本文整理匯總了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());
}
}
示例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())));
}
}
示例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);
}
示例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);
}
示例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);
}
}
示例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);
}
}
示例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());
}
}
示例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);
}
示例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"));
}
示例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());
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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"));
}
}