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

til.HashSet;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.jface.viewers.CheckboxTableViewer;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.ui.IWorkingSet;

class ExportProjectSetMainPage$5
  implements Listener
{
  final ExportProjectSetMainPage.WorkingSetPage this$1;
  
  ExportProjectSetMainPage$5(ExportProjectSetMainPage.WorkingSetPage paramWorkingSetPage)
  {
    this$1 = paramWorkingSetPage;
  }
  
  public void handleEvent(Event event)
  {
    ExportProjectSetMainPage.WorkingSetPage.access$4(this$1).setAllChecked(true);
    
    this$1.selectedProjects.removeAll(this$1.selectedProjects);
    this$1.selectedWorkingSet.removeAll(this$1.selectedWorkingSet);
    Object[] checked = ExportProjectSetMainPage.WorkingSetPage.access$4(this$1).getCheckedElements();
    for (int i = 0; i < checked.length; i++)
    {
      this$1.selectedWorkingSet.add(checked[i]);
      if ((checked[i] instanceof IWorkingSet))
      {
        IWorkingSet ws = (IWorkingSet)checked[i];
        IAdaptable[] elements = ws.getElements();
        ExportProjectSetMainPage.WorkingSetPage.access$5(this$1, elements);
      }
      ExportProjectSetMainPage.WorkingSetPage.access$1(this$1).setInput(this$1.selectedProjects);
    }
    ExportProjectSetMainPage.WorkingSetPage.access$3(this$1);
  }
}

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

import java.util.ArrayList;
import java.util.HashSet;
import org.eclipse.jface.viewers.CheckboxTableViewer;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;

class ExportProjectSetMainPage$6
  implements Listener
{
  final ExportProjectSetMainPage.WorkingSetPage this$1;
  
  ExportProjectSetMainPage$6(ExportProjectSetMainPage.WorkingSetPage paramWorkingSetPage)
  {
    this$1 = paramWorkingSetPage;
  }
  
  public void handleEvent(Event event)
  {
    ExportProjectSetMainPage.WorkingSetPage.access$4(this$1).setAllChecked(false);
    this$1.selectedWorkingSet.removeAll(this$1.selectedWorkingSet);
    this$1.selectedProjects.removeAll(this$1.selectedProjects);
    this$1.referenceCountProjects.removeAll(this$1.referenceCountProjects);
    ExportProjectSetMainPage.WorkingSetPage.access$1(this$1).setInput(this$1.selectedProjects);
    ExportProjectSetMainPage.WorkingSetPage.access$3(this$1);
  }
}

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

import org.eclipse.swt.widgets.Listener;

