Java Code Examples for org.eclipse.ui.plugin.AbstractUIPlugin
The following examples show how to use
org.eclipse.ui.plugin.AbstractUIPlugin. These examples are extracted from open source projects.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: http4e Source File: ResourceUtils.java License: Apache License 2.0 | 6 votes |
public static Image getImage( String pluginID, String image){ /*--- create from class file location ImageDescriptor iDescr = ImageDescriptor.createFromFile(CoreResources.class, name); Image image = resourceCache.getImage(iDescr); return image; --- get workbench shared image IWorkbench workbench = PlatformUI.getWorkbench(); ISharedImages images = workbench.getSharedImages(); image = images.getImage(ISharedImages.IMG_OBJ_FOLDER); --- image from plugin MyPlugin.getImageDescriptor("icons/a_image.gif").createImage(); AbstractUIPlugin.imageDescriptorFromPlugin(myPluginID, image)).createImage(); */ if (Utils.isIDE()) { return resourceCache.getImage(AbstractUIPlugin.imageDescriptorFromPlugin(pluginID, image)); } else { return resourceCache.getImage(image); } }
Example 2
Source Project: ADT_Frontend Source File: AbapGitStagingView.java License: MIT License | 5 votes |
/** * Action for unstaging an object from staged section to unstaged section */ private void createUnstageAction() { this.actionUnstage = new Action(Messages.AbapGitStaging_action_unstage_xtol, AbstractUIPlugin.imageDescriptorFromPlugin(AbapGitUIPlugin.PLUGIN_ID, "icons/etool/unstage.png")) { //$NON-NLS-1$ public void run() { IStructuredSelection selection = (IStructuredSelection) AbapGitStagingView.this.stagedTreeViewer.getSelection(); unstageSelectedObjects(selection); } }; }
Example 3
Source Project: CogniCrypt Source File: AltConfigWizard.java License: Eclipse Public License 2.0 | 5 votes |
public AltConfigWizard() { super(); // Set the Look and Feel of the application to the operating // system's look and feel. try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException e) { Activator.getDefault().logError(e); } setWindowTitle("CogniCrypt"); final ImageDescriptor image = AbstractUIPlugin.imageDescriptorFromPlugin("de.cognicrypt.codegenerator", "platform:/plugin/de.cognicrypt.core/icons/cognicrypt-medium.png "); setDefaultPageImageDescriptor(image); this.constraints = new LinkedHashMap<>(); }
Example 4
Source Project: google-cloud-eclipse Source File: PipelineArgumentsTab.java License: Apache License 2.0 | 5 votes |
@VisibleForTesting PipelineArgumentsTab(IWorkspaceRoot workspaceRoot, DataflowDependencyManager dependencyManager) { this.workspaceRoot = workspaceRoot; this.dependencyManager = dependencyManager; hierarchy = pipelineOptionsHierarchyFactory.global(new NullProgressMonitor()); ImageDescriptor descriptor = AbstractUIPlugin .imageDescriptorFromPlugin(DataflowUiPlugin.PLUGIN_ID, "icons/Dataflow_16.png"); image = descriptor != null ? descriptor.createImage() : null;; }
Example 5
Source Project: spotbugs Source File: FindbugsPlugin.java License: GNU Lesser General Public License v2.1 | 5 votes |
/** * Call this method to retrieve the (cache) ImageDescriptor for the given * id. * * @param id * the id of the image descriptor or relative icon path if icon * is inside of default icons folder * @return the ImageDescriptor instance. */ public ImageDescriptor getImageDescriptor(String id) { ImageDescriptor imageDescriptor = imageDescriptors.get(id); if (imageDescriptor == null) { String pluginId = getDefault().getBundle().getSymbolicName(); imageDescriptor = AbstractUIPlugin.imageDescriptorFromPlugin(pluginId, ICON_PATH + id); imageDescriptors.put(id, imageDescriptor); } return imageDescriptor; }
Example 6
Source Project: dsl-devkit Source File: AbstractHelloWorldUiModule.java License: Eclipse Public License 1.0 | 4 votes |
public AbstractHelloWorldUiModule(AbstractUIPlugin plugin) { super(plugin); }
Example 7
Source Project: xtext-eclipse Source File: AbstractBmTestLanguageUiModule.java License: Eclipse Public License 2.0 | 4 votes |
public AbstractBmTestLanguageUiModule(AbstractUIPlugin plugin) { super(plugin); }
Example 8
Source Project: depan Source File: StatsResources.java License: Apache License 2.0 | 4 votes |
private static ImageDescriptor getImageDescriptor(String path) { return AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID, path); }
Example 9
Source Project: dsl-devkit Source File: AbstractExpressionUiModule.java License: Eclipse Public License 1.0 | 4 votes |
public AbstractExpressionUiModule(AbstractUIPlugin plugin) { super(plugin); }
Example 10
Source Project: yang-design-studio Source File: AbstractYangUiModule.java License: Eclipse Public License 1.0 | 4 votes |
public AbstractYangUiModule(AbstractUIPlugin plugin) { super(plugin); }
Example 11
Source Project: dsl-devkit Source File: ExpressionUiModule.java License: Eclipse Public License 1.0 | 4 votes |
public ExpressionUiModule(final AbstractUIPlugin plugin) { super(plugin); }
Example 12
Source Project: xtext-eclipse Source File: Bug291022TestLanguageUiModule.java License: Eclipse Public License 2.0 | 4 votes |
public Bug291022TestLanguageUiModule(AbstractUIPlugin plugin) { super(plugin); }
Example 13
Source Project: xtext-eclipse Source File: EncodingUiTestLanguageUiModule.java License: Eclipse Public License 2.0 | 4 votes |
public EncodingUiTestLanguageUiModule(AbstractUIPlugin plugin) { super(plugin); }
Example 14
Source Project: xtext-eclipse Source File: ParametersTestLanguageUiModule.java License: Eclipse Public License 2.0 | 4 votes |
public ParametersTestLanguageUiModule(AbstractUIPlugin plugin) { super(plugin); }
Example 15
Source Project: xtext-eclipse Source File: ReferringTestLanguageUiModule.java License: Eclipse Public License 2.0 | 4 votes |
public ReferringTestLanguageUiModule(AbstractUIPlugin plugin) { super(plugin); }
Example 16
Source Project: xtext-eclipse Source File: PluginImageHelper.java License: Eclipse Public License 2.0 | 4 votes |
public AbstractUIPlugin getPlugin() { return plugin; }
Example 17
Source Project: xtext-eclipse Source File: AbstractReferringTestLanguageUiModule.java License: Eclipse Public License 2.0 | 4 votes |
public AbstractReferringTestLanguageUiModule(AbstractUIPlugin plugin) { super(plugin); }
Example 18
Source Project: depan Source File: ViewDocResources.java License: Apache License 2.0 | 4 votes |
private static ImageDescriptor getImageDescriptor(String path) { return AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID, path); }
Example 19
Source Project: xtext-eclipse Source File: Ecore2XtextTestUiModule.java License: Eclipse Public License 2.0 | 4 votes |
public Ecore2XtextTestUiModule(AbstractUIPlugin plugin) { super(plugin); }
Example 20
Source Project: depan Source File: NodeListResources.java License: Apache License 2.0 | 4 votes |
private static ImageDescriptor getImageDescriptor(String path) { return AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID, path); }
Example 21
Source Project: xtext-eclipse Source File: UnorderedGroupsTestLanguageUiModule.java License: Eclipse Public License 2.0 | 4 votes |
public UnorderedGroupsTestLanguageUiModule(AbstractUIPlugin plugin) { super(plugin); }
Example 22
Source Project: n4js Source File: AbstractJSONUiModule.java License: Eclipse Public License 1.0 | 4 votes |
public AbstractJSONUiModule(AbstractUIPlugin plugin) { super(plugin); }
Example 23
Source Project: xtext-eclipse Source File: AbstractContentAssistNoTerminalExtensionTestLanguageUiModule.java License: Eclipse Public License 2.0 | 4 votes |
public AbstractContentAssistNoTerminalExtensionTestLanguageUiModule(AbstractUIPlugin plugin) { super(plugin); }
Example 24
Source Project: n4js Source File: AbstractTypeExpressionsUiModule.java License: Eclipse Public License 1.0 | 4 votes |
public AbstractTypeExpressionsUiModule(AbstractUIPlugin plugin) { super(plugin); }
Example 25
Source Project: xtext-eclipse Source File: Bug332217TestLanguageUiModule.java License: Eclipse Public License 2.0 | 4 votes |
public Bug332217TestLanguageUiModule(AbstractUIPlugin plugin) { super(plugin); }
Example 26
Source Project: dsl-devkit Source File: CheckCfgUiModule.java License: Eclipse Public License 1.0 | 4 votes |
public CheckCfgUiModule(final AbstractUIPlugin plugin) { super(plugin); }
Example 27
Source Project: neoscada Source File: AbstractChartView.java License: Eclipse Public License 1.0 | 4 votes |
public ControllerAction () { super ( "Show controller", AbstractUIPlugin.imageDescriptorFromPlugin ( Activator.PLUGIN_ID, "icons/chartController.gif" ) ); //$NON-NLS-2$ setDescription ( "Show the chart controller view" ); setToolTipText ( "Show the chart controller view" ); }
Example 28
Source Project: neoscada Source File: AbstractChartView.java License: Eclipse Public License 1.0 | 4 votes |
public EditorAction () { super ( "Show editor", AbstractUIPlugin.imageDescriptorFromPlugin ( Activator.PLUGIN_ID, "icons/editchart.png" ) ); //$NON-NLS-2$ setDescription ( "Show the chart model editor view" ); setToolTipText ( "Show the chart model editor view" ); }
Example 29
Source Project: neoscada Source File: AbstractChartView.java License: Eclipse Public License 1.0 | 4 votes |
public HelpAction () { super ( "Help", AbstractUIPlugin.imageDescriptorFromPlugin ( Activator.PLUGIN_ID, "icons/help.gif" ) ); }
Example 30
Source Project: neoscada Source File: Activator.java License: Eclipse Public License 1.0 | 4 votes |
private void createDiscoverers () { final WritableSet resultDiscoverers = new WritableSet ( DisplayRealm.getRealm ( getWorkbench ().getDisplay () ) ); final WritableSet resultStores = new WritableSet ( DisplayRealm.getRealm ( getWorkbench ().getDisplay () ) ); for ( final IConfigurationElement ele : Platform.getExtensionRegistry ().getConfigurationElementsFor ( EXTP_CONNECTON_DISCOVERER ) ) { if ( ELE_DISCOVERER.equals ( ele.getName () ) ) { final String id = ele.getAttribute ( "id" ); String name = ele.getAttribute ( "name" ); if ( name == null ) { name = id; } final String icon = ele.getAttribute ( "icon" ); ImageDescriptor imageDescriptor = null; if ( icon != null ) { imageDescriptor = AbstractUIPlugin.imageDescriptorFromPlugin ( ele.getContributor ().getName (), icon ); } final String description = ele.getAttribute ( "description" ); // create try { final ConnectionDiscovererBean bean = new ConnectionDiscovererBean ( id, name, description, imageDescriptor, (ConnectionDiscoverer)ele.createExecutableExtension ( "class" ) ); resultDiscoverers.add ( bean ); if ( bean.isStore () ) { resultStores.add ( bean ); } } catch ( final CoreException e ) { getLog ().log ( e.getStatus () ); } } } this.discoverers = resultDiscoverers; this.stores = resultStores; }