本文整理汇总了Java中com.intellij.util.IconUtil.getEditIcon方法的典型用法代码示例。如果您正苦于以下问题:Java IconUtil.getEditIcon方法的具体用法?Java IconUtil.getEditIcon怎么用?Java IconUtil.getEditIcon使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.util.IconUtil
的用法示例。
在下文中一共展示了IconUtil.getEditIcon方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getIcon
import com.intellij.util.IconUtil; //导入方法依赖的package包/类
public Icon getIcon() {
switch (this) {
case ADD: return IconUtil.getAddIcon();
case EDIT: return IconUtil.getEditIcon();
case REMOVE: return IconUtil.getRemoveIcon();
case UP: return IconUtil.getMoveUpIcon();
case DOWN: return IconUtil.getMoveDownIcon();
}
return null;
}
示例2: initToolbarActions
import com.intellij.util.IconUtil; //导入方法依赖的package包/类
private void initToolbarActions() {
//Add
actionAdd = new BaseAction(Localizer.get("tooltip.Create"), Localizer.get("description.CreateNewPackageTemplate"), IconUtil.getAddIcon()) {
@Override
public void actionPerformed(AnActionEvent e) {
presenter.onAddAction();
}
};
//Edit
actionEdit = new BaseAction(Localizer.get("tooltip.Edit"), Localizer.get("description.EditExistingPackageTemplate"), IconUtil.getEditIcon()) {
@Override
public void actionPerformed(AnActionEvent e) {
if (FileValidator.isValidTemplatePath(getSelectedPath())) {
presenter.onEditAction(getSelectedPath());
} else {
Messages.showErrorDialog(project, Localizer.get("warning.select.packageTemplate"), Localizer.get("title.SystemMessage"));
}
}
};
// Settings
actionSettings = new BaseAction(Localizer.get("tooltip.Settings"), Localizer.get("description.EditGeneralSettings"), PlatformIcons.SHOW_SETTINGS_ICON) {
@Override
public void actionPerformed(AnActionEvent e) {
presenter.onSettingsAction();
}
};
// Export
actionExport = new BaseAction(Localizer.get("tooltip.Export"), Localizer.get("description.ExportPackageTemplate") ,PlatformIcons.EXPORT_ICON) {
@Override
public void actionPerformed(AnActionEvent e) {
if (FileValidator.isValidTemplatePath(getSelectedPath())) {
presenter.onExportAction(getSelectedPath());
} else {
Messages.showErrorDialog(project, Localizer.get("warning.select.packageTemplate"), Localizer.get("title.SystemMessage"));
}
}
};
// Import
actionImport = new BaseAction(Localizer.get("tooltip.Import"), Localizer.get("description.ImportPackageTemplate"), PlatformIcons.IMPORT_ICON) {
@Override
public void actionPerformed(AnActionEvent e) {
presenter.onImportAction();
}
};
// Add to Favourite
actionAddToFavourites = new BaseAction(Localizer.get("tooltip.Favourite"), Localizer.get("description.AddRemoveFromFavourites"), AllIcons.Toolwindows.ToolWindowFavorites) {
@Override
public void actionPerformed(AnActionEvent e) {
String path = getSelectedPath();
switch (templateSourceType) {
case FAVOURITE:
presenter.removeFavourite(path);
break;
case PATH:
if (!FileValidator.isValidTemplatePath(path)) {
Messages.showErrorDialog(project, Localizer.get("warning.select.packageTemplate"), Localizer.get("title.SystemMessage"));
return;
}
presenter.addFavourite(path);
break;
}
}
};
// AutoImport
actionAutoImport = new BaseAction(Localizer.get("tooltip.Auto"), Localizer.get("description.EditAutoImportSettings"), PluginIcons.AUTO_IMPORT) {
@Override
public void actionPerformed(AnActionEvent e) {
presenter.onAutoImportAction();
}
};
}
示例3: RenameAction
import com.intellij.util.IconUtil; //导入方法依赖的package包/类
private RenameAction() {
super("Rename", "", IconUtil.getEditIcon()); // todo
}