Skip to content

Commit 3362695

Browse files
HannesWellakurtakov
authored andcommitted
Tag API leaking Windows OLE methods/fields as non-api
1 parent 079d2a9 commit 3362695

File tree

5 files changed

+69
-58
lines changed

5 files changed

+69
-58
lines changed

binaries/org.eclipse.swt.win32.win32.x86_64/.settings/.api_filters

Lines changed: 41 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,128 +1,111 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
22
<component id="org.eclipse.swt.win32.win32.x86_64" version="2">
33
<resource path="Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleAutomation.java" type="org.eclipse.swt.ole.win32.OleAutomation">
4-
<filter id="643842064">
4+
<filter id="338944126">
55
<message_arguments>
6-
<message_argument value="TYPEATTR"/>
7-
<message_argument value="OleAutomation"/>
6+
<message_argument value="org.eclipse.swt.ole.win32.OleAutomation"/>
87
<message_argument value="getTypeInfoAttributes()"/>
98
</message_arguments>
109
</filter>
1110
</resource>
1211
<resource path="Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleClientSite.java" type="org.eclipse.swt.ole.win32.OleClientSite">
13-
<filter id="627060751">
12+
<filter id="338940029">
1413
<message_arguments>
15-
<message_argument value="GUID"/>
16-
<message_argument value="OleClientSite"/>
14+
<message_argument value="org.eclipse.swt.ole.win32.OleClientSite"/>
1715
<message_argument value="appClsid"/>
1816
</message_arguments>
1917
</filter>
20-
<filter id="627060751">
18+
<filter id="338940029">
2119
<message_arguments>
22-
<message_argument value="IOleCommandTarget"/>
23-
<message_argument value="OleClientSite"/>
24-
<message_argument value="objIOleCommandTarget"/>
20+
<message_argument value="org.eclipse.swt.ole.win32.OleClientSite"/>
21+
<message_argument value="objDocumentView"/>
2522
</message_arguments>
2623
</filter>
27-
<filter id="627060751">
24+
<filter id="338940029">
2825
<message_arguments>
29-
<message_argument value="IOleDocumentView"/>
30-
<message_argument value="OleClientSite"/>
31-
<message_argument value="objDocumentView"/>
26+
<message_argument value="org.eclipse.swt.ole.win32.OleClientSite"/>
27+
<message_argument value="objIOleCommandTarget"/>
3228
</message_arguments>
3329
</filter>
34-
<filter id="627060751">
30+
<filter id="338940029">
3531
<message_arguments>
36-
<message_argument value="IOleInPlaceObject"/>
37-
<message_argument value="OleClientSite"/>
32+
<message_argument value="org.eclipse.swt.ole.win32.OleClientSite"/>
3833
<message_argument value="objIOleInPlaceObject"/>
3934
</message_arguments>
4035
</filter>
41-
<filter id="627060751">
36+
<filter id="338940029">
4237
<message_arguments>
43-
<message_argument value="IOleObject"/>
44-
<message_argument value="OleClientSite"/>
38+
<message_argument value="org.eclipse.swt.ole.win32.OleClientSite"/>
4539
<message_argument value="objIOleObject"/>
4640
</message_arguments>
4741
</filter>
48-
<filter id="627060751">
49-
<message_arguments>
50-
<message_argument value="IStorage"/>
51-
<message_argument value="OleClientSite"/>
52-
<message_argument value="tempStorage"/>
53-
</message_arguments>
54-
</filter>
55-
<filter id="627060751">
42+
<filter id="338940029">
5643
<message_arguments>
57-
<message_argument value="IUnknown"/>
58-
<message_argument value="OleClientSite"/>
44+
<message_argument value="org.eclipse.swt.ole.win32.OleClientSite"/>
5945
<message_argument value="objIUnknown"/>
6046
</message_arguments>
6147
</filter>
62-
<filter id="627060751">
48+
<filter id="338940029">
6349
<message_arguments>
64-
<message_argument value="IViewObject2"/>
65-
<message_argument value="OleClientSite"/>
50+
<message_argument value="org.eclipse.swt.ole.win32.OleClientSite"/>
6651
<message_argument value="objIViewObject2"/>
6752
</message_arguments>
6853
</filter>
69-
<filter id="643842064">
54+
<filter id="338940029">
7055
<message_arguments>
71-
<message_argument value="GUID"/>
72-
<message_argument value="OleClientSite"/>
73-
<message_argument value="getClassID(String)"/>
56+
<message_argument value="org.eclipse.swt.ole.win32.OleClientSite"/>
57+
<message_argument value="tempStorage"/>
7458
</message_arguments>
7559
</filter>
76-
<filter id="643842064">
60+
<filter id="338944126">
7761
<message_arguments>
78-
<message_argument value="IStorage"/>
79-
<message_argument value="OleClientSite"/>
62+
<message_argument value="org.eclipse.swt.ole.win32.OleClientSite"/>
8063
<message_argument value="createTempStorage()"/>
8164
</message_arguments>
8265
</filter>
66+
<filter id="338944126">
67+
<message_arguments>
68+
<message_argument value="org.eclipse.swt.ole.win32.OleClientSite"/>
69+
<message_argument value="getClassID(String)"/>
70+
</message_arguments>
71+
</filter>
8372
</resource>
8473
<resource path="Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleControlSite.java" type="org.eclipse.swt.ole.win32.OleControlSite">
85-
<filter id="643846161">
74+
<filter id="338944126">
8675
<message_arguments>
87-
<message_argument value="GUID"/>
88-
<message_argument value="OleControlSite"/>
76+
<message_argument value="org.eclipse.swt.ole.win32.OleControlSite"/>
8977
<message_argument value="getLicenseInfo(GUID)"/>
9078
</message_arguments>
9179
</filter>
92-
<filter id="643846161">
80+
<filter id="338944126">
9381
<message_arguments>
94-
<message_argument value="GUID"/>
95-
<message_argument value="OleControlSite"/>
82+
<message_argument value="org.eclipse.swt.ole.win32.OleControlSite"/>
9683
<message_argument value="removeEventListener(OleAutomation, GUID, int, OleListener)"/>
9784
</message_arguments>
9885
</filter>
9986
</resource>
10087
<resource path="Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/Variant.java" type="org.eclipse.swt.ole.win32.Variant">
101-
<filter id="643842064">
88+
<filter id="338944126">
10289
<message_arguments>
103-
<message_argument value="IDispatch"/>
104-
<message_argument value="Variant"/>
90+
<message_argument value="org.eclipse.swt.ole.win32.Variant"/>
10591
<message_argument value="getDispatch()"/>
10692
</message_arguments>
10793
</filter>
108-
<filter id="643842064">
94+
<filter id="338944126">
10995
<message_arguments>
110-
<message_argument value="IUnknown"/>
111-
<message_argument value="Variant"/>
96+
<message_argument value="org.eclipse.swt.ole.win32.Variant"/>
11297
<message_argument value="getUnknown()"/>
11398
</message_arguments>
11499
</filter>
115-
<filter id="643850349">
100+
<filter id="338948223">
116101
<message_arguments>
117-
<message_argument value="IDispatch"/>
118-
<message_argument value="Variant"/>
102+
<message_argument value="org.eclipse.swt.ole.win32.Variant"/>
119103
<message_argument value="Variant(IDispatch)"/>
120104
</message_arguments>
121105
</filter>
122-
<filter id="643850349">
106+
<filter id="338948223">
123107
<message_arguments>
124-
<message_argument value="IUnknown"/>
125-
<message_argument value="Variant"/>
108+
<message_argument value="org.eclipse.swt.ole.win32.Variant"/>
126109
<message_argument value="Variant(IUnknown)"/>
127110
</message_arguments>
128111
</filter>

bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleAutomation.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,7 @@ public OleFunctionDescription getFunctionDescription(int index) {
347347
* the member descriptions and attributes of the type.
348348
*
349349
* @return the type info of the receiver
350+
* @noreference This method is not intended to be referenced by clients.
350351
*/
351352
public TYPEATTR getTypeInfoAttributes() {
352353
if (objITypeInfo == null) return null;

bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleClientSite.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ public class OleClientSite extends Composite {
5555
private COMObject iOleInPlaceSite;
5656
private COMObject iOleDocumentSite;
5757

58+
/** @noreference This field is not intended to be referenced by clients. */
5859
protected GUID appClsid;
5960
private GUID objClsid;
6061
private int refCount;
@@ -63,14 +64,21 @@ public class OleClientSite extends Composite {
6364
protected OleFrame frame;
6465

6566
// Access to the embedded/linked Ole Object
67+
/** @noreference This field is not intended to be referenced by clients. */
6668
protected IUnknown objIUnknown;
69+
/** @noreference This field is not intended to be referenced by clients. */
6770
protected IOleObject objIOleObject;
71+
/** @noreference This field is not intended to be referenced by clients. */
6872
protected IViewObject2 objIViewObject2;
73+
/** @noreference This field is not intended to be referenced by clients. */
6974
protected IOleInPlaceObject objIOleInPlaceObject;
75+
/** @noreference This field is not intended to be referenced by clients. */
7076
protected IOleCommandTarget objIOleCommandTarget;
77+
/** @noreference This field is not intended to be referenced by clients. */
7178
protected IOleDocumentView objDocumentView;
7279

7380
// Related storage information
81+
/** @noreference This field is not intended to be referenced by clients. */
7482
protected IStorage tempStorage; // IStorage interface of the receiver
7583

7684
// Internal state and style information
@@ -578,6 +586,11 @@ protected void createCOMInterfaces() {
578586
public long method3(long[] args) {return ActivateMe(args[0]);}
579587
};
580588
}
589+
590+
/**
591+
* @noreference This method is not intended to be referenced by clients.
592+
* @nooverride This method is not intended to be re-implemented or extended by clients.
593+
*/
581594
protected IStorage createTempStorage() {
582595
long[] tempStorage = new long[1];
583596
int grfMode = COM.STGM_READWRITE | COM.STGM_SHARE_EXCLUSIVE | COM.STGM_DELETEONRELEASE;
@@ -701,6 +714,10 @@ IDispatch getAutomationObject() {
701714
return null;
702715
return new IDispatch(ppvObject[0]);
703716
}
717+
/**
718+
* @noreference This method is not intended to be referenced by clients.
719+
* @nooverride This method is not intended to be re-implemented or extended by clients.
720+
*/
704721
protected GUID getClassID(String clientName) {
705722
// create a GUID struct to hold the result
706723
GUID guid = new GUID();

bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleControlSite.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -574,6 +574,10 @@ public Color getForeground () {
574574

575575
return super.getForeground();
576576
}
577+
/**
578+
* @noreference This method is not intended to be referenced by clients.
579+
* @nooverride This method is not intended to be re-implemented or extended by clients.
580+
*/
577581
protected long getLicenseInfo(GUID clsid) {
578582
long[] ppvObject = new long[1];
579583
if (COM.CoGetClassObject(clsid, COM.CLSCTX_INPROC_HANDLER
@@ -841,6 +845,8 @@ public void removeEventListener(int eventID, OleListener listener) {
841845
* @exception IllegalArgumentException <ul>
842846
* <li>ERROR_NULL_ARGUMENT when listener is null</li>
843847
* </ul>
848+
* @noreference This method is not intended to be referenced by clients.
849+
* @nooverride This method is not intended to be re-implemented or extended by clients.
844850
*/
845851
@Deprecated
846852
public void removeEventListener(OleAutomation automation, GUID guid, int eventID, OleListener listener) {

bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/Variant.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ public Variant(OleAutomation automation) {
171171
* @since 2.0
172172
*
173173
* @param idispatch the IDispatch object that this Variant represents
174+
* @noreference This constructor is not intended to be referenced by clients.
174175
*/
175176
public Variant(IDispatch idispatch) {
176177
type = COM.VT_DISPATCH;
@@ -183,6 +184,7 @@ public Variant(IDispatch idispatch) {
183184
* this Variant.
184185
*
185186
* @param unknown the IUnknown object that this Variant represents
187+
* @noreference This constructor is not intended to be referenced by clients.
186188
*/
187189
public Variant(IUnknown unknown) {
188190
type = COM.VT_UNKNOWN;
@@ -305,6 +307,7 @@ public OleAutomation getAutomation() {
305307
* @exception SWTException <ul>
306308
* <li>ERROR_CANNOT_CHANGE_VARIANT_TYPE when type of Variant can not be coerced into an IDispatch object</li>
307309
* </ul>
310+
* @noreference This method is not intended to be referenced by clients.
308311
*/
309312
public IDispatch getDispatch() {
310313
if (type == COM.VT_EMPTY) {
@@ -801,6 +804,7 @@ public short getType() {
801804
* <li>ERROR_CANNOT_CHANGE_VARIANT_TYPE when type of Variant can not be coerced into
802805
* an IUnknown object</li>
803806
* </ul>
807+
* @noreference This method is not intended to be referenced by clients.
804808
*/
805809
public IUnknown getUnknown() {
806810
if (type == COM.VT_EMPTY) {

0 commit comments

Comments
 (0)