Examples of ImageDescriptor


Examples of org.eclipse.jface.resource.ImageDescriptor

    public BytecodeActionBarContributor() {
        super();
        String symbolicName = BytecodeOutlinePlugin.getDefault().getBundle()
            .getSymbolicName();
        ImageDescriptor actionIcon = AbstractUIPlugin
            .imageDescriptorFromPlugin(symbolicName, "icons/bytecodeview.gif");

        refreshAction = new ShowBytecodeAction(actionIcon);

        actionIcon = AbstractUIPlugin.imageDescriptorFromPlugin(
View Full Code Here

Examples of org.eclipse.jface.resource.ImageDescriptor

     * @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 e) {
            DroolsIDEPlugin.log(e);
        }
View Full Code Here

Examples of org.eclipse.jface.resource.ImageDescriptor

        InputStream inputstream = getClass().getClassLoader().getResourceAsStream(fileName);
        file.create(inputstream, true, null);
    }

    protected void initializeDefaultPageImageDescriptor() {
        ImageDescriptor desc = AbstractUIPlugin.imageDescriptorFromPlugin(
                "org.eclipse.ui.ide", "icons/full/wizban/newprj_wiz.gif");
        setDefaultPageImageDescriptor(desc);
    }
View Full Code Here

Examples of org.eclipse.jface.resource.ImageDescriptor

    public Image getImage( String key )
    {
        Image image = getImageRegistry().get( key );
        if ( image == null )
        {
            ImageDescriptor id = getImageDescriptor( key );
            if ( id != null )
            {
                image = id.createImage();
                getImageRegistry().put( key, image );
            }
        }
        return image;
    }
View Full Code Here

Examples of org.eclipse.jface.resource.ImageDescriptor

            bean.setId( member.getAttribute( ID_ATTR ) );
            bean.setName( member.getAttribute( NAME_ATTR ) );
            bean.setDescription( member.getAttribute( DESCRIPTION_ATTR ) );
            String iconPath = member.getAttribute( ICON_ATTR );
            ImageDescriptor icon = AbstractUIPlugin.imageDescriptorFromPlugin( extendingPluginId, iconPath );
            if ( icon == null )
            {
                icon = ImageDescriptor.getMissingImageDescriptor();
            }
            bean.setIcon( icon );
View Full Code Here

Examples of org.eclipse.jface.resource.ImageDescriptor

    public Image getImage( String key )
    {
        Image image = getImageRegistry().get( key );
        if ( image == null )
        {
            ImageDescriptor id = getImageDescriptor( key );
            if ( id != null )
            {
                image = id.createImage();
                getImageRegistry().put( key, image );
            }
        }
        return image;
    }
View Full Code Here

Examples of org.eclipse.jface.resource.ImageDescriptor

    public BndSourceEditorPage(String id, BndEditor formEditor) {
        this.id = id;
        this.formEditor = formEditor;
        formEditor.getEditModel().addPropertyChangeListener(propChangeListener);
        ImageDescriptor iconDescriptor = AbstractUIPlugin.imageDescriptorFromPlugin(Plugin.PLUGIN_ID, "icons/page_white_text.png");
        icon = iconDescriptor.createImage();
    }
View Full Code Here

Examples of org.eclipse.jface.resource.ImageDescriptor

    protected synchronized Image getImage(String path, boolean returnMissingImageOnError) {
        Image image = cache.get(path);
        if (image != null)
            return image;

        ImageDescriptor descriptor = AbstractUIPlugin.imageDescriptorFromPlugin(pluginId, path);
        image = descriptor.createImage(returnMissingImageOnError);
        cache.put(path, image);

        return image;
    }
View Full Code Here

Examples of org.eclipse.jface.resource.ImageDescriptor

            } catch (CoreException e) {
                logger.logError("Error retrieving problem markers", e);
            }
        }

        ImageDescriptor editorImgOverlay;
        if (problemSeverity >= IMarker.SEVERITY_ERROR) {
            pageImage = imgError;
            editorImgOverlay = imgErrorOverlay;
        } else if (problemSeverity >= IMarker.SEVERITY_WARNING) {
            pageImage = imgWarning;
View Full Code Here

Examples of org.eclipse.jface.resource.ImageDescriptor

    }

    @Override
    public void update(ViewerCell cell) {
        Image icon = defaultImg;
        ImageDescriptor iconDescriptor = null;

        Object data = cell.getElement();
        if (data instanceof ConfigurationElementCategory) {
            ConfigurationElementCategory category = (ConfigurationElementCategory) data;
            cell.setText(category.toString());
            iconDescriptor = AbstractUIPlugin.imageDescriptorFromPlugin(Plugin.PLUGIN_ID, "icons/fldr_obj.gif");
        } else if (data instanceof IConfigurationElement) {
            IConfigurationElement element = (IConfigurationElement) data;
            cell.setText(element.getAttribute("name"));

            String iconPath = element.getAttribute("icon");
            if (iconPath != null)
                iconDescriptor = AbstractUIPlugin.imageDescriptorFromPlugin(element.getContributor().getName(), iconPath);
        } else {
            cell.setText("<<ERROR>>");
            iconDescriptor = null;
        }

        if (iconDescriptor != null) {
            icon = imgCache.get(iconDescriptor);
            if (icon == null) {
                icon = iconDescriptor.createImage(device);
                imgCache.put(iconDescriptor, icon);
            }
        }

        if (icon != null)
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.