org.eclipse.jface.action.ToolBarManager.appendToGroup()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(9.1k)|赞(0)|评价(0)|浏览(85)

本文整理了Java中org.eclipse.jface.action.ToolBarManager.appendToGroup()方法的一些代码示例,展示了ToolBarManager.appendToGroup()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ToolBarManager.appendToGroup()方法的具体详情如下:
包路径:org.eclipse.jface.action.ToolBarManager
类名称:ToolBarManager
方法名:appendToGroup

ToolBarManager.appendToGroup介绍

暂无

代码示例

代码示例来源:origin: org.eclipse/org.eclipse.jdt.ui

/**
 * Overriden to create a "smart" button in the viewer's pane control bar.
 * <p>
 * Clients can override this method and are free to decide whether they want to call
 * the inherited method.
 *
 * @param toolBarManager the toolbar manager for which to add the buttons
 */
protected void createToolItems(ToolBarManager toolBarManager) {
  
  super.createToolItems(toolBarManager);
  
  IAction a= new ChangePropertyAction(getBundle(), getCompareConfiguration(), "action.Smart.", SMART); //$NON-NLS-1$
  fSmartActionItem= new ActionContributionItem(a);
  fSmartActionItem.setVisible(fThreeWay);
  toolBarManager.appendToGroup("modes", fSmartActionItem); //$NON-NLS-1$
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

/**
 * Overriden to create a "smart" button in the viewer's pane control bar.
 * <p>
 * Clients can override this method and are free to decide whether they want to call
 * the inherited method.
 *
 * @param toolBarManager the toolbar manager for which to add the buttons
 */
@Override
protected void createToolItems(ToolBarManager toolBarManager) {
  super.createToolItems(toolBarManager);
  IAction a= new ChangePropertyAction(getBundle(), getCompareConfiguration(), "action.Smart.", SMART); //$NON-NLS-1$
  fSmartActionItem= new ActionContributionItem(a);
  fSmartActionItem.setVisible(fThreeWay);
  toolBarManager.appendToGroup("modes", fSmartActionItem); //$NON-NLS-1$
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.compare

public void contributeDiffViewerToolbarItems(Action[] actions, boolean workspacePatch){
  ToolBarManager tbm= CompareViewerPane.getToolBarManager(viewer.getControl().getParent());
  if (tbm != null) {
    tbm.removeAll();
    tbm.add(new Separator("contributed")); //$NON-NLS-1$
    for (int i = 0; i < actions.length; i++) {
      tbm.appendToGroup("contributed", actions[i]); //$NON-NLS-1$
    }
    tbm.update(true);
  }
}

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui

/**
 * Overriden to create a "smart" button in the viewer's pane control bar.
 * <p>
 * Clients can override this method and are free to decide whether they want to call
 * the inherited method.
 *
 * @param toolBarManager the toolbar manager for which to add the buttons
 */
@Override
protected void createToolItems(ToolBarManager toolBarManager) {
  super.createToolItems(toolBarManager);
  IAction a= new ChangePropertyAction(getBundle(), getCompareConfiguration(), "action.Smart.", SMART); //$NON-NLS-1$
  fSmartActionItem= new ActionContributionItem(a);
  fSmartActionItem.setVisible(fThreeWay);
  toolBarManager.appendToGroup("modes", fSmartActionItem); //$NON-NLS-1$
}

代码示例来源:origin: org.eclipse/org.eclipse.compare

public void contributeDiffViewerToolbarItems(Action[] actions, boolean workspacePatch){
  ToolBarManager tbm= CompareViewerPane.getToolBarManager(viewer.getControl().getParent());
  if (tbm != null) {
    tbm.removeAll();
    
    tbm.add(new Separator("contributed")); //$NON-NLS-1$
    
    for (int i = 0; i < actions.length; i++) {
      tbm.appendToGroup("contributed", actions[i]); //$NON-NLS-1$
    }
    
    tbm.update(true);
  }
}

代码示例来源:origin: org.eclipse/org.eclipse.ltk.ui.refactoring

/**
 * {@inheritDoc}
 */
protected void createToolBar(final ViewForm parent) {
  final ToolBarManager manager= getToolBarManager();
  if (manager != null) {
    manager.removeAll();
    manager.add(new Separator(TOOLBAR_SORT_GROUP));
    fSortProjects.setText(RefactoringUIMessages.BrowseRefactoringHistoryControl_sort_project);
    fSortProjects.setToolTipText(RefactoringUIMessages.BrowseRefactoringHistoryControl_sort_project);
    fSortProjects.setDescription(RefactoringUIMessages.BrowseRefactoringHistoryControl_sort_project_description);
    fSortProjects.setImageDescriptor(RefactoringPluginImages.DESC_ELCL_SORT_PROJECT);
    fSortProjects.setDisabledImageDescriptor(RefactoringPluginImages.DESC_DLCL_SORT_PROJECT);
    fSortTimestamps.setText(RefactoringUIMessages.BrowseRefactoringHistoryControl_sort_date);
    fSortTimestamps.setToolTipText(RefactoringUIMessages.BrowseRefactoringHistoryControl_sort_date);
    fSortTimestamps.setDescription(RefactoringUIMessages.BrowseRefactoringHistoryControl_sort_date_description);
    fSortTimestamps.setImageDescriptor(RefactoringPluginImages.DESC_ELCL_SORT_DATE);
    fSortTimestamps.setDisabledImageDescriptor(RefactoringPluginImages.DESC_DLCL_SORT_DATE);
    manager.appendToGroup(TOOLBAR_SORT_GROUP, fSortProjects);
    manager.appendToGroup(TOOLBAR_SORT_GROUP, fSortTimestamps);
    manager.update(true);
  }
}

代码示例来源:origin: org.eclipse/org.eclipse.compare

tbm.appendToGroup("merge", fCopyLeftToRightAction); //$NON-NLS-1$
  fHandlerService.registerAction(fCopyLeftToRightAction, "org.eclipse.compare.copyAllLeftToRight"); //$NON-NLS-1$
  tbm.appendToGroup("merge", fCopyRightToLeftAction); //$NON-NLS-1$
  fHandlerService.registerAction(fCopyRightToLeftAction, "org.eclipse.compare.copyAllRightToLeft"); //$NON-NLS-1$
fAncestorItem= new ActionContributionItem(a);
fAncestorItem.setVisible(false);
tbm.appendToGroup("modes", fAncestorItem); //$NON-NLS-1$
tbm.getControl().addDisposeListener(a);

代码示例来源:origin: org.eclipse.platform/org.eclipse.compare

tbm.appendToGroup("merge", copyLeftToRightItem); //$NON-NLS-1$
fHandlerService.registerAction(copyLeftToRightItem.getAction(), "org.eclipse.compare.copyAllLeftToRight"); //$NON-NLS-1$
tbm.appendToGroup("merge", copyRightToLeftItem); //$NON-NLS-1$
fHandlerService.registerAction(copyRightToLeftItem.getAction(), "org.eclipse.compare.copyAllRightToLeft"); //$NON-NLS-1$
tbm.appendToGroup("modes", fSwitchLeftAndRight); //$NON-NLS-1$
fAncestorItem= new ActionContributionItem(a);
fAncestorItem.setVisible(false);
tbm.appendToGroup("modes", fAncestorItem); //$NON-NLS-1$
tbm.getControl().addDisposeListener(a);

代码示例来源:origin: org.eclipse/org.eclipse.compare

tbm.appendToGroup("modes", fIgnoreAncestorItem); //$NON-NLS-1$
Utilities.initAction(a, getResourceBundle(), "action.NextDiff."); //$NON-NLS-1$
fNextDiff= new ActionContributionItem(a);
tbm.appendToGroup("navigation", fNextDiff); //$NON-NLS-1$
Utilities.initAction(a, getResourceBundle(), "action.PrevDiff."); //$NON-NLS-1$
fPreviousDiff= new ActionContributionItem(a);
tbm.appendToGroup("navigation", fPreviousDiff); //$NON-NLS-1$
Utilities.initAction(a, getResourceBundle(), "action.NextChange."); //$NON-NLS-1$
fNextChange= new ActionContributionItem(a);
tbm.appendToGroup("navigation", fNextChange); //$NON-NLS-1$
fHandlerService.registerAction(a, "org.eclipse.compare.selectNextChange");	//$NON-NLS-1$
Utilities.initAction(a, getResourceBundle(), "action.PrevChange."); //$NON-NLS-1$
fPreviousChange= new ActionContributionItem(a);
tbm.appendToGroup("navigation", fPreviousChange); //$NON-NLS-1$
fHandlerService.registerAction(a, "org.eclipse.compare.selectPreviousChange");	//$NON-NLS-1$
  fCopyDiffLeftToRightItem= new ActionContributionItem(a);
  fCopyDiffLeftToRightItem.setVisible(true);
  tbm.appendToGroup("merge", fCopyDiffLeftToRightItem); //$NON-NLS-1$
  fHandlerService.registerAction(a, "org.eclipse.compare.copyLeftToRight");	//$NON-NLS-1$
  fCopyDiffRightToLeftItem= new ActionContributionItem(a);
  fCopyDiffRightToLeftItem.setVisible(true);
  tbm.appendToGroup("merge", fCopyDiffRightToLeftItem); //$NON-NLS-1$
  fHandlerService.registerAction(a, "org.eclipse.compare.copyRightToLeft");	//$NON-NLS-1$

代码示例来源:origin: org.eclipse.platform/org.eclipse.compare

tbm.appendToGroup("modes", fIgnoreAncestorItem); //$NON-NLS-1$
Utilities.initAction(a, getResourceBundle(), "action.NextDiff."); //$NON-NLS-1$
fNextDiff= new ActionContributionItem(a);
tbm.appendToGroup("navigation", fNextDiff); //$NON-NLS-1$
Utilities.initAction(a, getResourceBundle(), "action.PrevDiff."); //$NON-NLS-1$
fPreviousDiff= new ActionContributionItem(a);
tbm.appendToGroup("navigation", fPreviousDiff); //$NON-NLS-1$
Utilities.initAction(a, getResourceBundle(), "action.NextChange."); //$NON-NLS-1$
fNextChange= new ActionContributionItem(a);
tbm.appendToGroup("navigation", fNextChange); //$NON-NLS-1$
fHandlerService.registerAction(a, "org.eclipse.compare.selectNextChange");	//$NON-NLS-1$
Utilities.initAction(a, getResourceBundle(), "action.PrevChange."); //$NON-NLS-1$
fPreviousChange= new ActionContributionItem(a);
tbm.appendToGroup("navigation", fPreviousChange); //$NON-NLS-1$
fHandlerService.registerAction(a, "org.eclipse.compare.selectPreviousChange");	//$NON-NLS-1$
fCopyDiffLeftToRightItem= new ActionContributionItem(a);
fCopyDiffLeftToRightItem.setVisible(isRightEditable());
tbm.appendToGroup("merge", fCopyDiffLeftToRightItem); //$NON-NLS-1$
fHandlerService.registerAction(a, "org.eclipse.compare.copyLeftToRight");	//$NON-NLS-1$
fCopyDiffRightToLeftItem= new ActionContributionItem(a);
fCopyDiffRightToLeftItem.setVisible(isLeftEditable());
tbm.appendToGroup("merge", fCopyDiffRightToLeftItem); //$NON-NLS-1$
fHandlerService.registerAction(a, "org.eclipse.compare.copyRightToLeft");	//$NON-NLS-1$

相关文章