コード例 #1
0
 public static Image createImage(final PackerItem item) {
   Image result = null;
   IWorkbench workbench = PlatformUI.getWorkbench();
   if (item.isDirectory()) {
     result = workbench.getSharedImages().getImage(ISharedImages.IMG_OBJ_FOLDER);
   } else {
     ImageDescriptor descriptor =
         workbench.getEditorRegistry().getImageDescriptor(item.getFileName());
     if (descriptor == null) {
       result = workbench.getSharedImages().getImage(ISharedImages.IMG_OBJ_FILE);
     } else {
       result = descriptor.createImage();
     }
     if (result == null) {
       result = workbench.getSharedImages().getImage(ISharedImages.IMG_OBJ_FILE);
     }
   }
   return result;
 }
コード例 #2
0
  public DeleteContactAction() {
    super(Messages.DeleteContactAction_title);

    setId(ACTION_ID);
    setToolTipText(Messages.DeleteContactAction_tooltip);

    IWorkbench workbench = PlatformUI.getWorkbench();
    setImageDescriptor(
        workbench.getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_DELETE));

    SarosPluginContext.initComponent(this);

    connectionService.addListener(connectionListener);
    SelectionUtils.getSelectionService().addSelectionListener(selectionListener);
    updateEnablement();
  }
コード例 #3
0
  public CPElementLabelProvider(boolean showExported, boolean showParentInfo) {
    fNewLabel = CPathEntryMessages.CPElementLabelProvider_new;
    fCreateLabel = CPathEntryMessages.CPElementLabelProvider_willbecreated;
    fRegistry = CUIPlugin.getImageDescriptorRegistry();

    fLibIcon = CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_ARCHIVE);
    fLibWSrcIcon = CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_ARCHIVE);
    fIncludeIcon = CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_INCLUDES_FOLDER);
    fQuoteIncludeIcon =
        CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_QUOTE_INCLUDES_FOLDER);
    fIncludeFileIcon = CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_TUNIT_HEADER);
    fMacroIcon = CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_MACRO);
    fMacrosFileIcon = CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_TUNIT_HEADER);
    fFolderImage = CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_SOURCE_ROOT);
    fOutputImage = CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_CONTAINER);
    fContainerImage = CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_LIBRARY);

    IWorkbench workbench = CUIPlugin.getDefault().getWorkbench();

    fProjectImage =
        workbench.getSharedImages().getImageDescriptor(IDE.SharedImages.IMG_OBJ_PROJECT);
    bShowExported = showExported;
    bShowParentInfo = showParentInfo;
  }