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

ffset #165
    //   Java source line #84	-> byte code offset #171
    //   Java source line #85	-> byte code offset #177
    //   Java source line #86	-> byte code offset #184
    //   Java source line #88	-> byte code offset #188
    //   Java source line #89	-> byte code offset #196
    //   Java source line #90	-> byte code offset #203
    //   Java source line #91	-> byte code offset #212
    //   Java source line #92	-> byte code offset #217
    //   Java source line #94	-> byte code offset #228
    //   Java source line #95	-> byte code offset #237
    //   Java source line #96	-> byte code offset #252
    //   Java source line #201	-> byte code offset #263
    //   Java source line #202	-> byte code offset #267
    //   Java source line #98	-> byte code offset #273
    //   Java source line #201	-> byte code offset #274
    //   Java source line #202	-> byte code offset #278
    //   Java source line #102	-> byte code offset #284
    //   Java source line #105	-> byte code offset #285
    //   Java source line #106	-> byte code offset #291
    //   Java source line #107	-> byte code offset #297
    //   Java source line #108	-> byte code offset #312
    //   Java source line #109	-> byte code offset #324
    //   Java source line #110	-> byte code offset #331
    //   Java source line #111	-> byte code offset #348
    //   Java source line #112	-> byte code offset #351
    //   Java source line #113	-> byte code offset #361
    //   Java source line #114	-> byte code offset #368
    //   Java source line #115	-> byte code offset #372
    //   Java source line #117	-> byte code offset #379
    //   Java source line #118	-> byte code offset #386
    //   Java source line #119	-> byte code offset #391
    //   Java source line #120	-> byte code offset #396
    //   Java source line #121	-> byte code offset #403
    //   Java source line #122	-> byte code offset #410
    //   Java source line #123	-> byte code offset #418
    //   Java source line #124	-> byte code offset #425
    //   Java source line #125	-> byte code offset #430
    //   Java source line #128	-> byte code offset #437
    //   Java source line #130	-> byte code offset #455
    //   Java source line #131	-> byte code offset #462
    //   Java source line #132	-> byte code offset #465
    //   Java source line #133	-> byte code offset #477
    //   Java source line #134	-> byte code offset #489
    //   Java source line #135	-> byte code offset #496
    //   Java source line #136	-> byte code offset #506
    //   Java source line #137	-> byte code offset #509
    //   Java source line #132	-> byte code offset #512
    //   Java source line #140	-> byte code offset #522
    //   Java source line #201	-> byte code offset #527
    //   Java source line #202	-> byte code offset #531
    //   Java source line #140	-> byte code offset #537
    //   Java source line #142	-> byte code offset #538
    //   Java source line #144	-> byte code offset #550
    //   Java source line #145	-> byte code offset #557
    //   Java source line #146	-> byte code offset #564
    //   Java source line #147	-> byte code offset #571
    //   Java source line #148	-> byte code offset #580
    //   Java source line #149	-> byte code offset #593
    //   Java source line #151	-> byte code offset #604
    //   Java source line #152	-> byte code offset #611
    //   Java source line #153	-> byte code offset #618
    //   Java source line #154	-> byte code offset #621
    //   Java source line #155	-> byte code offset #633
    //   Java source line #156	-> byte code offset #645
    //   Java source line #157	-> byte code offset #658
    //   Java source line #158	-> byte code offset #662
    //   Java source line #154	-> byte code offset #665
    //   Java source line #161	-> byte code offset #675
    //   Java source line #162	-> byte code offset #680
    //   Java source line #163	-> byte code offset #687
    //   Java source line #164	-> byte code offset #698
    //   Java source line #165	-> byte code offset #711
    //   Java source line #166	-> byte code offset #720
    //   Java source line #167	-> byte code offset #735
    //   Java source line #169	-> byte code offset #754
    //   Java source line #171	-> byte code offset #766
    //   Java source line #172	-> byte code offset #773
    //   Java source line #173	-> byte code offset #780
    //   Java source line #174	-> byte code offset #787
    //   Java source line #175	-> byte code offset #796
    //   Java source line #176	-> byte code offset #809
    //   Java source line #181	-> byte code offset #819
    //   Java source line #182	-> byte code offset #823
    //   Java source line #184	-> byte code offset #830
    //   Java source line #185	-> byte code offset #837
    //   Java source line #186	-> byte code offset #848
    //   Java source line #187	-> byte code offset #852
    //   Java source line #189	-> byte code offset #862
    //   Java source line #190	-> byte code offset #864
    //   Java source line #191	-> byte code offset #866
    //   Java source line #192	-> byte code offset #867
    //   Java source line #193	-> byte code offset #868
    //   Java source line #194	-> byte code offset #869
    //   Java source line #190	-> byte code offset #870
    //   Java source line #195	-> byte code offset #876
    //   Java source line #190	-> byte code offset #879
    //   Java source line #191	-> byte code offset #881
    //   Java source line #192	-> byte code offset #882
    //   Java source line #193	-> byte code offset #883
    //   Java source line #194	-> byte code offset #884
    //   Java source line #190	-> byte code offset #885
    //   Java source line #198	-> byte code offset #894
    //   Java source line #199	-> byte code offset #895
    //   Java source line #201	-> byte code offset #899
    //   Java source line #202	-> byte code offset #903
    //   Java source line #200	-> byte code offset #912
    //   Java source line #201	-> byte code offset #914
    //   Java source line #202	-> byte code offset #918
    //   Java source line #204	-> byte code offset #924
    //   Java source line #201	-> byte code offset #927
    //   Java source line #202	-> byte code offset #931
    //   Java source line #205	-> byte code offset #937
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	938	0	this	UpdateSinceTagOperation
    //   0	938	1	monitor	org.eclipse.core.runtime.IProgressMonitor
    //   42	2	2	charStartAttribute	Integer
    //   285	1	2	charStartAttribute	Integer
    //   538	1	2	charStartAttribute	Integer
    //   894	2	2	e	org.eclipse.core.runtime.CoreException
    //   47	213	3	intValue	int
    //   285	71	3	intValue	int
    //   538	1	3	intValue	int
    //   49	100	4	javaElement	org.eclipse.jdt.core.IJavaElement
    //   285	1	4	javaElement	org.eclipse.jdt.core.IJavaElement
    //   538	1	4	javaElement	org.eclipse.jdt.core.IJavaElement
    //   52	145	5	handleElement	org.eclipse.jdt.core.IJavaElement
    //   285	1	5	handleElement	org.eclipse.jdt.core.IJavaElement
    //   538	1	5	handleElement	org.eclipse.jdt.core.IJavaElement
    //   67	3	6	resource	org.eclipse.core.resources.IResource
    //   93	8	6	handle	String
    //   153	27	6	compilationUnit	org.eclipse.jdt.core.ICompilationUnit
    //   285	13	6	compilationUnit	org.eclipse.jdt.core.ICompilationUnit
    //   538	342	6	compilationUnit	org.eclipse.jdt.core.ICompilationUnit
    //   175	3	7	parser	org.eclipse.jdt.core.dom.ASTParser
    //   285	47	7	parser	org.eclipse.jdt.core.dom.ASTParser
    //   538	1	7	parser	org.eclipse.jdt.core.dom.ASTParser
    //   201	28	8	member	org.eclipse.jdt.core.IMember
    //   310	17	8	options	java.util.Map
    //   538	1	8	options	java.util.Map
    //   210	43	9	range	org.eclipse.jdt.core.ISourceRange
    //   346	51	9	unit	org.eclipse.jdt.core.dom.CompilationUnit
    //   538	1	9	unit	org.eclipse.jdt.core.dom.CompilationUnit
    //   349	93	10	node	org.eclipse.jdt.core.dom.BodyDeclaration
    //   538	67	10	node	org.eclipse.jdt.core.dom.BodyDeclaration
    //   359	21	11	nodeFinder	NodeFinder
    //   538	1	11	nodeFinder	NodeFinder
    //   401	30	12	ast	org.eclipse.jdt.core.dom.AST
    //   538	243	12	ast	org.eclipse.jdt.core.dom.AST
    //   408	30	13	rewrite	org.eclipse.jdt.core.dom.rewrite.ASTRewrite
    //   538	293	13	rewrite	org.eclipse.jdt.core.dom.rewrite.ASTRewrite
    //   423	33	14	docnode	org.eclipse.jdt.core.dom.Javadoc
    //   538	3	14	docnode	org.eclipse.jdt.core.dom.Javadoc
    //   609	148	14	docnode	org.eclipse.jdt.core.dom.Javadoc
    //   835	5	14	edit	org.eclipse.text.edits.TextEdit
    //   460	6	15	tags	java.util.List
    //   548	46	15	lrewrite	org.eclipse.jdt.core.dom.rewrite.ListRewrite
    //   616	261	15	tags	java.util.List
    //   463	60	16	found	boolean
    //   555	41	16	newtag	org.eclipse.jdt.core.dom.TagElement
    //   619	193	16	sinceTag	org.eclipse.jdt.core.dom.TagElement
    //   472	41	17	iterator	java.util.Iterator
    //   569	17	17	textElement	org.eclipse.jdt.core.dom.TextElement
    //   628	38	17	iterator	java.util.Iterator
    //   685	14	17	fragments	java.util.List
    //   487	3	18	element	org.eclipse.jdt.core.dom.TagElement
    //   643	16	18	tagElement	org.eclipse.jdt.core.dom.TagElement
    //   709	29	18	textElement	org.eclipse.jdt.core.dom.TextElement
    //   764	46	18	lrewrite	org.eclipse.jdt.core.dom.rewrite.ListRewrite
    //   494	5	19	tagName	String
    //   718	25	19	buffer	StringBuffer
    //   771	43	19	newtag	org.eclipse.jdt.core.dom.TagElement
    //   785	17	20	textElement	org.eclipse.jdt.core.dom.TextElement
    //   912	13	21	localObject	Object
    // Exception table:
    //   from	to	target	type
    //   819	862	862	finally
    //   28	263	894	org/eclipse/core/runtime/CoreException
    //   285	527	894	org/eclipse/core/runtime/CoreException
    //   538	891	894	org/eclipse/core/runtime/CoreException
    //   28	263	912	finally
    //   285	527	912	finally
    //   538	899	912	finally
  }
}

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

