Example usage for org.eclipse.jface.action IAction IAction

List of usage examples for org.eclipse.jface.action IAction IAction

Introduction

In this page you can find the example usage for org.eclipse.jface.action IAction IAction.

Prototype

IAction

Source Link

Usage

From source file:net.refractions.udig.project.ui.internal.tool.display.ToolManager.java

License:Open Source License

public IAction getToolAction(String toolID, String categoryID) {
    final IAction tool = getToolInteral(toolID, categoryID);

    if (tool == null)
        return null;

    return new IAction() {
        IAction wrapped = tool;/* w w w  .j a  v  a2s.com*/

        public void addPropertyChangeListener(IPropertyChangeListener listener) {
            wrapped.addPropertyChangeListener(listener);
        }

        public int getAccelerator() {
            return wrapped.getAccelerator();
        }

        public String getActionDefinitionId() {
            return wrapped.getActionDefinitionId();
        }

        public String getDescription() {
            return wrapped.getDescription();
        }

        public ImageDescriptor getDisabledImageDescriptor() {
            return wrapped.getDisabledImageDescriptor();
        }

        public HelpListener getHelpListener() {
            return wrapped.getHelpListener();
        }

        public ImageDescriptor getHoverImageDescriptor() {
            return wrapped.getHoverImageDescriptor();
        }

        public String getId() {
            return wrapped.getId();
        }

        public ImageDescriptor getImageDescriptor() {
            return wrapped.getImageDescriptor();
        }

        public IMenuCreator getMenuCreator() {
            return wrapped.getMenuCreator();
        }

        public int getStyle() {
            return wrapped.getStyle();
        }

        public String getText() {
            return wrapped.getText();
        }

        public String getToolTipText() {
            return wrapped.getToolTipText();
        }

        public boolean isChecked() {
            return wrapped.isChecked();
        }

        public boolean isEnabled() {
            return wrapped.isEnabled();
        }

        public boolean isHandled() {
            return wrapped.isHandled();
        }

        public void removePropertyChangeListener(IPropertyChangeListener listener) {
            wrapped.removePropertyChangeListener(listener);
        }

        public void runWithEvent(Event event) {
            wrapped.runWithEvent(event);
        }

        public void run() {
            wrapped.run();
        }

        public void setAccelerator(int keycode) {
            throw new UnsupportedOperationException("This is an unmodifiable action"); //$NON-NLS-1$
        }

        public void setActionDefinitionId(String id) {
            throw new UnsupportedOperationException("This is an unmodifiable action"); //$NON-NLS-1$
        }

        public void setChecked(boolean checked) {
            throw new UnsupportedOperationException("This is an unmodifiable action"); //$NON-NLS-1$
        }

        public void setDescription(String text) {
            throw new UnsupportedOperationException("This is an unmodifiable action"); //$NON-NLS-1$
        }

        public void setDisabledImageDescriptor(ImageDescriptor newImage) {
            throw new UnsupportedOperationException("This is an unmodifiable action"); //$NON-NLS-1$
        }

        public void setEnabled(boolean enabled) {
            throw new UnsupportedOperationException("This is an unmodifiable action"); //$NON-NLS-1$
        }

        public void setHelpListener(HelpListener listener) {
            throw new UnsupportedOperationException("This is an unmodifiable action"); //$NON-NLS-1$
        }

        public void setHoverImageDescriptor(ImageDescriptor newImage) {
            throw new UnsupportedOperationException("This is an unmodifiable action"); //$NON-NLS-1$
        }

        public void setId(String id) {
            throw new UnsupportedOperationException("This is an unmodifiable action"); //$NON-NLS-1$
        }

        public void setImageDescriptor(ImageDescriptor newImage) {
            throw new UnsupportedOperationException("This is an unmodifiable action"); //$NON-NLS-1$
        }

        public void setMenuCreator(IMenuCreator creator) {
            throw new UnsupportedOperationException("This is an unmodifiable action"); //$NON-NLS-1$
        }

        public void setText(String text) {
            throw new UnsupportedOperationException("This is an unmodifiable action"); //$NON-NLS-1$
        }

        public void setToolTipText(String text) {
            throw new UnsupportedOperationException("This is an unmodifiable action"); //$NON-NLS-1$
        }
    };
}