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

original.getName(), original.getLocation());
        localmonitor.worked(1);
        localmonitor.subTask(WizardMessages.ApiProfileWizardPage_copy_api_components);
        ArrayList comps = new ArrayList();
        IApiComponent comp = null;
        for (int i = 0; i < components.length; i++)
        {
          comp = ApiModelFactory.newApiComponent(workingcopy, components[i].getLocation());
          if (comp != null) {
            comps.add(comp);
          }
          localmonitor.worked(1);
        }
        workingcopy.addApiComponents((IApiComponent[])comps.toArray(new IApiComponent[comps.size()]));
      }
      catch (CoreException ce)
      {
        ApiUIPlugin.log(ce);
      }
    }
    
    public IApiBaseline getWorkingCopy()
    {
      return workingcopy;
    }
  }
  
  IApiBaseline fProfile = null;
  private String originalname = null;
  boolean contentchange = false;
  private boolean initializing = false;
  private Text nametext = null;
  private TreeViewer treeviewer = null;
  Combo locationcombo = null;
  private Button browsebutton = null;
  private Button reloadbutton = null;
  
  protected ApiBaselineWizardPage(IApiBaseline profile)
  {
    super(WizardMessages.ApiProfileWizardPage_1);
    fProfile = profile;
    setTitle(WizardMessages.ApiProfileWizardPage_1);
    if (profile == null) {
      setMessage(WizardMessages.ApiProfileWizardPage_3);
    } else {
      setMessage(WizardMessages.ApiProfileWizardPage_4);
    }
    setImageDescriptor(ApiUIPlugin.getImageDescriptor("IMG_WIZBAN_PROFILE"));
  }
  
  public void createControl(Composite parent)
  {
    Composite comp = SWTFactory.createComposite(parent, 4, 1, 768);
    SWTFactory.createWrapLabel(comp, WizardMessages.ApiProfileWizardPage_5, 1);
    nametext = SWTFactory.createText(comp, 2052, 3, 769);
    nametext.addModifyListener(new ModifyListener()
    {
      public void modifyText(ModifyEvent e)
      {
        setPageComplete(pageValid());
      }
    });
    IExecutionEnvironment[] envs = JavaRuntime.getExecutionEnvironmentsManager().getExecutionEnvironments();
    ArrayList items = new ArrayList();
    for (int i = 0; i < envs.length; i++) {
      if (envs[i].getCompatibleVMs().length > 0) {
        items.add(envs[i].getId());
      }
    }
    Collections.sort(items, new Comparator()
    {
      public int compare(Object o1, Object o2)
      {
        return ((String)o1).compareTo((String)o2);
      }
    });
    SWTFactory.createVerticalSpacer(comp, 1);
    
    SWTFactory.createWrapLabel(comp, WizardMessages.ApiProfileWizardPage_9, 1);
    locationcombo = SWTFactory.createCombo(comp, 2052, 1, 769, null);
    locationcombo.addModifyListener(new ModifyListener()
    {
      public void modifyText(ModifyEvent e)
      {
        setPageComplete(pageValid());
        updateButtons();
      }
    });
    browsebutton = SWTFactory.createPushButton(comp, WizardMessages.ApiProfileWizardPage_10, null);
    browsebutton.addSelectionListener(new SelectionAdapter()
    {
      public void widgetSelected(SelectionEvent e)
      {
        DirectoryDialog dialog = new DirectoryDialog(getShell());
        dialog.setMessage(WizardMessages.ApiProfileWizardPage_11);
        String loctext = locationcombo.getText().trim();
        if (loctext.length() > 0) {
          dialog.setFilterPath(loctext);
        }
        String newPath = dialog.open();
        if ((newPath != null) && ((!new Path(loctext).equals(new Path(newPath))) || 
          (getCurrentComponents().length == 0)))
        {
          locationcombo.setText(newPath);
          setErrorMessage(null);
          doReload();
        }
      }
    });
    reloadbutton = SWTFactory.createPushButton(comp, WizardMessages.ApiProfileWizardPage_12, null);
    reloadbutton.setEnabled(locationcombo.getText().trim().length() > 0);
    reloadbutton.addSelectionListener(new SelectionAdapter()
    {
      public void widgetSelected(SelectionEvent e)
      {
        doReload();
      }
    });
    SWTFactory.createWrapLabel(comp, WizardMessages.ApiProfileWizardPage_13, 4);
    Tree tree = new Tree(comp, 67586);
    GridData gd = new GridData(1808);
    heightHint = 250;
    horizontalSpan = 4;
    tree.setLayoutData(gd);
    treeviewer = new TreeViewer(tree);
    treeviewer.setLabelProvider(new ApiToolsLabelProvider());
    treeviewer.setContentProvider(new ContentProvider());
    treeviewer.setComparator(new ViewerComparator());
    treeviewer.setInput(getCurrentComponents());
    treeviewer.addSelectionChangedListener(new ISelectionChangedListener()
    {
      public void selectionChanged(SelectionChangedEvent event)
      {
        updateButtons();
      }
    });
    treeviewer.addFilter(new ViewerFilter()
    {
      public boolean select(Viewer viewer, Object parentElement, Object element)
      {
        if ((element instanceof IApiComponent))
        {
          IApiComponent component = (IApiComponent)element;
          try
          {
            if ((component.isSourceComponent()) || (component.isSystemComponent())) {
              return false;
            }
          }
          catch (CoreException e)
          {
            ApiPlugin.log(e);
          }
          return true;
        }
        return !(element instanceof SystemLibraryApiComponent);
      }
    });
    setControl(comp);
    setPageComplete(fProfile != null);
    initialize();
    PlatformUI.getWorkbench().getHelpSystem().setHelp(comp, IApiToolsHelpContextIds.APIPROFILES_WIZARD_PAGE);
    Dialog.applyDialogFont(comp);
  }
  
  /* Error */
  protected void initialize()
  {
    // Byte code:
    //   0: aload_0
    //   1: iconst_1
    //   2: putfield 438	org/eclipse/pde/api/tools/ui/internal/wizards/ApiBaselineWizardPage:initializing	Z
    //   5: aload_0
    //   6: getfield 441	org/eclipse/pde/api/tools/ui/internal/wizards/ApiBaselineWizardPage:fProfile	Lorg/eclipse/pde/api/tools/internal/provisional/model/IApiBaseline;
    //   9: ifnull +280 -> 289
    //   12: aload_0
    //   13: aload_0
    //   14: getfield 441	org/eclipse/pde/api/tools/ui/internal/wizards/ApiBaselineWizardPage:fProfile	Lorg/eclipse/pde/api/tools/internal/provisional/model/IApiBaseline;
    //   17: invokeinterface 556 1 0
    //   22: putfield 439	org/eclipse/pde/api/tools/ui/internal/wizards/ApiBaselineWizardPage:originalname	Ljava/lang/String;
    //   25: new 244	org/eclipse/pde/api/tools/ui/internal/wizards/ApiBaselineWizardPage$WorkingCopyOperation
    //   28: dup
    //   29: aload_0
    //   30: getfield 441	org/eclipse/pde/api/tools/ui/internal/wizards/ApiBaselineWizardPage:fProfile	Lorg/eclipse/pde/api/tools/internal/provisional/model/IApiBaseline;
    //   33: invokespecial 527	org/eclipse/pde/api/tools/ui/internal/wizards/ApiBaselineWizardPage$WorkingCopyOperation:<init>	(Lorg/eclipse/pde/api/tools/internal/provisional/model/IApiBaseline;)V
    //   36: astore_1
    //   37: aload_0
    //   38: invokevirtual 514	org/eclipse/pde/api/tools/ui/internal/wizards/ApiBaselineWizardPage:getContainer	()Lorg/eclipse/jface/wizard/IWizardContainer;
    //   41: iconst_0
    //   42: iconst_0
    //   43: aload_1
    //   44: invokeinterface 552 4 0
    //   49: goto +16 -> 65
    //   52: astore_2
    //   53: aload_2
    //   54: invokestatic 497	org/eclipse/pde/api/tools/ui/internal/ApiUIPlugin:log	(Ljava/lang/Throwable;)V
    //   57: goto +8 -> 65
    //   60: astore_2
    //   61: aload_2
    //   62: invokestatic 497	org/eclipse/pde/api/tools/ui/internal/ApiUIPlugin:log	(Ljava/lang/Throwable;)V
    //   65: aload_0
    //   66: aload_1
    //   67: invokevirtual 526	org/eclipse/pde/api/tools/ui/internal/wizards/ApiBaselineWizardPage$WorkingCopyOperation:getWorkingCopy	()Lorg/eclipse/pde/api/tools/internal/provisional/model/IApiBaseline;
    //   70: putfield 441	org/eclipse/pde/api/tools/ui/internal/wizards/ApiBaselineWizardPage:fProfile	Lorg/eclipse/pde/api/tools/internal/provisional/model/IApiBaseline;
    //   73: aload_0
    //   74: getfield 445	org/eclipse/pde/api/tools/ui/internal/wizards/ApiBaselineWizardPage:nametext	Lorg/eclipse/swt/widgets/Text;
    //   77: aload_0
    //   78: getfield 441	org/eclipse/pde/api/tools/ui/internal/wizards/ApiBaselineWizardPage:fProfile	Lorg/eclipse/pde/api/tools/internal/provisional/model/IApiBaseline;
    //   81: invokeinterface 556 1 0
    //   86: invokevirtual 537	org/eclipse/swt/widgets/Text:setText	(Ljava/lang/String;)V
    //   89: aload_0
    //   90: getfield 441	org/eclipse/pde/api/tools/ui/internal/wizards/ApiBaselineWizardPage:fProfile	Lorg/eclipse/pde/api/tools/internal/provisional/model/IApiBaseline;
    //   93: invokeinterface 559 1 0
    //   98: astore_2
    //   99: new 207	java/util/HashSet
    //   102: dup
    //   103: invokespecial 472	java/util/HashSet:<init>	()V
    //   106: astore_3
    //   107: aload_0
    //   108: getfield 441	org/eclipse/pde/api/tools/ui/internal/wizards/ApiBaselineWizardPage:fProfile	Lorg/eclipse/pde/api/tools/internal/provisional/model/IApiBaseline;
    //   111: invokeinterface 555 1 0
    //   116: astore 4
    //   118: aconst_null
    //   119: astore 5
    //   121: aload 4
    //   123: ifnull +47 -> 170
    //   126: new 213	org/eclipse/core/runtime/Path
    //   129: dup
    //   130: aload 4
    //   132: invokespecial 477	org/eclipse/core/runtime/Path:<init>	(Ljava/lang/String;)V
    //   135: astore 5
    //   137: aload 5
    //   139: invokeinterface 543 1 0
    //   144: invokevirtual 463	java/io/File:isDirectory	()Z
    //   147: ifeq +103 -> 250
    //   150: aload_3
    //   151: aload 5
    //   153: invokeinterface 545 1 0
    //   158: invokeinterface 544 1 0
    //   163: invokevirtual 473	java/util/HashSet:add	(Ljava/lang/Object;)Z
    //   166: pop
    //   167: goto +83 -> 250
    //   170: iconst_0
    //   171: istore 6
    //   173: goto +70 -> 243
    //   176: aload_2
    //   177: iload 6
    //   179: aaload
    //   180: invokeinterface 560 1 0
    //   185: ifne +55 -> 240
    //   188: new 213	org/eclipse/core/runtime/Path
    //   191: dup
    //   192: aload_2
    //   193: iload 6
    //   195: aaload
    //   196: invokeinterface 561 1 0
    //   201: invokespecial 477	org/eclipse/core/runtime/Path:<init>	(Ljava/lang/String;)V
    //   204: iconst_1
    //   205: invokevirtual 479	org/eclipse/core/runtime/Path:removeLastSegments	(I)Lorg/eclipse/core/runtime/IPath;
    //   208: astore 5
    //   210: aload 5
    //   212: invokeinterface 543 1 0
    //   217: invokevirtual 463	java/io/File:isDirectory	()Z
    //   220: ifeq +20 -> 240
    //   223: aload_3
    //   224: aload 5
    //   226: invokeinterface 545 1 0
    //   231: invokeinterface 544 1 0
    //   236: invokevirtual 473	java/util/HashSet:add	(Ljava/lang/Object;)Z
    //   239: pop
    //   240: iinc 6 1
    //   243: iload 6
    //   245: aload_2
    //   246: arraylength
    //   247: if_icmplt -71 -> 176
    //   250: aload_3
    //   251: invokevirtual 471	java/util/HashSet:size	()I
    //   254: ifle +111 -> 365
    //   257: aload_0
    //   258: getfield 444	org/eclipse/pde/api/tools/ui/internal/wizards/ApiBaselineWizardPage:locationcombo	Lorg/eclipse/swt/widgets/Combo;
    //   261: aload_3
    //   262: aload_3
    //   263: invokevirtual 471	java/util/HashSet:size	()I
    //   266: anewarray 202	java/lang/String
    //   269: invokevirtual 474	java/util/HashSet:toArray	([Ljava/lang/Object;)[Ljava/lang/Object;
    //   272: checkcast 198	[Ljava/lang/String;
    //   275: invokevirtual 534	org/eclipse/swt/widgets/Combo:setItems	([Ljava/lang/String;)V
    //   278: aload_0
    //   279: getfield 444	org/eclipse/pde/api/tools/ui/internal/wizards/ApiBaselineWizardPage:locationcombo	Lorg/eclipse/swt/widgets/Combo;
    //   282: iconst_0
    //   283: invokevirtual 531	org/eclipse/swt/widgets/Combo:select	(I)V
    //   286: goto +79 -> 365
    //   289: invokestatic 480	org/eclipse/core/runtime/Platform:getInstallLocation	()Lorg/eclipse/osgi/service/datalocation/Location;
    //   292: astore_1
    //   293: aload_1
    //   294: ifnull +71 -> 365
    //   297: aload_1
    //   298: invokeinterface 553 1 0
    //   303: astore_2
    //   304: new 213	org/eclipse/core/runtime/Path
    //   307: dup
    //   308: aload_2
    //   309: invokevirtual 467	java/net/URL:getFile	()Ljava/lang/String;
    //   312: invokespecial 477	org/eclipse/core/runtime/Path:<init>	(Ljava/lang/String;)V
    //   315: invokevirtual 478	org/eclipse/core/runtime/Path:removeTrailingSeparator	()Lorg/eclipse/core/runtime/IPath;
    //   318: astore_3
    //   319: aload_3
    //   320: invokeinterface 543 1 0
    //   325: invokevirtual 462	java/io/File:exists	()Z
    //   328: ifeq +37 -> 365
    //   331: aload_0
    //   332: getfield 444	org/eclipse/pde/api/tools/ui/internal/wizards/ApiBaselineWizardPage:locationcombo	Lorg/eclipse/swt/widgets/Combo;
    //   335: aload_3
    //   336: invokeinterface 544 1 0
    //   341: invokevirtual 533	org/eclipse/swt/widgets/Combo:add	(Ljava/lang/String;)V
    //   344: aload_0
    //   345: getfield 444	org/eclipse/pde/api/tools/ui/internal/wizards/ApiBaselineWizardPage:locationcombo	Lorg/eclipse/swt/widgets/Combo;
    //   348: iconst_0
    //   349: invokevirtual 531	org/eclipse/swt/widgets/Combo:select	(I)V
    //   352: goto +13 -> 365
    //   355: astore 7
    //   357: aload_0
    //   358: iconst_0
    //   359: putfield 438	org/eclipse/pde/api/tools/ui/internal/wizards/ApiBaselineWizardPage:initializing	Z
    //   362: aload 7
    //   364: athrow
    //   365: aload_0
    //   366: iconst_0
    //   367: putfield 438	org/eclipse/pde/api/tools/ui/internal/wizards/ApiBaselineWizardPage:initializing	Z
    //   370: return
    // Line number table:
    //   Java source line #389	-> byte code offset #0
    //   Java source line #391	-> byte code offset #5
    //   Java source line #392	-> byte code offset #12
    //   Java source line #393	-> byte code offset #25
    //   Java source line #395	-> byte code offset #37
    //   Java source line #396	-> byte code offset #52
    //   Java source line #397	-> byte code offset #53
    //   Java source line #398	-> byte code offset #60
    //   Java source line #399	-> byte code offset #61
    //   Java source line #401	-> byte code offset #65
    //   Java source line #402	-> byte code offset #73
    //   Java source line #403	-> byte code offset #89
    //   Java source line #404	-> byte code offset #99
    //   Java source line #405	-> byte code offset #107
    //   Java source line #406	-> byte code offset #118
    //   Java source line #407	-> byte code offset #121
    //   Java source line #408	-> byte code offset #126
    //   Java source line #410	-> byte code offset #137
    //   Java source line #411	-> byte code offset #150
    //   Java source line #414	-> byte code offset #170
    //   Java source line #415	-> byte code offset #176
    //   Java source line #416	-> byte code offset #188
    //   Java source line #417	-> byte code offset #210
    //   Java source line #418	-> byte code offset #223
    //   Java source line #414	-> byte code offset #240
    //   Java source line #423	-> byte code offset #250
    //   Java source line #424	-> byte code offset #257
    //   Java source line #425	-> byte code offset #278
    //   Java source line #431	-> byte code offset #289
    //   Java source line #432	-> byte code offset #293
    //   Java source line #433	-> byte code offset #297
    //   Java source line #434	-> byte code offset #304
    //   Java source line #435	-> byte code offset #319
    //   Java source line #436	-> byte code offset #331
    //   Java source line #437	-> byte code offset #344
    //   Java source line #442	-> byte code offset #355
    //   Java source line #443	-> byte code offset #357
    //   Java source line #444	-> byte code offset #362
    //   Java source line #443	-> byte code offset #365
    //   Java source line #445	-> byte code offset #370
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	371	0	this	ApiBaselineWizardPage
    //   36	31	1	op	WorkingCopyOperation
    //   292	6	1	location	org.eclipse.osgi.service.datalocation.Location
    //   52	2	2	e	InvocationTargetException
    //   60	2	2	e	InterruptedException
    //   98	148	2	components	IApiComponent[]
    //   303	6	2	url	java.net.URL
    //   106	157	3	locations	java.util.HashSet
    //   318	18	3	path	org.eclipse.core.runtime.IPath
    //   116	15	4	loc	String
    //   119	106	5	location	org.eclipse.core.runtime.IPath
    //   171	73	6	i	int
    //   355	8	7	localObject	Object
    // Exception table:
    //   from	to	target	type
    //   37	49	52	java/lang/reflect/InvocationTargetException
    //   37	49	60	java/lang/InterruptedException
    //   5	355	355	finally
  }
  
  protected void doReload()
  {
    ReloadOperation op = new ReloadOperation(nametext.getText().trim(), locationcombo.getText().trim());
    try
    {
      getContainer().run(true, true, op);
      treeviewer.setInput(getCurrentComponents());
      treeviewer.refresh();
      setPageComplete(pageValid());
    }
    catch (InvocationTargetException localInvocationTargetException) {}catch (InterruptedException localInterruptedException) {}
  }
  
  protected boolean pageValid()
  {
    if (initializing) {
      return false;
    }
    setErrorMessage(null);
    if (!isNameValid(nametext.getText().trim())) {
      return false;
    }
    String text = locationcombo.getText().trim();
    if (text.length() < 1)
    {
      setErrorMessage(WizardMessages.ApiProfileWizardPage_23);
      reloadbutton.setEnabled(false);
      return false;
    }
    if (!new Path(text).toFile().exists())
    {
      setErrorMessage(WizardMessages.ApiProfileWizardPage_24);
      reloadbutton.setEnabled(false);
      return false;
    }
    if (fProfile != null)
    {
      if (fProfile.getApiComponents().length == 0)
      {
        setErrorMessage(WizardMessages.ApiProfileWizardPage_2);
        return false;
      }
      IStatus status = fProfile.getExecutionEnvironmentStatus();
      if (status.getSeverity() == 4)
      {
        setErrorMessage(status.getMessage());
        return false;
      }
    }
    else
    {
      setErrorMessage(WizardMessages.ApiProfileWizardPage_location_needs_reset);
      return false;
    }
    return true;
  }
  
  private boolean isNameValid(String name)
  {
    if (name.length() < 1)
    {
      setErrorMessage(WizardMessages.ApiProfileWizardPage_20);
      return false;
    }
    if ((!name.equals(originalname)) && (((ApiBaselineManager)ApiPlugin.getDefault().getApiBaselineManager()).isExistingProfileName(name)) && 
      (!ApiBaselinePreferencePage.isRemovedBaseline(name)))
    {
      setErrorMessage(WizardMessages.ApiProfileWizardPage_profile_with_that_name_exists);
      return false;
    }
    IStatus status = ResourcesPlugin.getWorkspace().validateName(name, 1);
    if (!status.isOK())
    {
      setErrorMessage(status.getMessage());
      return false;
    }
    return true;
  }
  
  protected IApiComponent[] getCurrentComponents()
  {
    if (fProfile != null) {
      return fProfile.getApiComponents();
    }
    return new IApiComponent[0];
  }
  
  protected void updateButtons()
  {
    String loctext = locationcombo.getText().trim();
    reloadbutton.setEnabled(loctext.length() > 0);
  }
  
  public IApiBaseline finish()
    throws IOException, CoreException
  {
    if (fProfile != null) {
      fProfile.setName(nametext.getText().trim());
    }
    return fProfile;
  }
  
  public boolean contentChanged()
  {
    return contentchange;
  }
  
  public void cancel()
  {
    if (fProfile != null) {
      fProfile.dispose();
    }
  }
}

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

