Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix API warnings in macosx fragments #1111

Merged
merged 1 commit into from
Mar 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
110 changes: 102 additions & 8 deletions binaries/org.eclipse.swt.cocoa.macosx.aarch64/.settings/.api_filters
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,108 @@
</message_arguments>
</filter>
</resource>
<resource path="Eclipse SWT/cocoa/org/eclipse/swt/graphics/GCData.java" type="org.eclipse.swt.graphics.GCData">
HannesWell marked this conversation as resolved.
Show resolved Hide resolved
<filter id="338940029">
<message_arguments>
<message_argument value="org.eclipse.swt.graphics.GCData"/>
<message_argument value="bg"/>
</message_arguments>
</filter>
<filter id="338940029">
<message_arguments>
<message_argument value="org.eclipse.swt.graphics.GCData"/>
<message_argument value="clipPath"/>
</message_arguments>
</filter>
<filter id="338940029">
<message_arguments>
<message_argument value="org.eclipse.swt.graphics.GCData"/>
<message_argument value="fg"/>
</message_arguments>
</filter>
<filter id="338940029">
<message_arguments>
<message_argument value="org.eclipse.swt.graphics.GCData"/>
<message_argument value="flippedContext"/>
</message_arguments>
</filter>
<filter id="338940029">
<message_arguments>
<message_argument value="org.eclipse.swt.graphics.GCData"/>
<message_argument value="inverseTransform"/>
</message_arguments>
</filter>
<filter id="338940029">
<message_arguments>
<message_argument value="org.eclipse.swt.graphics.GCData"/>
<message_argument value="layoutManager"/>
</message_arguments>
</filter>
<filter id="338940029">
<message_arguments>
<message_argument value="org.eclipse.swt.graphics.GCData"/>
<message_argument value="paintRect"/>
</message_arguments>
</filter>
<filter id="338940029">
<message_arguments>
<message_argument value="org.eclipse.swt.graphics.GCData"/>
<message_argument value="path"/>
</message_arguments>
</filter>
<filter id="338940029">
<message_arguments>
<message_argument value="org.eclipse.swt.graphics.GCData"/>
<message_argument value="size"/>
</message_arguments>
</filter>
<filter id="338940029">
<message_arguments>
<message_argument value="org.eclipse.swt.graphics.GCData"/>
<message_argument value="textContainer"/>
</message_arguments>
</filter>
<filter id="338940029">
<message_arguments>
<message_argument value="org.eclipse.swt.graphics.GCData"/>
<message_argument value="textStorage"/>
</message_arguments>
</filter>
<filter id="338940029">
<message_arguments>
<message_argument value="org.eclipse.swt.graphics.GCData"/>
<message_argument value="transform"/>
</message_arguments>
</filter>
<filter id="338940029">
<message_arguments>
<message_argument value="org.eclipse.swt.graphics.GCData"/>
<message_argument value="view"/>
</message_arguments>
</filter>
<filter id="338940029">
<message_arguments>
<message_argument value="org.eclipse.swt.graphics.GCData"/>
<message_argument value="visiblePath"/>
</message_arguments>
</filter>
</resource>
<resource path="Eclipse SWT/cocoa/org/eclipse/swt/widgets/Composite.java" type="org.eclipse.swt.widgets.Composite">
<filter id="576778288">
<message_arguments>
<message_argument value="Scrollable"/>
<message_argument value="Composite"/>
</message_arguments>
</filter>
</resource>
Comment on lines +337 to +344
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think APItools are too strict here.
For classes in the same bundle I think it makes sense to permit extending classes tagged with @noextend by default.

