org.eclipse.team.ui_3.6.101.R37x_v20111109-0800

ojectSetExportWizard$1:this$0	Lorg/eclipse/team/internal/ui/wizards/ProjectSetExportWizard;
          //   792: getfield 361	org/eclipse/team/internal/ui/wizards/ProjectSetExportWizard:locationPage	Lorg/eclipse/team/internal/ui/wizards/ExportProjectSetLocationPage;
          //   795: invokevirtual 401	org/eclipse/team/internal/ui/wizards/ExportProjectSetLocationPage:isSaveToFileSystem	()Z
          //   798: ifne +18 -> 816
          //   801: aload_0
          //   802: getfield 364	org/eclipse/team/internal/ui/wizards/ProjectSetExportWizard$1:this$0	Lorg/eclipse/team/internal/ui/wizards/ProjectSetExportWizard;
          //   805: getfield 361	org/eclipse/team/internal/ui/wizards/ProjectSetExportWizard:locationPage	Lorg/eclipse/team/internal/ui/wizards/ExportProjectSetLocationPage;
          //   808: aload_1
          //   809: invokevirtual 403	org/eclipse/team/internal/ui/wizards/ExportProjectSetLocationPage:refreshWorkspaceFile	(Lorg/eclipse/core/runtime/IProgressMonitor;)V
          //   812: goto +4 -> 816
          //   815: pop
          //   816: aload 8
          //   818: invokeinterface 417 1 0
          //   823: invokeinterface 422 1 0
          //   828: astore 11
          //   830: goto +58 -> 888
          //   833: aload 11
          //   835: invokeinterface 416 1 0
          //   840: checkcast 174	java/lang/String
          //   843: astore 12
          //   845: aload 12
          //   847: invokestatic 399	org/eclipse/team/core/RepositoryProviderType:getProviderType	(Ljava/lang/String;)Lorg/eclipse/team/core/RepositoryProviderType;
          //   850: astore 13
          //   852: aload 13
          //   854: ifnull +34 -> 888
          //   857: aload 13
          //   859: invokevirtual 398	org/eclipse/team/core/RepositoryProviderType:getProjectSetCapability	()Lorg/eclipse/team/core/ProjectSetCapability;
          //   862: astore 14
          //   864: aload 14
          //   866: ifnull +22 -> 888
          //   869: aload 14
          //   871: aload 4
          //   873: aload 9
          //   875: new 189	org/eclipse/core/runtime/SubProgressMonitor
          //   878: dup
          //   879: aload_1
          //   880: bipush 10
          //   882: invokespecial 389	org/eclipse/core/runtime/SubProgressMonitor:<init>	(Lorg/eclipse/core/runtime/IProgressMonitor;I)V
          //   885: invokevirtual 394	org/eclipse/team/core/ProjectSetCapability:projectSetCreated	(Ljava/io/File;Lorg/eclipse/team/core/ProjectSetSerializationContext;Lorg/eclipse/core/runtime/IProgressMonitor;)V
          //   888: aload 11
          //   890: invokeinterface 415 1 0
          //   895: ifne -62 -> 833
          //   898: aload_1
          //   899: invokeinterface 424 1 0
          //   904: return
          // Line number table:
          //   Java source line #57	-> byte code offset #0
          //   Java source line #58	-> byte code offset #11
          //   Java source line #59	-> byte code offset #20
          //   Java source line #60	-> byte code offset #27
          //   Java source line #62	-> byte code offset #47
          //   Java source line #63	-> byte code offset #54
          //   Java source line #64	-> byte code offset #64
          //   Java source line #65	-> byte code offset #71
          //   Java source line #66	-> byte code offset #84
          //   Java source line #67	-> byte code offset #102
          //   Java source line #68	-> byte code offset #107
          //   Java source line #69	-> byte code offset #114
          //   Java source line #71	-> byte code offset #115
          //   Java source line #72	-> byte code offset #122
          //   Java source line #73	-> byte code offset #127
          //   Java source line #74	-> byte code offset #143
          //   Java source line #75	-> byte code offset #150
          //   Java source line #78	-> byte code offset #151
          //   Java source line #79	-> byte code offset #167
          //   Java source line #80	-> byte code offset #185
          //   Java source line #81	-> byte code offset #190
          //   Java source line #82	-> byte code offset #197
          //   Java source line #86	-> byte code offset #198
          //   Java source line #87	-> byte code offset #204
          //   Java source line #88	-> byte code offset #220
          //   Java source line #91	-> byte code offset #232
          //   Java source line #92	-> byte code offset #244
          //   Java source line #93	-> byte code offset #253
          //   Java source line #94	-> byte code offset #259
          //   Java source line #95	-> byte code offset #266
          //   Java source line #96	-> byte code offset #273
          //   Java source line #97	-> byte code offset #278
          //   Java source line #98	-> byte code offset #285
          //   Java source line #99	-> byte code offset #299
          //   Java source line #100	-> byte code offset #304
          //   Java source line #105	-> byte code offset #321
          //   Java source line #107	-> byte code offset #333
          //   Java source line #93	-> byte code offset #343
          //   Java source line #112	-> byte code offset #354
          //   Java source line #114	-> byte code offset #371
          //   Java source line #117	-> byte code offset #374
          //   Java source line #118	-> byte code offset #387
          //   Java source line #119	-> byte code offset #404
          //   Java source line #122	-> byte code offset #431
          //   Java source line #123	-> byte code offset #437
          //   Java source line #124	-> byte code offset #451
          //   Java source line #125	-> byte code offset #474
          //   Java source line #126	-> byte code offset #477
          //   Java source line #127	-> byte code offset #489
          //   Java source line #128	-> byte code offset #498
          //   Java source line #129	-> byte code offset #510
          //   Java source line #130	-> byte code offset #524
          //   Java source line #131	-> byte code offset #546
          //   Java source line #132	-> byte code offset #553
          //   Java source line #133	-> byte code offset #560
          //   Java source line #134	-> byte code offset #567
          //   Java source line #135	-> byte code offset #572
          //   Java source line #136	-> byte code offset #594
          //   Java source line #137	-> byte code offset #600
          //   Java source line #138	-> byte code offset #612
          //   Java source line #136	-> byte code offset #627
          //   Java source line #125	-> byte code offset #638
          //   Java source line #142	-> byte code offset #648
          //   Java source line #143	-> byte code offset #653
          //   Java source line #144	-> byte code offset #659
          //   Java source line #145	-> byte code offset #669
          //   Java source line #143	-> byte code offset #681
          //   Java source line #148	-> byte code offset #692
          //   Java source line #149	-> byte code offset #699
          //   Java source line #150	-> byte code offset #709
          //   Java source line #151	-> byte code offset #711
          //   Java source line #152	-> byte code offset #721
          //   Java source line #153	-> byte code offset #723
          //   Java source line #154	-> byte code offset #733
          //   Java source line #155	-> byte code offset #735
          //   Java source line #157	-> byte code offset #740
          //   Java source line #158	-> byte code offset #748
          //   Java source line #159	-> byte code offset #750
          //   Java source line #162	-> byte code offset #760
          //   Java source line #155	-> byte code offset #763
          //   Java source line #157	-> byte code offset #768
          //   Java source line #158	-> byte code offset #776
          //   Java source line #159	-> byte code offset #778
          //   Java source line #165	-> byte code offset #788
          //   Java source line #167	-> byte code offset #801
          //   Java source line #168	-> byte code offset #815
          //   Java source line #173	-> byte code offset #816
          //   Java source line #174	-> byte code offset #833
          //   Java source line #175	-> byte code offset #845
          //   Java source line #176	-> byte code offset #852
          //   Java source line #177	-> byte code offset #857
          //   Java source line #178	-> byte code offset #864
          //   Java source line #179	-> byte code offset #869
          //   Java source line #173	-> byte code offset #888
          //   Java source line #184	-> byte code offset #898
          //   Java source line #185	-> byte code offset #904
          // Local variable table:
          //   start	length	slot	name	signature
          //   0	905	0	this	1
          //   0	905	1	monitor	org.eclipse.core.runtime.IProgressMonitor
          //   10	356	2	filename	String
          //   19	2	3	path	org.eclipse.core.runtime.Path
          //   62	810	4	file	java.io.File
          //   69	47	5	parentFile	java.io.File
          //   100	23	6	r	boolean
          //   183	3	6	r	boolean
          //   202	485	6	workingSets	org.eclipse.ui.IWorkingSet[]
          //   242	107	7	projects	IProject[]
          //   251	566	8	map	java.util.Map
          //   254	93	9	i	int
          //   369	505	9	context	org.eclipse.team.internal.ui.UIProjectSetSerializationContext
          //   264	72	10	project	IProject
          //   372	397	10	writer	java.io.BufferedWriter
          //   271	8	11	provider	org.eclipse.team.core.RepositoryProvider
          //   435	258	11	xmlMemento	XMLMemento
          //   709	7	11	e	java.io.IOException
          //   721	7	11	e	TeamException
          //   828	61	11	iter	java.util.Iterator
          //   283	41	12	id	String
          //   449	190	12	it	java.util.Iterator
          //   843	3	12	id	String
          //   297	37	13	list	java.util.Set
          //   487	60	13	id	String
          //   654	31	13	i	int
          //   850	8	13	type	org.eclipse.team.core.RepositoryProviderType
          //   496	105	14	memento	org.eclipse.ui.IMemento
          //   667	8	14	memento	org.eclipse.ui.IMemento
          //   862	8	14	capability	org.eclipse.team.core.ProjectSetCapability
          //   522	5	15	list	java.util.Set
          //   544	31	16	projectArray	IProject[]
          //   551	10	17	providerType	org.eclipse.team.core.RepositoryProviderType
          //   558	15	18	serializer	org.eclipse.team.core.ProjectSetCapability
          //   592	41	19	references	String[]
          //   595	36	20	i	int
          //   610	3	21	proj	org.eclipse.ui.IMemento
          //   733	28	22	localObject	Object
          //   748	7	23	e	java.io.IOException
          //   776	7	23	e	java.io.IOException
          //   815	1	40	localCoreException	org.eclipse.core.runtime.CoreException
          // Exception table:
          //   from	to	target	type
          //   374	706	709	java/io/IOException
          //   374	706	721	org/eclipse/team/core/TeamException
          //   374	733	733	finally
          //   740	745	748	java/io/IOException
          //   768	773	776	java/io/IOException
          //   801	812	815	org/eclipse/core/runtime/CoreException
        }
        
        private XMLMemento getXMLMementoRoot()
        {
          try
          {
            Document document = DocumentBuilderFactory.newInstance()
              .newDocumentBuilder().newDocument();
            Element element = document.createElement("psf");
            element.setAttribute("version", "2.0");
            document.appendChild(element);
            return new XMLMemento(document, element);
          }
          catch (ParserConfigurationException e)
          {
            throw new Error(e.getMessage());
          }
        }
      });
    }
    catch (InterruptedException localInterruptedException)
    {
      return true;
    }
    catch (InvocationTargetException e)
    {
      Throwable target = e.getTargetException();
      if ((target instanceof TeamException))
      {
        ErrorDialog.openError(getShell(), null, null, ((TeamException)target).getStatus());
        return false;
      }
      if ((target instanceof RuntimeException)) {
        throw ((RuntimeException)target);
      }
      if ((target instanceof Error)) {
        throw ((Error)target);
      }
    }
    return result[0];
  }
  
  public void init(IWorkbench workbench, IStructuredSelection selection)
  {
    this.selection = selection;
  }
}

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