import java.util.HashSet;
import java.util.Iterator;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.core.runtime.Status;
import org.eclipse.ltk.core.refactoring.Change;
import org.eclipse.ltk.core.refactoring.CompositeChange;
import org.eclipse.ltk.core.refactoring.NullChange;
import org.eclipse.ltk.core.refactoring.Refactoring;
import org.eclipse.ltk.core.refactoring.RefactoringStatus;

public class ApiToolingSetupRefactoring
  extends Refactoring
{
  private HashSet fChanges = null;
  
  public RefactoringStatus checkFinalConditions(IProgressMonitor pm)
    throws CoreException, OperationCanceledException
  {
    if ((fChanges == null) || (fChanges.size() < 1)) {
      return RefactoringStatus.createErrorStatus(WizardMessages.JavadocTagRefactoring_0);
    }
    return RefactoringStatus.create(Status.OK_STATUS);
  }
  
  public RefactoringStatus checkInitialConditions(IProgressMonitor pm)
    throws CoreException, OperationCanceledException
  {
    return RefactoringStatus.create(Status.OK_STATUS);
  }
  
  public Change createChange(IProgressMonitor pm)
    throws CoreException, OperationCanceledException
  {
    if (fChanges == null) {
      return new NullChange();
    }
    CompositeChange change = new CompositeChange(WizardMessages.JavadocTagRefactoring_1);
    for (Iterator iter = fChanges.iterator(); iter.hasNext();) {
      change.add((Change)iter.next());
    }
    return change;
  }
  
  public void addChange(Change change)
  {
    if (fChanges == null) {
      fChanges = new HashSet();
    }
    fChanges.add(change);
  }
  
  public void resetRefactoring()
  {
    if (fChanges != null)
    {
      fChanges.clear();
      fChanges = null;
    }
  }
  
  public String getName()
  {
    return WizardMessages.JavadocTagRefactoring_3;
  }
}

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

