Java Code Examples for org.eclipse.jface.action.IAction#AS_RADIO_BUTTON
The following examples show how to use
org.eclipse.jface.action.IAction#AS_RADIO_BUTTON .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SetHierarchyTypeAction.java From xtext-eclipse with Eclipse Public License 2.0 | 6 votes |
public SetHierarchyTypeAction(CallHierarchyType callHierarchyType, AbstractCallHierarchyViewPart callHierarchyViewPart) { super("", IAction.AS_RADIO_BUTTON); this.callHierarchyType = callHierarchyType; this.callHierarchyViewPart = callHierarchyViewPart; switch (callHierarchyType) { case CALLEE: setText("Show Callee Hierarchy"); setToolTipText("Show Callee Hierarchy"); setImageDescriptor(XtextPluginImages.DESC_CH_CALLEES); setHoverImageDescriptor(XtextPluginImages.DESC_CH_CALLEES); break; default: setText("Show Caller Hierarchy"); setToolTipText("Show Caller Hierarchy"); setImageDescriptor(XtextPluginImages.DESC_CH_CALLERS); setHoverImageDescriptor(XtextPluginImages.DESC_CH_CALLERS); break; } }
Example 2
Source File: ControlFlowView.java From tracecompass with Eclipse Public License 2.0 | 6 votes |
private IAction createHierarchicalAction() { IAction action = new Action(Messages.ControlFlowView_hierarchicalViewLabel, IAction.AS_RADIO_BUTTON) { @Override public void run() { ITmfTrace parentTrace = getTrace(); synchronized (fFlatTraces) { fFlatTraces.remove(parentTrace); List<@NonNull TimeGraphEntry> entryList = getEntryList(parentTrace); if (entryList != null) { for (TimeGraphEntry traceEntry : entryList) { Collection<TimeGraphEntry> controlFlowEntries = fEntries.row(getProvider(traceEntry)).values(); controlFlowEntries.forEach(e -> e.setParent(null)); addEntriesToHierarchicalTree(controlFlowEntries, traceEntry); } } } refresh(); } }; action.setChecked(true); action.setToolTipText(Messages.ControlFlowView_hierarchicalViewToolTip); return action; }
Example 3
Source File: MasterPageSelectionAction.java From birt with Eclipse Public License 1.0 | 6 votes |
public MasterPageSelectionAction( MasterPageHandle handle ) { super( DEUtil.getDisplayLabel( handle ), IAction.AS_RADIO_BUTTON ); this.handle = handle; boolean checked = false; FormEditor formEditor = UIUtil.getActiveReportEditor( ); if ( formEditor != null ) { if ( ReportMasterPageEditorFormPage.ID.equals( formEditor.getActivePageInstance( ) .getId( ) ) ) { checked = ( ( (ReportMasterPageEditorFormPage) ( formEditor.getActivePageInstance( ) ) ).getGraphicalViewer( ) .getContents( ) .getModel( ) == handle ); } } setChecked( checked ); }
Example 4
Source File: AbstractChangeDesignAction.java From ermaster-b with Apache License 2.0 | 5 votes |
public AbstractChangeDesignAction(String ID, String type, ERDiagramEditor editor) { super(ID, ResourceString .getResourceString("action.title.change.design." + type), IAction.AS_RADIO_BUTTON, editor); this.type = type; }
Example 5
Source File: ICEScrolledPropertiesBlock.java From ice with Eclipse Public License 1.0 | 5 votes |
/** * <p> * This operation creates actions in the toolbar for the block. * </p> * * @param managedForm * <p> * The parent Form * </p> */ @Override protected void createToolBarActions(IManagedForm managedForm) { final ScrolledForm form = managedForm.getForm(); Action haction = new Action("Horizontal Orientation", IAction.AS_RADIO_BUTTON) { @Override public void run() { sashForm.setOrientation(SWT.HORIZONTAL); form.reflow(true); } }; haction.setChecked(true); haction.setToolTipText("Set Details to the Right of Masters"); Action vaction = new Action("Vertical Orientation", IAction.AS_RADIO_BUTTON) { @Override public void run() { sashForm.setOrientation(SWT.VERTICAL); form.reflow(true); } }; vaction.setChecked(false); vaction.setToolTipText("Set Details Below Masters"); form.getToolBarManager().add(haction); form.getToolBarManager().add(vaction); }
Example 6
Source File: ChangeOutlineViewOrderByPhysicalNameAction.java From ermasterr with Apache License 2.0 | 4 votes |
public ChangeOutlineViewOrderByPhysicalNameAction(final TreeViewer treeViewer) { super(ID, null, IAction.AS_RADIO_BUTTON, treeViewer); setText(ResourceString.getResourceString("label.physical.name")); }
Example 7
Source File: ChangeOutlineViewOrderByLogicalNameAction.java From ermasterr with Apache License 2.0 | 4 votes |
public ChangeOutlineViewOrderByLogicalNameAction(final TreeViewer treeViewer) { super(ID, null, IAction.AS_RADIO_BUTTON, treeViewer); setText(ResourceString.getResourceString("label.logical.name")); }
Example 8
Source File: AbstractChangeViewAction.java From erflute with Apache License 2.0 | 4 votes |
public AbstractChangeViewAction(String id, String type, MainDiagramEditor editor) { super(id, null, IAction.AS_RADIO_BUTTON, editor); setText(DisplayMessages.getMessage("action.title.change.mode.to." + type)); }
Example 9
Source File: ChangeOutlineViewToBothAction.java From ermaster-b with Apache License 2.0 | 4 votes |
public ChangeOutlineViewToBothAction(TreeViewer treeViewer) { super(ID, null, IAction.AS_RADIO_BUTTON, treeViewer); this.setText(ResourceString .getResourceString("action.title.change.mode.to.both")); }
Example 10
Source File: ChangeOutlineViewOrderByLogicalNameAction.java From ermaster-b with Apache License 2.0 | 4 votes |
public ChangeOutlineViewOrderByLogicalNameAction(TreeViewer treeViewer) { super(ID, null, IAction.AS_RADIO_BUTTON, treeViewer); this.setText(ResourceString.getResourceString("label.logical.name")); }
Example 11
Source File: AbstractChangeNotationLevelAction.java From erflute with Apache License 2.0 | 4 votes |
public AbstractChangeNotationLevelAction(String id, MainDiagramEditor editor) { super(id, null, IAction.AS_RADIO_BUTTON, editor); setText(DisplayMessages.getMessage("action.title.change.notation.level." + getLevel())); }
Example 12
Source File: ChangeOutlineViewToPhysicalAction.java From ermasterr with Apache License 2.0 | 4 votes |
public ChangeOutlineViewToPhysicalAction(final TreeViewer treeViewer) { super(ID, null, IAction.AS_RADIO_BUTTON, treeViewer); setText(ResourceString.getResourceString("action.title.change.mode.to.physical")); }
Example 13
Source File: AbstractChangeNotationAction.java From erflute with Apache License 2.0 | 4 votes |
public AbstractChangeNotationAction(String id, String type, MainDiagramEditor editor) { super(id, null, IAction.AS_RADIO_BUTTON, editor); this.setText(DisplayMessages.getMessage("action.title.change.notation." + type)); }
Example 14
Source File: ChangeOutlineViewOrderByPhysicalNameAction.java From ermaster-b with Apache License 2.0 | 4 votes |
public ChangeOutlineViewOrderByPhysicalNameAction(TreeViewer treeViewer) { super(ID, null, IAction.AS_RADIO_BUTTON, treeViewer); this.setText(ResourceString.getResourceString("label.physical.name")); }
Example 15
Source File: AbstractTimeGraphView.java From tracecompass with Eclipse Public License 2.0 | 4 votes |
public MarkerSetAction(MarkerSet markerSet) { super(markerSet == null ? Messages.AbstractTimeGraphView_MarkerSetNoneActionText : markerSet.getName(), IAction.AS_RADIO_BUTTON); fMarkerSet = markerSet; }
Example 16
Source File: ChangeOutlineViewToBothAction.java From ermasterr with Apache License 2.0 | 4 votes |
public ChangeOutlineViewToBothAction(final TreeViewer treeViewer) { super(ID, null, IAction.AS_RADIO_BUTTON, treeViewer); setText(ResourceString.getResourceString("action.title.change.mode.to.both")); }
Example 17
Source File: AbstractChangeNotationAction.java From ermaster-b with Apache License 2.0 | 4 votes |
public AbstractChangeNotationAction(String id, String type, ERDiagramEditor editor) { super(id, null, IAction.AS_RADIO_BUTTON, editor); this.setText(ResourceString .getResourceString("action.title.change.notation." + type)); }
Example 18
Source File: ChangeOutlineViewToLogicalAction.java From erflute with Apache License 2.0 | 4 votes |
public ChangeOutlineViewToLogicalAction(TreeViewer treeViewer) { super(ID, null, IAction.AS_RADIO_BUTTON, treeViewer); setText(DisplayMessages.getMessage("action.title.change.mode.to.logical")); }
Example 19
Source File: ChangeOutlineViewToPhysicalAction.java From erflute with Apache License 2.0 | 4 votes |
public ChangeOutlineViewToPhysicalAction(TreeViewer treeViewer) { super(ID, null, IAction.AS_RADIO_BUTTON, treeViewer); setText(DisplayMessages.getMessage("action.title.change.mode.to.physical")); }
Example 20
Source File: SwitchRepositoryMenuCreator.java From ADT_Frontend with MIT License | 4 votes |
@Override public Menu getMenu(Menu parent) { //check if project is logged on if (!SwitchRepositoryMenuCreator.this.stagingUtil.isLoggedOn(this.project)) { return null; } //get an instance of the repository service for the IRepositoryService service = getRepositoryService(this.project); if (service == null) { //abapgit not supported return null; } //create sub menu Menu repositoryMenu = new Menu(parent); //fetch the repositories available in the system IRepositories repositories = service.getRepositories(new NullProgressMonitor()); //get the logged on user String loggedOnUser = getLoggedOnUser(this.project); //sort repositories List<IRepository> repos = sortRepositories(repositories, loggedOnUser); //create menu contribution for each repository for (IRepository repository : repos) { String repoName = RepositoryUtil.getRepoNameFromUrl(repository.getUrl()); SwitchRepositoryMenuCreator.this.menuItem = new Action(repoName, IAction.AS_RADIO_BUTTON) { @Override public void run() { //open the selected repository in the staging view if (!RespositoryListMenuCreator.this.project.equals(SwitchRepositoryMenuCreator.this.view.getProject()) || !repository.equals(SwitchRepositoryMenuCreator.this.view.getRepository())) { SwitchRepositoryMenuCreator.this.view.openStagingView(repository, RespositoryListMenuCreator.this.project); } } }; //set an image for the menu contribution if the repository belongs to the logged on user if (repository.getCreatedBy().equalsIgnoreCase(loggedOnUser)) { SwitchRepositoryMenuCreator.this.menuItem.setImageDescriptor(getMyRepositoryImageDescriptor()); } //set the linked package name as tooltip SwitchRepositoryMenuCreator.this.menuItem.setToolTipText(repository.getPackage()); //check the current selected repository if (SwitchRepositoryMenuCreator.this.view.getRepository() != null) { if (SwitchRepositoryMenuCreator.this.view.getProject().equals(this.project) && repository.equals(SwitchRepositoryMenuCreator.this.view.getRepository())) { SwitchRepositoryMenuCreator.this.menuItem.setChecked(true); } } SwitchRepositoryMenuCreator.this.item = new ActionContributionItem(SwitchRepositoryMenuCreator.this.menuItem); SwitchRepositoryMenuCreator.this.item.fill(repositoryMenu, -1); } //if no abapgit repositories are available, add a dummy menu contribution if (repositoryMenu.getItemCount() == 0) { SwitchRepositoryMenuCreator.this.menuItem = new Action(Messages.AbapGitStaging_switch_repository_no_repositories_xmsg) { }; //disable the menu SwitchRepositoryMenuCreator.this.menuItem.setEnabled(false); SwitchRepositoryMenuCreator.this.item = new ActionContributionItem(SwitchRepositoryMenuCreator.this.menuItem); SwitchRepositoryMenuCreator.this.item.fill(repositoryMenu, -1); } return repositoryMenu; }