import org.eclipse.core.resources.IMarker;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.ui.progress.UIJob;

class VersionNumberingResolution$1
  extends UIJob
{
  final VersionNumberingResolution this$0;
  private final IMarker val$marker;
  
  VersionNumberingResolution$1(VersionNumberingResolution paramVersionNumberingResolution, String $anonymous0, IMarker paramIMarker)
  {
    super($anonymous0);this$0 = paramVersionNumberingResolution;val$marker = paramIMarker;
  }
  
  public IStatus runInUIThread(IProgressMonitor monitor)
  {
    UpdateBundleVersionOperation updateBundleVersionOperation = 
      new UpdateBundleVersionOperation(
      val$marker, 
      this$0.newVersionValue);
    return updateBundleVersionOperation.run(monitor);
  }
}

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

import org.eclipse.core.resources.IMarker;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.osgi.util.NLS;
import org.eclipse.pde.api.tools.internal.problems.ApiProblemFactory;
import org.eclipse.pde.api.tools.ui.internal.ApiUIPlugin;
import org.eclipse.swt.graphics.Image;
import org.eclipse.ui.IMarkerResolution2;
import org.eclipse.ui.progress.UIJob;

public class VersionNumberingResolution
  implements IMarkerResolution2
{
  String newVersionValue;
  private int kind;
  private String description;
  
  public VersionNumberingResolution(IMarker marker)
  {
    newVersionValue = marker.getAttribute("version", null);
    kind = ApiProblemFactory.getProblemKind(marker.getAttribute("problemid", 0));
    description = marker.getAttribute("description", null);
  }
  
  public String getDescription()
  {
    switch (kind)
    {
    case 1: 
      return NLS.bind(
        MarkerMessages.VersionNumberingResolution_major0, 
        new String[] { description });
    case 2: 
      return NLS.bind(
        MarkerMessages.VersionNumberingResolution_minor0, 
        new String[] { description });
    case 3: 
      return NLS.bind(
        MarkerMessages.VersionNumberingResolution_major0, 
        new String[] { description });
    case 4: 
      return MarkerMessages.VersionNumberingResolution_minorNoNewAPI0;
    case 5: 
      return MarkerMessages.VersionNumberingResolution_reexportedMajor0;
    }
    return MarkerMessages.VersionNumberingResolution_reexportedMinor0;
  }
  
  public Image getImage()
  {
    return ApiUIPlugin.getSharedImage("IMG_OBJ_BUNDLE_VERSION");
  }
  
  public String getLabel()
  {
    switch (kind)
    {
    case 1: 
      return NLS.bind(MarkerMessages.VersionNumberingResolution_major1, newVersionValue);
    case 2: 
      return NLS.bind(MarkerMessages.VersionNumberingResolution_minor1, newVersionValue);
    case 3: 
      return NLS.bind(MarkerMessages.VersionNumberingResolution_major1, newVersionValue);
    case 4: 
      return NLS.bind(MarkerMessages.VersionNumberingResolution_minorNoNewAPI1, newVersionValue);
    case 5: 
      return NLS.bind(MarkerMessages.VersionNumberingResolution_reexportedMajor1, newVersionValue);
    }
    return NLS.bind(MarkerMessages.VersionNumberingResolution_reexportedMinor1, newVersionValue);
  }
  
  public void run(IMarker marker)
  {
    String title = null;
    switch (kind)
    {
    case 1: 
      title = NLS.bind(MarkerMessages.VersionNumberingResolution_major2, newVersionValue);
      break;
    case 2: 
      title = NLS.bind(MarkerMessages.VersionNumberingResolution_minor2, newVersionValue);
      break;
    case 3: 
      title = NLS.bind(MarkerMessages.VersionNumberingResolution_major2, newVersionValue);
      break;
    case 4: 
      title = NLS.bind(MarkerMessages.VersionNumberingResolution_minorNoNewAPI2, newVersionValue);
      break;
    case 5: 
      title = NLS.bind(MarkerMessages.VersionNumberingResolution_reexportedMajor2, newVersionValue);
      break;
    default: 
      title = NLS.bind(MarkerMessages.VersionNumberingResolution_reexportedMinor2, newVersionValue);
    }
    UIJob job = new UIJob(title)
    {
      private final IMarker val$marker;
      
      public IStatus runInUIThread(IProgressMonitor monitor)
      {
        UpdateBundleVersionOperation updateBundleVersionOperation = 
          new UpdateBundleVersionOperation(
          val$marker, 
          newVersionValue);
        return updateBundleVersionOperation.run(monitor);
      }
    };
    job.setSystem(true);
    job.schedule();
  }
}

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