import org.eclipse.ltk.core.refactoring.Refactoring;
import org.eclipse.ltk.ui.refactoring.RefactoringWizard;

public class ApiToolingSetupWizard
  extends RefactoringWizard
{
  public ApiToolingSetupWizard(Refactoring refactoring)
  {
    super(refactoring, 2);
    setWindowTitle(WizardMessages.UpdateJavadocTagsWizard_0);
    setNeedsProgressMonitor(true);
    setChangeCreationCancelable(false);
    setDefaultPageTitle(WizardMessages.ApiToolingSetupWizard_0);
  }
  
  public boolean performFinish()
  {
    super.performFinish();
    return ((ApiToolingSetupWizardPage)getStartingPage()).finish();
  }
  
  protected void addUserInputPages()
  {
    addPage(new ApiToolingSetupWizardPage());
  }
}

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

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

class ApiToolingSetupWizardPage$1
  implements ModifyListener
{
  final ApiToolingSetupWizardPage this$0;
  private final Text val$text;
  
  ApiToolingSetupWizardPage$1(ApiToolingSetupWizardPage paramApiToolingSetupWizardPage, Text paramText)
  {
    this$0 = paramApiToolingSetupWizardPage;val$text = paramText;
  }
  
  public void modifyText(ModifyEvent e)
  {
    this$0.updatejob.setFilter(val$text.getText().trim());
    this$0.updatejob.cancel();
    this$0.updatejob.schedule();
  }
}

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