import java.lang.reflect.InvocationTargetException;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.dialogs.ErrorDialog;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.osgi.util.NLS;
import org.eclipse.team.core.TeamException;
import org.eclipse.team.internal.ui.TeamUIMessages;
import org.eclipse.team.internal.ui.TeamUIPlugin;
import org.eclipse.ui.IImportWizard;
import org.eclipse.ui.IWorkbench;
import org.xml.sax.SAXException;

public class ProjectSetImportWizard
  extends Wizard
  implements IImportWizard
{
  ImportProjectSetMainPage mainPage;
  
  public ProjectSetImportWizard()
  {
    setNeedsProgressMonitor(true);
    setWindowTitle(TeamUIMessages.ProjectSetImportWizard_Project_Set_1);
  }
  
  public void addPages()
  {
    mainPage = new ImportProjectSetMainPage("projectSetMainPage", TeamUIMessages.ProjectSetImportWizard_Import_a_Project_Set_3, TeamUIPlugin.getImageDescriptor("wizban/import_projectset_wizban.png"));
    addPage(mainPage);
  }
  
  public boolean performFinish()
  {
    boolean[] result = new boolean[1];
    try
    {
      ImportProjectSetOperation op;
      ImportProjectSetOperation op;
      if (mainPage.getInputType() == 1)
      {
        String psfContent = mainPage.getURLContents();
        if (psfContent == null) {
          return false;
        }
        op = new ImportProjectSetOperation(
          mainPage.isRunInBackgroundOn() ? null : getContainer(), 
          psfContent, mainPage.getUrl(), mainPage.getWorkingSets());
      }
      else
      {
        op = new ImportProjectSetOperation(
          mainPage.isRunInBackgroundOn() ? null : getContainer(), 
          mainPage.getFileName(), mainPage.getWorkingSets());
      }
      op.run();
      result[0] = true;
    }
    catch (InterruptedException localInterruptedException)
    {
      return true;
    }
    catch (InvocationTargetException e)
    {
      Throwable target = e.getTargetException();
      if ((target instanceof TeamException))
      {
        ErrorDialog.openError(getShell(), null, null, ((TeamException)target).getStatus());
        return false;
      }
      if ((target instanceof RuntimeException)) {
        throw ((RuntimeException)target);
      }
      if ((target instanceof Error)) {
        throw ((Error)target);
      }
      if ((target instanceof SAXException))
      {
        ErrorDialog.openError(getShell(), null, null, new Status(4, "org.eclipse.team.ui", 0, NLS.bind(TeamUIMessages.ProjectSetImportWizard_2, new String[] { target.getMessage() }), target));
        return false;
      }
      ErrorDialog.openError(getShell(), null, null, new Status(4, "org.eclipse.team.ui", 0, NLS.bind(TeamUIMessages.ProjectSetImportWizard_3, new String[] { target.getMessage() }), target));
    }
    return result[0];
  }
  
  public void init(IWorkbench workbench, IStructuredSelection selection)
  {
    PsfFilenameStore.getInstance().setDefaultFromSelection(workbench);
  }
}

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