import org.eclipse.swt.events.KeyAdapter;
import org.eclipse.swt.events.KeyEvent;

class ApiBaselinePreferencePage$1
  extends KeyAdapter
{
  final ApiBaselinePreferencePage this$0;
  
  ApiBaselinePreferencePage$1(ApiBaselinePreferencePage paramApiBaselinePreferencePage)
  {
    this$0 = paramApiBaselinePreferencePage;
  }
  
  public void keyReleased(KeyEvent e)
  {
    if ((stateMask == 0) && (keyCode == 127)) {
      this$0.doRemove();
    }
  }
}

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

import org.eclipse.jface.viewers.DoubleClickEvent;
import org.eclipse.jface.viewers.IDoubleClickListener;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.pde.api.tools.internal.provisional.model.IApiBaseline;

class ApiBaselinePreferencePage$2
  implements IDoubleClickListener
{
  final ApiBaselinePreferencePage this$0;
  
  ApiBaselinePreferencePage$2(ApiBaselinePreferencePage paramApiBaselinePreferencePage)
  {
    this$0 = paramApiBaselinePreferencePage;
  }
  
  public void doubleClick(DoubleClickEvent event)
  {
    IStructuredSelection ss = (IStructuredSelection)event.getSelection();
    this$0.doEdit((IApiBaseline)ss.getFirstElement());
  }
}

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

