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


Java Presentation.setDescription方法代码示例

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


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

示例1: update

import com.intellij.openapi.actionSystem.Presentation; //导入方法依赖的package包/类
@Override
public void update(@NotNull AnActionEvent e) {
  Presentation presentation = e.getPresentation();

  OpenInBrowserRequest result = BaseOpenInBrowserAction.doUpdate(e);
  if (result == null) {
    return;
  }

  String description = getTemplatePresentation().getDescription();
  if (HtmlUtil.isHtmlFile(result.getFile())) {
    description += " (hold Shift to open URL of local file)";
  }

  presentation.setText(getTemplatePresentation().getText());
  presentation.setDescription(description);

  WebBrowser browser = findUsingBrowser();
  if (browser != null) {
    presentation.setIcon(browser.getIcon());
  }

  if (ActionPlaces.isPopupPlace(e.getPlace())) {
    presentation.setVisible(presentation.isEnabled());
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:27,代码来源:OpenFileInDefaultBrowserAction.java

示例2: updateOnTextChange

import com.intellij.openapi.actionSystem.Presentation; //导入方法依赖的package包/类
@Override
protected void updateOnTextChange(final String text, final Presentation presentation) {
    try {
        Pattern pattern = Pattern.compile(text);
        presentation.putClientProperty(TEXT_FIELD_BACKGROUND, null);
    } catch (IllegalArgumentException | IndexOutOfBoundsException e) {
        presentation.setDescription(e.getMessage());
        presentation.putClientProperty(TEXT_FIELD_BACKGROUND, BackgroundColor.of(Utils.errorColor(UIUtil.getTextFieldBackground())));
    }
}
 
开发者ID:vsch,项目名称:MissingInActions,代码行数:11,代码来源:PatternAction.java

示例3: update

import com.intellij.openapi.actionSystem.Presentation; //导入方法依赖的package包/类
@Override
public void update(final AnActionEvent e) {
  final Project project = e.getData(CommonDataKeys.PROJECT);

  final Presentation presentation = e.getPresentation();
  presentation.setVisible(project != null);
  presentation.setEnabled(project != null);

  presentation.setDescription(SvnBundle.message("action.show.svn.map.description"));
  presentation.setIcon(SvnIcons.ShowWorkingCopies);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:ShowSvnMapAction.java

示例4: ActivityMenuAction

import com.intellij.openapi.actionSystem.Presentation; //导入方法依赖的package包/类
public ActivityMenuAction(RenderContext renderContext) {
  myRenderContext = renderContext;
  Presentation presentation = getTemplatePresentation();
  presentation.setIcon(AndroidIcons.Activity);
  presentation.setDescription("Associate with Activity...");
  updatePresentation(presentation);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:ActivityMenuAction.java

示例5: updatePresentation

import com.intellij.openapi.actionSystem.Presentation; //导入方法依赖的package包/类
private void updatePresentation(Presentation presentation) {
  Configuration configuration = myRenderContext.getConfiguration();
  boolean visible = configuration != null;
  if (visible) {
    String brief = getThemeLabel(configuration.getTheme(), true);
    presentation.setText(brief, false);
    presentation.setDescription(getThemeLabel(configuration.getTheme(), false));
  }
  if (visible != presentation.isVisible()) {
    presentation.setVisible(visible);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:ThemeMenuAction.java

示例6: LayoutAction

import com.intellij.openapi.actionSystem.Presentation; //导入方法依赖的package包/类
protected LayoutAction(@NotNull DesignerEditorPanel designer, @NotNull String description, @Nullable String label, @Nullable Icon icon) {
  myDesigner = designer;
  Presentation presentation = getTemplatePresentation();
  presentation.setDescription(description);
  if (label != null) {
    presentation.setText(label);
  }
  if (icon != null) {
    presentation.setIcon(icon);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:LayoutAction.java

示例7: updatePresentation

import com.intellij.openapi.actionSystem.Presentation; //导入方法依赖的package包/类
@Override
protected void updatePresentation(@NotNull Presentation presentation, @Nullable DeploymentNode node) {
  if (node != null && node.isDeployed()) {
    presentation.setText("Redeploy");
    presentation.setDescription("Redeploy '" + node.getDeploymentName() + "'");
  }
  else {
    presentation.setText(getTemplatePresentation().getText());
    presentation.setDescription(getTemplatePresentation().getDescription());
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:DeployAction.java

示例8: CloseTabToolbarAction

import com.intellij.openapi.actionSystem.Presentation; //导入方法依赖的package包/类
public CloseTabToolbarAction() {
  copyFrom(ActionManager.getInstance().getAction(IdeActions.ACTION_CLOSE_ACTIVE_TAB));
  Presentation presentation = getTemplatePresentation();
  presentation.setIcon(AllIcons.Actions.Cancel);
  presentation.setText(CommonBundle.getCloseButtonText());
  presentation.setDescription(null);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:CloseTabToolbarAction.java

示例9: update

import com.intellij.openapi.actionSystem.Presentation; //导入方法依赖的package包/类
@Override
public void update(final AnActionEvent e) {
  super.update(e);
  final Presentation presentation = e.getPresentation();
  presentation.setIcon(SvnIcons.ShowIntegratedFrom);
  presentation.setText(SvnBundle.message("committed.changes.action.enable.merge.highlighting"));
  presentation.setDescription(SvnBundle.message("committed.changes.action.enable.merge.highlighting.description.text"));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:ShowHideMergePanelAction.java

示例10: EditMultipleSourcesAction

import com.intellij.openapi.actionSystem.Presentation; //导入方法依赖的package包/类
public EditMultipleSourcesAction() {
  Presentation presentation = getTemplatePresentation();
  presentation.setText(ActionsBundle.actionText("EditSource"));
  presentation.setIcon(AllIcons.Actions.EditSource);
  presentation.setDescription(ActionsBundle.actionDescription("EditSource"));
  // TODO shortcuts
  // setShortcutSet(ActionManager.getInstance().getAction(IdeActions.ACTION_EDIT_SOURCE).getShortcutSet());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:EditMultipleSourcesAction.java

示例11: ShowExpert

import com.intellij.openapi.actionSystem.Presentation; //导入方法依赖的package包/类
public ShowExpert(RadPropertyTable table) {
  myTable = table;

  Presentation presentation = getTemplatePresentation();
  String text = DesignerBundle.message("designer.properties.show.expert");
  presentation.setText(text);
  presentation.setDescription(text);
  presentation.setIcon(AllIcons.General.Filter);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:ShowExpert.java

示例12: ShowColumns

import com.intellij.openapi.actionSystem.Presentation; //导入方法依赖的package包/类
public ShowColumns(RadPropertyTable table) {
  myTable = table;

  Presentation presentation = getTemplatePresentation();
  String text = DesignerBundle.message("designer.properties.show.columns");
  presentation.setText(text);
  presentation.setDescription(text);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:ShowColumns.java

示例13: AbstractGravityAction

import com.intellij.openapi.actionSystem.Presentation; //导入方法依赖的package包/类
public AbstractGravityAction(DesignerEditorPanel designer, List<? extends RadViewComponent> components) {
  myDesigner = designer;
  myComponents = components;

  Presentation presentation = getTemplatePresentation();
  presentation.setDescription("Gravity");
  presentation.setIcon(Gravity.ICON);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:AbstractGravityAction.java

示例14: TargetMenuAction

import com.intellij.openapi.actionSystem.Presentation; //导入方法依赖的package包/类
public TargetMenuAction(RenderContext renderContext) {
  myRenderContext = renderContext;
  Presentation presentation = getTemplatePresentation();
  presentation.setDescription("Android version to use when rendering layouts in the IDE");
  presentation.setIcon(AndroidIcons.Targets);
  updatePresentation(presentation);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:TargetMenuAction.java

示例15: update

import com.intellij.openapi.actionSystem.Presentation; //导入方法依赖的package包/类
@Override
public void update(AnActionEvent event) {
  Presentation p = event.getPresentation();
  if (TestFinderHelper.getFinders().length == 0) {
    p.setVisible(false);
    return;
  }
  p.setEnabled(false);
  Project project = event.getData(CommonDataKeys.PROJECT);
  Editor editor = event.getData(CommonDataKeys.EDITOR);
  if (editor == null || project == null) return;

  PsiFile psiFile = PsiUtilBase.getPsiFileInEditor(editor, project);
  if (psiFile == null) return;

  PsiElement element = GotoTestOrCodeHandler.getSelectedElement(editor, psiFile);

  if (TestFinderHelper.findSourceElement(element) == null) return;

  p.setEnabled(true);
  if (TestFinderHelper.isTest(element)) {
    p.setText(ActionsBundle.message("action.GotoTestSubject.text"));
    p.setDescription(ActionsBundle.message("action.GotoTestSubject.description"));
  } else {
    p.setText(ActionsBundle.message("action.GotoTest.text"));
    p.setDescription(ActionsBundle.message("action.GotoTest.description"));
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:29,代码来源:GotoTestOrCodeAction.java


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