List of usage examples for org.eclipse.jface.action IAction AS_UNSPECIFIED
int AS_UNSPECIFIED
To view the source code for org.eclipse.jface.action IAction AS_UNSPECIFIED.
Click Source Link
0) indicating action style is not specified yet. From source file:cz.cvut.kbss.owldiff.neonplugin.views.ODActions.java
License:Open Source License
public ODActions(final DiffView owlDiffView) { Action a = null;/*from w w w. ja v a 2s .c o m*/ // Execution of initial actions // useCEX a = new Action(OWLDiffAction.useCEX.getLabel(), IAction.AS_UNSPECIFIED) { public void run() { owlDiffView.runCEXDiff(); } }; setupAction(a, OWLDiffAction.useCEX, "useCEX.png", IAction.AS_UNSPECIFIED); // showExplanations a = new Action(OWLDiffAction.showExplanations.getLabel(), IAction.AS_UNSPECIFIED) { public void run() { owlDiffView.setShowEntailments(true); } }; setupAction(a, OWLDiffAction.showExplanations, "showExplanations.png", IAction.AS_UNSPECIFIED); // selectAllOriginal a = new Action(OWLDiffAction.selectAllOriginal.getLabel(), IAction.AS_UNSPECIFIED) { public void run() { owlDiffView.selectAllOriginalAxioms(); } }; setupAction(a, OWLDiffAction.selectAllOriginal, "selectAllOriginal.png", IAction.AS_UNSPECIFIED); // selectAllUpdate a = new Action(OWLDiffAction.selectAllUpdate.getLabel(), IAction.AS_UNSPECIFIED) { public void run() { owlDiffView.selectAllUpdateAxioms(); } }; setupAction(a, OWLDiffAction.selectAllUpdate, "selectAllUpdate.png", IAction.AS_UNSPECIFIED); // deselectAllOriginal a = new Action(OWLDiffAction.deselectAllOriginal.getLabel(), IAction.AS_UNSPECIFIED) { public void run() { owlDiffView.deselectAllOriginalAxioms(); } }; setupAction(a, OWLDiffAction.deselectAllOriginal, "deselectAllOriginal.png", IAction.AS_UNSPECIFIED); // deselectAllUpdate a = new Action(OWLDiffAction.deselectAllUpdate.getLabel(), IAction.AS_UNSPECIFIED) { public void run() { owlDiffView.deselectAllUpdateAxioms(); } }; setupAction(a, OWLDiffAction.deselectAllUpdate, "deselectAllUpdate.png", IAction.AS_UNSPECIFIED); // merge a = new Action(OWLDiffAction.merge.getLabel(), IAction.AS_UNSPECIFIED) { public void run() { owlDiffView.saveMergeResult(); } }; setupAction(a, OWLDiffAction.merge, "merge.png", IAction.AS_UNSPECIFIED); // showCommon a = new Action(OWLDiffAction.showCommon.getLabel(), IAction.AS_CHECK_BOX) { public void run() { owlDiffView.setShowCommonAxioms(!owlDiffView.isShowCommonAxioms()); } }; setupAction(a, OWLDiffAction.showCommon, "showCommon.png", IAction.AS_CHECK_BOX); a.setChecked(owlDiffView.isShowCommonAxioms()); final ActionGroup grpVisualization = new ActionGroup(); // showAxiomList a = new Action(OWLDiffAction.showAxiomList.getLabel(), IAction.AS_RADIO_BUTTON) { public void run() { grpVisualization.setSelectedAction(this); owlDiffView.setView(DiffVisualization.LIST_VIEW); } }; setupAction(a, OWLDiffAction.showAxiomList, "showAxiomList.png", IAction.AS_RADIO_BUTTON); grpVisualization.addAction(a); // showAssertedFrames a = new Action(OWLDiffAction.showAssertedFrames.getLabel(), IAction.AS_RADIO_BUTTON) { public void run() { grpVisualization.setSelectedAction(this); owlDiffView.setView(DiffVisualization.SIMPLE_FRAME_VIEW); } }; setupAction(a, OWLDiffAction.showAssertedFrames, "showAssertedFrames.png", IAction.AS_RADIO_BUTTON); grpVisualization.addAction(a); // showClassifiedFrames a = new Action(OWLDiffAction.showClassifiedFrames.getLabel(), IAction.AS_RADIO_BUTTON) { public void run() { grpVisualization.setSelectedAction(this); owlDiffView.setView(DiffVisualization.CLASSIFIED_FRAME_VIEW); } }; setupAction(a, OWLDiffAction.showClassifiedFrames, "showClassifiedFrames.png", IAction.AS_RADIO_BUTTON); grpVisualization.addAction(a); switch (owlDiffView.getView()) { case LIST_VIEW: grpVisualization.setSelectedAction(actionMap.get(OWLDiffAction.showAxiomList)); break; case SIMPLE_FRAME_VIEW: grpVisualization.setSelectedAction(actionMap.get(OWLDiffAction.showAssertedFrames)); break; case CLASSIFIED_FRAME_VIEW: grpVisualization.setSelectedAction(actionMap.get(OWLDiffAction.showClassifiedFrames)); break; default: throw new IllegalArgumentException("Unexpected DiffVisualization type : " + owlDiffView.getView()); } final ActionGroup grpSyntax = new ActionGroup(); // manchester a = new Action(OWLDiffAction.manchester.getLabel(), IAction.AS_RADIO_BUTTON) { public void run() { owlDiffView.setSyntax(SyntaxEnum.MANCHESTER); grpSyntax.setSelectedAction(this); } }; setupAction(a, OWLDiffAction.manchester, "manchester.png", IAction.AS_RADIO_BUTTON); grpSyntax.addAction(a); // descriptionLogic a = new Action(OWLDiffAction.descriptionLogic.getLabel(), IAction.AS_RADIO_BUTTON) { public void run() { owlDiffView.setSyntax(SyntaxEnum.DL); grpSyntax.setSelectedAction(this); } }; setupAction(a, OWLDiffAction.descriptionLogic, "descriptionLogic.png", IAction.AS_RADIO_BUTTON); grpSyntax.addAction(a); switch (owlDiffView.getSyntax()) { case DL: grpSyntax.setSelectedAction(actionMap.get(OWLDiffAction.descriptionLogic)); break; case MANCHESTER: grpSyntax.setSelectedAction(actionMap.get(OWLDiffAction.manchester)); break; default: throw new IllegalArgumentException("Unexpected Syntax : " + owlDiffView.getSyntax()); } }
From source file:fr.lip6.move.coloane.core.ui.actions.OptionAction.java
License:Open Source License
/** * Convert a IOptionType to a type understandable by an IAction * @param style option style/*from www .j av a 2s . c o m*/ * @return a IAction style */ private static int convertStyle(int style) { if (style == IOptionMenu.TYPE_CHECKBOX) { return IAction.AS_CHECK_BOX; } else if (style == IOptionMenu.TYPE_RADIO) { return IAction.AS_RADIO_BUTTON; } else { return IAction.AS_UNSPECIFIED; } }
From source file:org.eclipse.buildship.ui.generic.CommandBackedAction.java
License:Open Source License
protected CommandBackedAction(String commandId) { this(commandId, IAction.AS_UNSPECIFIED); }
From source file:org.eclipse.ui.actions.LabelRetargetAction.java
License:Open Source License
/** * Constructs a LabelRetargetAction with the given action id and text. * /*from ww w. j a v a2 s.c o m*/ * @param actionID the retargetable action id * @param text the action's text, or <code>null</code> if there is no text */ public LabelRetargetAction(String actionID, String text) { this(actionID, text, IAction.AS_UNSPECIFIED); }
From source file:org.eclipse.ui.actions.RetargetAction.java
License:Open Source License
/** * Constructs a RetargetAction with the given action id and text. * // w ww.ja v a 2s.c o m * @param actionID the retargetable action id * @param text the action's text, or <code>null</code> if there is no text */ public RetargetAction(String actionID, String text) { this(actionID, text, IAction.AS_UNSPECIFIED); }
From source file:org.eclipse.ui.internal.ActionDescriptor.java
License:Open Source License
/** * Creates an instance of PluginAction. Depending on the target part, * subclasses of this class may be created. */// w w w . j av a 2s . c o m private PluginAction createAction(int targetType, IConfigurationElement actionElement, Object target, String style) { int actionStyle = IAction.AS_UNSPECIFIED; if (style != null) { if (style.equals(STYLE_RADIO)) { actionStyle = IAction.AS_RADIO_BUTTON; } else if (style.equals(STYLE_TOGGLE)) { actionStyle = IAction.AS_CHECK_BOX; } else if (style.equals(STYLE_PULLDOWN)) { actionStyle = IAction.AS_DROP_DOWN_MENU; } else if (style.equals(STYLE_PUSH)) { actionStyle = IAction.AS_PUSH_BUTTON; } } switch (targetType) { case T_VIEW: return new ViewPluginAction(actionElement, (IViewPart) target, id, actionStyle); case T_EDITOR: return new EditorPluginAction(actionElement, (IEditorPart) target, id, actionStyle); case T_WORKBENCH: return new WWinPluginAction(actionElement, (IWorkbenchWindow) target, id, actionStyle); case T_WORKBENCH_PULLDOWN: actionStyle = IAction.AS_DROP_DOWN_MENU; return new WWinPluginPulldown(actionElement, (IWorkbenchWindow) target, id, actionStyle); case T_POPUP: return new ObjectPluginAction(actionElement, id, actionStyle); default: WorkbenchPlugin.log("Unknown Action Type: " + targetType);//$NON-NLS-1$ return null; } }
From source file:org.jkiss.dbeaver.ui.controls.resultset.ResultSetViewer.java
License:Open Source License
private void fillAttributeTransformersMenu(IMenuManager manager, final DBDAttributeBinding attr) { final DBSDataContainer dataContainer = getDataContainer(); if (dataContainer == null) { return;/*from ww w .ja v a2 s. c o m*/ } final DBPDataSource dataSource = dataContainer.getDataSource(); final DBDRegistry registry = dataSource.getContainer().getApplication().getValueHandlerRegistry(); final DBVTransformSettings transformSettings = DBVUtils.getTransformSettings(attr, false); DBDAttributeTransformerDescriptor customTransformer = null; if (transformSettings != null && transformSettings.getCustomTransformer() != null) { customTransformer = registry.getTransformer(transformSettings.getCustomTransformer()); } List<? extends DBDAttributeTransformerDescriptor> customTransformers = registry.findTransformers(dataSource, attr, true); if (customTransformers != null && !customTransformers.isEmpty()) { manager.add(new TransformerAction(attr, "Default", IAction.AS_RADIO_BUTTON, transformSettings == null || CommonUtils.isEmpty(transformSettings.getCustomTransformer())) { @Override public void run() { if (isChecked()) { getTransformSettings().setCustomTransformer(null); saveTransformerSettings(); } } }); for (final DBDAttributeTransformerDescriptor descriptor : customTransformers) { final TransformerAction action = new TransformerAction(attr, descriptor.getName(), IAction.AS_RADIO_BUTTON, transformSettings != null && descriptor.getId().equals(transformSettings.getCustomTransformer())) { @Override public void run() { if (isChecked()) { final DBVTransformSettings settings = getTransformSettings(); final String oldCustomTransformer = settings.getCustomTransformer(); settings.setCustomTransformer(descriptor.getId()); TransformerSettingsDialog settingsDialog = new TransformerSettingsDialog( ResultSetViewer.this, attr, settings); if (settingsDialog.open() == IDialogConstants.OK_ID) { saveTransformerSettings(); } else { settings.setCustomTransformer(oldCustomTransformer); } } } }; manager.add(action); } } if (customTransformer != null && !CommonUtils.isEmpty(customTransformer.getProperties())) { manager.add(new TransformerAction(attr, "Settings ...", IAction.AS_UNSPECIFIED, false) { @Override public void run() { TransformerSettingsDialog settingsDialog = new TransformerSettingsDialog(ResultSetViewer.this, attr, transformSettings); if (settingsDialog.open() == IDialogConstants.OK_ID) { saveTransformerSettings(); } } }); } List<? extends DBDAttributeTransformerDescriptor> applicableTransformers = registry .findTransformers(dataSource, attr, false); if (applicableTransformers != null) { manager.add(new Separator()); for (final DBDAttributeTransformerDescriptor descriptor : applicableTransformers) { boolean checked; if (transformSettings != null) { if (descriptor.isApplicableByDefault()) { checked = !transformSettings.isExcluded(descriptor.getId()); } else { checked = transformSettings.isIncluded(descriptor.getId()); } } else { checked = descriptor.isApplicableByDefault(); } manager.add(new TransformerAction(attr, descriptor.getName(), IAction.AS_CHECK_BOX, checked) { @Override public void run() { getTransformSettings().enableTransformer(descriptor, !isChecked()); saveTransformerSettings(); } }); } } }
From source file:org.springframework.ide.eclipse.boot.dash.views.AbstractBootDashAction.java
License:Open Source License
protected AbstractBootDashAction(UserInteractions ui) { this(ui, IAction.AS_UNSPECIFIED); }
From source file:org.springframework.ide.eclipse.boot.dash.views.AbstractBootDashElementsAction.java
License:Open Source License
public AbstractBootDashElementsAction(BootDashViewModel model, MultiSelection<BootDashElement> _selection, UserInteractions ui) { this(model, _selection, ui, IAction.AS_UNSPECIFIED); }
From source file:org.springframework.ide.eclipse.boot.dash.views.AbstractCloudAppDashElementsAction.java
License:Open Source License
public AbstractCloudAppDashElementsAction(BootDashViewModel model, MultiSelection<BootDashElement> _selection, UserInteractions ui) { this(model, _selection, ui, IAction.AS_UNSPECIFIED); }