class ExportProjectSetMainPage$7
  implements Listener
{
  final ExportProjectSetMainPage.WorkingSetPage this$1;
  
  ExportProjectSetMainPage$7(ExportProjectSetMainPage.WorkingSetPage paramWorkingSetPage)
  {
    this$1 = paramWorkingSetPage;
  }
  
  /* Error */
  public void handleEvent(org.eclipse.swt.widgets.Event event)
  {
    // Byte code:
    //   0: invokestatic 130	org/eclipse/team/internal/ui/TeamUIPlugin:getPlugin	()Lorg/eclipse/team/internal/ui/TeamUIPlugin;
    //   3: invokevirtual 131	org/eclipse/team/internal/ui/TeamUIPlugin:getWorkbench	()Lorg/eclipse/ui/IWorkbench;
    //   6: invokeinterface 138 1 0
    //   11: astore_2
    //   12: aload_2
    //   13: aload_0
    //   14: getfield 119	org/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage$7:this$1	Lorg/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage$WorkingSetPage;
    //   17: invokestatic 137	org/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage$WorkingSetPage:access$7	(Lorg/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage$WorkingSetPage;)Lorg/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage;
    //   20: invokevirtual 132	org/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage:getShell	()Lorg/eclipse/swt/widgets/Shell;
    //   23: iconst_0
    //   24: invokeinterface 142 3 0
    //   29: astore_3
    //   30: aload_3
    //   31: ifnull +242 -> 273
    //   34: aconst_null
    //   35: astore 4
    //   37: new 62	org/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage$8
    //   40: dup
    //   41: aload_0
    //   42: invokespecial 133	org/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage$8:<init>	(Lorg/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage$7;)V
    //   45: astore 4
    //   47: aload_2
    //   48: aload 4
    //   50: invokeinterface 140 2 0
    //   55: aload_3
    //   56: invokeinterface 143 1 0
    //   61: pop
    //   62: aload_0
    //   63: getfield 119	org/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage$7:this$1	Lorg/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage$WorkingSetPage;
    //   66: getfield 121	org/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage$WorkingSetPage:selectedWorkingSet	Ljava/util/ArrayList;
    //   69: aload_0
    //   70: getfield 119	org/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage$7:this$1	Lorg/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage$WorkingSetPage;
    //   73: getfield 121	org/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage$WorkingSetPage:selectedWorkingSet	Ljava/util/ArrayList;
    //   76: invokevirtual 125	java/util/ArrayList:removeAll	(Ljava/util/Collection;)Z
    //   79: pop
    //   80: aload_0
    //   81: getfield 119	org/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage$7:this$1	Lorg/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage$WorkingSetPage;
    //   84: getfield 120	org/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage$WorkingSetPage:referenceCountProjects	Ljava/util/ArrayList;
    //   87: aload_0
    //   88: getfield 119	org/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage$7:this$1	Lorg/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage$WorkingSetPage;
    //   91: getfield 122	org/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage$WorkingSetPage:selectedProjects	Ljava/util/HashSet;
    //   94: invokevirtual 125	java/util/ArrayList:removeAll	(Ljava/util/Collection;)Z
    //   97: pop
    //   98: aload_0
    //   99: getfield 119	org/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage$7:this$1	Lorg/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage$WorkingSetPage;
    //   102: getfield 122	org/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage$WorkingSetPage:selectedProjects	Ljava/util/HashSet;
    //   105: aload_0
    //   106: getfield 119	org/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage$7:this$1	Lorg/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage$WorkingSetPage;
    //   109: getfield 122	org/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage$WorkingSetPage:selectedProjects	Ljava/util/HashSet;
    //   112: invokevirtual 126	java/util/HashSet:removeAll	(Ljava/util/Collection;)Z
    //   115: pop
    //   116: aload_0
    //   117: getfield 119	org/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage$7:this$1	Lorg/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage$WorkingSetPage;
    //   120: invokestatic 135	org/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage$WorkingSetPage:access$4	(Lorg/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage$WorkingSetPage;)Lorg/eclipse/jface/viewers/CheckboxTableViewer;
    //   123: aload_2
    //   124: invokevirtual 128	org/eclipse/jface/viewers/CheckboxTableViewer:setInput	(Ljava/lang/Object;)V
    //   127: aload_0
    //   128: getfield 119	org/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage$7:this$1	Lorg/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage$WorkingSetPage;
    //   131: invokestatic 135	org/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage$WorkingSetPage:access$4	(Lorg/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage$WorkingSetPage;)Lorg/eclipse/jface/viewers/CheckboxTableViewer;
    //   134: invokevirtual 127	org/eclipse/jface/viewers/CheckboxTableViewer:getCheckedElements	()[Ljava/lang/Object;
    //   137: astore 5
    //   139: iconst_0
    //   140: istore 6
    //   142: goto +61 -> 203
    //   145: aload_0
    //   146: getfield 119	org/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage$7:this$1	Lorg/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage$WorkingSetPage;
    //   149: getfield 121	org/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage$WorkingSetPage:selectedWorkingSet	Ljava/util/ArrayList;
    //   152: aload 5
    //   154: iload 6
    //   156: aaload
    //   157: invokevirtual 124	java/util/ArrayList:add	(Ljava/lang/Object;)Z
    //   160: pop
    //   161: aload 5
    //   163: iload 6
    //   165: aaload
    //   166: instanceof 65
    //   169: ifeq +31 -> 200
    //   172: aload 5
    //   174: iload 6
    //   176: aaload
    //   177: checkcast 65	org/eclipse/ui/IWorkingSet
    //   180: astore 7
    //   182: aload 7
    //   184: invokeinterface 139 1 0
    //   189: astore 8
    //   191: aload_0
    //   192: getfield 119	org/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage$7:this$1	Lorg/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage$WorkingSetPage;
    //   195: aload 8
    //   197: invokestatic 134	org/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage$WorkingSetPage:access$5	(Lorg/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage$WorkingSetPage;[Lorg/eclipse/core/runtime/IAdaptable;)V
    //   200: iinc 6 1
    //   203: iload 6
    //   205: aload 5
    //   207: arraylength
    //   208: if_icmplt -63 -> 145
    //   211: aload_0
    //   212: getfield 119	org/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage$7:this$1	Lorg/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage$WorkingSetPage;
    //   215: invokestatic 135	org/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage$WorkingSetPage:access$4	(Lorg/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage$WorkingSetPage;)Lorg/eclipse/jface/viewers/CheckboxTableViewer;
    //   218: aload_2
    //   219: invokevirtual 128	org/eclipse/jface/viewers/CheckboxTableViewer:setInput	(Ljava/lang/Object;)V
    //   222: aload_0
    //   223: getfield 119	org/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage$7:this$1	Lorg/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage$WorkingSetPage;
    //   226: invokestatic 136	org/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage$WorkingSetPage:access$1	(Lorg/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage$WorkingSetPage;)Lorg/eclipse/jface/viewers/TableViewer;
    //   229: aload_0
    //   230: getfield 119	org/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage$7:this$1	Lorg/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage$WorkingSetPage;
    //   233: getfield 122	org/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage$WorkingSetPage:selectedProjects	Ljava/util/HashSet;
    //   236: invokevirtual 129	org/eclipse/jface/viewers/TableViewer:setInput	(Ljava/lang/Object;)V
    //   239: goto +21 -> 260
    //   242: astore 9
    //   244: aload 4
    //   246: ifnull +11 -> 257
    //   249: aload_2
    //   250: aload 4
    //   252: invokeinterface 141 2 0
    //   257: aload 9
    //   259: athrow
    //   260: aload 4
    //   262: ifnull +11 -> 273
    //   265: aload_2
    //   266: aload 4
    //   268: invokeinterface 141 2 0
    //   273: return
    // Line number table:
    //   Java source line #597	-> byte code offset #0
    //   Java source line #598	-> byte code offset #12
    //   Java source line #599	-> byte code offset #30
    //   Java source line #600	-> byte code offset #34
    //   Java source line #603	-> byte code offset #37
    //   Java source line #608	-> byte code offset #47
    //   Java source line #609	-> byte code offset #55
    //   Java source line #611	-> byte code offset #62
    //   Java source line #612	-> byte code offset #80
    //   Java source line #613	-> byte code offset #98
    //   Java source line #614	-> byte code offset #116
    //   Java source line #615	-> byte code offset #127
    //   Java source line #616	-> byte code offset #139
    //   Java source line #617	-> byte code offset #145
    //   Java source line #618	-> byte code offset #161
    //   Java source line #619	-> byte code offset #172
    //   Java source line #620	-> byte code offset #182
    //   Java source line #621	-> byte code offset #191
    //   Java source line #616	-> byte code offset #200
    //   Java source line #625	-> byte code offset #211
    //   Java source line #626	-> byte code offset #222
    //   Java source line #627	-> byte code offset #242
    //   Java source line #628	-> byte code offset #244
    //   Java source line #629	-> byte code offset #249
    //   Java source line #630	-> byte code offset #257
    //   Java source line #628	-> byte code offset #260
    //   Java source line #629	-> byte code offset #265
    //   Java source line #632	-> byte code offset #273
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	274	0	this	7
    //   0	274	1	event	org.eclipse.swt.widgets.Event
    //   11	255	2	workingSetManager	org.eclipse.ui.IWorkingSetManager
    //   29	27	3	wsWizard	org.eclipse.ui.dialogs.IWorkingSetSelectionDialog
    //   35	232	4	propListener	org.eclipse.jface.util.IPropertyChangeListener
    //   137	69	5	checked	Object[]
    //   140	64	6	i	int
    //   180	3	7	ws	org.eclipse.ui.IWorkingSet
    //   189	7	8	elements	org.eclipse.core.runtime.IAdaptable[]
    //   242	16	9	localObject	Object
    // Exception table:
    //   from	to	target	type
    //   37	242	242	finally
  }
}

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