import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IPath;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchWindow;

public class PsfFilenameStore
  extends PsfStore
{
  private static final String FILENAMES = "filenames";
  private static final String PREVIOUS = "previous";
  private static String _selectedFilename = null;
  private static PsfFilenameStore instance;
  
  public static PsfFilenameStore getInstance()
  {
    if (instance == null) {
      instance = new PsfFilenameStore();
    }
    return instance;
  }
  
  public void setDefaultFromSelection(IWorkbench workbench)
  {
    IWorkbenchWindow wnd = workbench.getActiveWorkbenchWindow();
    IWorkbenchPage pg = wnd.getActivePage();
    ISelection sel = pg.getSelection();
    if (!(sel instanceof IStructuredSelection)) {
      return;
    }
    IStructuredSelection selection = (IStructuredSelection)sel;
    
    Object firstElement = selection.getFirstElement();
    if (!(firstElement instanceof IAdaptable)) {
      return;
    }
    Object o = ((IAdaptable)firstElement).getAdapter(IResource.class);
    if (o == null) {
      return;
    }
    IResource resource = (IResource)o;
    if (resource.getType() != 1) {
      return;
    }
    if (!resource.isAccessible()) {
      return;
    }
    String extension = resource.getFileExtension();
    if ((extension == null) || (!extension.equalsIgnoreCase("psf"))) {
      return;
    }
    IWorkspace workspace = resource.getWorkspace();
    workspace.getRoot().getFullPath();
    
    IPath path = resource.getLocation();
    _selectedFilename = path.toOSString();
  }
  
  public String getSuggestedDefault()
  {
    if (_selectedFilename != null) {
      return _selectedFilename;
    }
    return getPrevious();
  }
  
  protected String getPreviousTag()
  {
    return "previous";
  }
  
  protected String getListTag()
  {
    return "filenames";
  }
}

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

