Skip to content

Commit 977394d

Browse files
HannesWellakurtakov
authored andcommitted
Tag API leaking Windows OLE methods/fields as non-api
1 parent 182518f commit 977394d

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
@@ -249,128 +249,111 @@
249249
</filter>
250250
</resource>
251251
<resource path="Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleAutomation.java" type="org.eclipse.swt.ole.win32.OleAutomation">
252-
<filter id="643842064">
252+
<filter id="338944126">
253253
<message_arguments>
254-
<message_argument value="TYPEATTR"/>
255-
<message_argument value="OleAutomation"/>
254+
<message_argument value="org.eclipse.swt.ole.win32.OleAutomation"/>
256255
<message_argument value="getTypeInfoAttributes()"/>
257256
</message_arguments>
258257
</filter>
259258
</resource>
260259
<resource path="Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleClientSite.java" type="org.eclipse.swt.ole.win32.OleClientSite">
261-
<filter id="627060751">
260+
<filter id="338940029">
262261
<message_arguments>
263-
<message_argument value="GUID"/>
264-
<message_argument value="OleClientSite"/>
262+
<message_argument value="org.eclipse.swt.ole.win32.OleClientSite"/>
265263
<message_argument value="appClsid"/>
266264
</message_arguments>
267265
</filter>
268-
<filter id="627060751">
266+
<filter id="338940029">
269267
<message_arguments>
270-
<message_argument value="IOleCommandTarget"/>
271-
<message_argument value="OleClientSite"/>
272-
<message_argument value="objIOleCommandTarget"/>
268+
<message_argument value="org.eclipse.swt.ole.win32.OleClientSite"/>
269+
<message_argument value="objDocumentView"/>
273270
</message_arguments>
274271
</filter>
275-
<filter id="627060751">
272+
<filter id="338940029">
276273
<message_arguments>
277-
<message_argument value="IOleDocumentView"/>
278-
<message_argument value="OleClientSite"/>
279-
<message_argument value="objDocumentView"/>
274+
<message_argument value="org.eclipse.swt.ole.win32.OleClientSite"/>
275+
<message_argument value="objIOleCommandTarget"/>
280276
</message_arguments>
281277
</filter>
282-
<filter id="627060751">
278+
<filter id="338940029">
283279
<message_arguments>
284-
<message_argument value="IOleInPlaceObject"/>
285-
<message_argument value="OleClientSite"/>
280+
<message_argument value="org.eclipse.swt.ole.win32.OleClientSite"/>
286281
<message_argument value="objIOleInPlaceObject"/>
287282
</message_arguments>
288283
</filter>
289-
<filter id="627060751">
284+
<filter id="338940029">
290285
<message_arguments>
291-
<message_argument value="IOleObject"/>
292-
<message_argument value="OleClientSite"/>
286+
<message_argument value="org.eclipse.swt.ole.win32.OleClientSite"/>
293287
<message_argument value="objIOleObject"/>
294288
</message_arguments>
295289
</filter>
296-
<filter id="627060751">
297-
<message_arguments>
298-
<message_argument value="IStorage"/>
299-
<message_argument value="OleClientSite"/>
300-
<message_argument value="tempStorage"/>
301-
</message_arguments>
302-
</filter>
303-
<filter id="627060751">
290+
<filter id="338940029">
304291
<message_arguments>
305-
<message_argument value="IUnknown"/>
306-
<message_argument value="OleClientSite"/>
292+
<message_argument value="org.eclipse.swt.ole.win32.OleClientSite"/>
307293
<message_argument value="objIUnknown"/>
308294
</message_arguments>
309295
</filter>
310-
<filter id="627060751">
296+
<filter id="338940029">
311297
<message_arguments>
312-
<message_argument value="IViewObject2"/>
313-
<message_argument value="OleClientSite"/>
298+
<message_argument value="org.eclipse.swt.ole.win32.OleClientSite"/>
314299
<message_argument value="objIViewObject2"/>
315300
</message_arguments>
316301
</filter>
317-
<filter id="643842064">
302+
<filter id="338940029">
318303
<message_arguments>
319-
<message_argument value="GUID"/>
320-
<message_argument value="OleClientSite"/>
321-
<message_argument value="getClassID(String)"/>
304+
<message_argument value="org.eclipse.swt.ole.win32.OleClientSite"/>
305+
<message_argument value="tempStorage"/>
322306
</message_arguments>
323307
</filter>
324-
<filter id="643842064">
308+
<filter id="338944126">
325309
<message_arguments>
326-
<message_argument value="IStorage"/>
327-
<message_argument value="OleClientSite"/>
310+
<message_argument value="org.eclipse.swt.ole.win32.OleClientSite"/>
328311
<message_argument value="createTempStorage()"/>
329312
</message_arguments>
330313
</filter>
314+
<filter id="338944126">
315+
<message_arguments>
316+
<message_argument value="org.eclipse.swt.ole.win32.OleClientSite"/>
317+
<message_argument value="getClassID(String)"/>
318+
</message_arguments>
319+
</filter>
331320
</resource>
332321
<resource path="Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleControlSite.java" type="org.eclipse.swt.ole.win32.OleControlSite">
333-
<filter id="643846161">
322+
<filter id="338944126">
334323
<message_arguments>
335-
<message_argument value="GUID"/>
336-
<message_argument value="OleControlSite"/>
324+
<message_argument value="org.eclipse.swt.ole.win32.OleControlSite"/>
337325
<message_argument value="getLicenseInfo(GUID)"/>
338326
</message_arguments>
339327
</filter>
340-
<filter id="643846161">
328+
<filter id="338944126">
341329
<message_arguments>
342-
<message_argument value="GUID"/>
343-
<message_argument value="OleControlSite"/>
330+
<message_argument value="org.eclipse.swt.ole.win32.OleControlSite"/>
344331
<message_argument value="removeEventListener(OleAutomation, GUID, int, OleListener)"/>
345332
</message_arguments>
346333
</filter>
347334
</resource>
348335
<resource path="Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/Variant.java" type="org.eclipse.swt.ole.win32.Variant">
349-
<filter id="643842064">
336+
<filter id="338944126">
350337
<message_arguments>
351-
<message_argument value="IDispatch"/>
352-
<message_argument value="Variant"/>
338+
<message_argument value="org.eclipse.swt.ole.win32.Variant"/>
353339
<message_argument value="getDispatch()"/>
354340
</message_arguments>
355341
</filter>
356-
<filter id="643842064">
342+
<filter id="338944126">
357343
<message_arguments>
358-
<message_argument value="IUnknown"/>
359-
<message_argument value="Variant"/>
344+
<message_argument value="org.eclipse.swt.ole.win32.Variant"/>
360345
<message_argument value="getUnknown()"/>
361346
</message_arguments>
362347
</filter>
363-
<filter id="643850349">
348+
<filter id="338948223">
364349
<message_arguments>
365-
<message_argument value="IDispatch"/>
366-
<message_argument value="Variant"/>
350+
<message_argument value="org.eclipse.swt.ole.win32.Variant"/>
367351
<message_argument value="Variant(IDispatch)"/>
368352
</message_arguments>
369353
</filter>
370-
<filter id="643850349">
354+
<filter id="338948223">
371355
<message_arguments>
372-
<message_argument value="IUnknown"/>
373-
<message_argument value="Variant"/>
356+
<message_argument value="org.eclipse.swt.ole.win32.Variant"/>
374357
<message_argument value="Variant(IUnknown)"/>
375358
</message_arguments>
376359
</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)