import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.pde.api.tools.internal.provisional.model.IApiBaseline;
import org.eclipse.swt.widgets.Button;

class ApiBaselinePreferencePage$3
  implements ISelectionChangedListener
{
  final ApiBaselinePreferencePage this$0;
  
  ApiBaselinePreferencePage$3(ApiBaselinePreferencePage paramApiBaselinePreferencePage)
  {
    this$0 = paramApiBaselinePreferencePage;
  }
  
  public void selectionChanged(SelectionChangedEvent event)
  {
    IApiBaseline[] state = this$0.getCurrentSelection();
    this$0.removebutton.setEnabled(state.length > 0);
    this$0.editbutton.setEnabled(state.length == 1);
  }
}

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

import org.eclipse.jface.viewers.CheckStateChangedEvent;
import org.eclipse.jface.viewers.CheckboxTableViewer;
import org.eclipse.jface.viewers.ICheckStateListener;
import org.eclipse.pde.api.tools.internal.provisional.IApiBaselineManager;
import org.eclipse.pde.api.tools.internal.provisional.model.IApiBaseline;

class ApiBaselinePreferencePage$4
  implements ICheckStateListener
{
  final ApiBaselinePreferencePage this$0;
  
  ApiBaselinePreferencePage$4(ApiBaselinePreferencePage paramApiBaselinePreferencePage)
  {
    this$0 = paramApiBaselinePreferencePage;
  }
  
  public void checkStateChanged(CheckStateChangedEvent event)
  {
    IApiBaseline baseline = (IApiBaseline)event.getElement();
    boolean checked = event.getChecked();
    if (checked)
    {
      this$0.tableviewer.setCheckedElements(new Object[] { baseline });
      this$0.newdefault = baseline.getName();
      this$0.defaultchanged = (!this$0.newdefault.equals(this$0.origdefault));
    }
    else
    {
      this$0.tableviewer.setChecked(baseline, checked);
      this$0.newdefault = null;
      this$0.manager.setDefaultApiBaseline(null);
      this$0.defaultchanged = true;
    }
    ApiBaselinePreferencePage.rebuildcount = 0;
    this$0.tableviewer.refresh(true);
    this$0.dirty = true;
  }
}

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