import java.util.Vector;
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.team.internal.ui.TeamUIPlugin;

public abstract class PsfStore
{
  private static final int HISTORY_LENGTH = 10;
  private static final String STORE_SECTION = "ImportPSFDialog";
  private static IDialogSettings _section;
  
  protected abstract String getPreviousTag();
  
  protected abstract String getListTag();
  
  public abstract String getSuggestedDefault();
  
  protected String getPrevious()
  {
    IDialogSettings section = getSettingsSection();
    String retval = section.get(getPreviousTag());
    if (retval == null) {
      retval = "";
    }
    return retval;
  }
  
  public String[] getHistory()
  {
    IDialogSettings section = getSettingsSection();
    String[] arr = section.getArray(getListTag());
    if (arr == null) {
      arr = new String[0];
    }
    return arr;
  }
  
  public void remember(String filename)
  {
    Vector filenames = createVector(getHistory());
    if (filenames.contains(filename)) {
      filenames.remove(filename);
    }
    filenames.add(0, filename);
    while (filenames.size() > 10) {
      filenames.remove(10);
    }
    String[] arr = (String[])filenames.toArray(new String[filenames.size()]);
    
    IDialogSettings section = getSettingsSection();
    section.put(getListTag(), arr);
    section.put(getPreviousTag(), filename);
  }
  