import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.jface.util.PropertyChangeEvent;

class ExportProjectSetMainPage$8
  implements IPropertyChangeListener
{
  final ExportProjectSetMainPage.7 this$2;
  
  ExportProjectSetMainPage$8(ExportProjectSetMainPage.7 param7)
  {
    this$2 = param7;
  }
  
  public void propertyChange(PropertyChangeEvent event) {}
}

/* Location:
 * Qualified Name:     org.eclipse.team.internal.ui.wizards.ExportProjectSetMainPage.8
 * 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.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.widgets.Button;
import org.eclipse.ui.part.PageBook;

class ExportProjectSetMainPage$9
  extends SelectionAdapter
{
  final ExportProjectSetMainPage this$0;
  
  ExportProjectSetMainPage$9(ExportProjectSetMainPage paramExportProjectSetMainPage)
  {
    this$0 = paramExportProjectSetMainPage;
  }
  
  public void widgetSelected(SelectionEvent e)
  {
    if (((Button)widget).getSelection())
    {
      this$0.book.showPage(this$0.workingSetPage.getControl());
      this$0.selectedPage = this$0.workingSetPage;
      this$0.workingSetPage.refresh();
      ExportProjectSetMainPage.WorkingSetPage.access$3(this$0.workingSetPage);
    }
    else
    {
      this$0.book.showPage(this$0.projectPage.getControl());
      this$0.selectedPage = this$0.projectPage;
      ExportProjectSetMainPage.ProjectPage.access$0(this$0.projectPage);
    }
  }
}

/* Location:
 * Qualified Name:     org.eclipse.team.internal.ui.wizards.ExportProjectSetMainPage.9
 * 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.IProject;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.model.WorkbenchLabelProvider;

class ExportProjectSetMainPage$ExportProjectSetLabelProvider
  extends WorkbenchLabelProvider
{
  final ExportProjectSetMainPage this$0;
  
  private ExportProjectSetMainPage$ExportProjectSetLabelProvider(ExportProjectSetMainPage paramExportProjectSetMainPage)
  {
    this$0 = paramExportProjectSetMainPage;
  }
  
  ExportProjectSetMainPage$ExportProjectSetLabelProvider(ExportProjectSetMainPage paramExportProjectSetMainPage, ExportProjectSetLabelProvider paramExportProjectSetLabelProvider)
  {
    this(paramExportProjectSetMainPage);
  }
  
  public Color getForeground(Object element)
  {
    if (((element instanceof IProject)) && 
      (!ExportProjectSetMainPage.access$0(this$0, (IProject)element))) {
      return Display.getCurrent().getSystemColor(
        18);
    }
    return super.getForeground(element);
  }
}

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

import java.util.ArrayList;
import java.util.HashSet;

abstract interface ExportProjectSetMainPage$IExportProjectSetPage
{
  public abstract HashSet getSelectedProjects();
  
  public abstract ArrayList getReferenceCountProjects();
  
  public abstract ArrayList getWorkingSet();
}

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

import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.jface.viewers.ITreePathContentProvider;
import org.eclipse.jface.viewers.TreePath;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.team.internal.ui.TeamUIPlugin;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkingSet;
import org.eclipse.ui.IWorkingSetManager;

class ExportProjectSetMainPage$ProjectContentProvider
  implements ITreePathContentProvider
{
  final ExportProjectSetMainPage this$0;
  
  ExportProjectSetMainPage$ProjectContentProvider(ExportProjectSetMainPage paramExportProjectSetMainPage)
  {
    this$0 = paramExportProjectSetMainPage;
  }
  
  public Object[] getChildren(TreePath parentPath)
  {
    Object obj = parentPath.getLastSegment();
    if ((obj instanceof IWorkingSet)) {
      return ((IWorkingSet)obj).getElements();
    }
    return null;
  }
  
  public TreePath[] getParents(Object element)
  {
    if ((element instanceof IProject))
    {
      ArrayList treePaths = new ArrayList();
      IWorkingSet[] workingSets = TeamUIPlugin.getPlugin().getWorkbench().getWorkingSetManager().getWorkingSets();
      for (int i = 0; i < workingSets.length; i++)
      {
        IAdaptable[] elements = workingSets[i].getElements();
        for (int j = 0; j < elements.length; j++) {
          if (elements[j].equals(element))
          {
            treePaths.add(workingSets[i]);
            break;
          }
        }
      }
      return (TreePath[])treePaths.toArray(new TreePath[treePaths.size()]);
    }
    return null;
  }
  
  public boolean hasChildren(TreePath path)
  {
    Object obj = path.getLastSegment();
    if ((obj instanceof IWorkingSet)) {
      return true;
    }
    return false;
  }
  
  public Object[] getElements(Object inputElement)
  {
    if ((inputElement instanceof IWorkspaceRoot))
    {
      IWorkspaceRoot root = (IWorkspaceRoot)inputElement;
      List projectList = new ArrayList();
      IProject[] workspaceProjects = root.getProjects();
      for (int i = 0; i < workspaceProjects.length; i++) {
        if (ExportProjectSetMainPage.access$0(this$0, workspaceProjects[i])) {
          projectList.add(workspaceProjects[i]);
        }
      }
      return projectList.toArray(new IProject[projectList.size()]);
    }
    if ((inputElement instanceof IWorkingSetManager))
    {
      IWorkingSetManager manager = (IWorkingSetManager)inputElement;
      IWorkingSet[] allSets = manager.getAllWorkingSets();
      ArrayList resourceSets = new ArrayList();
      for (int i = 0; i < allSets.length; i++) {
        if (ExportProjectSetMainPage.access$1(allSets[i])) {
          resourceSets.add(allSets[i]);
        }
      }
      return resourceSets.toArray(new IWorkingSet[resourceSets.size()]);
    }
    if ((inputElement instanceof IAdaptable))
    {
      IProject[] tempProjects = ExportProjectSetMainPage.access$2(this$0, inputElement);
      if (tempProjects != null) {
        return tempProjects;
      }
    }
    else
    {
      if ((inputElement instanceof IAdaptable[]))
      {
        IAdaptable[] tempAdaptable = (IAdaptable[])inputElement;
        return ExportProjectSetMainPage.access$3(this$0, tempAdaptable);
      }
      if ((inputElement instanceof HashSet))
      {
        Set tempList = new HashSet();
        HashSet inputElementSet = (HashSet)inputElement;
        for (Iterator iterator = inputElementSet.iterator(); iterator.hasNext();)
        {
          IProject[] projects = ExportProjectSetMainPage.access$2(this$0, iterator.next());
          if (projects != null) {
            tempList.addAll(Arrays.asList(projects));
          }
        }
        return (IProject[])tempList.toArray(new IProject[tempList.size()]);
      }
    }
    return null;
  }
  
  public void dispose() {}
  
  public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {}
}

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

import java.util.ArrayList;
import java.util.HashSet;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.jface.viewers.CheckboxTableViewer;
import org.eclipse.jface.viewers.TableLayout;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Table;
import org.eclipse.team.internal.ui.SWTUtils;
import org.eclipse.team.internal.ui.TeamUIMessages;
import org.eclipse.ui.model.WorkbenchLabelProvider;
import org.eclipse.ui.part.Page;
import org.eclipse.ui.views.navigator.ResourceComparator;

class ExportProjectSetMainPage$ProjectPage
  extends Page
  implements ExportProjectSetMainPage.IExportProjectSetPage
{
  private Composite projectComposite;
  private CheckboxTableViewer tableViewer;
  private Table table;
  HashSet selectedProjects;
  ArrayList referenceCountProjects;
  ArrayList selectedWorkingSet;
  final ExportProjectSetMainPage this$0;
  
  ExportProjectSetMainPage$ProjectPage(ExportProjectSetMainPage paramExportProjectSetMainPage, ProjectPage paramProjectPage)
  {
    this(paramExportProjectSetMainPage);
  }
  
  private ExportProjectSetMainPage$ProjectPage(ExportProjectSetMainPage paramExportProjectSetMainPage)
  {
    this$0 = paramExportProjectSetMainPage;
    
    selectedProjects = new HashSet();
    referenceCountProjects = new ArrayList();
    selectedWorkingSet = new ArrayList();
  }
  
  public void createControl(Composite parent)
  {
    projectComposite = SWTUtils.createHVFillComposite(parent, 1);
    ExportProjectSetMainPage.access$4(this$0, projectComposite);
    
    addProjectSection(projectComposite);
    initializeProjects();
    
    this$0.setPageComplete(selectedProjects.size() > 0);
  }
  
  public Control getControl()
  {
    return projectComposite;
  }
  
  public void setFocus()
  {
    projectComposite.setFocus();
  }
  
  private void addProjectSection(Composite composite)
  {
    this$0.createLabel(composite, TeamUIMessages.ExportProjectSetMainPage_Select_the_projects_to_include_in_the_project_set__2);
    
    table = new Table(composite, 2848);
    tableViewer = new CheckboxTableViewer(table);
    table.setLayout(new TableLayout());
    GridData data = new GridData(1808);
    heightHint = 300;
    table.setLayoutData(data);
    tableViewer.setContentProvider(new ExportProjectSetMainPage.ProjectContentProvider(this$0));
    tableViewer.setLabelProvider(new WorkbenchLabelProvider());
    tableViewer.setComparator(new ResourceComparator(1));
    tableViewer.addCheckStateListener(new ExportProjectSetMainPage.1(this));
    
    Composite buttonComposite = new Composite(composite, 0);
    GridLayout layout = new GridLayout();
    numColumns = 2;
    marginWidth = 0;
    buttonComposite.setLayout(layout);
    data = new GridData(4, 4, true, false);
    buttonComposite.setLayoutData(data);
    
    Button selectAll = new Button(buttonComposite, 8);
    data = new GridData();
    verticalAlignment = 1;
    horizontalAlignment = 3;
    int widthHint = ExportProjectSetMainPage.access$5(this$0, 61);
    widthHint = Math.max(widthHint, computeSize-1-1x);
    selectAll.setLayoutData(data);
    selectAll.setText(TeamUIMessages.ExportProjectSetMainPage_SelectAll);
    selectAll.addListener(13, new ExportProjectSetMainPage.2(this));
    
    Button deselectAll = new Button(buttonComposite, 8);
    data = new GridData();
    verticalAlignment = 1;
    horizontalAlignment = 3;
    widthHint = ExportProjectSetMainPage.access$5(this$0, 61);
    widthHint = Math.max(widthHint, computeSize-1-1x);
    deselectAll.setLayoutData(data);
    deselectAll.setText(TeamUIMessages.ExportProjectSetMainPage_DeselectAll);
    deselectAll.addListener(13, new ExportProjectSetMainPage.3(this));
  }
  
  private void initializeProjects()
  {
    tableViewer.setInput(ResourcesPlugin.getWorkspace().getRoot());
    if (selectedProjects != null) {
      tableViewer.setCheckedElements(selectedProjects.toArray(new IProject[selectedProjects.size()]));
    }
  }
  
  private void updateEnablement()
  {
    boolean complete = selectedProjects.size() > 0;
    if (complete)
    {
      this$0.setErrorMessage(null);
      this$0.setDescription(TeamUIMessages.ExportProjectSetMainPage_description);
    }
    else
    {
      this$0.setErrorMessage(TeamUIMessages.ExportProjectSetMainPage_A_project_must_be_selected);
    }
    this$0.setPageComplete(complete);
  }
  
  public ArrayList getReferenceCountProjects()
  {
    return referenceCountProjects;
  }
  
  public HashSet getSelectedProjects()
  {
    return selectedProjects;
  }
  
  public ArrayList getWorkingSet()
  {
    return selectedWorkingSet;
  }
}

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

import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.jface.viewers.CheckboxTableViewer;
import org.eclipse.jface.viewers.TableLayout;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.swt.custom.SashForm;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Table;
import org.eclipse.team.internal.ui.SWTUtils;
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.model.WorkbenchLabelProvider;
import org.eclipse.ui.part.Page;
import org.eclipse.ui.views.navigator.ResourceComparator;

class ExportProjectSetMainPage$WorkingSetPage
  extends Page
  implements ExportProjectSetMainPage.IExportProjectSetPage
{
  private Composite projectComposite;
  private Table wsTable;
  private CheckboxTableViewer wsTableViewer;
  private Table table;
  private TableViewer tableViewer;
  HashSet selectedProjects;
  ArrayList referenceCountProjects;
  ArrayList selectedWorkingSet;
  private boolean pageShown;
  final ExportProjectSetMainPage this$0;
  
  ExportProjectSetMainPage$WorkingSetPage(ExportProjectSetMainPage paramExportProjectSetMainPage, WorkingSetPage paramWorkingSetPage)
  {
    this(paramExportProjectSetMainPage);
  }
  
  private ExportProjectSetMainPage$WorkingSetPage(ExportProjectSetMainPage paramExportProjectSetMainPage)
  {
    this$0 = paramExportProjectSetMainPage;
    
    selectedProjects = new HashSet();
    referenceCountProjects = new ArrayList();
    selectedWorkingSet = new ArrayList();
    
    pageShown = false;
  }
  
  public void createControl(Composite parent)
  {
    projectComposite = SWTUtils.createHVFillComposite(parent, 1);
    ExportProjectSetMainPage.access$4(this$0, projectComposite);
    
    Label label = this$0.createLabel(projectComposite, TeamUIMessages.ExportProjectSetMainPage_SelectButton);
    GridData grid = (GridData)label.getLayoutData();
    label.setData(grid);
    
    SashForm form = new SashForm(projectComposite, 256);
    form.setLayout(new FillLayout());
    GridData data = new GridData(1808);
    form.setLayoutData(data);
    
    addWorkingSetSection(form);
    
    addProjectSection(form);
    
    form.setWeights(new int[] { 50, 50 });
    
    addButtons(projectComposite);
    this$0.setPageComplete(false);
  }
  
  private void addProjectSection(Composite composite)
  {
    table = new Table(composite, 2816);
    tableViewer = new TableViewer(table);
    table.setLayout(new TableLayout());
    GridData data = new GridData(1808);
    heightHint = 300;
    table.setLayoutData(data);
    tableViewer.setContentProvider(new ExportProjectSetMainPage.ProjectContentProvider(this$0));
    tableViewer.setLabelProvider(new ExportProjectSetMainPage.ExportProjectSetLabelProvider(this$0, null));
    tableViewer.setComparator(new ResourceComparator(1));
  }
  
  private void addWorkingSetSection(Composite projectComposite)
  {
    wsTable = new Table(projectComposite, 2848);
    wsTableViewer = new CheckboxTableViewer(wsTable);
    wsTable.setLayout(new TableLayout());
    GridData data = new GridData(1808);
    heightHint = 300;
    wsTable.setLayoutData(data);
    wsTableViewer.setContentProvider(new ExportProjectSetMainPage.ProjectContentProvider(this$0));
    wsTableViewer.setLabelProvider(new WorkbenchLabelProvider());
    wsTableViewer.addCheckStateListener(new ExportProjectSetMainPage.4(this));
    
    wsTableViewer.setInput(TeamUIPlugin.getPlugin().getWorkbench().getWorkingSetManager());
  }
  
  private void addButtons(Composite projectComposite)
  {
    Composite buttonComposite = new Composite(projectComposite, 0);
    GridLayout layout = new GridLayout();
    numColumns = 3;
    marginWidth = 0;
    buttonComposite.setLayout(layout);
    GridData data = new GridData(4, 4, false, false);
    buttonComposite.setLayoutData(data);
    
    Button selectAll = new Button(buttonComposite, 8);
    data = new GridData();
    verticalAlignment = 4;
    horizontalAlignment = 4;
    int widthHint = ExportProjectSetMainPage.access$5(this$0, 61);
    widthHint = Math.max(widthHint, computeSize-1-1x);
    selectAll.setLayoutData(data);
    selectAll.setText(TeamUIMessages.ExportProjectSetMainPage_SelectAll);
    selectAll.addListener(13, new ExportProjectSetMainPage.5(this));
    
    Button deselectAll = new Button(buttonComposite, 8);
    data = new GridData();
    verticalAlignment = 4;
    horizontalAlignment = 4;
    widthHint = ExportProjectSetMainPage.access$5(this$0, 61);
    widthHint = Math.max(widthHint, computeSize-1-1x);
    deselectAll.setLayoutData(data);
    deselectAll.setText(TeamUIMessages.ExportProjectSetMainPage_DeselectAll);
    deselectAll.addListener(13, new ExportProjectSetMainPage.6(this));
    
    Button newWorkingSet = new Button(buttonComposite, 8);
    data = new GridData();
    verticalAlignment = 4;
    horizontalAlignment = 4;
    widthHint = ExportProjectSetMainPage.access$5(this$0, 61);
    widthHint = Math.max(widthHint, computeSize-1-1x);
    newWorkingSet.setLayoutData(data);
    newWorkingSet.setText(TeamUIMessages.ExportProjectSetMainPage_EditButton);
    newWorkingSet.addListener(13, new ExportProjectSetMainPage.7(this));
  }
  
  public Control getControl()
  {
    return projectComposite;
  }
  
  public void setFocus()
  {
    projectComposite.setFocus();
  }
  
  public void refresh()
  {
    wsTableViewer.setInput(TeamUIPlugin.getPlugin().getWorkbench().getWorkingSetManager());
  }
  
  private void updateEnablement()
  {
    boolean complete = (selectedProjects.size() > 0) && 
      (selectedWorkingSet.size() > 0);
    boolean allExportable = complete;
    if ((complete) || (!pageShown))
    {
      complete = false;
      for (Iterator iterator = selectedProjects.iterator(); iterator
            .hasNext();)
      {
        IProject selectedProject = (IProject)iterator.next();
        if (ExportProjectSetMainPage.access$0(this$0, selectedProject)) {
          complete = true;
        } else {
          allExportable = false;
        }
      }
      if ((!complete) && (!pageShown))
      {
        this$0.setErrorMessage(null);
        this$0.setMessage(TeamUIMessages.ExportProjectSetMainPage_Initial_description);
      }
      else if ((complete) || (!pageShown))
      {
        if (allExportable)
        {
          this$0.setErrorMessage(null);
          this$0.setMessage(TeamUIMessages.ExportProjectSetMainPage_description);
        }
        else
        {
          this$0.setErrorMessage(null);
          this$0.setMessage(TeamUIMessages.ExportProjectSetMainPage_warning, 2);
        }
      }
      else
      {
        this$0.setErrorMessage(TeamUIMessages.ExportProjectSetMainPage_None_of_the_selected_working_sets_have_an_available_project_to_export);
      }
    }
    else
    {
      this$0.setErrorMessage(TeamUIMessages.ExportProjectSetMainPage_A_working_set_must_be_selected);
    }
    this$0.setPageComplete(complete);
    pageShown = true;
  }
  
  public ArrayList getReferenceCountProjects()
  {
    return referenceCountProjects;
  }
  
  public HashSet getSelectedProjects()
  {
    return selectedProjects;
  }
  
  public ArrayList getWorkingSet()
  {
    return selectedWorkingSet;
  }
  
  private void workingSetAdded(IWorkingSet workingSet)
  {
    IAdaptable[] elements = workingSet.getElements();
    selectedWorkingSet.add(workingSet);
    addProjects(elements);
  }
  
  private void workingSetRemoved(IWorkingSet workingSet)
  {
    IAdaptable[] elements = workingSet.getElements();
    selectedWorkingSet.remove(workingSet);
    
    Set tempSet = new HashSet();
    for (int i = 0; i < elements.length; i++)
    {
      IProject[] projects = ExportProjectSetMainPage.access$2(this$0, elements[i]);
      if (projects != null) {
        tempSet.addAll(Arrays.asList(projects));
      }
    }
    if (!tempSet.isEmpty())
    {
      selectedProjects.removeAll(tempSet);
      for (Iterator iterator = tempSet.iterator(); iterator.hasNext();)
      {
        Object element = iterator.next();
        referenceCountProjects.remove(element);
      }
      selectedProjects.addAll(referenceCountProjects);
    }
  }
  
  private void addProjects(IAdaptable[] elements)
  {
    Set tempSet = new HashSet();
    for (int j = 0; j < elements.length; j++)
    {
      IProject[] projects = ExportProjectSetMainPage.access$2(this$0, elements[j]);
      if (projects != null) {
        tempSet.addAll(Arrays.asList(projects));
      }
    }
    selectedProjects.addAll(tempSet);
    referenceCountProjects.addAll(tempSet);
  }
}

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

import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.resources.mapping.ResourceMapping;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.viewers.CheckboxTableViewer;
import org.eclipse.jface.viewers.ITreePathContentProvider;
import org.eclipse.jface.viewers.TableLayout;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.TreePath;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.swt.custom.SashForm;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Table;
import org.eclipse.team.core.RepositoryProvider;
import org.eclipse.team.internal.ui.SWTUtils;
import org.eclipse.team.internal.ui.TeamUIMessages;
import org.eclipse.team.internal.ui.TeamUIPlugin;
import org.eclipse.team.internal.ui.Utils;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkingSet;
import org.eclipse.ui.IWorkingSetManager;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.help.IWorkbenchHelpSystem;
import org.eclipse.ui.ide.ResourceUtil;
import org.eclipse.ui.model.WorkbenchLabelProvider;
import org.eclipse.ui.part.Page;
import org.eclipse.ui.part.PageBook;
import org.eclipse.ui.views.navigator.ResourceComparator;

public class ExportProjectSetMainPage
  extends TeamWizardPage
{
  PageBook book;
  ProjectPage projectPage;
  WorkingSetPage workingSetPage;
  IExportProjectSetPage selectedPage;
  Button exportWorkingSets;
  ArrayList passedInSelectedProjects = new ArrayList();
  
  class ProjectContentProvider
    implements ITreePathContentProvider
  {
    ProjectContentProvider() {}
    
    public Object[] getChildren(TreePath parentPath)
    {
      Object obj = parentPath.getLastSegment();
      if ((obj instanceof IWorkingSet)) {
        return ((IWorkingSet)obj).getElements();
      }
      return null;
    }
    
    public TreePath[] getParents(Object element)
    {
      if ((element instanceof IProject))
      {
        ArrayList treePaths = new ArrayList();
        IWorkingSet[] workingSets = TeamUIPlugin.getPlugin().getWorkbench().getWorkingSetManager().getWorkingSets();
        for (int i = 0; i < workingSets.length; i++)
        {
          IAdaptable[] elements = workingSets[i].getElements();
          for (int j = 0; j < elements.length; j++) {
            if (elements[j].equals(element))
            {
              treePaths.add(workingSets[i]);
              break;
            }
          }
        }
        return (TreePath[])treePaths.toArray(new TreePath[treePaths.size()]);
      }
      return null;
    }
    
    public boolean hasChildren(TreePath path)
    {
      Object obj = path.getLastSegment();
      if ((obj instanceof IWorkingSet
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