Exemplo n.º 1
0
  private MultiActionGroup createSwitchActionGroup() {

    LayoutAction switchToFlatViewAction =
        new LayoutAction(
            ScriptBrowsingMessages.PackagesView_flatLayoutAction_label, LIST_VIEW_STATE);
    LayoutAction switchToHierarchicalViewAction =
        new LayoutAction(
            ScriptBrowsingMessages.PackagesView_HierarchicalLayoutAction_label, TREE_VIEW_STATE);
    DLTKPluginImages.setLocalImageDescriptors(
        switchToFlatViewAction, "flatLayout.png"); // $NON-NLS-1$
    DLTKPluginImages.setLocalImageDescriptors(
        switchToHierarchicalViewAction, "hierarchicalLayout.png"); // $NON-NLS-1$

    return new LayoutActionGroup(
        new IAction[] {switchToFlatViewAction, switchToHierarchicalViewAction}, fCurrViewState);
  }
  protected ImageDescriptor getCPListElementBaseImage(BPListElement cpentry) {

    if (cpentry.getEntryKind() == IBuildpathEntry.BPE_LIBRARY) {
      return DLTKPluginImages.getDescriptor(DLTKPluginImages.IMG_OBJS_LIBRARY);
    } else if (cpentry.getEntryKind() == IBuildpathEntry.BPE_SOURCE) {
      // handling Folder special case - need to decide if it's in the
      // build path or not.
      ImageDescriptor folderBaseImage = getFolderBaseImage(cpentry.getResource());
      if (null != folderBaseImage) return folderBaseImage;
    }
    return super.getCPListElementBaseImage(cpentry);
  }
 @Override
 public Image getImage() {
   return DLTKPluginImages.getImage(JavaScriptUI.getDefault(), "icons/obj16/supresswarnings.gif");
 }