  private Vector createVector(Object[] arr)
  {
    Vector v = new Vector();
    for (int ix = 0; ix < arr.length; ix++) {
      v.add(ix, arr[ix]);
    }
    return v;
  }
  
  private IDialogSettings getSettingsSection()
  {
    if (_section != null) {
      return _section;
    }
    IDialogSettings settings = TeamUIPlugin.getPlugin().getDialogSettings();
    _section = settings.getSection("ImportPSFDialog");
    if (_section != null) {
      return _section;
    }
    _section = settings.addNewSection("ImportPSFDialog");
    return _section;
  }
}

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

public class PsfUrlStore
  extends PsfStore
{
  private static final String URLS = "urls";
  private static final String PREVIOUS = "previous_url";
  private static PsfUrlStore instance;
  
  public static PsfUrlStore getInstance()
  {
    if (instance == null) {
      instance = new PsfUrlStore();
    }
    return instance;
  }
  
  protected String getPreviousTag()
  {
    return "previous_url";
  }
  
  protected String getListTag()
  {
    return "urls";
  }
  
  public String getSuggestedDefault()
  {
    return getPrevious();
  }
}

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

import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;

public abstract class TeamWizardPage
  extends WizardPage
{
  public TeamWizardPage(String pageName, String title, ImageDescriptor titleImage)
  {
    super(pageName, title, titleImage);
  }
  
  protected Composite createComposite(Composite parent, int numColumns)
  {
    Composite composite = new Composite(parent, 0);
    
    GridLayout layout = new GridLayout();
    numColumns = numColumns;
    composite.setLayout(layout);
    
    GridData data = new GridData();
    verticalAlignment = 4;
    horizontalAlignment = 4;
    composite.setLayoutData(data);
    return composite;
  }
  
  protected Label createLabel(Composite parent, String text)
  {
    return createIndentedLabel(parent, text, 0);
  }
  
  protected Label createIndentedLabel(Composite parent, String text, int indent)
  {
    Label label = new Label(parent, 16384);
    label.setText(text);
    GridData data = new GridData();
    horizontalSpan = 1;
    horizontalAlignment = 4;
    horizontalIndent = indent;
    label.setLayoutData(data);
    return label;
  }
  
  protected Text createTextField(Composite parent)
  {
    Text text = new Text(parent, 2052);
    GridData data = new GridData(768);
    verticalAlignment = 2;
    grabExcessVerticalSpace = false;
    widthHint = 200;
    text.setLayoutData(data);
    return text;
  }
  
  protected Combo createDropDownCombo(Composite parent)
  {
    Combo combo = new Combo(parent, 4);
    GridData comboData = new GridData(768);
    verticalAlignment = 2;
    grabExcessVerticalSpace = false;
    widthHint = 200;
    combo.setLayoutData(comboData);
    return combo;
  }
}

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

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

class WorkingSetsDialog$1
  implements ISelectionChangedListener
{
  final WorkingSetsDialog this$0;
  
  WorkingSetsDialog$1(WorkingSetsDialog paramWorkingSetsDialog)
  {
    this$0 = paramWorkingSetsDialog;
  }
  
  public void selectionChanged(SelectionChangedEvent event)
  {
    IStructuredSelection s = (IStructuredSelection)event.getSelection();
    Object obj = s.getFirstElement();
    if ((obj instanceof IWorkingSet)) {
      this$0.wsNameText.setText(((IWorkingSet)obj).getName());
    }
  }
}

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

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

class WorkingSetsDialog$2
  implements ModifyListener
{
  final WorkingSetsDialog this$0;
  
  WorkingSetsDialog$2(WorkingSetsDialog paramWorkingSetsDialog)
  {
    this$0 = paramWorkingSetsDialog;
  }
  
  public void modifyText(ModifyEvent e)
  {
    this$0.setErrorMessage(null);
  }
}

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

import java.util.Collection;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.Map;
import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.swt.graphics.Image;
import org.eclipse.ui.IWorkingSet;