import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerComparator;
import org.eclipse.pde.api.tools.internal.provisional.model.IApiBaseline;

class ApiBaselinePreferencePage$5
  extends ViewerComparator
{
  final ApiBaselinePreferencePage this$0;
  
  ApiBaselinePreferencePage$5(ApiBaselinePreferencePage paramApiBaselinePreferencePage)
  {
    this$0 = paramApiBaselinePreferencePage;
  }
  
  public int compare(Viewer viewer, Object e1, Object e2)
  {
    return ((IApiBaseline)e1).getName().compareTo(((IApiBaseline)e2).getName());
  }
}

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

import java.util.ArrayList;
import java.util.Arrays;
import org.eclipse.jface.viewers.CheckboxTableViewer;
import org.eclipse.pde.api.tools.internal.provisional.IApiBaselineManager;

class ApiBaselinePreferencePage$6
  implements Runnable
{
  final ApiBaselinePreferencePage this$0;
  
  ApiBaselinePreferencePage$6(ApiBaselinePreferencePage paramApiBaselinePreferencePage)
  {
    this$0 = paramApiBaselinePreferencePage;
  }
  
  public void run()
  {
    this$0.backingcollection.addAll(Arrays.asList(this$0.manager.getApiBaselines()));
    this$0.tableviewer.setInput(this$0.backingcollection);
  }
}

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

import java.util.ArrayList;
import org.eclipse.jface.viewers.CheckboxTableViewer;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.pde.api.tools.internal.provisional.model.IApiBaseline;
import org.eclipse.pde.api.tools.ui.internal.ApiUIPlugin;
import org.eclipse.pde.api.tools.ui.internal.wizards.ApiBaselineWizard;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;

class ApiBaselinePreferencePage$7
  extends SelectionAdapter
{
  final ApiBaselinePreferencePage this$0;
  
  ApiBaselinePreferencePage$7(ApiBaselinePreferencePage paramApiBaselinePreferencePage)
  {
    this$0 = paramApiBaselinePreferencePage;
  }
  
  public void widgetSelected(SelectionEvent e)
  {
    ApiBaselineWizard wizard = new ApiBaselineWizard(null);
    WizardDialog dialog = new WizardDialog(ApiUIPlugin.getShell(), wizard);
    if (dialog.open() == 0)
    {
      IApiBaseline profile = wizard.getProfile();
      if (profile != null)
      {
        this$0.backingcollection.add(profile);
        this$0.tableviewer.refresh();
        this$0.tableviewer.setSelection(new StructuredSelection(profile), true);
        if (this$0.backingcollection.size() == 1)
        {
          this$0.newdefault = profile.getName();
          this$0.tableviewer.setCheckedElements(new Object[] { profile });
          this$0.tableviewer.refresh(profile);
          this$0.defaultchanged = true;
          ApiBaselinePreferencePage.rebuildcount = 0;
        }
        this$0.dirty = true;
      }
    }
  }
}

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

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

class ApiBaselinePreferencePage$8
  extends SelectionAdapter
{
  final ApiBaselinePreferencePage this$0;
  
  ApiBaselinePreferencePage$8(ApiBaselinePreferencePage paramApiBaselinePreferencePage)
  {
    this$0 = paramApiBaselinePreferencePage;
  }
  
  public void widgetSelected(SelectionEvent e)
  {
    this$0.doEdit(this$0.getCurrentSelection()[0]);
  }
}

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

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

class ApiBaselinePreferencePage$9
  extends SelectionAdapter
{
  final ApiBaselinePreferencePage this$0;
  
  ApiBaselinePreferencePage$9(ApiBaselinePreferencePage paramApiBaselinePreferencePage)
  {
    this$0 = paramApiBaselinePreferencePage;
  }
  
  public void widgetSelected(SelectionEvent e)
  {
    this$0.doRemove();
  }
}

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

import org.eclipse.pde.api.tools.ui.internal.ApiToolsLabelProvider;

class ApiBaselinePreferencePage$BaselineLabelProvider
  extends ApiToolsLabelProvider
{
  final ApiBaselinePreferencePage this$0;
  
  ApiBaselinePreferencePage$BaselineLabelProvider(ApiBaselinePreferencePage paramApiBaselinePreferencePage)
  {
    this$0 = paramApiBaselinePreferencePage;
  }
  
  protected boolean isDefaultBaseline(Object element)
  {
    return this$0.isDefault(element);
  }
}

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