<resource path="Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java" type="org.eclipse.swt.widgets.Display">
<filter id="336744520">
<message_arguments>
<message_argument value="@noextend"/>
<message_argument value="org.eclipse.swt.widgets.Display"/>
</message_arguments>
</filter>
</resource>
<resource path="Eclipse SWT/common/org/eclipse/swt/events/ArmListener.java" type="org.eclipse.swt.events.ArmListener">
<filter id="576720909">
<message_arguments>
Expand Down Expand Up @@ -448,14 +550,6 @@
</message_arguments>
</filter>
</resource>
<resource path="Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java" type="org.eclipse.swt.widgets.Display">
<filter id="336744520">
<message_arguments>
<message_argument value="@noextend"/>
<message_argument value="org.eclipse.swt.widgets.Display"/>
</message_arguments>
</filter>
</resource>
<resource path="Eclipse SWT/common/org/eclipse/swt/widgets/TypedListener.java" type="org.eclipse.swt.widgets.TypedListener">
<filter comment="Class declared as internal in its JavaDoc since ever." id="336744520">
<message_arguments>
Expand Down
110 changes: 102 additions & 8 deletions binaries/org.eclipse.swt.cocoa.macosx.x86_64/.settings/.api_filters
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,108 @@
</message_arguments>
</filter>
</resource>
<resource path="Eclipse SWT/cocoa/org/eclipse/swt/graphics/GCData.java" type="org.eclipse.swt.graphics.GCData">
<filter id="338940029">
<message_arguments>
<message_argument value="org.eclipse.swt.graphics.GCData"/>
<message_argument value="bg"/>
</message_arguments>
</filter>
<filter id="338940029">
<message_arguments>
<message_argument value="org.eclipse.swt.graphics.GCData"/>
<message_argument value="clipPath"/>
</message_arguments>
</filter>
<filter id="338940029">
<message_arguments>
<message_argument value="org.eclipse.swt.graphics.GCData"/>
<message_argument value="fg"/>
</message_arguments>
</filter>
<filter id="338940029">
<message_arguments>
<message_argument value="org.eclipse.swt.graphics.GCData"/>
<message_argument value="flippedContext"/>
</message_arguments>
</filter>
<filter id="338940029">
<message_arguments>
<message_argument value="org.eclipse.swt.graphics.GCData"/>
<message_argument value="inverseTransform"/>
</message_arguments>
</filter>
<filter id="338940029">
<message_arguments>
<message_argument value="org.eclipse.swt.graphics.GCData"/>
<message_argument value="layoutManager"/>
</message_arguments>
</filter>
<filter id="338940029">
<message_arguments>
<message_argument value="org.eclipse.swt.graphics.GCData"/>
<message_argument value="paintRect"/>
</message_arguments>
</filter>
<filter id="338940029">
<message_arguments>
<message_argument value="org.eclipse.swt.graphics.GCData"/>
<message_argument value="path"/>
</message_arguments>
</filter>
<filter id="338940029">
<message_arguments>
<message_argument value="org.eclipse.swt.graphics.GCData"/>
<message_argument value="size"/>
</message_arguments>
</filter>
<filter id="338940029">
<message_arguments>
<message_argument value="org.eclipse.swt.graphics.GCData"/>
<message_argument value="textContainer"/>
</message_arguments>
</filter>
<filter id="338940029">
<message_arguments>
<message_argument value="org.eclipse.swt.graphics.GCData"/>
<message_argument value="textStorage"/>
</message_arguments>
</filter>
<filter id="338940029">
<message_arguments>
<message_argument value="org.eclipse.swt.graphics.GCData"/>
<message_argument value="transform"/>
</message_arguments>
</filter>
<filter id="338940029">
<message_arguments>
<message_argument value="org.eclipse.swt.graphics.GCData"/>
<message_argument value="view"/>
</message_arguments>
</filter>
<filter id="338940029">
<message_arguments>
<message_argument value="org.eclipse.swt.graphics.GCData"/>
<message_argument value="visiblePath"/>
</message_arguments>
</filter>
</resource>
<resource path="Eclipse SWT/cocoa/org/eclipse/swt/widgets/Composite.java" type="org.eclipse.swt.widgets.Composite">
<filter id="576778288">
<message_arguments>
<message_argument value="Scrollable"/>
<message_argument value="Composite"/>
</message_arguments>
</filter>
</resource>
<resource path="Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java" type="org.eclipse.swt.widgets.Display">
<filter id="336744520">
<message_arguments>
<message_argument value="@noextend"/>
<message_argument value="org.eclipse.swt.widgets.Display"/>
</message_arguments>
</filter>
</resource>
<resource path="Eclipse SWT/common/org/eclipse/swt/events/ArmListener.java" type="org.eclipse.swt.events.ArmListener">
<filter id="576720909">
<message_arguments>
Expand Down Expand Up @@ -448,14 +550,6 @@
</message_arguments>
</filter>
</resource>
<resource path="Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java" type="org.eclipse.swt.widgets.Display">
<filter id="336744520">
<message_arguments>
<message_argument value="@noextend"/>
<message_argument value="org.eclipse.swt.widgets.Display"/>
</message_arguments>
</filter>
</resource>
<resource path="Eclipse SWT/common/org/eclipse/swt/widgets/TypedListener.java" type="org.eclipse.swt.widgets.TypedListener">
<filter comment="Class declared as internal in its JavaDoc since ever." id="336744520">
<message_arguments>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -789,6 +789,7 @@ id getColumnsAttribute(int childID) {
* </p>
*
* @noreference This method is not intended to be referenced by clients.
* @nooverride This method is not intended to be re-implemented or extended by clients.
*/
public id internal_accessibilityActionDescription(NSString action, int childID) {
NSString returnValue = NSString.string();
Expand Down Expand Up @@ -834,6 +835,7 @@ public id internal_accessibilityActionDescription(NSString action, int childID)
* </p>
*
* @noreference This method is not intended to be referenced by clients.
* @nooverride This method is not intended to be re-implemented or extended by clients.
*/
public NSArray internal_accessibilityActionNames(int childID) {
if (accessibleActionListenersSize() > 0) {
Expand Down Expand Up @@ -919,6 +921,7 @@ public NSArray internal_accessibilityActionNames(int childID) {
* </p>
*
* @noreference This method is not intended to be referenced by clients.
* @nooverride This method is not intended to be re-implemented or extended by clients.
*/
public boolean internal_accessibilityIsAttributeSettable(NSString attribute, int childID) {
if (accessibleTextExtendedListenersSize() > 0) {
Expand All @@ -944,6 +947,7 @@ public boolean internal_accessibilityIsAttributeSettable(NSString attribute, int
* </p>
*
* @noreference This method is not intended to be referenced by clients.
* @nooverride This method is not intended to be re-implemented or extended by clients.
*/
public NSArray internal_accessibilityAttributeNames(int childID) {
// The supported attribute set depends on the role played by the control.
Expand Down Expand Up @@ -1226,6 +1230,7 @@ public NSArray internal_accessibilityAttributeNames(int childID) {
* </p>
*
* @noreference This method is not intended to be referenced by clients.
* @nooverride This method is not intended to be re-implemented or extended by clients.
*/
public id internal_accessibilityAttributeValue(NSString attribute, int childID) {
if (attribute.isEqualToString(OS.NSAccessibilityRoleAttribute)) return getRoleAttribute(childID);
Expand Down Expand Up @@ -1285,6 +1290,7 @@ public id internal_accessibilityAttributeValue(NSString attribute, int childID)
* </p>
*
* @noreference This method is not intended to be referenced by clients.
* @nooverride This method is not intended to be re-implemented or extended by clients.
*/
public id internal_accessibilityAttributeValue_forParameter(NSString attribute, id parameter, int childID) {
if (attribute.isEqualToString(OS.NSAccessibilityStringForRangeParameterizedAttribute)) return getStringForRangeParameterizedAttribute(parameter, childID);
Expand Down Expand Up @@ -1312,6 +1318,7 @@ public id internal_accessibilityAttributeValue_forParameter(NSString attribute,
* </p>
*
* @noreference This method is not intended to be referenced by clients.
* @nooverride This method is not intended to be re-implemented or extended by clients.
*/
public id internal_accessibilityFocusedUIElement(int childID) {
AccessibleControlEvent event = new AccessibleControlEvent(this);
Expand Down Expand Up @@ -1352,6 +1359,7 @@ public id internal_accessibilityFocusedUIElement(int childID) {
* </p>
*
* @noreference This method is not intended to be referenced by clients.
* @nooverride This method is not intended to be re-implemented or extended by clients.
*/
public id internal_accessibilityHitTest(NSPoint point, int childID) {
AccessibleControlEvent event = new AccessibleControlEvent(this);
Expand Down Expand Up @@ -1422,6 +1430,7 @@ public boolean internal_accessibilityIsIgnored(int childID) {
* </p>
*
* @noreference This method is not intended to be referenced by clients.
* @nooverride This method is not intended to be re-implemented or extended by clients.
*/
public NSArray internal_accessibilityParameterizedAttributeNames(int childID) {
AccessibleControlEvent event = new AccessibleControlEvent(this);
Expand Down Expand Up @@ -1483,6 +1492,7 @@ public NSArray internal_accessibilityParameterizedAttributeNames(int childID) {
* </p>
*
* @noreference This method is not intended to be referenced by clients.
* @nooverride This method is not intended to be re-implemented or extended by clients.
*/
public boolean internal_accessibilityPerformAction(NSString action, int childID) {
String actionName = action.getString();
Expand Down Expand Up @@ -1528,6 +1538,7 @@ public boolean internal_accessibilityPerformAction(NSString action, int childID)
* </p>
*
* @noreference This method is not intended to be referenced by clients.
* @nooverride This method is not intended to be re-implemented or extended by clients.
*/
public void internal_accessibilitySetValue_forAttribute(id value, NSString attribute, int childId) {
if (attribute.isEqualToString(OS.NSAccessibilitySelectedTextRangeAttribute)) setSelectedTextRangeAttribute(value, childId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,30 @@ public final class GCData {
public int fillRule = SWT.FILL_EVEN_ODD;
public Image image;

/** @noreference This field is not intended to be referenced by clients. */
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should IMHO also be implied by the @noreference of this class respectively public non-api types should not be an issue.

public NSTextStorage textStorage;
/** @noreference This field is not intended to be referenced by clients. */
public NSLayoutManager layoutManager;
/** @noreference This field is not intended to be referenced by clients. */
public NSTextContainer textContainer;
/** @noreference This field is not intended to be referenced by clients. */
public NSColor fg, bg;
public double drawXOffset, drawYOffset;
/** @noreference This field is not intended to be referenced by clients. */
public NSRect paintRect;
/** @noreference This field is not intended to be referenced by clients. */
public NSBezierPath path;
/** @noreference This field is not intended to be referenced by clients. */
public NSAffineTransform transform, inverseTransform;
/** @noreference This field is not intended to be referenced by clients. */
public NSBezierPath clipPath, visiblePath;
public long visibleRgn;
/** @noreference This field is not intended to be referenced by clients. */
public NSView view;
/** @noreference This field is not intended to be referenced by clients. */
public NSSize size;
public Thread thread;
/** @noreference This field is not intended to be referenced by clients. */
public NSGraphicsContext flippedContext;
public boolean restoreContext;
}