/** * Returns the <code>ImageDescriptor</code> identified by the given key, * or <code>null</code> if it does not exist. * * @return the <code>ImageDescriptor</code> identified by the given key, * or <code>null</code> if it does not exist * @since 3.1 */ public static ImageDescriptor getImageDescriptor(String key) { return ConsolePluginImages.getImageDescriptor(key); }
/** * Declare all images */ private static void declareImages() { // Actions //local toolbars declareRegistryImage(IConsoleConstants.IMG_LCL_CLEAR, LOCALTOOL + "clear_co.gif"); //$NON-NLS-1$ declareRegistryImage(IInternalConsoleConstants.IMG_LCL_PIN, LOCALTOOL + "pin.gif"); //$NON-NLS-1$ declareRegistryImage(IInternalConsoleConstants.IMG_LCL_LOCK, LOCALTOOL + "lock_co.gif"); //$NON-NLS-1$ // disabled local toolbars declareRegistryImage(IInternalConsoleConstants.IMG_DLCL_CLEAR, DLCL + "clear_co.gif"); //$NON-NLS-1$ declareRegistryImage(IInternalConsoleConstants.IMG_DLCL_PIN, DLCL + "pin.gif"); //$NON-NLS-1$ declareRegistryImage(IInternalConsoleConstants.IMG_DLCL_LOCK, DLCL + "lock_co.gif"); //$NON-NLS-1$ declareRegistryImage(IInternalConsoleConstants.IMG_DLCL_CLOSE, DLCL + "rem_co.gif"); //$NON-NLS-1$ // enabled local toolbars declareRegistryImage(IInternalConsoleConstants.IMG_ELCL_CLEAR, ELCL + "clear_co.gif"); //$NON-NLS-1$ declareRegistryImage(IInternalConsoleConstants.IMG_ELCL_PIN, ELCL + "pin.gif"); //$NON-NLS-1$ declareRegistryImage(IInternalConsoleConstants.IMG_ELCL_LOCK, ELCL + "lock_co.gif"); //$NON-NLS-1$ declareRegistryImage(IInternalConsoleConstants.IMG_ELCL_CLOSE, ELCL + "rem_co.gif"); //$NON-NLS-1$ declareRegistryImage(IInternalConsoleConstants.IMG_ELCL_NEW_CON, ELCL + "new_con.gif"); //$NON-NLS-1$ // Views declareRegistryImage(IConsoleConstants.IMG_VIEW_CONSOLE, VIEW + "console_view.gif"); //$NON-NLS-1$ }
/** * Returns the <code>Image</code> identified by the given key, * or <code>null</code> if it does not exist. * * @return the <code>Image</code> identified by the given key, * or <code>null</code> if it does not exist * @since 3.1 */ public static Image getImage(String key) { return ConsolePluginImages.getImage(key); }
/** * Returns the <code>ImageDescriptor<code> identified by the given key, * or <code>null</code> if it does not exist. */ public static ImageDescriptor getImageDescriptor(String key) { return getImageRegistry().getDescriptor(key); }
/** * Returns the ImageRegistry. */ public static ImageRegistry getImageRegistry() { if (imageRegistry == null) { initializeImageRegistry(); } return imageRegistry; }
/** * Declare an Image in the registry table. * @param key The key to use when registering the image * @param path The path where the image can be found. This path is relative to where * this plugin class is found (i.e. typically the packages directory) */ private final static void declareRegistryImage(String key, String path) { ImageDescriptor desc= ImageDescriptor.getMissingImageDescriptor(); try { desc= ImageDescriptor.createFromURL(makeIconFileURL(path)); } catch (MalformedURLException me) { ConsolePlugin.log(me); } imageRegistry.put(key, desc); }
declareImages(); return imageRegistry;
/** * Returns the <code>ImageDescriptor<code> identified by the given key, * or <code>null</code> if it does not exist. */ public static ImageDescriptor getImageDescriptor(String key) { return getImageRegistry().getDescriptor(key); }
/** * Returns the ImageRegistry. */ public static ImageRegistry getImageRegistry() { if (imageRegistry == null) { initializeImageRegistry(); } return imageRegistry; }
/** * Declare an Image in the registry table. * @param key The key to use when registering the image * @param path The path where the image can be found. This path is relative to where * this plugin class is found (i.e. typically the packages directory) */ private final static void declareRegistryImage(String key, String path) { ImageDescriptor desc= ImageDescriptor.getMissingImageDescriptor(); try { desc= ImageDescriptor.createFromURL(makeIconFileURL(path)); } catch (MalformedURLException me) { ConsolePlugin.log(me); } imageRegistry.put(key, desc); }
declareImages(); return imageRegistry;
/** * Returns the <code>ImageDescriptor</code> identified by the given key, * or <code>null</code> if it does not exist. * * @return the <code>ImageDescriptor</code> identified by the given key, * or <code>null</code> if it does not exist * @since 3.1 */ public static ImageDescriptor getImageDescriptor(String key) { return ConsolePluginImages.getImageDescriptor(key); }
/** * Returns the <code>Image<code> identified by the given key, * or <code>null</code> if it does not exist. */ public static Image getImage(String key) { return getImageRegistry().get(key); }
/** * Returns the <code>Image</code> identified by the given key, * or <code>null</code> if it does not exist. * * @return the <code>Image</code> identified by the given key, * or <code>null</code> if it does not exist * @since 3.1 */ public static Image getImage(String key) { return ConsolePluginImages.getImage(key); }
/** * Declare all images */ private static void declareImages() { // Actions //local toolbars declareRegistryImage(IConsoleConstants.IMG_LCL_CLEAR, LOCALTOOL + "clear_co.png"); //$NON-NLS-1$ declareRegistryImage(IInternalConsoleConstants.IMG_LCL_PIN, LOCALTOOL + "pin.png"); //$NON-NLS-1$ declareRegistryImage(IInternalConsoleConstants.IMG_LCL_LOCK, LOCALTOOL + "lock_co.png"); //$NON-NLS-1$ declareRegistryImage(IInternalConsoleConstants.IMG_LCL_WRAP, LOCALTOOL + "wordwrap.png"); //$NON-NLS-1$ // disabled local toolbars declareRegistryImage(IInternalConsoleConstants.IMG_DLCL_CLEAR, DLCL + "clear_co.png"); //$NON-NLS-1$ declareRegistryImage(IInternalConsoleConstants.IMG_DLCL_PIN, DLCL + "pin.png"); //$NON-NLS-1$ declareRegistryImage(IInternalConsoleConstants.IMG_DLCL_LOCK, DLCL + "lock_co.png"); //$NON-NLS-1$ declareRegistryImage(IInternalConsoleConstants.IMG_DLCL_WRAP, DLCL + "wordwrap.png"); //$NON-NLS-1$ declareRegistryImage(IInternalConsoleConstants.IMG_DLCL_CLOSE, DLCL + "rem_co.png"); //$NON-NLS-1$ // enabled local toolbars declareRegistryImage(IInternalConsoleConstants.IMG_ELCL_CLEAR, ELCL + "clear_co.png"); //$NON-NLS-1$ declareRegistryImage(IInternalConsoleConstants.IMG_ELCL_PIN, ELCL + "pin.png"); //$NON-NLS-1$ declareRegistryImage(IInternalConsoleConstants.IMG_ELCL_LOCK, ELCL + "lock_co.png"); //$NON-NLS-1$ declareRegistryImage(IInternalConsoleConstants.IMG_ELCL_WRAP, ELCL + "wordwrap.png"); //$NON-NLS-1$ declareRegistryImage(IInternalConsoleConstants.IMG_ELCL_CLOSE, ELCL + "rem_co.png"); //$NON-NLS-1$ declareRegistryImage(IInternalConsoleConstants.IMG_ELCL_NEW_CON, ELCL + "new_con.png"); //$NON-NLS-1$ // Views declareRegistryImage(IConsoleConstants.IMG_VIEW_CONSOLE, VIEW + "console_view.gif"); //$NON-NLS-1$ }
public CloseConsoleAction(IConsole console) { super(ConsoleMessages.CloseConsoleAction_0, ConsolePluginImages.getImageDescriptor(IInternalConsoleConstants.IMG_ELCL_CLOSE)); setToolTipText(ConsoleMessages.CloseConsoleAction_1); fConsole = console; }
/** * Returns the <code>Image<code> identified by the given key, * or <code>null</code> if it does not exist. */ public static Image getImage(String key) { return getImageRegistry().get(key); }
public CloseConsoleAction(IConsole console) { super(ConsoleMessages.CloseConsoleAction_0, ConsolePluginImages.getImageDescriptor(IInternalConsoleConstants.IMG_ELCL_CLOSE)); setToolTipText(ConsoleMessages.CloseConsoleAction_1); fConsole = console; }
/** * Constructs a clear output action. * * @since 3.1 */ private ClearOutputAction() { super(ConsoleMessages.ClearOutputAction_title); setToolTipText(ConsoleMessages.ClearOutputAction_toolTipText); setHoverImageDescriptor(ConsolePluginImages.getImageDescriptor(IConsoleConstants.IMG_LCL_CLEAR)); setDisabledImageDescriptor(ConsolePluginImages.getImageDescriptor(IInternalConsoleConstants.IMG_DLCL_CLEAR)); setImageDescriptor(ConsolePluginImages.getImageDescriptor(IInternalConsoleConstants.IMG_ELCL_CLEAR)); PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IConsoleHelpContextIds.CLEAR_CONSOLE_ACTION); }
/** * Constructs a clear output action. * * @since 3.1 */ private ClearOutputAction() { super(ConsoleMessages.ClearOutputAction_title); setToolTipText(ConsoleMessages.ClearOutputAction_toolTipText); setHoverImageDescriptor(ConsolePluginImages.getImageDescriptor(IConsoleConstants.IMG_LCL_CLEAR)); setDisabledImageDescriptor(ConsolePluginImages.getImageDescriptor(IInternalConsoleConstants.IMG_DLCL_CLEAR)); setImageDescriptor(ConsolePluginImages.getImageDescriptor(IInternalConsoleConstants.IMG_ELCL_CLEAR)); PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IConsoleHelpContextIds.CLEAR_CONSOLE_ACTION); }