class WorkingSetsDialog$WorkingSetLabelProvider
  extends LabelProvider
{
  private Map icons;
  final WorkingSetsDialog this$0;
  
  public WorkingSetsDialog$WorkingSetLabelProvider(WorkingSetsDialog paramWorkingSetsDialog)
  {
    this$0 = paramWorkingSetsDialog;
    icons = new Hashtable();
  }
  
  public void dispose()
  {
    Iterator iterator = icons.values().iterator();
    while (iterator.hasNext())
    {
      Image icon = (Image)iterator.next();
      icon.dispose();
    }
    super.dispose();
  }
  
  public Image getImage(Object object)
  {
    Assert.isTrue(object instanceof IWorkingSet);
    IWorkingSet workingSet = (IWorkingSet)object;
    ImageDescriptor imageDescriptor = workingSet.getImageDescriptor();
    if (imageDescriptor == null) {
      return null;
    }
    Image icon = (Image)icons.get(imageDescriptor);
    if (icon == null)
    {
      icon = imageDescriptor.createImage();
      icons.put(imageDescriptor, icon);
    }
    return icon;
  }
  
  public String getText(Object object)
  {
    Assert.isTrue(object instanceof IWorkingSet);
    IWorkingSet workingSet = (IWorkingSet)object;
    return workingSet.getLabel();
  }
}

/* Location:
 * Qualified Name:     org.eclipse.team.internal.ui.wizards.WorkingSetsDialog.WorkingSetLabelProvider
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.team.internal.ui.wizards;

import java.util.Collection;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.Map;
import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.dialogs.TitleAreaDialog;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.viewers.ArrayContentProvider;
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.TableViewer;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.Text;
import org.eclipse.team.internal.ui.TeamUIMessages;
import org.eclipse.team.internal.ui.TeamUIPlugin;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkingSet;
import org.eclipse.ui.IWorkingSetManager;

public class WorkingSetsDialog
  extends TitleAreaDialog
{
  protected TableViewer wsTableViewer;
  protected Text wsNameText;
  protected Image dlgTitleImage;
  private String selectedWorkingSet;
  public static final String resourceWorkingSetId = "org.eclipse.ui.resourceWorkingSetPage";
  
  public WorkingSetsDialog(Shell shell)
  {
    super(shell);
    setShellStyle(getShellStyle() | 0x10);
  }
  
  protected Control createDialogArea(Composite parent)
  {
    setTitle(TeamUIMessages.WorkingSetsDialog_Title);
    setMessage(TeamUIMessages.WorkingSetsDialog_Message);
    Composite workingSetsComposite = (Composite)super.createDialogArea(parent);
    workingSetsComposite = new Composite(workingSetsComposite, 0);
    getShell().setText(TeamUIMessages.WorkingSetsDialog_TitleBar);
    
    Composite group = new Composite(workingSetsComposite, 0);
    GridLayout layout = new GridLayout(2, false);
    marginWidth = 0;
    group.setLayout(layout);
    group.setLayoutData(new GridData(4, 4, true, false));
    
    Label label = new Label(group, 0);
    label.setLayoutData(new GridData());
    label.setText(TeamUIMessages.WorkingSetsDialog_Label);
    
    wsNameText = new Text(group, 2048);
    wsNameText.setLayoutData(new GridData(4, 128, true, false));
    
    layout = new GridLayout();
    numColumns = 1;
    marginHeight = convertVerticalDLUsToPixels(7);
    marginWidth = convertHorizontalDLUsToPixels(7);
    workingSetsComposite.setLayout(layout);
    GridData data = new GridData(4, 4, true, true);
    workingSetsComposite.setLayoutData(data);
    
    wsTableViewer = new TableViewer(workingSetsComposite, 2048);
    GridData gd = new GridData(4, 4, true, true);
    widthHint = 450;
    heightHint = 250;
    wsTableViewer.getTable().setLayoutData(gd);
    
    wsTableViewer.setContentProvider(new ArrayContentProvider());
    wsTableViewer.setLabelProvider(new WorkingSetLabelProvider());
    wsTableViewer.setInput(TeamUIPlugin.getPlugin().getWorkbench().getWorkingSetManager().getWorkingSets());
    
    setupListeners();
    
    return parent;
  }
  
  protected void okPressed()
  {
    selectedWorkingSet = wsNameText.getText();
    if (selectedWorkingSet.equals(""))
    {
      setErrorMessage(TeamUIMessages.WorkingSetsDialog_ErrorMessage);
      return;
    }
    super.okPressed();
  }
  
  protected void cancelPressed()
  {
    super.cancelPressed();
  }
  
  public boolean close()
  {
    if (dlgTitleImage != null) {
      dlgTitleImage.dispose();
    }
    return super.close();
  }
  
  void setupListeners()
  {
    wsTableViewer.addSelectionChangedListener(new ISelectionChangedListener()
    {
      public void selectionChanged(SelectionChangedEvent event)
      {
        IStructuredSelection s = (IStructuredSelection)event.getSelection();
        Object obj = s.getFirstElement();
        if ((obj instanceof IWorkingSet)) {
          wsNameText.setText(((IWorkingSet)obj).getName());
        }
      }
    });
    wsNameText.addModifyListener(new ModifyListener()
    {
      public void modifyText(ModifyEvent e)
      {
        setErrorMessage(null);
      }
    });
  }
  
  class WorkingSetLabelProvider
    extends LabelProvider
  {
    private Map icons;
    
    public WorkingSetLabelProvider()
    {
      icons = new Hashtable();
    }
    
    public void dispose()
    {
      Iterator iterator = icons.values().iterator();
      while (iterator.hasNext())
      {
        Image icon = (Image)iterator.next();
        icon.dispose();
      }
      super.dispose();
    }
    
    public Image getImage(Object object)
    {
      Assert.isTrue(object instanceof IWorkingSet);
      IWorkingSet workingSet = (IWorkingSet)object;
      ImageDescriptor imageDescriptor = workingSet.getImageDescriptor();
      if (imageDescriptor == null) {
        return null;
      }
      Image icon = (Image)icons.get(imageDescriptor);
      if (icon == null)
      {
        icon = imageDescriptor.createImage();
        icons.put(imageDescriptor, icon);
      }
      return icon;
    }
    
    public String getText(Object object)
    {
      Assert.isTrue(object instanceof IWorkingSet);
      IWorkingSet workingSet = (IWorkingSet)object;
      return workingSet.getLabel();
    }
  }
  
  public String getSelectedWorkingSet()
  {
    return selectedWorkingSet;
  }
}

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

import org.eclipse.core.resources.IProject;
import org.eclipse.jface.wizard.IWizard;
import org.eclipse.ui.IWorkbench;

public abstract interface IConfigurationWizard
  extends IWizard
{
  public abstract void init(IWorkbench paramIWorkbench, IProject paramIProject);
}

/* Location:
 * Qualified Name:     org.eclipse.team.ui.IConfigurationWizard
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.team.ui;

import org.eclipse.core.resources.IProject;
import org.eclipse.ui.IWorkbench;

public abstract interface IConfigurationWizardExtension
{
  public abstract void init(IWorkbench paramIWorkbench, IProject[] paramArrayOfIProject);
}

/* Location:
 * Qualified Name:     org.eclipse.team.ui.IConfigurationWizardExtension
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.team.ui;

import org.eclipse.ui.ISaveablePart;
import org.eclipse.ui.IWorkbenchPart;

/**
 * @deprecated
 */
