当前位置: 首页>>代码示例>>Java>>正文


Java RetargetAction.setImageDescriptor方法代码示例

本文整理汇总了Java中org.eclipse.ui.actions.RetargetAction.setImageDescriptor方法的典型用法代码示例。如果您正苦于以下问题:Java RetargetAction.setImageDescriptor方法的具体用法?Java RetargetAction.setImageDescriptor怎么用?Java RetargetAction.setImageDescriptor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.ui.actions.RetargetAction的用法示例。


在下文中一共展示了RetargetAction.setImageDescriptor方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: create

import org.eclipse.ui.actions.RetargetAction; //导入方法依赖的package包/类
@Override
public IWorkbenchAction create(IWorkbenchWindow window) {
	if (window == null) {
              throw new IllegalArgumentException();
          }
	String string = "Add " + EPlanUtils.getActivityGroupDisplayName();
	String description = "This action will add a new " 
		+ EPlanUtils.getActivityGroupDisplayName() 
		+ " to the plan.";
	RetargetAction action = new RetargetAction(getId(), string); 
	action.setToolTipText(string);
	action.setDescription(description);
	window.getPartService().addPartListener(action);
          action.setActionDefinitionId("gov.nasa.ensemble.core.plan.editor.newActivityGroupAction"); //$NON-NLS-1$
          action.setImageDescriptor(new ImageDescriptor() {
          	@Override
          	public ImageData getImageData() {
          		return ADD_GROUP_ICON;
          	}
          });
          return action;
}
 
开发者ID:nasa,项目名称:OpenSPIFe,代码行数:23,代码来源:PlanActionFactory.java

示例2: BasicCompilationUnitEditorActionContributor

import org.eclipse.ui.actions.RetargetAction; //导入方法依赖的package包/类
public BasicCompilationUnitEditorActionContributor() {

		fRetargetContentAssist= new RetargetAction(JdtActionConstants.CONTENT_ASSIST,  JavaEditorMessages.ContentAssistProposal_label);
		fRetargetContentAssist.setActionDefinitionId(ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS);
		fRetargetContentAssist.setImageDescriptor(JavaPluginImages.DESC_ELCL_CODE_ASSIST);
		fRetargetContentAssist.setDisabledImageDescriptor(JavaPluginImages.DESC_DLCL_CODE_ASSIST);
		markAsPartListener(fRetargetContentAssist);

		fContentAssist= new RetargetTextEditorAction(JavaEditorMessages.getBundleForConstructedKeys(), "ContentAssistProposal."); //$NON-NLS-1$
		fContentAssist.setActionDefinitionId(ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS);
		fContentAssist.setImageDescriptor(JavaPluginImages.DESC_ELCL_CODE_ASSIST);
		fContentAssist.setDisabledImageDescriptor(JavaPluginImages.DESC_DLCL_CODE_ASSIST);

		fContextInformation= new RetargetTextEditorAction(JavaEditorMessages.getBundleForConstructedKeys(), "ContentAssistContextInformation."); //$NON-NLS-1$
		fContextInformation.setActionDefinitionId(ITextEditorActionDefinitionIds.CONTENT_ASSIST_CONTEXT_INFORMATION);

		fQuickAssistAction= new RetargetTextEditorAction(JavaEditorMessages.getBundleForConstructedKeys(), "CorrectionAssistProposal."); //$NON-NLS-1$
		fQuickAssistAction.setActionDefinitionId(ITextEditorActionDefinitionIds.QUICK_ASSIST);

		fChangeEncodingAction= new RetargetTextEditorAction(JavaEditorMessages.getBundleForConstructedKeys(), "Editor.ChangeEncodingAction."); //$NON-NLS-1$
	}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:22,代码来源:BasicCompilationUnitEditorActionContributor.java

示例3: buildActions

import org.eclipse.ui.actions.RetargetAction; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override
protected void buildActions() {
  addRetargetAction(new UndoRetargetAction());
  addRetargetAction(new RedoRetargetAction());
  addRetargetAction(new DeleteRetargetAction());

  // add grid icon to grid action
  final RetargetAction gridAction =
      new RetargetAction(GEFActionConstants.TOGGLE_GRID_VISIBILITY, "", IAction.AS_CHECK_BOX);
  gridAction.setImageDescriptor(Activator.imageDescriptorFromPlugin(Activator.PLUGIN_ID,
      "icons/grid.png"));
  gridAction.setToolTipText(TOGGLE_GRID_LABEL);
  addRetargetAction(gridAction);

  final RetargetAction snapAction =
      new RetargetAction(GEFActionConstants.TOGGLE_SNAP_TO_GEOMETRY, "", IAction.AS_CHECK_BOX);
  snapAction.setImageDescriptor(Activator.imageDescriptorFromPlugin(Activator.PLUGIN_ID,
      "icons/grid-snap.png"));
  snapAction.setToolTipText(TOGGLE_SNAP_TO_GERMETRY_LABEL);

  addRetargetAction(snapAction);

}
 
开发者ID:leondart,项目名称:FRaMED,代码行数:25,代码来源:ORMGraphicalEditorActionBarContributor.java

示例4: buildActions

import org.eclipse.ui.actions.RetargetAction; //导入方法依赖的package包/类
private void buildActions(IActionBars actionBars) {
	addRetargetAction(new UndoRetargetAction());
	addRetargetAction(new RedoRetargetAction());
	addRetargetAction(new DeleteRetargetAction());
	
	RetargetAction showGridAction=new RetargetAction(GEFActionConstants.TOGGLE_GRID_VISIBILITY, "Grid");
	showGridAction.setImageDescriptor(Activator.getImageDescriptorFromPlugin("icons/grid.png"));
	addRetargetAction(showGridAction);
}
 
开发者ID:bsteker,项目名称:bdf2,代码行数:10,代码来源:EditorActionBarContributor.java

示例5: buildActions

import org.eclipse.ui.actions.RetargetAction; //导入方法依赖的package包/类
/**
 * Builds the actions.
 * 
 * @see org.eclipse.gef.ui.actions.ActionBarContributor#buildActions()
 */
protected void buildActions() {
	addRetargetAction(new UndoRetargetAction());
	addRetargetAction(new RedoRetargetAction());
	addRetargetAction(new DeleteRetargetAction());

	addRetargetAction(new ZoomInRetargetAction());
	addRetargetAction(new ZoomOutRetargetAction());

	RetargetAction raction = new RetargetAction(ExportJar.ID, "Export Chart Theme jar");
	raction.setImageDescriptor(Activator.getDefault().getImageDescriptor("icons/charttheme_export-16.png"));
	addRetargetAction(raction);
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:18,代码来源:JrctxEditorContributor.java

示例6: getShowGridRetargetAction

import org.eclipse.ui.actions.RetargetAction; //导入方法依赖的package包/类
private RetargetAction getShowGridRetargetAction() {
	RetargetAction showGridAction = new RetargetAction(GEFActionConstants.TOGGLE_GRID_VISIBILITY, "显示网格", IAction.AS_CHECK_BOX);
	showGridAction.setImageDescriptor(Activator.getImageDescriptor(Activator.IMAGE_GRID));
	return showGridAction;
}
 
开发者ID:bsteker,项目名称:bdf2,代码行数:6,代码来源:DbToolGefEditorActionBarContributor.java


注:本文中的org.eclipse.ui.actions.RetargetAction.setImageDescriptor方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。