import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.preference.PreferencePage;
import org.eclipse.jface.viewers.ArrayContentProvider;
import org.eclipse.jface.viewers.CheckStateChangedEvent;
import org.eclipse.jface.viewers.CheckboxTableViewer;
import org.eclipse.jface.viewers.DoubleClickEvent;
import org.eclipse.jface.viewers.ICheckStateListener;
import org.eclipse.jface.viewers.IDoubleClickListener;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerComparator;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.pde.api.tools.internal.provisional.ApiPlugin;
import org.eclipse.pde.api.tools.internal.provisional.IApiBaselineManager;
import org.eclipse.pde.api.tools.internal.provisional.model.IApiBaseline;
import org.eclipse.pde.api.tools.internal.util.Util;
import org.eclipse.pde.api.tools.ui.internal.ApiToolsLabelProvider;
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.wizards.ApiBaselineWizard;
import org.eclipse.swt.custom.BusyIndicator;
import org.eclipse.swt.events.KeyAdapter;
import org.eclipse.swt.events.KeyEvent;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Table;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.help.IWorkbenchHelpSystem;
import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer;

public class ApiBaselinePreferencePage
  extends PreferencePage
  implements IWorkbenchPreferencePage
{
  public static final String ID = "org.eclipse.pde.api.tools.ui.apiprofiles.prefpage";
  
  class BaselineLabelProvider
    extends ApiToolsLabelProvider
  {
    BaselineLabelProvider() {}
    
    protected boolean isDefaultBaseline(Object element)
    {
      return isDefault(element);
    }
  }
  
  IApiBaselineManager manager = ApiPlugin.getDefault()
    .getApiBaselineManager();
  private static HashSet removed = new HashSet(8);
  CheckboxTableViewer tableviewer = null;
  ArrayList backingcollection = new ArrayList(8);
  String newdefault = null;
  private Button newbutton = null;
  Button removebutton = null;
  Button editbutton = null;
  protected static int rebuildcount = 0;
  String origdefault = null;
  boolean dirty = false;
  private boolean defaultcontentchanged = false;
  boolean defaultchanged = false;
  private ApiBaselinesConfigurationBlock block = null;
  
  protected Control createContents(Composite parent)
  {
    Composite comp = SWTFactory.createComposite(parent, 1, 1, 1808, 0, 0);
    SWTFactory.createWrapLabel(comp, PreferenceMessages.ApiProfilesPreferencePage_0, 2, 200);
    SWTFactory.createVerticalSpacer(comp, 1);
    
    Composite lcomp = SWTFactory.createComposite(comp, 2, 1, 1808, 0, 0);
    SWTFactory.createWrapLabel(lcomp, PreferenceMessages.ApiProfilesPreferencePage_1, 2);
    Table table = new Table(lcomp, 67618);
    table.setLayoutData(new GridData(1808));
    table.addKeyListener(new KeyAdapter()
    {
      public void keyReleased(KeyEvent e)
      {
        if ((stateMask == 0) && (keyCode == 127)) {
          doRemove();
        }
      }
    });
    tableviewer = new CheckboxTableViewer(table);
    tableviewer.setLabelProvider(new BaselineLabelProvider());
    tableviewer.setContentProvider(new ArrayContentProvider());
    tableviewer.addDoubleClickListener(new IDoubleClickListener()
    {
      public void doubleClick(DoubleClickEvent event)
      {
        IStructuredSelection ss = (IStructuredSelection)event.getSelection();
        doEdit((IApiBaseline)ss.getFirstElement());
      }
    });
    tableviewer.addSelectionChangedListener(new ISelectionChangedListener()
    {
      public void selectionChanged(SelectionChangedEvent event)
      {
        IApiBaseline[] state = getCurrentSelection();
        removebutton.setEnabled(state.length > 0);
        editbutton.setEnabled(state.length == 1);
      }
    });
    tableviewer.addCheckStateListener(new ICheckStateListener()
    {
      public void checkStateChanged(CheckStateChangedEvent event)
      {
        IApiBaseline baseline = (IApiBaseline)event.getElement();
        boolean checked = event.getChecked();
        if (checked)
        {
          tableviewer.setCheckedElements(new Object[] { baseline });
          newdefault = baseline.getName();
          defaultchanged = (!newdefault.equals(origdefault));
        }
        else
        {
          tableviewer.setChecked(baseline, checked);
          newdefault = null;
          manager.setDefaultApiBaseline(null);
          defaultchanged = true;
        }
        ApiBaselinePreferencePage.rebuildcount = 0;
        tableviewer.refresh(true);
        dirty = true;
      }
    });
    tableviewer.setComparator(new ViewerComparator()
    {
      public int compare(Viewer viewer, Object e1, Object e2)
      {
        return ((IApiBaseline)e1).getName().compareTo(((IApiBaseline)e2).getName());
      }
    });
    BusyIndicator.showWhile(getShell().getDisplay(), new Runnable()
    {
      public void run()
      {
        backingcollection.addAll(Arrays.asList(manager.getApiBaselines()));
        tableviewer.setInput(backingcollection);
      }
    });
    Composite bcomp = SWTFactory.createComposite(lcomp, 1, 1, 1042, 0, 0);
    newbutton = SWTFactory.createPushButton(bcomp, PreferenceMessages.ApiProfilesPreferencePage_2, null);
    newbutton.addSelectionListener(new SelectionAdapter()
    {
      public void widgetSelected(SelectionEvent e)
      {
        ApiBaselineWizard wizard = new ApiBaselineWizard(null);
        WizardDialog dialog = new WizardDialog(ApiUIPlugin.getShell(), wizard);
        if (dialog.open() == 0)
        {
          IApiBaseline profile = wizard.getProfile();
          if (profile != null)
          {
            backingcollection.add(profile);
            tableviewer.refresh();
            tableviewer.setSelection(new StructuredSelection(profile), true);
            if (backingcollection.size() == 1)
            {
              newdefault = profile.getName();
              tableviewer.setCheckedElements(new Object[] { profile });
              tableviewer.refresh(profile);
              defaultchanged = true;
              ApiBaselinePreferencePage.rebuildcount = 0;
            }
            dirty = true;
          }
        }
      }
    });
    editbutton = SWTFactory.createPushButton(bcomp, PreferenceMessages.ApiProfilesPreferencePage_4, null);
    editbutton.addSelectionListener(new SelectionAdapter()
    {
      public void widgetSelected(SelectionEvent e)
      {
        doEdit(getCurrentSelection()[0]);
      }
    });
    editbutton.setEnabled(false);
    removebutton = SWTFactory.createPushButton(bcomp, PreferenceMessages.ApiProfilesPreferencePage_3, null);
    removebutton.addSelectionListener(new SelectionAdapter()
    {
      public void widgetSelected(SelectionEvent e)
      {
        doRemove();
      }
    });
    removebutton.setEnabled(false);
    
    SWTFactory.createVerticalSpacer(bcomp, 1);
    
    IApiBaseline baseline = manager.getDefaultApiBaseline();
    if (baseline != null) {
      tableviewer.setCheckedElements(new Object[] { baseline });
    }
    origdefault = (newdefault = baseline == null ? null : baseline.getName());
    PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, IApiToolsHelpContextIds.APIBASELINE_PREF_PAGE);
    
    block = new ApiBaselinesConfigurationBlock((IWorkbenchPreferenceContainer)getContainer());
    block.createControl(comp, this);
    Dialog.applyDialogFont(comp);
    return comp;
  }
  
  public static boolean isRemovedBaseline(String name)
  {
    return removed.contains(name);
  }
  
  protected void doRemove()
  {
    IApiBaseline[] states = getCurrentSelection();
    for (int i = 0; i < states.length; i++)
    {
      if (isDefault(states[i]))
      {
        newdefault = null;
        manager.setDefaultApiBaseline(null);
        defaultchanged = true;
        rebuildcount = 0;
      }
      removed.add(states[i].getName());
    }
    if (backingcollection.removeAll(Arrays.asList(states))) {
      dirty = true;
    }
    tableviewer.refresh();
  }
  
  protected void doEdit(IApiBaseline baseline)
  {
    ApiBaselineWizard wizard = new ApiBaselineWizard(baseline);
    WizardDialog dialog = new WizardDialog(ApiUIPlugin.getShell(), wizard);
    if (dialog.open() == 0)
    {
      IApiBaseline newbaseline = wizard.getProfile();
      if (newbaseline != null)
      {
        removed.add(baseline.getName());
        backingcollection.remove(baseline);
        backingcollection.add(newbaseline);
        tableviewer.refresh();
        if (isDefault(baseline))
        {
          tableviewer.setSelection(new StructuredSelection(newbaseline), true);
          tableviewer.setCheckedElements(new Object[] { newbaseline });
          newdefault = newbaseline.getName();
          rebuildcount = 0;
          defaultcontentchanged = wizard.contentChanged();
          tableviewer.refresh(true);
        }
        dirty = true;
      }
    }
  }
  
  protected boolean isDefault(Object element)
  {
    if ((element instanceof IApiBaseline))
    {
      IApiBaseline profile = (IApiBaseline)element;
      if (newdefault == null)
      {
        IApiBaseline def = ApiPlugin.getDefault()
          .getApiBaselineManager().getDefaultApiBaseline();
        if (def != null) {
          return profile.getName().equals(def.getName());
        }
      }
      else
      {
        return profile.getName().equals(newdefault);
      }
    }
    return false;
  }
  
  protected IApiBaseline[] getCurrentSelection()
  {
    IStructuredSelection ss = (IStructuredSelection)tableviewer
      .getSelection();
    if (ss.isEmpty()) {
      return new IApiBaseline[0];
    }
    return (IApiBaseline[])((IStructuredSelection)tableviewer
      .getSelection()).toList().toArray(new IApiBaseline[ss.size()]);
  }
  
  public void init(IWorkbench workbench) {}
  
  public boolean performCancel()
  {
    manager.setDefaultApiBaseline(origdefault);
    backingcollection.clear();
    removed.clear();
    if (block != null) {
      block.performCancel();
    }
    return super.performCancel();
  }
  
  protected void applyChanges()
  {
    if (!dirty) {
      return;
    }
    for (Iterator iter = removed.iterator(); iter.hasNext();) {
      manager.removeApiBaseline((String)iter.next());
    }
    for (Iterator iter = backingcollection.iterator(); iter.hasNext();) {
      manager.addApiBaseline((IApiBaseline)iter.next());
    }
    manager.setDefaultApiBaseline(newdefault);
    if (((defaultchanged) || (defaultcontentchanged)) && 
      (rebuildcount < 1))
    {
      rebuildcount += 1;
      IProject[] projects = Util.getApiProjects();
      if ((projects != null) && 
        (MessageDialog.openQuestion(getShell(), 
        PreferenceMessages.ApiProfilesPreferencePage_6, 
        PreferenceMessages.ApiProfilesPreferencePage_7))) {
        Util.getBuildJob(projects).schedule();
      }
    }
    origdefault = newdefault;
    dirty = false;
    defaultcontentchanged = false;
    defaultchanged = false;
    removed.clear();
  }
  
  public boolean performOk()
  {
    block.performOK();
    applyChanges();
    return true;
  }
  
  protected void performApply()
  {
    block.performApply();
    applyChanges();
  }
  
  protected void performDefaults()
  {
    block.performDefaults();
    applyChanges();
  }
}

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

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

