Examples of ImageDescriptor


Examples of org.eclipse.jface.resource.ImageDescriptor

    Job.getJobManager().suspend();

    // Register the build actions
    IProgressService service = PlatformUI.getWorkbench()
        .getProgressService();
    ImageDescriptor newImage = IDEInternalWorkbenchImages
        .getImageDescriptor(IDEInternalWorkbenchImages.IMG_ETOOL_BUILD_EXEC);
    service.registerIconForFamily(newImage,
        ResourcesPlugin.FAMILY_MANUAL_BUILD);
    service.registerIconForFamily(newImage,
        ResourcesPlugin.FAMILY_AUTO_BUILD);
View Full Code Here

Examples of org.eclipse.jface.resource.ImageDescriptor

   * @see IWorkbenchConfigurer#declareImage
   */
  private void declareWorkbenchImage(Bundle ideBundle, String symbolicName,
      String path, boolean shared) {
    URL url = FileLocator.find(ideBundle, new Path(path), null);
    ImageDescriptor desc = ImageDescriptor.createFromURL(url);
    getWorkbenchConfigurer().declareImage(symbolicName, desc, shared);
  }
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

            } 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;

        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
                iconDescriptor = null;
        } 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

Examples of org.eclipse.jface.resource.ImageDescriptor

        if (image == null) {
            IConfigurationElement configElem = configElements.get(className);
            if (configElem != null) {
                String iconPath = configElem.getAttribute("icon");
                if (iconPath != null) {
                    ImageDescriptor descriptor = AbstractUIPlugin.imageDescriptorFromPlugin(configElem.getContributor().getName(), iconPath);
                    if (descriptor != null) {
                        image = descriptor.createImage();
                        images.put(className, image);
                    }
                }
            }
        }
View Full Code Here

Examples of org.eclipse.jface.resource.ImageDescriptor

        cell.setText(label.toString());
        cell.setStyleRanges(label.getStyleRanges());

        String iconPath = element.getAttribute("icon");
        if (iconPath != null) {
            ImageDescriptor descriptor = AbstractUIPlugin.imageDescriptorFromPlugin(element.getContributor().getName(), iconPath);
            if (descriptor != null) {
                Image image = descriptor.createImage();
                images.add(image);
                cell.setImage(image);
            }
        }
    }
View Full Code Here

Examples of org.eclipse.jface.resource.ImageDescriptor

    private Command command;

    public CommandAction(String text, int style, ActionStore actionStore) {
        super(text, style);
        ImageDescriptor img = getImage();
        if (img != null) {
            setImageDescriptor(img);           
        }
        actionStore.put(this);
    }
View Full Code Here

Examples of org.eclipse.jface.resource.ImageDescriptor

        super.setInitializationData(cfig, propertyName, data);

        String strIcon = cfig.getAttribute("icon");

        // Load the icons
        ImageDescriptor baseImageDesc = strIcon != null ? AbstractUIPlugin.imageDescriptorFromPlugin(cfig.getContributor().getName(), strIcon) : null;
        imgTitleBase = baseImageDesc != null ? baseImageDesc.createImage() : getDefaultImage();

        ImageDescriptor imgWarningOverlay = AbstractUIPlugin.imageDescriptorFromPlugin(Plugin.PLUGIN_ID, "icons/warning_co.gif");
        DecorationOverlayIcon warningImageDesc = new DecorationOverlayIcon(imgTitleBase, imgWarningOverlay, IDecoration.BOTTOM_LEFT);
        imgTitleWarning = warningImageDesc.createImage();

        ImageDescriptor imgErrorOverlay = AbstractUIPlugin.imageDescriptorFromPlugin(Plugin.PLUGIN_ID, "icons/error_co.gif");
        DecorationOverlayIcon errorImageDesc = new DecorationOverlayIcon(imgTitleBase, imgErrorOverlay, IDecoration.BOTTOM_LEFT);
        imgTitleError = errorImageDesc.createImage();

        titleImage = imgTitleBase;
    }
View Full Code Here

Examples of org.eclipse.jface.resource.ImageDescriptor

    }

    private static ImageDescriptor createManaged(String prefix, String name,
        String key)
    {
        ImageDescriptor result = create(prefix,
            name.substring(NAME_PREFIX_LENGTH), true);

        if (fgAvoidSWTErrorMap == null) fgAvoidSWTErrorMap = new HashMap();

        fgAvoidSWTErrorMap.put(key, result);
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.