import org.eclipse.jface.viewers.CheckboxTableViewer;
import org.eclipse.swt.events.KeyAdapter;
import org.eclipse.swt.events.KeyEvent;
import org.eclipse.swt.widgets.Table;

class ApiToolingSetupWizardPage$2
  extends KeyAdapter
{
  final ApiToolingSetupWizardPage this$0;
  
  ApiToolingSetupWizardPage$2(ApiToolingSetupWizardPage paramApiToolingSetupWizardPage)
  {
    this$0 = paramApiToolingSetupWizardPage;
  }
  
  public void keyPressed(KeyEvent e)
  {
    if ((keyCode == 16777218) && 
      (this$0.tableviewer != null)) {
      this$0.tableviewer.getTable().setFocus();
    }
  }
}

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

import java.util.HashSet;
import org.eclipse.jface.viewers.CheckStateChangedEvent;
import org.eclipse.jface.viewers.ICheckStateListener;

class ApiToolingSetupWizardPage$3
  implements ICheckStateListener
{
  final ApiToolingSetupWizardPage this$0;
  
  ApiToolingSetupWizardPage$3(ApiToolingSetupWizardPage paramApiToolingSetupWizardPage)
  {
    this$0 = paramApiToolingSetupWizardPage;
  }
  
  public void checkStateChanged(CheckStateChangedEvent event)
  {
    if (event.getChecked()) {
      this$0.checkedset.add(event.getElement());
    } else {
      this$0.checkedset.remove(event.getElement());
    }
    this$0.setPageComplete(this$0.pageValid());
  }
}

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