class ApiBaselinesConfigurationBlock$1
  extends SelectionAdapter
{
  final ApiBaselinesConfigurationBlock this$0;
  
  ApiBaselinesConfigurationBlock$1(ApiBaselinesConfigurationBlock paramApiBaselinesConfigurationBlock)
  {
    this$0 = paramApiBaselinesConfigurationBlock;
  }
  
  public void widgetSelected(SelectionEvent e)
  {
    if ((widget instanceof Combo))
    {
      Combo combo = (Combo)widget;
      ApiBaselinesConfigurationBlock.ControlData data = (ApiBaselinesConfigurationBlock.ControlData)combo.getData();
      key.setStoredValue(this$0.fLookupOrder[0], combo.getText(), this$0.fManager);
      this$0.fDirty = true;
      ApiBaselinePreferencePage.rebuildcount = 0;
    }
  }
}

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

public class ApiBaselinesConfigurationBlock$ControlData
{
  ApiBaselinesConfigurationBlock.Key key;
  private String[] values;
  
  public ApiBaselinesConfigurationBlock$ControlData(ApiBaselinesConfigurationBlock.Key key, String[] values)
  {
    this.key = key;
    this.values = values;
  }
  
  public ApiBaselinesConfigurationBlock.Key getKey()
  {
    return key;
  }
  
  public String getValue(boolean selection)
  {
    int index = selection ? 0 : 1;
    return values[index];
  }
  
  public String getValue(int index)
  {
    return values[index];
  }
  
  public int getSelection(String value)
  {
    if (value != null) {
      for (int i = 0; i < values.length; i++) {
        if (value.equals(values[i])) {
          return i;
        }
      }
    }
    return values.length - 1;
  }
}

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

import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.eclipse.core.runtime.preferences.IScopeContext;
import org.eclipse.ui.preferences.IWorkingCopyManager;

public class ApiBaselinesConfigurationBlock$Key
{
  private String qualifier;
  private String key;
  
  public ApiBaselinesConfigurationBlock$Key(String qualifier, String key)
  {
    this.qualifier = qualifier;
    this.key = key;
  }
  
  private IEclipsePreferences getNode(IScopeC
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-2019. Infinite Loop Ltd