public abstract interface ISaveableWorkbenchPart
  extends ISaveablePart, IWorkbenchPart
{
  public static final int PROP_DIRTY = 257;
}

/* Location:
 * Qualified Name:     org.eclipse.team.ui.ISaveableWorkbenchPart
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.team.ui;

import org.eclipse.jface.wizard.IWizardPage;
import org.eclipse.team.core.RepositoryProviderType;
import org.eclipse.team.core.ScmUrlImportDescription;

public abstract interface IScmUrlImportWizardPage
  extends IWizardPage
{
  public static final String ATT_EXTENSION = "scmUrlImportPages";
  public static final String ATT_PAGE = "page";
  public static final String ATT_REPOSITORY = "repository";
  
  public abstract boolean finish();
  
  public abstract ScmUrlImportDescription[] getSelection();
  
  public abstract void setSelection(ScmUrlImportDescription[] paramArrayOfScmUrlImportDescription);
  
  public abstract void setProvider(RepositoryProviderType paramRepositoryProviderType);
  
  public abstract RepositoryProviderType getProvider();
}

/* Location:
 * Qualified Name:     org.eclipse.team.ui.IScmUrlImportWizardPage
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.team.ui;

public abstract interface ISharedImages
{
  public static final String IMG_DIRTY_OVR = "ovr/dirty_ov.gif";
  public static final String IMG_CHECKEDIN_OVR = "ovr/version_controlled.gif";
  public static final String IMG_CHECKEDOUT_OVR = "ovr/checkedout_ov.gif";
  public static final String IMG_CONFLICT_OVR = "ovr/confchg_ov.gif";
  public static final String IMG_ERROR_OVR = "ovr/error_co.gif";
  public static final String IMG_WARNING_OVR = "ovr/warning_co.gif";
  public static final String IMG_HOURGLASS_OVR = "ovr/waiting_ovr.gif";
}

/* Location:
 * Qualified Name:     org.eclipse.team.ui.ISharedImages
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.team.ui;

import org.eclipse.compare.CompareViewerPane;
import org.eclipse.compare.Splitter;
import org.eclipse.compare.structuremergeviewer.ICompareInput;
import org.eclipse.jface.viewers.DoubleClickEvent;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionProvider;
import org.eclipse.jface.viewers.OpenEvent;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.swt.widgets.Composite;

class PageCompareEditorInput$1
  extends CompareViewerPane
{
  final PageCompareEditorInput this$0;
  
  PageCompareEditorInput$1(PageCompareEditorInput paramPageCompareEditorInput, Composite $anonymous0, int $anonymous1)
  {
    super($anonymous0, $anonymous1);this$0 = paramPageCompareEditorInput;
  }
  
  public void selectionChanged(SelectionChangedEvent ev)
  {
    ISelection selection = ev.getSelection();
    StructuredSelection newSelection = convertSelection(selection, false);
    SelectionChangedEvent newEv = new SelectionChangedEvent(PageCompareEditorInput.access$0(this$0), newSelection);
    super.selectionChanged(newEv);
  }
  
  private StructuredSelection convertSelection(ISelection selection, boolean prepare)
  {
    ICompareInput ci = this$0.asCompareInput(selection);
    StructuredSelection newSelection;
    StructuredSelection newSelection;
    if (ci != null)
    {
      if (prepare) {
        this$0.prepareCompareInput(ci);
      }
      newSelection = new StructuredSelection(ci);
    }
    else
    {
      newSelection = StructuredSelection.EMPTY;
    }
    return newSelection;
  }
  
  public ISelection getSelection()
  {
    return convertSelection(this$0.getSelectionProvider().getSelection(), false);
  }
  
  public Object getInput()
  {
    return this$0.getCompareResult();
  }
  
  public void open(OpenEvent event)
  {
    ISelection selection = event.getSelection();
    StructuredSelection newSelection = convertSelection(selection, true);
    super.open(new OpenEvent((Viewer)event.getSource(), newSelection));
  }
  
  public void doubleClick(DoubleClickEvent event)
  {
    ISelection selection = event.getSelection();
    StructuredSelection newSelection = convertSelection(selection, true);
    super.doubleClick(new DoubleClickEvent((Viewer)event.getSource(), newSelection));
  }
  
  public void setInput(Object input)
  {
    super.setInput(input);
    Composite c = getParent();
    if ((c instanceof Splitter)) {
      ((Splitter)c).setVisible(this, true);
    }
    layout(true);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.team.ui.PageCompareEditorInput.1
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.team.ui;

import java.lang.reflect.InvocationTargetException;
import org.eclipse.compare.structuremergeviewer.ICompareInput;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.operation.IRunnableWithProgress;

class PageCompareEditorInput$2
  implements IRunnableWithProgress
{
  final PageCompareEditorInput this$0;
  private final ICompareInput val$input;
  
  PageCompareEditorInput$2(PageCompareEditorInput paramPageCompareEditorInput, ICompareInput paramICompareInput)
  {
    this$0 = paramPageCompareEditorInput;val$input = paramICompareInput;
  }
  
  public void run(IProgressMonitor monitor)
    throws InvocationTargetException, InterruptedException
  {
    this$0.prepareInput(val$input, this$0.getCompareConfiguration(), monitor);
    PageCompareEditorInput.access$1(this$0, val$input);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.team.ui.PageCompareEditorInput.2
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.team.ui;

import java.lang.reflect.InvocationTargetException;
import org.eclipse.compare.CompareConfiguration;
import org.eclipse.compare.CompareEditorInput;
import org.eclipse.compare.CompareViewerPane;
import org.eclipse.compare.IContentChangeListener;
import org.eclipse.compare.IContentChangeNotifier;
import org.eclipse.compare.ITypedElement;
import org.eclipse.compare.Splitter;
import org.eclipse.compare.structuremergeviewer.ICompareInput;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.jface.action.ToolBarManager;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.viewers.DoubleClickEvent;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionProvider;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.OpenEvent;
import org.eclipse.jface.vi
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69

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