import java.util.Arrays;
import java.util.HashSet;
import org.eclipse.jface.viewers.CheckboxTableViewer;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;

class ApiToolingSetupWizardPage$4
  extends SelectionAdapter
{
  final ApiToolingSetupWizardPage this$0;
  
  ApiToolingSetupWizardPage$4(ApiToolingSetupWizardPage paramApiToolingSetupWizardPage)
  {
    this$0 = paramApiToolingSetupWizardPage;
  }
  
  public void widgetSelected(SelectionEvent e)
  {
    this$0.tableviewer.setAllChecked(true);
    this$0.checkedset.addAll(Arrays.asList(this$0.tableviewer.getCheckedElements()));
    this$0.setPageComplete(this$0.pageValid());
  }
}

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

import java.util.HashSet;
import org.eclipse.jface.viewers.CheckboxTableViewer;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableItem;

class ApiToolingSetupWizardPage$5
  extends SelectionAdapter
{
  final ApiToolingSetupWizardPage this$0;
  
  ApiToolingSetupWizardPage$5(ApiToolingSetupWizardPage paramApiToolingSetupWizardPage)
  {
    this$0 = paramApiToolingSetupWizardPage;
  }
  
  public void widgetSelected(SelectionEvent e)
  {
    this$0.tableviewer.setAllChecked(false);
    TableItem[] items = this$0.tableviewer.getTable().getItems();
    for (int i = 0; i < items.length; i++) {
      this$0.checkedset.remove(items[i].getData());
    }
    this$0.setPageComplete(this$0.pageValid());
  }
}

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

