Skip to content

Commit

Permalink
Replace apitools javadoc tags with annotations
Browse files Browse the repository at this point in the history
Identified in
eclipse-platform/eclipse.platform.releng.aggregator#1655
that so far annotations were missing in generated .api_description
files.
Local build shown that everything is still picked up with annotations
only, even the one that wasn't before (LazyResourceManager) and caused
this issue.
  • Loading branch information
akurtakov committed Dec 11, 2023
1 parent 09cad27 commit 07f7732
Show file tree
Hide file tree
Showing 49 changed files with 125 additions and 76 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,15 @@
package org.eclipse.jface.action;

import org.eclipse.core.runtime.Assert;
import org.eclipse.pde.api.tools.annotations.NoExtend;

/**
* Abstract superclass for group marker classes.
* <p>
* This class is not intended to be subclassed outside the framework.
* </p>
* @noextend This class is not intended to be subclassed by clients.
*/
@NoExtend
public abstract class AbstractGroupMarker extends ContributionItem {
/**
* Constructor for use by subclasses.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import org.eclipse.jface.util.Policy;
import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.jface.util.Util;
import org.eclipse.pde.api.tools.annotations.NoExtend;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.graphics.Point;
Expand All @@ -51,8 +52,8 @@
* <p>
* This class may be instantiated; it is not intended to be subclassed.
* </p>
* @noextend This class is not intended to be subclassed by clients.
*/
@NoExtend
public class ActionContributionItem extends ContributionItem {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
*******************************************************************************/
package org.eclipse.jface.action;

import org.eclipse.pde.api.tools.annotations.NoExtend;

/**
* A group marker is a special kind of contribution item denoting
* the beginning of a group. These groups are used to structure
Expand All @@ -23,8 +25,8 @@
* This class may be instantiated; it is not intended to be
* subclassed outside the framework.
* </p>
* @noextend This class is not intended to be subclassed by clients.
*/
@NoExtend
public class GroupMarker extends AbstractGroupMarker {
/**
* Create a new group marker with the given name.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import org.eclipse.core.commands.IHandlerAttributes;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.pde.api.tools.annotations.NoImplement;
import org.eclipse.swt.events.HelpListener;
import org.eclipse.swt.widgets.Event;

Expand All @@ -42,8 +43,8 @@
* </p>
*
* @see Action
* @noimplement This interface is not intended to be implemented by clients.
*/
@NoImplement
public interface IAction {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

package org.eclipse.jface.action;

import org.eclipse.pde.api.tools.annotations.NoImplement;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.CoolBar;
import org.eclipse.swt.widgets.Menu;
Expand All @@ -37,8 +38,8 @@
* </p>
*
* @see IContributionManager
* @noimplement This interface is not intended to be implemented by clients.
*/
@NoImplement
public interface IContributionItem {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
*******************************************************************************/
package org.eclipse.jface.action;

import org.eclipse.pde.api.tools.annotations.NoImplement;

/**
* This interface is used by instances of <code>IContributionItem</code>
* to determine if the values for certain properties have been overriden
Expand All @@ -23,8 +25,8 @@
* </p>
*
* @since 2.0
* @noimplement This interface is not intended to be implemented by clients.
*/
@NoImplement
public interface IContributionManagerOverrides {
/**
* Id for the enabled property. Value is <code>"enabled"</code>.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
*******************************************************************************/
package org.eclipse.jface.action;

import org.eclipse.pde.api.tools.annotations.NoImplement;

/**
* The <code>IMenuManager</code> interface provides protocol for managing
* contributions to a menu bar and its sub menus. An <code>IMenuManager</code>
Expand All @@ -26,9 +28,8 @@
* This package provides a concrete menu manager implementation,
* {@link MenuManager MenuManager}.
* </p>
*
* @noimplement This interface is not intended to be implemented by clients.
*/
@NoImplement
public interface IMenuManager extends IContributionManager, IContributionItem {
/**
* Adds a menu listener to this menu.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
*******************************************************************************/
package org.eclipse.jface.action;

import org.eclipse.pde.api.tools.annotations.NoExtend;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.MenuItem;
Expand All @@ -28,8 +29,8 @@
* This class may be instantiated; it is not intended to be
* subclassed outside the framework.
* </p>
* @noextend This class is not intended to be subclassed by clients.
*/
@NoExtend
public class Separator extends AbstractGroupMarker {
/**
* Creates a separator which does not start a new group.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
*******************************************************************************/
package org.eclipse.jface.action;

import org.eclipse.pde.api.tools.annotations.NoExtend;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.CoolBar;
import org.eclipse.swt.widgets.Menu;
Expand All @@ -25,8 +26,8 @@
* <p>
* This class is not intended to be subclassed.
* </p>
* @noextend This class is not intended to be subclassed by clients.
*/
@NoExtend
public class SubContributionItem implements IContributionItem {
/**
* The visibility of the item.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.internal.provisional.action.IToolBarContributionItem;
import org.eclipse.jface.util.Policy;
import org.eclipse.pde.api.tools.annotations.NoExtend;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.DisposeEvent;
import org.eclipse.swt.events.SelectionEvent;
Expand All @@ -46,8 +47,8 @@
* </p>
*
* @since 3.0
* @noextend This class is not intended to be subclassed by clients.
*/
@NoExtend
public class ToolBarContributionItem extends ContributionItem implements IToolBarContributionItem {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import javax.xml.parsers.ParserConfigurationException;

import org.eclipse.jface.internal.XmlProcessorFactoryJFace;
import org.eclipse.pde.api.tools.annotations.NoExtend;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
Expand Down Expand Up @@ -70,9 +71,8 @@
* settings.save("c:\\temp\\test\\dialog.xml");
* </code>
* </pre>
* @noextend This class is not intended to be subclassed by clients.
*/

@NoExtend
public class DialogSettings implements IDialogSettings {
// The name of the DialogSettings.
private String name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
*******************************************************************************/
package org.eclipse.jface.dialogs;

import org.eclipse.pde.api.tools.annotations.NoImplement;

/**
* IDialogLabelKeys contains publicly accessible keys to the common dialog
* labels used throughout JFace. <code>IDialogConstants</code> provides
Expand All @@ -24,10 +26,8 @@
*
* @see IDialogConstants
* @since 3.7
*
* @noimplement This interface is not intended to be implemented by clients.
*/
@NoImplement
public interface IDialogLabelKeys {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

import org.eclipse.core.runtime.ListenerList;
import org.eclipse.jface.util.Util;
import org.eclipse.pde.api.tools.annotations.NoExtend;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.ScrolledComposite;
import org.eclipse.swt.events.DisposeListener;
Expand Down Expand Up @@ -75,9 +76,8 @@
*
* @see FieldDecoration
* @see FieldDecorationRegistry
*
* @noextend This class is not intended to be subclassed by clients.
*/
@NoExtend
public class ControlDecoration {
/**
* Debug flag for tracing
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@

import org.eclipse.jface.action.IMenuListener2;
import org.eclipse.jface.action.MenuManager;
import org.eclipse.pde.api.tools.annotations.NoInstantiate;
import org.eclipse.pde.api.tools.annotations.NoReference;

/**
* @since 3.8.100
* @noinstantiate This class is not intended to be instantiated by clients.
* @noreference This class is not intended to be referenced by clients.
*/
@NoInstantiate
@NoReference
public final class MenuManagerEventHelper {

private IMenuListener2 showHelper;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
import org.eclipse.core.runtime.ProgressMonitorWrapper;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.util.Policy;
import org.eclipse.pde.api.tools.annotations.NoExtend;
import org.eclipse.pde.api.tools.annotations.NoInstantiate;
import org.eclipse.swt.widgets.Display;

/**
Expand All @@ -35,9 +37,9 @@
* <p>
* This class is not intended to be subclassed.
* </p>
* @noinstantiate This class is not intended to be instantiated by clients.
* @noextend This class is not intended to be subclassed by clients.
*/
@NoInstantiate
@NoExtend
public class ModalContext {
/**
* Indicates whether ModalContext is in debug mode; <code>false</code> by
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.jface.resource.StringConverter;
import org.eclipse.pde.api.tools.annotations.NoInstantiate;
import org.eclipse.swt.SWTException;
import org.eclipse.swt.graphics.FontData;
import org.eclipse.swt.graphics.Point;
Expand Down Expand Up @@ -46,9 +47,8 @@
* </p>
* Note: touching this class has the side effect of creating a display (static
* initializer).
*
* @noinstantiate This class is not intended to be instantiated by clients.
*/
@NoInstantiate
public class PreferenceConverter {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.jface.util.SafeRunnable;
import org.eclipse.pde.api.tools.annotations.NoExtend;

/**
* A concrete preference store implementation based on an internal
Expand All @@ -40,8 +41,8 @@
* </p>
*
* @see IPreferenceStore
* @noextend This class is not intended to be subclassed by clients.
*/
@NoExtend
public class PreferenceStore extends EventManager implements
IPersistentPreferenceStore {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import java.util.Set;

import org.eclipse.core.runtime.Assert;
import org.eclipse.pde.api.tools.annotations.NoExtend;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.RGB;
import org.eclipse.swt.widgets.Display;
Expand All @@ -44,8 +45,8 @@
* </p>
*
* @since 3.0
* @noextend This class is not intended to be subclassed by clients.
*/
@NoExtend
public class ColorRegistry extends ResourceRegistry {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import java.util.Objects;
import java.util.function.ToIntFunction;

import org.eclipse.pde.api.tools.annotations.NoExtend;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.ImageData;
import org.eclipse.swt.graphics.ImageDataProvider;
Expand Down Expand Up @@ -48,8 +49,8 @@ public abstract class CompositeImageDescriptor extends ImageDescriptor {
* @see #createCachedImageDataProvider(ImageDescriptor)
*
* @since 3.13
* @noextend This class is not intended to be subclassed by clients.
*/
@NoExtend
protected abstract class CachedImageDataProvider implements ImageDataProvider {
/**
* Returns the {@link ImageData#width} in points. This method must only
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.util.Policy;
import org.eclipse.jface.util.Util;
import org.eclipse.pde.api.tools.annotations.NoExtend;
import org.eclipse.swt.SWT;
import org.eclipse.swt.SWTException;
import org.eclipse.swt.graphics.Font;
Expand Down Expand Up @@ -58,8 +59,8 @@
* </p>
*
* Since 3.0 this class extends ResourceRegistry.
* @noextend This class is not intended to be subclassed by clients.
*/
@NoExtend
public class FontRegistry extends ResourceRegistry {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.pde.api.tools.annotations.NoExtend;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Device;
import org.eclipse.swt.graphics.Image;
Expand All @@ -44,8 +45,8 @@
* Unlike the FontRegistry, it is an error to replace images. As a result
* there are no events that fire when values are changed in the registry
* </p>
* @noextend This class is not intended to be subclassed by clients.
*/
@NoExtend
public class ImageRegistry {
/**
* display used when getting images
Expand Down
Loading

0 comments on commit 07f7732

Please sign in to comment.