List of usage examples for com.intellij.openapi.actionSystem ActionPlaces MAIN_TOOLBAR
String MAIN_TOOLBAR
To view the source code for com.intellij.openapi.actionSystem ActionPlaces MAIN_TOOLBAR.
Click Source Link
From source file:com.favorite.FavoriteConfigEditorAction.java
License:Apache License
public void update(AnActionEvent event) { super.update(event); Presentation presentation = event.getPresentation(); if (ActionPlaces.MAIN_TOOLBAR.equals(event.getPlace())) { if (myIcon == null) { java.net.URL resource = FavoriteConfigEditorAction.class.getResource("/icons/garbage.png"); myIcon = new ImageIcon(resource); }/*from www.ja v a 2s . c o m*/ presentation.setIcon(myIcon); } }
From source file:com.microsoft.intellij.actions.DeployAction.java
License:Open Source License
public void update(AnActionEvent event) { final Module module = event.getData(LangDataKeys.MODULE); VirtualFile selectedFile = CommonDataKeys.VIRTUAL_FILE.getData(event.getDataContext()); boolean enabled = module != null && AzureModuleType.AZURE_MODULE.equals(module.getOptionValue(Module.ELEMENT_TYPE)) && PluginUtil.isModuleRoot(selectedFile, module); event.getPresentation().setVisible(enabled || ActionPlaces.MAIN_TOOLBAR.equals(event.getPlace())); event.getPresentation().setEnabled(enabled); }
From source file:com.microsoft.intellij.actions.PackageAction.java
License:Open Source License
public void update(AnActionEvent event) { final Module module = event.getData(LangDataKeys.MODULE); event.getPresentation()/*from www. j a va2s . c o m*/ .setVisible(PlatformUtils.isIdeaUltimate() && module != null && ModuleTypeId.JAVA_MODULE.equals(module.getOptionValue(Module.ELEMENT_TYPE)) || ActionPlaces.MAIN_TOOLBAR.equals(event.getPlace())); }
From source file:com.microsoft.intellij.actions.UnpublishAction.java
License:Open Source License
public void update(AnActionEvent event) { final Module module = event.getData(LangDataKeys.MODULE); VirtualFile selectedFile = CommonDataKeys.VIRTUAL_FILE.getData(event.getDataContext()); event.getPresentation()//w w w .java2 s .com .setEnabledAndVisible(module != null && AzureModuleType.AZURE_MODULE.equals(module.getOptionValue(Module.ELEMENT_TYPE)) && PluginUtil.isModuleRoot(selectedFile, module) || ActionPlaces.MAIN_TOOLBAR.equals(event.getPlace())); }
From source file:com.microsoftopentechnologies.intellij.actions.PackageAction.java
License:Apache License
public void update(AnActionEvent event) { event.getPresentation() .setVisible(PlatformUtils.isIdeaUltimate() || ActionPlaces.MAIN_TOOLBAR.equals(event.getPlace())); }
From source file:io.flutter.actions.DeviceSelectorAction.java
License:Open Source License
@Override public void update(final AnActionEvent e) { // Suppress device actions in all but the toolbars. final String place = e.getPlace(); if (!Objects.equals(place, ActionPlaces.NAVIGATION_BAR_TOOLBAR) && !Objects.equals(place, ActionPlaces.MAIN_TOOLBAR)) { e.getPresentation().setVisible(false); return;//w w w.jav a2 s .co m } // Only show device menu when the device daemon process is running. final Project project = e.getProject(); if (!isSelectorVisible(project)) { e.getPresentation().setVisible(false); return; } super.update(e); if (!knownProjects.contains(project)) { knownProjects.add(project); Disposer.register(project, () -> knownProjects.remove(project)); DeviceService.getInstance(project).addListener(() -> update(project, e.getPresentation())); update(project, e.getPresentation()); } }
From source file:io.flutter.actions.ReloadFlutterAppRetarget.java
License:Open Source License
public ReloadFlutterAppRetarget() { super(ReloadFlutterApp.ID, ReloadFlutterApp.TEXT, ReloadFlutterApp.DESCRIPTION, ActionPlaces.MAIN_TOOLBAR, ActionPlaces.NAVIGATION_BAR_TOOLBAR, ActionPlaces.MAIN_MENU); }
From source file:io.flutter.actions.RestartFlutterAppRetarget.java
License:Open Source License
public RestartFlutterAppRetarget() { super(RestartFlutterApp.ID, RestartFlutterApp.TEXT, RestartFlutterApp.DESCRIPTION, ActionPlaces.MAIN_TOOLBAR, ActionPlaces.NAVIGATION_BAR_TOOLBAR, ActionPlaces.MAIN_MENU); }
From source file:myActions.GarbageCollectionAction.java
License:Apache License
public void update(AnActionEvent event) { super.update(event); Presentation presentation = event.getPresentation(); if (ActionPlaces.MAIN_TOOLBAR.equals(event.getPlace())) { if (myIcon == null) { java.net.URL resource = GarbageCollectionAction.class.getResource("/icons/garbage.png"); myIcon = new ImageIcon(resource); }// ww w.jav a 2 s .c om presentation.setIcon(myIcon); } }
From source file:org.apache.axis2.tools.idea.ServiceArchiveCreator.java
License:Apache License
public void update(AnActionEvent event) { super.update(event); Presentation presentation = event.getPresentation(); if (ActionPlaces.MAIN_TOOLBAR.equals(event.getPlace())) { if (myIcon == null) { java.net.URL resource = ServiceArchiveCreator.class.getResource("/icons/garbage.png"); myIcon = new ImageIcon(resource); }/*from w w w . j av a2s .c o m*/ presentation.setIcon(myIcon); } }