import com.ibm.icu.text.MessageFormat;
import java.io.File;
import java.lang.reflect.InvocationTargetException;
import java.util.HashSet;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.SubMonitor;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.ltk.core.refactoring.CompositeChange;
import org.eclipse.ltk.core.refactoring.resource.DeleteResourceChange;
import org.eclipse.pde.api.tools.internal.util.Util;
import org.eclipse.swt.widgets.Button;

class ApiToolingSetupWizardPage$6
  implements IRunnableWithProgress
{
  final ApiToolingSetupWizardPage this$0;
  private final ApiToolingSetupRefactoring val$refactoring;
  
  ApiToolingSetupWizardPage$6(ApiToolingSetupWizardPage paramApiToolingSetupWizardPage, ApiToolingSetupRefactoring paramApiToolingSetupRefactoring)
  {
    this$0 = paramApiToolingSetupWizardPage;val$refactoring = paramApiToolingSetupRefactoring;
  }
  
  public void run(IProgressMonitor monitor)
    throws InvocationTargetException, InterruptedException
  {
    Object[] projects = this$0.checkedset.toArray(new IProject[this$0.checkedset.size()]);
    IProject project = null;
    SubMonitor localmonitor = SubMonitor.convert(monitor);
    localmonitor.beginTask("", projects.length);
    localmonitor.setTaskName(WizardMessages.ApiToolingSetupWizardPage_7);
    val$refactoring.resetRefactoring();
    boolean remove = this$0.removecxml.getSelection();
    CompositeChange pchange = null;
    for (int i = 0; i < projects.length; i++)
    {
      project = (IProject)projects[i];
      pchange = new CompositeChange(project.getName());
      val$refactoring.addChange(pchange);
      pchange.add(new ProjectUpdateChange(project));
      localmonitor.subTask(MessageFormat.format(WizardMessages.ApiToolingSetupWizardPage_4, new String[] { project.getName() }));
      IResource cxml = project.findMember("component.xml");
      if (cxml != null)
      {
        this$0.createTagChanges(pchange, JavaCore.create(project), new File(cxml.getLocationURI()));
        if (remove) {
          pchange.add(new DeleteResourceChange(cxml.getFullPath(), true));
        }
      }
      Util.updateMonitor(localmonitor, 1);
    }
  }
}

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

import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.pde.api.tools.ui.internal.SWTFactory;
import org.eclipse.ui.progress.UIJob;

