org.eclipse.pde.api.tools.ui_1.0.301.v20110803_r371

ic static String ApiUseScanJob_checking_component;
  public static String ApiUseScanJob_cleaning_xml_loc;
  public static String ApiUseScanJob_collecting_target_components;
  public static String ApiUseScanJob_creating_html_reports;
  public static String ApiUseScanJob_deleteing_file;
  public static String ApiUseScanJob_deleting_old_reports;
  public static String ApiUseScanJob_deleting_root_folder;
  public static String ApiUseScanJob_generating_html_reports;
  public static String ApiUseScanJob_intall_dir_does_no_exist;
  public static String ApiUseScanJob_missing_xml_loc;
  public static String ApiUseScanJob_no_bundles;
  public static String ApiUseScanJob_preparing_for_scan;
  public static String ApiUseScanJob_reading_target;
  public static String ApiUseScanJob_scanning;
  public static String ApiUseScanJob_skipping_component;
  public static String ApiUseScanJob_target_api_unspecified;
  public static String ApiUseScanJob_target_unspecified;
  public static String ApiUseScanJob_unspecified_install_path;
  public static String ApiUseScanTab_analuze;
  public static String ApiUseScanTab_api_baseline;
  public static String ApiUseScanTab_api_references;
  public static String ApiUseScanTab_api_use_report;
  public static String ApiUseScanTab_baselines;
  public static String ApiUseScanTab_brows_e_;
  public static String ApiUseScanTab_browse;
  public static String ApiUseScanTab_bundles_matching;
  public static String ApiUseScanTab_clean_html_report_dir;
  public static String ApiUseScanTab_clean_report_dir;
  public static String ApiUseScanTab_create_html_report;
  public static String ApiUseScanTab_description;
  public static String ApiUseScanTab_enter_report_location;
  public static String ApiUseScanTab_generate_html_only;
  public static String ApiUseScanTab_illegal_api_use;
  public static String ApiUseScanTab_install_location;
  public static String ApiUseScanTab_internal_references;
  public static String ApiUseScanTab_must_search_something;
  public static String ApiUseScanTab_open_report;
  public static String ApiUseScanTab_referencedBundlesReport;
  public static String ApiUseScanTab_references_to;
  public static String ApiUseScanTab_referencingBundlesReport;
  public static String ApiUseScanTab_regex_problem;
  public static String ApiUseScanTab_report_location;
  public static String ApiUseScanTab_reporting;
  public static String ApiUseScanTab_reportType;
  public static String ApiUseScanTab_search_for;
  public static String ApiUseScanTab_search_in;
  public static String ApiUseScanTab_select_install_location;
  public static String ApiUseScanTab_SelectDirectory;
  public static String ApiUseScanTab_target_definitions;
  public static String ApiUseScanTab_targets;
  public static String ArchivePatternPage_archive_name;
  public static String ArchivePatternPage_bundle_name;
  public static String ArchivePatternPage_create_nested_pattern;
  public static String ArchivePatternPage_edit_acrhive_eclusion_pattern;
  public static String ArchivePatternPage_enter_a_pattern;
  public static String ArchivePatternPage_enter_bundle_name;
  public static String ArchivePatternPage_nested_archive_pattern;
  public static String DescriptionPatternPage_api_pattern;
  public static String DescriptionPatternPage_create_package__pattern;
  public static String DescriptionPatternPage_edit_package_pattern;
  public static String DescriptionPatternPage_package_name_pattern;
  public static String DescriptionPatternPage_patetern;
  public static String DescriptionPatternPage_provide_regex;
  public static String PatternSelectionPage_archive_pattern;
  public static String PatternSelectionPage_archive_pattern_desc;
  public static String PatternSelectionPage_description;
  public static String PatternSelectionPage_must_select_type;
  public static String PatternSelectionPage_no_desc;
  public static String PatternSelectionPage_package_pattern;
  public static String PatternSelectionPage_package_pattern_desc;
  public static String PatternSelectionPage_pattern_types;
  public static String PatternSelectionPage_report_conversion_pattern;
  public static String PatternSelectionPage_report_conversion_pattern_desc;
  public static String PatternSelectionPage_select_pattern;
  public static String PatternSelectionPage_select_type;
  public static String PatternWizard_use_scan_patterns;
  public static String ReportPatternPage_create_conversion_pattern;
  public static String ReportPatternPage_edit_conversion_pattern;
  public static String ReportPatternPage_enter_conversion_pattern;
  public static String ReportPatternPage_filter_from_pattern;
  public static String ReportPatternPage_filter_to_pattern;
  public static String ReportPatternPage_pattern;
  public static String ReportPatternPage_report_conversion_pattern;
  
  static
  {
    NLS.initializeMessages("org.eclipse.pde.api.tools.ui.internal.use.messages", Messages.class);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.pde.api.tools.ui.internal.use.Messages
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.pde.api.tools.ui.internal.use;

import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.swt.widgets.Text;

class PatternSelectionPage$1
  implements ISelectionChangedListener
{
  final PatternSelectionPage this$0;
  
  PatternSelectionPage$1(PatternSelectionPage paramPatternSelectionPage)
  {
    this$0 = paramPatternSelectionPage;
  }
  
  public void selectionChanged(SelectionChangedEvent event)
  {
    String desc = this$0.getSelectedElement().desc;
    this$0.description.setText(desc == null ? Messages.PatternSelectionPage_no_desc : desc);
    this$0.setPageComplete(this$0.isPageComplete());
  }
}

/* Location:
 * Qualified Name:     org.eclipse.pde.api.tools.ui.internal.use.PatternSelectionPage.1
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.pde.api.tools.ui.internal.use;

import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerComparator;

class PatternSelectionPage$2
  extends ViewerComparator
{
  final PatternSelectionPage this$0;
  
  PatternSelectionPage$2(PatternSelectionPage paramPatternSelectionPage)
  {
    this$0 = paramPatternSelectionPage;
  }
  
  public int compare(Viewer viewer, Object e1, Object e2)
  {
    return name.compareTo(name);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.pde.api.tools.ui.internal.use.PatternSelectionPage.2
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.pde.api.tools.ui.internal.use;

import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.pde.api.tools.ui.internal.ApiUIPlugin;
import org.eclipse.swt.graphics.Image;

class PatternSelectionPage$LP
  extends LabelProvider
{
  final PatternSelectionPage this$0;
  
  PatternSelectionPage$LP(PatternSelectionPage paramPatternSelectionPage)
  {
    this$0 = paramPatternSelectionPage;
  }
  
  public String getText(Object element)
  {
    return name;
  }
  
  public Image getImage(Object element)
  {
    PatternSelectionPage.PatternElement pelement = (PatternSelectionPage.PatternElement)element;
    if (imgid != null) {
      return ApiUIPlugin.getSharedImage(imgid);
    }
    return null;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.pde.api.tools.ui.internal.use.PatternSelectionPage.LP
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.pde.api.tools.ui.internal.use;

class PatternSelectionPage$PatternElement
{
  String name;
  String desc;
  String imgid;
  String pname;
  final PatternSelectionPage this$0;
  
  public PatternSelectionPage$PatternElement(PatternSelectionPage paramPatternSelectionPage, String name, String desc, String imgid, String pname)
  {
    this$0 = paramPatternSelectionPage;this.name = null;this.desc = null;this.imgid = null;this.pname = null;
    this.name = name;
    this.desc = desc;
    this.imgid = imgid;
    this.pname = pname;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.pde.api.tools.ui.internal.use.PatternSelectionPage.PatternElement
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.pde.api.tools.ui.internal.use;

import org.eclipse.jface.viewers.ArrayContentProvider;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerComparator;
import org.eclipse.jface.wizard.IWizard;
import org.eclipse.jface.wizard.IWizardPage;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.pde.api.tools.ui.internal.ApiUIPlugin;
import org.eclipse.pde.api.tools.ui.internal.IApiToolsHelpContextIds;
import org.eclipse.pde.api.tools.ui.internal.SWTFactory;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.help.IWorkbenchHelpSystem;

public class PatternSelectionPage
  extends WizardPage
{
  static final String PAGE_NAME = "select";
  
  class PatternElement
  {
    String pname = null;
    String imgid = null;
    String desc = null;
    String name = null;
    
    public PatternElement(String name, String desc, String imgid, String pname)
    {
      this.name = name;
      this.desc = desc;
      this.imgid = imgid;
      this.pname = pname;
    }
  }
  
  class LP
    extends LabelProvider
  {
    LP() {}
    
    public String getText(Object element)
    {
      return name;
    }
    
    public Image getImage(Object element)
    {
      PatternSelectionPage.PatternElement pelement = (PatternSelectionPage.PatternElement)element;
      if (imgid != null) {
        return ApiUIPlugin.getSharedImage(imgid);
      }
      return null;
    }
  }
  
  final PatternElement[] fgelements = {
    new PatternElement(Messages.PatternSelectionPage_package_pattern, Messages.PatternSelectionPage_package_pattern_desc, null, "description"), 
    new PatternElement(Messages.PatternSelectionPage_archive_pattern, Messages.PatternSelectionPage_archive_pattern_desc, null, "archive"), 
    new PatternElement(Messages.PatternSelectionPage_report_conversion_pattern, Messages.PatternSelectionPage_report_conversion_pattern_desc, null, "report") };
  TableViewer viewer = null;
  Text description = null;
  
  protected PatternSelectionPage()
  {
    super("select", Messages.PatternSelectionPage_select_pattern, null);
  }
  
  public void createControl(Composite parent)
  {
    Composite comp = SWTFactory.createComposite(parent, 1, 2, 1808);
    SWTFactory.createWrapLabel(comp, Messages.PatternSelectionPage_pattern_types, 1);
    viewer = new TableViewer(new Table(comp, 67588));
    viewer.setLabelProvider(new LP());
    viewer.setContentProvider(new ArrayContentProvider());
    viewer.setInput(fgelements);
    viewer.addSelectionChangedListener(new ISelectionChangedListener()
    {
      public void selectionChanged(SelectionChangedEvent event)
      {
        String desc = getSelectedElement().desc;
        description.setText(desc == null ? Messages.PatternSelectionPage_no_desc : desc);
        setPageComplete(isPageComplete());
      }
    });
    viewer.setComparator(new ViewerComparator()
    {
      public int compare(Viewer viewer, Object e1, Object e2)
      {
        return name.compareTo(name);
      }
    });
    GridData gd = new GridData(768);
    heightHint = 100;
    viewer.getTable().setLayoutData(gd);
    SWTFactory.createHorizontalSpacer(comp, 1);
    SWTFactory.createWrapLabel(comp, Messages.PatternSelectionPage_description, 1);
    description = new Text(comp, 2120);
    description.setEnabled(false);
    gd = new GridData(768);
    heightHint = 50;
    description.setLayoutData(gd);
    if ((fgelements != null) && (fgelements.length > 0)) {
      viewer.setSelection(new StructuredSelection(viewer.getElementAt(0)), true);
    }
    setControl(comp);
    PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IApiToolsHelpContextIds.APITOOLS_PATTERN_SELECTION_WIZARD_PAGE);
  }
  
  public boolean isPageComplete()
  {
    if (viewer.getSelection().isEmpty())
    {
      setErrorMessage(Messages.PatternSelectionPage_must_select_type);
      return false;
    }
    setErrorMessage(null);
    setMessage(Messages.PatternSelectionPage_select_type);
    return true;
  }
  
  PatternElement getSelectedElement()
  {
    IStructuredSelection ss = (IStructuredSelection)viewer.getSelection();
    return (PatternElement)ss.getFirstElement();
  }
  
  public IWizardPage getNextPage()
  {
    return getWizard().getPage(nextPage());
  }
  
  public String nextPage()
  {
    PatternElement element = getSelectedElement();
    if (element != null) {
      return pname;
    }
    return null;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.pde.api.tools.ui.internal.use.PatternSelectionPage
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.pde.api.tools.ui.internal.use;

import org.eclipse.jface.wizard.IWizardPage;
import org.eclipse.jface.wizard.Wizard;

public class PatternWizard
  extends Wizard
{
  private String pattern = null;
  private int kind = -1;
  
  public PatternWizard(String pattern, int kind)
  {
    setWindowTitle(Messages.PatternWizard_use_scan_patterns);
    this.pattern = pattern;
    this.kind = kind;
  }
  
  public void addPages()
  {
    if (pattern == null)
    {
      addPage(new PatternSelectionPage());
      addPage(new DescriptionPatternPage(null, -1));
      addPage(new ArchivePatternPage(null));
      addPage(new ReportPatternPage(null, -1));
    }
    else
    {
      switch (kind)
      {
      case 1: 
      case 2: 
        addPage(new DescriptionPatternPage(pattern, kind));
        break;
      case 3: 
        addPage(new ArchivePatternPage(pattern));
        break;
      case 4: 
      case 5: 
        addPage(new ReportPatternPage(pattern, kind));
      }
    }
  }
  
  public boolean performFinish()
  {
    IWizardPage page = getStartingPage();
    UsePatternPage upage = null;
    if ((page instanceof PatternSelectionPage)) {
      upage = (UsePatternPage)getPage(((PatternSelectionPage)page).nextPage());
    } else {
      upage = (UsePatternPage)page;
    }
    pattern = upage.getPattern();
    kind = upage.getKind();
    return true;
  }
  
  public boolean canFinish()
  {
    String name = getStartingPage().getName();
    if (!name.equals("select")) {
      return getStartingPage().isPageComplete();
    }
    IWizardPage page = getStartingPage().getNextPage();
    if (page != null) {
      return page.isPageComplete();
    }
    return false;
  }
  
  public String getPattern()
  {
    return pattern;
  }
  
  public int getKind()
  {
    return kind;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.pde.api.tools.ui.internal.use.PatternWizard
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.pde.api.tools.ui.internal.use;

import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;

class ReportPatternPage$1
  extends SelectionAdapter
{
  final ReportPatternPage this$0;
  
  ReportPatternPage$1(ReportPatternPage paramReportPatternPage)
  {
    this$0 = paramReportPatternPage;
  }
  
  public void widgetSelected(SelectionEvent e)
  {
    this$0.kind = 5;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.pde.api.tools.ui.internal.use.ReportPatternPage.1
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.pde.api.tools.ui.internal.use;

import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;

class ReportPatternPage$2
  extends SelectionAdapter
{
  final ReportPatternPage this$0;
  
  ReportPatternPage$2(ReportPatternPage paramReportPatternPage)
  {
    this$0 = paramReportPatternPage;
  }
  
  public void widgetSelected(SelectionEvent e)
  {
    this$0.kind = 4;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.pde.api.tools.ui.internal.use.ReportPatternPage.2
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.pde.api.tools.ui.internal.use;

import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;

class ReportPatternPage$3
  implements ModifyListener
{
  final ReportPatternPage this$0;
  
  ReportPatternPage$3(ReportPatternPage paramReportPatternPage)
  {
    this$0 = paramReportPatternPage;
  }
  
  public void modifyText(ModifyEvent e)
  {
    this$0.setDirty();
    this$0.setPageComplete(this$0.isPageComplete());
  }
}

/* Location:
 * Qualified Name:     org.eclipse.pde.api.tools.ui.internal.use.ReportPatternPage.3
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.pde.api.tools.ui.internal.use;

import java.util.regex.Pattern;
import java.util.regex.PatternSyntaxException;
import org.eclipse.pde.api.tools.ui.internal.IApiToolsHelpContextIds;
import org.eclipse.pde.api.tools.ui.internal.SWTFactory;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.help.IWorkbenchHelpSystem;

public class ReportPatternPage
  extends UsePatternPage
{
  static final String PAGE_NAME = "report";
  private Text patterntext = null;
  int kind = 5;
  Button to = null;
  Button from = null;
  String pattern = null;
  
  public ReportPatternPage(String pattern, int kind)
  {
    super("report", Messages.ReportPatternPage_report_conversion_pattern, null);
    this.pattern = pattern;
    this.kind = kind;
  }
  
  public int getKind()
  {
    return kind;
  }
  
  public String getPattern()
  {
    return patterntext.getText().trim();
  }
  
  public void createControl(Composite parent)
  {
    Composite comp = SWTFactory.createComposite(parent, 1, 1, 768);
    to = SWTFactory.createRadioButton(comp, Messages.ReportPatternPage_filter_to_pattern);
    to.addSelectionListener(new SelectionAdapter()
    {
      public void widgetSelected(SelectionEvent e)
      {
        kind = 5;
      }
    });
    from = SWTFactory.createRadioButton(comp, Messages.ReportPatternPage_filter_from_pattern);
    from.addSelectionListener(new SelectionAdapter()
    {
      public void widgetSelected(SelectionEvent e)
      {
        kind = 4;
      }
    });
    if (kind == 4)
    {
      from.setSelection(true);
    }
    else
    {
      to.setSelection(true);
      kind = 5;
    }
    SWTFactory.createLabel(comp, Messages.ReportPatternPage_pattern, 1);
    patterntext = SWTFactory.createSingleText(comp, 1);
    if (pattern != null) {
      patterntext.setText(pattern);
    }
    patterntext.addModifyListener(new ModifyListener()
    {
      public void modifyText(ModifyEvent e)
      {
        setDirty();
        setPageComplete(isPageComplete());
      }
    });
    patterntext.selectAll();
    patterntext.setFocus();
    setControl(comp);
    PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IApiToolsHelpContextIds.APITOOLS_REPORT_PATTERN_WIZARD_PAGE);
  }
  
  public boolean isPageComplete()
  {
    String newtext = patterntext.getText().trim();
    if ("".equals(newtext))
    {
      if (pageDirty()) {
        setErrorMessage(Messages.ReportPatternPage_enter_conversion_pattern);
      } else {
        setMessage(Messages.ReportPatternPage_enter_conversion_pattern);
      }
      return false;
    }
    try
    {
      Pattern.compile(newtext);
    }
    catch (PatternSyntaxException pse)
    {
      setErrorMessage(pse.getMessage());
      return false;
    }
    resetMessage(pattern != null);
    return true;
  }
  
  protected void resetMessage(boolean isediting)
  {
    setErrorMessage(null);
    if (isediting) {
      setMessage(Messages.ReportPatternPage_edit_conversion_pattern);
    } else {
      setMessage(Messages.ReportPatternPage_create_conversion_pattern);
    }
  }
}

/* Location:
 * Qualified Name:     org.eclipse.pde.api.tools.ui.internal.use.ReportPatternPage
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.pde.api.tools.ui.internal.use;

import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.wizard.WizardPage;

public abstract class UsePatternPage
  extends WizardPage
{
  boolean dirty = false;
  
  protected UsePatternPage(String pageName, String title, ImageDescriptor titleImage)
  {
    super(pageName, title, titleImage);
  }
  
  protected boolean pageDirty()
  {
    return dirty;
  }
  
  protected void setDirty()
  {
    dirty = true;
  }
  
  protected void resetMessage(boolean isediting) {}
  
  public abstract int getKind();
  
  public abstract String getPattern();
}

/* Location:
 * Qualified Name:     org.eclipse.pde.api.tools.ui.internal.use.UsePatternPage
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.pde.api.tools.ui.internal.views;

import org.eclipse.jface.viewers.ViewerComparator;
import org.eclipse.pde.api.tools.internal.provisional.ITreeNode;

class APIToolingView$1
  extends ViewerComparator
{
  final APIToolingView this$0;
  
  APIToolingView$1(APIToolingView paramAPIToolingView)
  {
    this$0 = paramAPIToolingView;
  }
  
  public int category(Object element)
  {
    ITreeNode node = (ITreeNode)element;
    switch (node.getId())
    {
    case 5: 
      return 1;
    }
    return 0;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.pde.api.tools.ui.internal.views.APIToolingView.1
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.pde.api.tools.ui.internal.views;

import org.eclipse.jface.action.Action;
import org.eclipse.jface.viewers.DoubleClickEvent;
import org.eclipse.jface.viewers.IDoubleClickListener;

class APIToolingView$2
  implements IDoubleClickListener
{
  final APIToolingView this$0;
  
  APIToolingView$2(APIToolingView paramAPIToolingView)
  {
    this$0 = paramAPIToolingView;
  }
  
  public void doubleClick(DoubleClickEvent event)
  {
    this$0.doubleClickAction.run();
  }
}

/* Location:
 * Qualified Name:     org.eclipse.pde.api.tools.ui.internal.views.APIToolingView.2
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.pde.api.tools.ui.internal.views;

import org.eclipse.jface.action.Action;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.pde.api.tools.internal.provisional.ITreeNode;
import org.eclipse.pde.api.tools.ui.internal.ApiUIPlugin;

class APIToolingView$3
  extends Action
{
  final APIToolingView this$0;
  
  APIToolingView$3(APIToolingView paramAPIToolingView)
  {
    this$0 = paramAPIToolingView;
  }
  
  public void run()
  {
    ISelection selection = this$0.viewer.getSelection();
    if ((selection instanceof IStructuredSelection))
    {
      Object item = ((IStructuredSelection)selection).getFirstElement();
      if (this$0.viewer.getExpandedState(item)) {
        this$0.viewer.collapseToLevel(item, 1);
      } else {
        this$0.viewer.expandToLevel(item, 1);
      }
      if ((item instanceof ITreeNode))
      {
        ITreeNode node = (ITreeNode)item;
        if ((node.getData() != null) && (!node.hasChildren())) {
          ApiUIPlugin.getDefault().showPropertiesView();
        }
      }
    }
  }
}

/* Location:
 * Qualified Name:     org.eclipse.pde.api.tools.ui.internal.views.APIToolingView.3
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.pde.api.tools.ui.internal.views;

import org.eclipse.jface.action.IAction;
import org.eclipse.pde.api.tools.internal.provisional.ApiPlugin;
import org.eclipse.pde.api.tools.internal.provisional.ISession;
import org.eclipse.pde.api.tools.internal.provisional.ISessionManager;
import org.eclipse.pde.api.tools.ui.internal.actions.CollapseAllAction;
import org.eclipse.pde.api.tools.ui.internal.actions.ExpandAllAction;
import org.eclipse.pde.api.tools.ui.internal.actions.ExportSessionAction;
import org.eclipse.pde.api.tools.ui.internal.actions.NavigateAction;
import org.eclipse.swt.widgets.Label;

class APIToolingView$4
  implements Runnable
{
  final APIToolingView this$0;
  
  APIToolingView$4(APIToolingView paramAPIToolingView)
  {
    this$0 = paramAPIToolingView;
  }
  
  public void run()
  {
    ISessionManager sessionManager = ApiPlugin.getDefault().getSessionManager();
    ISession active = sessionManager.getActiveSession();
    this$0.sessionDescription.setText(active == null ? "No Description" : active.getDescription());
    ISession[] sessions = sessionManager.getSessions();
    boolean atLeastOne = sessions.length >= 1;
    this$0.removeActiveSessionAction.setEnabled(atLeastOne);
    this$0.removeAllSessionsAction.setEnabled(atLeastOne);
    this$0.selectSessionAction.setEnabled(atLeastOne);
    this$0.exportSessionAction.setEnabled(active != null);
    this$0.expandallAction.setEnabled(atLeastOne);
    this$0.collapseallAction.setEnabled(atLeastOne);
    this$0.nextAction.setEnabled(atLeastOne);
    this$0.previousAction.setEnabled(atLeastOne);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.pde.api.tools.ui.internal.views.APIToolingView.4
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.pde.api.tools.ui.internal.views;

import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.pde.api.tools.internal.provisional.ISession;

class APIToolingView$5
  implements Runnable
{
  final APIToolingView this$0;
  private final ISession val$session;
  
  APIToolingView$5(APIToolingView paramAPIToolingView, ISession paramISession)
  {
    this$0 = paramAPIToolingView;val$session = paramISession;
  }
  
  public void run()
  {
    this$0.viewer.setInput(val$session);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.pde.api.tools.ui.internal.views.APIToolingView.5
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.pde.api.tools.ui.internal.views;

import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.pde.api.tools.internal.provisional.ISession;

class APIToolingView$6
  implements Runnable
{
  final APIToolingView this$0;
  private final ISession val$session;
  
  APIToolingView$6(APIToolingView paramAPIToolingView, ISession paramISession)
  {
    this$0 = paramAPIToolingView;val$session = paramISession;
  }
  
  public void run()
  {
    this$0.viewer.setInput(val$session);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.pde.api.tools.ui.internal.views.APIToolingView.6
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.pde.api.tools.ui.internal.views;

import org.eclipse.jface.viewers.IStructuredContentProvider;
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.pde.api.tools.internal.provisional.ISession;
import org.eclipse.pde.api.tools.internal.provisional.ITreeModel;
import org.eclipse.pde.api.tools.internal.provisional.ITreeNode;

class APIToolingView$ViewContentProvider
  implements IStructuredContentProvider, ITreeContentProvider
{
  ITreeModel model;
  final APIToolingView this$0;
  
  APIToolingView$ViewContentProvider(APIToolingView paramAPIToolingView)
  {
    this$0 = paramAPIToolingView;
  }
  
  public void inputChanged(Viewer v, Object oldInput, Object newInput)
  {
    model = null;
  }
  
  public void dispose() {}
  
  public Object[] getElements(Object parent)
  {
    if ((parent instanceof ISession))
    {
      ISession session = (ISession)parent;
      if (model == null) {
        model = session.getModel();
      }
      return getChildren(model.getRoot());
    }
    return getChildren(parent);
  }
  
  public Object getParent(Object child)
  {
    return null;
  }
  
  public Object[] getChildren(Object parent)
  {
    if ((parent instanceof ITreeNode)) {
      return ((ITreeNode)parent).getChildren();
    }
    return new Object[0];
  }
  
  public boolean hasChildren(Object parent)
  {
    if ((parent instanceof ITreeNode)) {
      return ((ITreeNode)parent).hasChildren();
    }
    return false;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.pde.api.tools.ui.internal.views.APIToolingView.ViewContentProvider
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.pde.api.tools.ui.internal.views;

import org.eclipse.core.runtime.CoreException;
import org.eclipse.jdt.core.Flags;
import org.eclipse.jdt.ui.ISharedImages;
import org.eclipse.jdt.ui.JavaUI;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.pde.api.tools.internal.ApiBaselineManager;
import org.eclipse.pde.api.tools.internal.provisional.ApiPlugin;
import org.eclipse.pde.api.tools.internal.provisional.ITreeNode;
import org.eclipse.pde.api.tools.internal.provisional.comparator.DeltaProcessor;
import org.eclipse.pde.api.tools.internal.provisional.comparator.IDelta;
import org.eclipse.pde.api.tools.internal.provisional.model.IApiBaseline;
import org.eclipse.pde.api.tools.internal.provisional.model.IApiComponent;
import org.eclipse.pde.api.tools.ui.internal.ApiImageDescriptor;
import org.eclipse.pde.api.tools.ui.internal.ApiUIPlugin;
import org.eclipse.swt.graphics.Image;

class APIToolingView$ViewLabelProvider
  extends LabelProvider
{
  final APIToolingView this$0;
  
  APIToolingView$ViewLabelProvider(APIToolingView paramAPIToolingView)
  {
    this$0 = paramAPIToolingView;
  }
  
  public String getText(Object obj)
  {
    return obj.toString();
  }
  
  public Image getImage(Object obj)
  {
    if ((obj instanceof ITreeNode))
    {
      ITreeNode treeNode = (ITreeNode)obj;
      switch (treeNode.getId())
      {
      case 1: 
        return JavaUI.getSharedImages().getImage("org.eclipse.jdt.ui.class_obj.gif");
      case 2: 
        return JavaUI.getSharedImages().getImage("org.eclipse.jdt.ui.int_obj.gif");
      case 3: 
        return JavaUI.getSharedImages().getImage("org.eclipse.jdt.ui.annotation_obj.gif");
      case 4: 
        return JavaUI.getSharedImages().getImage("org.eclipse.jdt.ui.enum_obj.gif");
      case 5: 
        return JavaUI.getSharedImages().getImage("org.eclipse.jdt.ui.package_obj.gif");
      }
      Object data = treeNode.getData();
      if ((data instanceof IDelta))
      {
        IDelta delta = (IDelta)data;
        Image image = getDeltaElementImage(delta);
        if (image != null)
        {
          int flags = DeltaProcessor.isCompatible(delta) ? 2 : 1;
          ImageDescriptor descriptor = ImageDescriptor.createFromImage(image);
          ApiImageDescriptor desc = new ApiImageDescriptor(descriptor, flags);
          return ApiUIPlugin.getImage(desc);
        }
      }
    }
    return null;
  }
  
  private Image getDeltaElementImage(IDelta delta)
  {
    switch (delta.getFlags())
    {
    case 16: 
    case 61: 
      int modifiers = delta.getNewModifiers();
      switch (delta.getKind())
      {
      case 3: 
        modifiers = delta.getOldModifiers();
      }
      if (Flags.isPublic(modifiers)) {
        return JavaUI.getSharedImages().getImage("org.eclipse.jdt.ui.field_public_obj.gif");
      }
      if (Flags.isProtected(modifiers)) {
        return JavaUI.getSharedImages().getImage("org.eclipse.jdt.ui.field_protected_obj.gif");
      }
      if (Flags.isPrivate(modifiers)) {
        return JavaUI.getSharedImages().getImage("org.eclipse.jdt.ui.field_private_obj.gif");
      }
      return JavaUI.getSharedImages().getImage("org.eclipse.jdt.ui.field_default_obj.gif");
    case 7: 
    case 8: 
    case 25: 
    case 26: 
    case 27: 
    case 28: 
    case 67: 
      int modifiers = delta.getNewModifiers();
      switch (delta.getKind())
      {
      case 3: 
        modifiers = delta.getOldModifiers();
      }
      if (Flags.isPublic(modifiers)) {
        return JavaUI.getSharedImages().getImage("org.eclipse.jdt.ui.methpub_obj.gif");
      }
      if (Flags.isProtected(modifiers)) {
        return JavaUI.getSharedImages().getImage("org.eclipse.jdt.ui.methpro_obj.gif");
      }
      if (Flags.isPrivate(modifiers)) {
        return JavaUI.getSharedImages().getImage("org.eclipse.jdt.ui.methpri_obj.gif");
      }
      return JavaUI.getSharedImages().getImage("org.eclipse.jdt.ui.class_default_obj.gif");
    }
    switch (delta.getElementType())
    {
    case 1: 
      return JavaUI.getSharedImages().getImage("org.eclipse.jdt.ui.annotation_obj.gif");
    case 6: 
      return JavaUI.getSharedImages().getImage("org.eclipse.jdt.ui.enum_obj.gif");
    case 4: 
      return JavaUI.getSharedImages().getImage("org.eclipse.jdt.ui.class_obj.gif");
    case 8: 
      return JavaUI.getSharedImages().getImage("org.eclipse.jdt.ui.int_obj.gif");
    case 7: 
      int modifiers = delta.getNewModifiers();
      switch (delta.getKind())
      {
      case 3: 
        modifiers = delta.getOldModifiers();
      }
      if (Flags.isPublic(modifiers)) {
        return JavaUI.getSharedImages().getImage("org.eclipse.jdt.ui.field_public_obj.gif");
      }
      if (Flags.isProtected(modifiers)) {
        return JavaUI.getSharedImages().getImage("org.eclipse.jdt.ui.field_protected_obj.gif");
      }
      if (Flags.isPrivate(modifiers)) {
        return JavaUI.getSharedImages().getImage("org.eclipse.jdt.ui.field_private_obj.gif");
      }
      return JavaUI.getSharedImages().getImage("org.eclipse.jdt.ui.field_default_obj.gif");
    case 5: 
    case 9: 
      int modifiers = delta.getNewModifiers();
      switch (delta.getKind())
      {
      case 3: 
        modifiers = delta.getOldModifiers();
      }
      if (Flags.isPublic(modifiers)) {
        return JavaUI.getSharedImages().getImage("org.eclipse.jdt.ui.methpub_obj.gif");
      }
      if (Flags.isProtected(modifiers)) {
        return JavaUI.getSharedImages().getImage("org.eclipse.jdt.ui.methpro_obj.gif");
      }
      if (Flags.isPrivate(modifiers)) {
        return JavaUI.getSharedImages().getImage("org.eclipse.jdt.ui.methpri_obj.gif");
      }
      return JavaUI.getSharedImages().getImage("org.eclipse.jdt.ui.class_default_obj.gif");
    case 10: 
      return JavaUI.getSharedImages().getImage("org.eclipse.jdt.ui.methpub_obj.gif");
    case 2: 
    case 3: 
      String componentVersionId = delta.getComponentVersionId();
      IApiComponent component = null;
      if (componentVersionId != null)
      {
        int indexOfOpen = componentVersionId.lastIndexOf('(');
        String componentID = componentVersionId.substring(0, indexOfOpen);
        IApiBaseline baseline = ApiBaselineManager.getManager().getWorkspaceBaseline();
        if (baseline != null)
        {
          IApiComponent apiComponent = baseline.getApiComponent(componentID);
          if (apiComponent != null) {
            component = apiComponent;
          }
        }
      }
      if (component != null)
      {
        if (component.isSystemComponent()) {
          return ApiUIPlugin.getSharedImage("IMG_OBJ_API_SYSTEM_LIBRARY");
        }
        try
        {
          if (component.isFragment()) {
            return ApiUIPlugin.getSharedImage("IMG_OBJ_FRAGMENT");
          }
        }
        catch (CoreException e)
        {
          ApiPlugin.log(e);
        }
      }
      return ApiUIPlugin.getSharedImage("IMG_OBJ_BUNDLE");
    }
    return null;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.pde.api.tools.ui.internal.views.APIToolingView.ViewLabelProvider
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.pde.api.tools.ui.internal.views;

import org.eclipse.core.runtime.CoreException;
import org.eclipse.jdt.core.Flags;
import org.eclipse.jdt.ui.ISharedImages;
import org.eclipse.jdt.ui.JavaUI;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.jface.action.Separator;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.viewers.DoubleClickEvent;
import org.eclipse.jface.viewers.IDoubleClickListener;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredContentProvider;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerComparator;
import org.eclipse.pde.api.tools.internal.ApiBaselineManager;
import org.eclipse.pde.api.tools.internal.provisional.ApiPlugin;
import org.eclipse.pde.api.tools.internal.provisional.ISession;
import org.eclipse.pde.api.tools.internal.provisional.ISessionListener;
import org.eclipse.pde.api.tools.internal.provisional.ISessionManager;
import org.eclipse.pde.api.tools.internal.provisional.ITreeModel;
import org.eclipse.pde.api.tools.internal.provisional.ITreeNode;
import org.eclipse.pde.api.tools.internal.provisional.comparator.DeltaProcessor;
import org.eclipse.pde.api.tools.internal.provisional.comparator.IDelta;
import org.eclipse.pde.api.tools.internal.provisional.model.IApiBaseline;
import org.eclipse.pde.api.tools.internal.provisional.model.IApiComponent;
import org.eclipse.pde.api.tools.ui.internal.ApiImageDescriptor;
import org.eclipse.pde.api.tools.ui.internal.ApiUIPlugin;
import org.eclipse.pde.api.tools.ui.internal.IApiToolsHelpContextIds;
import org.eclipse.pde.api.tools.ui.internal.SWTFactory;
import org.eclipse.pde.api.tools.ui.internal.actions.CollapseAllAction;
import org.eclipse.pde.api.tools.ui.internal.actions.ExpandAllAction;
import org.eclipse.pde.api.tools.ui.internal.actions.ExportSessionAction;
import org.eclipse.pde.api.tools.ui.internal.actions.NavigateAction;
import org.eclipse.pde.api.tools.ui.internal.actions.RemoveActiveSessionAction;
import org.eclipse.pde.api.tools.ui.internal.actions.RemoveAllSessionsAction;
import org.eclipse.pde.api.tools.ui.internal.actions.SelectSessionAction;
import org.eclipse.swt.custom.ViewForm;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.IViewSite;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPartSite;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.actions.ActionFactory;
import org.eclipse.ui.help.IWorkbenchHelpSystem;
import org.eclipse.ui.part.ViewPart;
import org.eclipse.ui.views.properties.IPropertySheetPage;
import org.eclipse.ui.views.properties.PropertySheetPage;

public class APIToolingView
  extends ViewPart
  implements ISessionListener
{
  public static final String ID = "org.eclipse.pde.api.tools.ui.views.apitooling.views.apitoolingview";
  public TreeViewer viewer;
  Label sessionDescription = null;
  IAction removeActiveSessionAction;
  IAction removeAllSessionsAction;
  IAction selectSessionAction;
  Action doubleClickAction;
  ExportSessionAction exportSessionAction;
  NavigateAction nextAction;
  NavigateAction previousAction;
  ExpandAllAction expandallAction;
  Col
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2017. Infinite Loop Ltd