class ApiToolingSetupWizardPage$7
  extends UIJob
{
  final ApiToolingSetupWizardPage this$0;
  
  ApiToolingSetupWizardPage$7(ApiToolingSetupWizardPage paramApiToolingSetupWizardPage, String $anonymous0)
  {
    super($anonymous0);this$0 = paramApiToolingSetupWizardPage;
  }
  
  public IStatus runInUIThread(IProgressMonitor monitor)
  {
    boolean doit = MessageDialog.openQuestion(this$0.getShell(), WizardMessages.ApiToolingSetupWizardPage_1, WizardMessages.ApiToolingSetupWizardPage_2 + 
      WizardMessages.ApiToolingSetupWizardPage_3);
    if (doit) {
      SWTFactory.showPreferencePage(this$0.getShell(), "org.eclipse.pde.api.tools.ui.apiprofiles.prefpage", null);
    }
    return Status.OK_STATUS;
  }
}

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

import org.eclipse.core.resources.IResource;
import org.eclipse.jdt.internal.ui.util.StringMatcher;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerFilter;

class ApiToolingSetupWizardPage$StringFilter
  extends ViewerFilter
{
  private String pattern = null;
  StringMatcher matcher = null;
  
  public void setPattern(String pattern)
  {
    this.pattern = pattern;
  }
  
  public boolean select(Viewer viewer, Object parentElement, Object element)
  {
    if (pattern == null) {
      return true;
    }
    if (pattern.trim().length() == 0) {
      return true;
    }
    String name = null;
    if ((element instanceof IResource)) {
      name = ((IResource)element).getName();
    }
    if (name == null) {
      return false;
    }
    matcher = new StringMatcher(pattern, true, false);
    return matcher.match(name, 0, name.length());
  }
}

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

import org.eclipse.ui.progress.WorkbenchJob;

class ApiToolingSetupWizardPage$UpdateJob
  extends WorkbenchJob
{
  private String pattern;
  final ApiToolingSetupWizardPage this$0;
  
  public ApiToolingSetupWizardPage$UpdateJob(ApiToolingSetupWizardPage paramApiToolingSetupWizardPage)
  {
    super(WizardMessages.ApiToolingSetupWizardPage_filter_update_job);this$0 = paramApiToolingSetupWizardPage;pattern = null;
    setSystem(true);
  }
  
  public synchronized void setFilter(String pattern)
  {
    this.pattern = pattern;
  }
  
  /* Error */
  public org.eclipse.core.runtime.IStatus runInUIThread(org.eclipse.core.runtime.IProgressMonitor monitor)
  {
    // Byte code:
    //   0: aload_0
    //   1: getfield 87	org/eclipse/pde/api/tools/ui/internal/wizards/ApiToolingSetupWizardPage$UpdateJob:this$0	Lorg/eclipse/pde/api/tools/ui/internal/wizards/ApiToolingSetupWizardPage;
    //   4: getfield 84	org/eclipse/pde/api/tools/ui/internal/wizards/ApiToolingSetupWizardPage:tableviewer	Lorg/eclipse/jface/viewers/CheckboxTableViewer;
    //   7: ifnull +126 -> 133
    //   10: aload_0
    //   11: getfield 87	org/eclipse/pde/api/tools/ui/internal/wizards/ApiToolingSetupWizardPage$UpdateJob:this$0	Lorg/eclipse/pde/api/tools/ui/internal/wizards/ApiToolingSetupWizardPage;
    //   14: getfield 84	org/eclipse/pde/api/tools/ui/internal/wizards/ApiToolingSetupWizardPage:tableviewer	Lorg/eclipse/jface/viewers/CheckboxTableViewer;
    //   17: invokevirtual 96	org/eclipse/jface/viewers/CheckboxTableViewer:getTable	()Lorg/eclipse/swt/widgets/Table;
    //   20: iconst_0
    //   21: invokevirtual 99	org/eclipse/swt/widgets/Table:setRedraw	(Z)V
    //   24: aload_0
    //   25: dup
    //   26: astore_2
    //   27: monitorenter
    //   28: aload_0
    //   29: getfield 87	org/eclipse/pde/api/tools/ui/internal/wizards/ApiToolingSetupWizardPage$UpdateJob:this$0	Lorg/eclipse/pde/api/tools/ui/internal/wizards/ApiToolingSetupWizardPage;
    //   32: getfield 85	org/eclipse/pde/api/tools/ui/internal/wizards/ApiToolingSetupWizardPage:filter	Lorg/eclipse/pde/api/tools/ui/internal/wizards/ApiToolingSetupWizardPage$StringFilter;
    //   35: new 37	java/lang/StringBuffer
    //   38: dup
    //   39: aload_0
    //   40: getfield 86	org/eclipse/pde/api/tools/ui/internal/wizards/ApiToolingSetupWizardPage$UpdateJob:pattern	Ljava/lang/String;
    //   43: invokestatic 89	java/lang/String:valueOf	(Ljava/lang/Object;)Ljava/lang/String;
    //   46: invokespecial 91	java/lang/StringBuffer:<init>	(Ljava/lang/String;)V
    //   49: bipush 42
    //   51: invokevirtual 92	java/lang/StringBuffer:append	(C)Ljava/lang/StringBuffer;
    //   54: invokevirtual 90	java/lang/StringBuffer:toString	()Ljava/lang/String;
    //   57: invokevirtual 97	org/eclipse/pde/api/tools/ui/internal/wizards/ApiToolingSetupWizardPage$StringFilter:setPattern	(Ljava/lang/String;)V
    //   60: aload_2
    //   61: monitorexit
    //   62: goto +6 -> 68
    //   65: aload_2
    //   66: monitorexit
    //   67: athrow
    //   68: aload_0
    //   69: getfield 87	org/eclipse/pde/api/tools/ui/internal/wizards/ApiToolingSetupWizardPage$UpdateJob:this$0	Lorg/eclipse/pde/api/tools/ui/internal/wizards/ApiToolingSetupWizardPage;
    //   72: getfield 84	org/eclipse/pde/api/tools/ui/internal/wizards/ApiToolingSetupWizardPage:tableviewer	Lorg/eclipse/jface/viewers/CheckboxTableViewer;
    //   75: iconst_1
    //   76: invokevirtual 94	org/eclipse/jface/viewers/CheckboxTableViewer:refresh	(Z)V
    //   79: aload_0
    //   80: getfield 87	org/eclipse/pde/api/tools/ui/internal/wizards/ApiToolingSetupWizardPage$UpdateJob:this$0	Lorg/eclipse/pde/api/tools/ui/internal/wizards/ApiToolingSetupWizardPage;
    //   83: getfield 84	org/eclipse/pde/api/tools/ui/internal/wizards/ApiToolingSetupWizardPage:tableviewer	Lorg/eclipse/jface/viewers/CheckboxTableViewer;
    //   86: aload_0
    //   87: getfield 87	org/eclipse/pde/api/tools/ui/internal/wizards/ApiToolingSetupWizardPage$UpdateJob:this$0	Lorg/eclipse/pde/api/tools/ui/internal/wizards/ApiToolingSetupWizardPage;
    //   90: getfield 83	org/eclipse/pde/api/tools/ui/internal/wizards/ApiToolingSetupWizardPage:checkedset	Ljava/util/HashSet;
    //   93: invokevirtual 93	java/util/HashSet:toArray	()[Ljava/lang/Object;
    //   96: invokevirtual 95	org/eclipse/jface/viewers/CheckboxTableViewer:setCheckedElements	([Ljava/lang/Object;)V
    //   99: goto +20 -> 119
    //   102: astore_3
    //   103: aload_0
    //   104: getfield 87	org/eclipse/pde/api/tools/ui/internal/wizards/ApiToolingSetupWizardPage$UpdateJob:this$0	Lorg/eclipse/pde/api/tools/ui/internal/wizards/ApiToolingSetupWizardPage;
    //   107: getfield 84	org/eclipse/pde/api/tools/ui/internal/wizards/ApiToolingSetupWizardPage:tableviewer	Lorg/eclipse/jface/viewers/CheckboxTableViewer;
    //   110: invokevirtual 96	org/eclipse/jface/viewers/CheckboxTableViewer:getTable	()Lorg/eclipse/swt/widgets/Table;
    //   113: iconst_1
    //   114: invokevirtual 99	org/eclipse/swt/widgets/Table:setRedraw	(Z)V
    //   117: aload_3
    //   118: athrow
    //   119: aload_0
    //   120: getfield 87	org/eclipse/pde/api/tools/ui/internal/wizards/ApiToolingSetupWizardPage$UpdateJob:this$0	Lorg/eclipse/pde/api/tools/ui/internal/wizards/ApiToolingSetupWizardPage;
    //   123: getfield 84	org/eclipse/pde/api/tools/ui/internal/wizards/ApiToolingSetupWizardPage:tableviewer	Lorg/eclipse/jface/viewers/CheckboxTableViewer;
    //   126: invokevirtual 96	org/eclipse/jface/viewers/CheckboxTableViewer:getTable	()Lorg/eclipse/swt/widgets/Table;
    //   129: iconst_1
    //   130: invokevirtual 99	org/eclipse/swt/widgets/Table:setRedraw	(Z)V
    //   133: getstatic 82	org/eclipse/core/runtime/Status:OK_STATUS	Lorg/eclipse/core/runtime/IStatus;
    //   136: areturn
    // Line number table:
    //   Java source line #122	-> byte code offset #0
    //   Java source line #124	-> byte code offset #10
    //   Java source line #125	-> byte code offset #24
    //   Java source line #126	-> byte code offset #28
    //   Java source line #125	-> byte code offset #60
    //   Java source line #128	-> byte code offset #68
    //   Java source line #129	-> byte code offset #79
    //   Java source line #131	-> byte code offset #102
    //   Java source line #132	-> byte code offset #103
    //   Java source line #133	-> byte code offset #117
    //   Java source line #132	-> byte code offset #119
    //   Java source line #135	-> byte code offset #133
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	137	0	this	UpdateJob
    //   0	137	1	monitor	org.eclipse.core.runtime.IProgressMonitor
    //   102	16	3	localObject1	Object
    // Exception table:
    //   from	to	target	type
    //   28	62	65	finally
    //   65	67	65	finally
    //   10	102	102	finally
  }
}

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

import com.ibm.icu.text.MessageFormat;
import java.io.File;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Map.Entry;
import java.util.Set;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResour
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