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

etException localInvocationTargetException) {}
    return false;
  }
  
  private static void mergeWorkingSets(IWorkingSet newWs, IWorkingSet oldWs)
  {
    IAdaptable[] oldElements = oldWs.getElements();
    IAdaptable[] newElements = newWs.getElements();
    
    Set combinedElements = new HashSet();
    combinedElements.addAll(Arrays.asList(oldElements));
    combinedElements.addAll(Arrays.asList(newElements));
    
    oldWs.setElements((IAdaptable[])combinedElements.toArray(new IAdaptable[0]));
  }
  
  private static void replaceWorkingSet(IWorkingSetManager wsManager, IWorkingSet newWs, IWorkingSet oldWs)
  {
    if (oldWs != null) {
      wsManager.removeWorkingSet(oldWs);
    }
    wsManager.addWorkingSet(newWs);
  }
  
  private static class AdviceDialog
    extends MessageDialog
  {
    boolean applyToAll;
    
    public AdviceDialog(Shell parentShell, String dialogTitle, Image dialogTitleImage, String dialogMessage, int dialogImageType, String[] dialogButtonLabels, int defaultIndex)
    {
      super(dialogTitle, dialogTitleImage, dialogMessage, dialogImageType, dialogButtonLabels, defaultIndex);
    }
    
    protected Control createCustomArea(Composite parent)
    {
      Button checkBox = new Button(parent, 32);
      checkBox.setText(TeamUIMessages.ImportProjectSetDialog_duplicatedWorkingSet_applyToAll);
      checkBox.addSelectionListener(new ProjectSetImporter.1(this, checkBox));
      
      return checkBox;
    }
  }
}

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

import org.eclipse.core.runtime.ISafeRunnable;
import org.eclipse.core.runtime.ListenerList;
import org.eclipse.core.runtime.SafeRunner;
import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.jface.util.PropertyChangeEvent;

class PropertyChangeHandler$PropertyNotifier
  implements ISafeRunnable
{
  private IPropertyChangeListener fListener;
  private PropertyChangeEvent fEvent;
  final PropertyChangeHandler this$0;
  
  PropertyChangeHandler$PropertyNotifier(PropertyChangeHandler paramPropertyChangeHandler)
  {
    this$0 = paramPropertyChangeHandler;
  }
  
  public void handleException(Throwable exception)
  {
    TeamUIPlugin.log(4, TeamUIMessages.AbstractSynchronizeParticipant_5, exception);
  }
  
  public void run()
    throws Exception
  {
    fListener.propertyChange(fEvent);
  }
  
  public void notify(PropertyChangeEvent event)
  {
    if (PropertyChangeHandler.access$0(this$0) == null) {
      return;
    }
    fEvent = event;
    Object[] copiedListeners = PropertyChangeHandler.access$0(this$0).getListeners();
    for (int i = 0; i < copiedListeners.length; i++)
    {
      fListener = ((IPropertyChangeListener)copiedListeners[i]);
      SafeRunner.run(this);
    }
    fListener = null;
  }
}

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

import org.eclipse.core.runtime.ISafeRunnable;
import org.eclipse.core.runtime.ListenerList;
import org.eclipse.core.runtime.SafeRunner;
import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.jface.util.PropertyChangeEvent;

public class PropertyChangeHandler
{
  private ListenerList fListeners = new ListenerList(1);
  
  class PropertyNotifier
    implements ISafeRunnable
  {
    private IPropertyChangeListener fListener;
    private PropertyChangeEvent fEvent;
    
    PropertyNotifier() {}
    
    public void handleException(Throwable exception)
    {
      TeamUIPlugin.log(4, TeamUIMessages.AbstractSynchronizeParticipant_5, exception);
    }
    
    public void run()
      throws Exception
    {
      fListener.propertyChange(fEvent);
    }
    
    public void notify(PropertyChangeEvent event)
    {
      if (fListeners == null) {
        return;
      }
      fEvent = event;
      Object[] copiedListeners = fListeners.getListeners();
      for (int i = 0; i < copiedListeners.length; i++)
      {
        fListener = ((IPropertyChangeListener)copiedListeners[i]);
        SafeRunner.run(this);
      }
      fListener = null;
    }
  }
  
  public void addPropertyChangeListener(IPropertyChangeListener listener)
  {
    fListeners.add(listener);
  }
  
  public void removePropertyChangeListener(IPropertyChangeListener listener)
  {
    fListeners.remove(listener);
  }
  
  public void firePropertyChange(Object source, String property, Object oldValue, Object newValue)
  {
    PropertyNotifier notifier = new PropertyNotifier();
    notifier.notify(new PropertyChangeEvent(source, property, oldValue, newValue));
  }
}

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

import org.eclipse.jface.preference.PreferenceDialog;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.dialogs.PreferencesUtil;

class SWTUtils$1
  extends SelectionAdapter
{
  private final Shell val$shell;
  private final String val$pageId;
  private final String[] val$displayIds;
  
  SWTUtils$1(Shell paramShell, String paramString, String[] paramArrayOfString)
  {
    val$shell = paramShell;val$pageId = paramString;val$displayIds = paramArrayOfString;
  }
  
  public void widgetSelected(SelectionEvent e)
  {
    PreferenceDialog prefDialog = PreferencesUtil.createPreferenceDialogOn(val$shell, val$pageId, val$displayIds, null);
    prefDialog.open();
  }
}

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

import com.ibm.icu.text.MessageFormat;
import java.util.Iterator;
import java.util.List;
import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.preference.IPreferenceNode;
import org.eclipse.jface.preference.PreferenceDialog;
import org.eclipse.jface.preference.PreferenceManager;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
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.Group;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Link;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.dialogs.PreferenceLinkArea;
import org.eclipse.ui.dialogs.PreferencesUtil;
import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer;

public class SWTUtils
{
  public static final int MARGINS_DEFAULT = -1;
  public static final int MARGINS_NONE = 0;
  public static final int MARGINS_DIALOG = 1;
  
  public static PreferenceLinkArea createPreferenceLink(IWorkbenchPreferenceContainer container, Composite parent, String pageId, String text)
  {
    PreferenceLinkArea area = new PreferenceLinkArea(parent, 0, pageId, text, container, null);
    return area;
  }
  
  public static Link createPreferenceLink(Shell shell, Composite parent, String pageId, String message)
  {
    return createPreferenceLink(shell, parent, pageId, new String[] { pageId }, message);
  }
  
  public static Link createPreferenceLink(Shell shell, Composite parent, String pageId, String[] displayIds, String message)
  {
    Link link = new Link(parent, 0);
    link.setText(getLinkLabel(pageId, message));
    link.addSelectionListener(new SelectionAdapter()
    {
      private final String val$pageId;
      private final String[] val$displayIds;
      
      public void widgetSelected(SelectionEvent e)
      {
        PreferenceDialog prefDialog = PreferencesUtil.createPreferenceDialogOn(SWTUtils.this, val$pageId, val$displayIds, null);
        prefDialog.open();
      }
    });
    return link;
  }
  
  private static String getLinkLabel(String pageId, String message)
  {
    IPreferenceNode node = getPreferenceNode(pageId);
    if (node == null) {
      return NLS.bind(TeamUIMessages.NotFound, pageId);
    }
    return MessageFormat.format(message, new String[] { node.getLabelText() });
  }
  
  private static IPreferenceNode getPreferenceNode(String pageId)
  {
    Iterator iterator = PlatformUI.getWorkbench().getPreferenceManager()
      .getElements(0).iterator();
    while (iterator.hasNext())
    {
      IPreferenceNode next = (IPreferenceNode)iterator.next();
      if (next.getId().equals(pageId)) {
        return next;
      }
    }
    return null;
  }
  
  public static GridData createGridData(int width, int height, boolean hFill, boolean vFill)
  {
    return createGridData(width, height, hFill ? 4 : 1, vFill ? 4 : 16777216, hFill, vFill);
  }
  
  public static GridData createGridData(int width, int height, int hAlign, int vAlign, boolean hGrab, boolean vGrab)
  {
    GridData gd = new GridData(hAlign, vAlign, hGrab, vGrab);
    widthHint = width;
    heightHint = height;
    return gd;
  }
  
  public static GridData createHFillGridData()
  {
    return createHFillGridData(1);
  }
  
  public static GridData createHFillGridData(int span)
  {
    GridData gd = createGridData(0, -1, 4, 16777216, true, false);
    horizontalSpan = span;
    return gd;
  }
  
  public static Composite createHFillComposite(Composite parent, int margins)
  {
    return createHFillComposite(parent, margins, 1);
  }
  
  public static Composite createHFillComposite(Composite parent, int margins, int columns)
  {
    Composite composite = new Composite(parent, 0);
    composite.setFont(parent.getFont());
    composite.setLayoutData(createHFillGridData());
    composite.setLayout(createGridLayout(columns, new PixelConverter(parent), margins));
    return composite;
  }
  
  public static Composite createHVFillComposite(Composite parent, int margins)
  {
    return createHVFillComposite(parent, margins, 1);
  }
  
  public static Composite createHVFillComposite(Composite parent, int margins, int columns)
  {
    Composite composite = new Composite(parent, 0);
    composite.setFont(parent.getFont());
    composite.setLayoutData(createHVFillGridData());
    composite.setLayout(createGridLayout(columns, new PixelConverter(parent), margins));
    return composite;
  }
  
  public static Group createHFillGroup(Composite parent, String text, int margins)
  {
    return createHFillGroup(parent, text, margins, 1);
  }
  
  public static Group createHFillGroup(Composite parent, String text, int margins, int rows)
  {
    Group group = new Group(parent, 0);
    group.setFont(parent.getFont());
    group.setLayoutData(createHFillGridData());
    if (text != null) {
      group.setText(text);
    }
    group.setLayout(createGridLayout(rows, new PixelConverter(parent), margins));
    return group;
  }
  
  public static Group createHVFillGroup(Composite parent, String text, int margins)
  {
    return createHVFillGroup(parent, text, margins, 1);
  }
  
  public static Group createHVFillGroup(Composite parent, String text, int margins, int rows)
  {
    Group group = new Group(parent, 0);
    group.setFont(parent.getFont());
    group.setLayoutData(createHVFillGridData());
    if (text != null) {
      group.setText(text);
    }
    group.setLayout(createGridLayout(rows, new PixelConverter(parent), margins));
    return group;
  }
  
  public static GridData createHVFillGridData()
  {
    return createHVFillGridData(1);
  }
  
  public static GridData createHVFillGridData(int span)
  {
    GridData gd = createGridData(0, 0, true, true);
    horizontalSpan = span;
    return gd;
  }
  
  public static GridLayout createGridLayout(int numColumns, PixelConverter converter, int margins)
  {
    Assert.isTrue((margins == -1) || (margins == 0) || (margins == 1));
    
    GridLayout layout = new GridLayout(numColumns, false);
    horizontalSpacing = converter.convertHorizontalDLUsToPixels(4);
    verticalSpacing = converter.convertVerticalDLUsToPixels(4);
    switch (margins)
    {
    case 0: 
      marginLeft = (marginRight = 0);
      marginTop = (marginBottom = 0);
      break;
    case 1: 
      marginLeft = (marginRight = converter.convertHorizontalDLUsToPixels(7));
      marginTop = (marginBottom = converter.convertVerticalDLUsToPixels(7));
      break;
    case -1: 
      marginLeft = (marginRight = marginWidth);
      marginTop = (marginBottom = marginHeight);
    }
    marginWidth = (marginHeight = 0);
    return layout;
  }
  
  public static Label createLabel(Composite parent, String message)
  {
    return createLabel(parent, message, 1);
  }
  
  public static Label createLabel(Composite parent, String message, int span)
  {
    Label label = new Label(parent, 64);
    if (message != null) {
      label.setText(message);
    }
    label.setLayoutData(createHFillGridData(span));
    return label;
  }
  
  public static Button createCheckBox(Composite parent, String message)
  {
    return createCheckBox(parent, message, 1);
  }
  
  public static Button createCheckBox(Composite parent, String message, int span)
  {
    Button button = new Button(parent, 32);
    button.setText(message);
    button.setLayoutData(createHFillGridData(span));
    return button;
  }
  
  public static Button createRadioButton(Composite parent, String message)
  {
    return createRadioButton(parent, message, 1);
  }
  
  public static Button createRadioButton(Composite parent, String message, int span)
  {
    Button button = new Button(parent, 16);
    button.setText(message);
    button.setLayoutData(createHFillGridData(span));
    return button;
  }
  
  public static Text createText(Composite parent)
  {
    return createText(parent, 1);
  }
  
  public static Text createText(Composite parent, int span)
  {
    Text text = new Text(parent, 2052);
    text.setLayoutData(createHFillGridData(span));
    return text;
  }
  
  public static Control createPlaceholder(Composite parent, int heightInChars, int span)
  {
    Assert.isTrue(heightInChars > 0);
    Control placeHolder = new Composite(parent, 0);
    GridData gd = new GridData(1, 128, false, false);
    heightHint = new PixelConverter(parent).convertHeightInCharsToPixels(heightInChars);
    horizontalSpan = span;
    placeHolder.setLayoutData(gd);
    return placeHolder;
  }
  
  public static Control createPlaceholder(Composite parent, int heightInChars)
  {
    return createPlaceholder(parent, heightInChars, 1);
  }
  
  public static PixelConverter createDialogPixelConverter(Control control)
  {
    Dialog.applyDialogFont(control);
    return new PixelConverter(control);
  }
  
  public static int calculateControlSize(PixelConverter converter, Control[] controls)
  {
    return calculateControlSize(converter, controls, 0, controls.length - 1);
  }
  
  public static int calculateControlSize(PixelConverter converter, Control[] controls, int start, int end)
  {
    int minimum = converter.convertHorizontalDLUsToPixels(61);
    for (int i = start; i <= end; i++)
    {
      int length = computeSize-1-1x;
      if (minimum < length) {
        minimum = length;
      }
    }
    return minimum;
  }
  
  public static void equalizeControls(PixelConverter converter, Control[] controls)
  {
    equalizeControls(converter, controls, 0, controls.length - 1);
  }
  
  public static void equalizeControls(PixelConverter converter, Control[] controls, int start, int end)
  {
    int size = calculateControlSize(converter, controls, start, end);
    for (int i = start; i <= end; i++)
    {
      Control button = controls[i];
      if ((button.getLayoutData() instanceof GridData)) {
        getLayoutDatawidthHint = size;
      }
    }
  }
  
  public static int getWidthInCharsForLongest(PixelConverter converter, String[] strings)
  {
    int minimum = 0;
    for (int i = 0; i < strings.length; i++)
    {
      int length = converter.convertWidthInCharsToPixels(strings[i].length());
      if (minimum < length) {
        minimum = length;
      }
    }
    return minimum;
  }
}

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

import org.eclipse.compare.SharedDocumentAdapter;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jface.text.IDocument;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.texteditor.IDocumentProvider;

class StorageTypedElement$1
  extends SharedDocumentAdapter
{
  final StorageTypedElement this$0;
  
  StorageTypedElement$1(StorageTypedElement paramStorageTypedElement)
  {
    this$0 = paramStorageTypedElement;
  }
  
  public IEditorInput getDocumentKey(Object element)
  {
    return this$0.getDocumentKey(element);
  }
  
  public void flushDocument(IDocumentProvider provider, IEditorInput documentKey, IDocument document, boolean overwrite)
    throws CoreException
  {}
}

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

import java.io.InputStream;
import org.eclipse.compare.CompareUI;
import org.eclipse.compare.IEncodedStreamContentAccessor;
import org.eclipse.compare.ISharedDocumentAdapter;
import org.eclipse.compare.ITypedElement;
import org.eclipse.compare.SharedDocumentAdapter;
import org.eclipse.core.resources.IEncodedStorage;
import org.eclipse.core.resources.IStorage;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IAdapterManager;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Platform;
import org.eclipse.jface.text.IDocument;
import org.eclipse.swt.graphics.Image;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.texteditor.IDocumentProvider;

public abstract class StorageTypedElement
  implements ITypedElement, IEncodedStreamContentAccessor, IAdaptable
{
  private IStorage bufferedContents;
  private final String localEncoding;
  private ISharedDocumentAdapter sharedDocumentAdapter;
  
  public StorageTypedElement(String localEncoding)
  {
    this.localEncoding = localEncoding;
  }
  
  public InputStream getContents()
    throws CoreException
  {
    if (bufferedContents == null) {
      cacheContents(new NullProgressMonitor());
    }
    if (bufferedContents != null) {
      return bufferedContents.getContents();
    }
    return null;
  }
  
  public void cacheContents(IProgressMonitor monitor)
    throws CoreException
  {
    bufferedContents = fetchContents(monitor);
  }
  
  protected abstract IStorage fetchContents(IProgressMonitor paramIProgressMonitor)
    throws CoreException;
  
  public IStorage getBufferedStorage()
  {
    return bufferedContents;
  }
  
  public Image getImage()
  {
    return CompareUI.getImage(getType());
  }
  
  public String getType()
  {
    String name = getName();
    if (name != null)
    {
      int index = name.lastIndexOf('.');
      if (index == -1) {
        return "";
      }
      if (index == name.length() - 1) {
        return "";
      }
      return name.substring(index + 1);
    }
    return "FOLDER";
  }
  
  public String getCharset()
    throws CoreException
  {
    if (localEncoding != null) {
      return localEncoding;
    }
    if (bufferedContents == null) {
      cacheContents(new NullProgressMonitor());
    }
    if ((bufferedContents instanceof IEncodedStorage))
    {
      String charset = ((IEncodedStorage)bufferedContents).getCharset();
      return charset;
    }
    return null;
  }
  
  public Object getAdapter(Class adapter)
  {
    if (adapter == ISharedDocumentAdapter.class) {
      synchronized (this)
      {
        if (sharedDocumentAdapter == null) {
          sharedDocumentAdapter = new SharedDocumentAdapter()
          {
            public IEditorInput getDocumentKey(Object element)
            {
              return StorageTypedElement.this.getDocumentKey(element);
            }
            
            public void flushDocument(IDocumentProvider provider, IEditorInput documentKey, IDocument document, boolean overwrite)
              throws CoreException
            {}
          };
        }
        return sharedDocumentAdapter;
      }
    }
    return Platform.getAdapterManager().getAdapter(this, adapter);
  }
  
  protected abstract IEditorInput getDocumentKey(Object paramObject);
  
  public String getLocalEncoding()
  {
    return localEncoding;
  }
}

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

import org.eclipse.compare.structuremergeviewer.DiffNode;
import org.eclipse.core.resources.mapping.IModelProviderDescriptor;
import org.eclipse.core.resources.mapping.ModelProvider;
import org.eclipse.core.runtime.IAdapterFactory;
import org.eclipse.team.core.RepositoryProviderType;
import org.eclipse.team.core.history.IFileRevision;
import org.eclipse.team.core.mapping.IResourceMappingMerger;
import org.eclipse.team.core.mapping.ISynchronizationScopeParticipantFactory;
import org.eclipse.team.internal.ui.history.FileRevisionEditorInput;
import org.eclipse.team.internal.ui.mapping.DefaultResourceMappingMerger;
import org.eclipse.team.internal.ui.mapping.ResourceModelPersistenceAdapter;
import org.eclipse.team.internal.ui.mapping.ResourceModelScopeParticipantFactory;
import org.eclipse.team.internal.ui.synchronize.DiffNodeWorkbenchAdapter;
import org.eclipse.team.ui.mapping.ISynchronizationCompareAdapter;
import org.eclipse.team.ui.mapping.ITeamStateProvider;
import org.eclipse.ui.model.IWorkbenchAdapter;

public class TeamAdapterFactory
  implements IAdapterFactory
{
  private DiffNodeWorkbenchAdapter diffNodeAdapter = new DiffNodeWorkbenchAdapter();
  private static final ISynchronizationCompareAdapter COMPARE_ADAPTER = new ResourceModelPersistenceAdapter();
  
  public Object getAdapter(Object adaptableObject, Class adapterType)
  {
    if (((adaptableObject instanceof DiffNode)) && (adapterType == IWorkbenchAdapter.class)) {
      return diffNodeAdapter;
    }
    if ((adaptableObject instanceof ModelProvider))
    {
      ModelProvider provider = (ModelProvider)adaptableObject;
      if (provider.getDescriptor().getId().equals("org.eclipse.core.resources.modelProvider"))
      {
        if (adapterType == IResourceMappingMerger.class) {
          return new DefaultResourceMappingMerger((ModelProvider)adaptableObject);
        }
        if (adapterType == ISynchronizationScopeParticipantFactory.class) {
          return new ResourceModelScopeParticipantFactory((ModelProvider)adaptableObject);
        }
      }
    }
    if (((adaptableObject instanceof ModelProvider)) && (adapterType == ISynchronizationCompareAdapter.class)) {
      return COMPARE_ADAPTER;
    }
    if (((adaptableObject instanceof RepositoryProviderType)) && (adapterType == ITeamStateProvider.class))
    {
      RepositoryProviderType rpt = (RepositoryProviderType)adaptableObject;
      return TeamUIPlugin.getPlugin().getDecoratedStateProvider(rpt);
    }
    if ((IFileRevision.class == adapterType) && ((adaptableObject instanceof FileRevisionEditorInput))) {
      return ((FileRevisionEditorInput)adaptableObject).getFileRevision();
    }
    return null;
  }
  
  public Class[] getAdapterList()
  {
    return new Class[] {
      IWorkbenchAdapter.class, 
      IResourceMappingMerger.class, 
      ISynchronizationCompareAdapter.class, 
      ISynchronizationScopeParticipantFactory.class, 
      ITeamStateProvider.class, 
      IFileRevision.class };
  }
}

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

import org.eclipse.ui.IPluginContribution;

class TeamCapabilityHelper$1
  implements IPluginContribution
{
  final TeamCapabilityHelper this$0;
  private final String val$id;
  private final String val$pluginId;
  
  TeamCapabilityHelper$1(TeamCapabilityHelper paramTeamCapabilityHelper, String paramString1, String paramString2)
  {
    this$0 = paramTeamCapabilityHelper;val$id = paramString1;val$pluginId = paramString2;
  }
  
  public String getLocalId()
  {
    return val$id;
  }
  
  public String getPluginId()
  {
    return val$pluginId;
  }
}

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

import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExtension;
import org.eclipse.core.runtime.IExtensionPoint;
import org.eclipse.core.runtime.IExtensionRegistry;
import org.eclipse.core.runtime.Platform;
import org.eclipse.team.core.RepositoryProvider;
import org.eclipse.team.internal.core.TeamPlugin;
import org.eclipse.ui.IPluginContribution;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.activities.IActivityManager;
import org.eclipse.ui.activities.IIdentifier;
import org.eclipse.ui.activities.IWorkbenchActivitySupport;
import org.eclipse.ui.activities.WorkbenchActivityHelper;

public class TeamCapabilityHelper
{
  private Map providerIdToPluginId;
  private static TeamCapabilityHelper singleton;
  
  public static TeamCapabilityHelper getInstance()
  {
    if (singleton == null) {
      singleton = new TeamCapabilityHelper();
    }
    return singleton;
  }
  
  private TeamCapabilityHelper()
  {
    providerIdToPluginId = new HashMap();
    loadRepositoryProviderIds();
    
    IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
    IWorkbenchActivitySupport workbenchActivitySupport = PlatformUI.getWorkbench().getActivitySupport();
    for (int i = 0; i < projects.length; i++) {
      try
      {
        processProject(projects[i], workbenchActivitySupport);
      }
      catch (CoreException localCoreException) {}
    }
  }
  
  public void loadRepositoryProviderIds()
  {
    providerIdToPluginId.clear();
    IExtensionPoint point = Platform.getExtensionRegistry().getExtensionPoint("org.eclipse.team.core.repository");
    if (point != null)
    {
      IExtension[] extensions = point.getExtensions();
      for (int i = 0; i < extensions.length; i++)
      {
        IExtension extension = extensions[i];
        IConfigurationElement[] elements = extension.getConfigurationElements();
        for (int j = 0; j < elements.length; j++)
        {
          IConfigurationElement element = elements[j];
          String pluginId = extension.getNamespace();
          if (element.getName().equals("repository"))
          {
            String id = element.getAttribute("id");
            if (id != null) {
              providerIdToPluginId.put(id, new IPluginContribution()
              {
                private final String val$id;
                private final String val$pluginId;
                
                public String getLocalId()
                {
                  return val$id;
                }
                
                public String getPluginId()
                {
                  return val$pluginId;
                }
              });
            }
          }
        }
      }
    }
  }
  
  protected void processProject(IProject project, IWorkbenchActivitySupport workbenchActivitySupport)
    throws CoreException
  {
    if (!project.isOpen()) {
      return;
    }
    String id = getProviderIdFor(project);
    processRepositoryId(id, workbenchActivitySupport);
  }
  
  public void processRepositoryId(String id, IWorkbenchActivitySupport workbenchActivitySupport)
  {
    if (id == null) {
      return;
    }
    IActivityManager activityManager = workbenchActivitySupport
      .getActivityManager();
    Set activities = new HashSet(activityManager.getEnabledActivityIds());
    boolean changed = false;
    
    IPluginContribution contribution = (IPluginContribution)providerIdToPluginId.get(id);
    if (contribution == null) {
      return;
    }
    IIdentifier identifier = activityManager.getIdentifier(WorkbenchActivityHelper.createUnifiedId(contribution));
    if (activities.addAll(identifier.getActivityIds())) {
      changed = true;
    }
    if (changed) {
      workbenchActivitySupport.setEnabledActivityIds(activities);
    }
  }
  
  public String getProviderIdFor(IProject project)
    throws CoreException
  {
    if (project.isAccessible())
    {
      Object prop = project.getSessionProperty(TeamPlugin.PROVIDER_PROP_KEY);
      if ((prop != null) && ((prop instanceof RepositoryProvider)))
      {
        RepositoryProvider provider = (RepositoryProvider)prop;
        return provider.getID();
      }
      return project.getPersistentProperty(TeamPlugin.PROVIDER_PROP_KEY);
    }
    return null;
  }
}

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

import org.eclipse.osgi.util.NLS;

public class TeamUIMessages
  extends NLS
{
  private static final String BUNDLE_NAME = "org.eclipse.team.internal.ui.messages";
  public static String ConfigureMultipleProjectsWizard_0;
  public static String ConfigureMultipleProjectsWizard_1;
  public static String ProjectSelectionPage_0;
  public static String ProjectSelectionPage_1;
  public static String ProjectSelectionPage_2;
  public static String TextPreferencePage_ExtensionNotCompleted;
  public static String CompareInputChangeNotifier_0;
  public static String CompareInputChangeNotifier_1;
  public static String CompareLocalHistory_0;
  public static String DiffTreeChangesSection_10;
  public static String DiffTreeChangesSection_11;
  public static String DiffTreeChangesSection_12;
  public static String DiffTreeChangesSection_13;
  public static String DiffTreeChangesSection_14;
  public static String DiffTreeChangesSection_3;
  public static String DiffTreeChangesSection_4;
  public static String DiffTreeChangesSection_5;
  public static String DiffTreeChangesSection_6;
  public static String DiffTreeChangesSection_7;
  public static String DiffTreeChangesSection_8;
  public static String DiffTreeChangesSection_9;
  public static String EditionHistoryPage_0;
  public static String EditionHistoryPage_1;
  public static String EditionHistoryPage_2;
  public static String ExportProjectSetMainPage_Browse;
  public static String ExportProjectSetMainPage_DeselectAll;
  public static String ExportProjectSetMainPage_EditButton;
  public static String ExportProjectSetMainPage_ExportWorkingSets;
  public static String ExportProjectSetMainPage_FileButton;
  public static String ExportProjectSetMainPage_SelectAll;
  public static String ExportProjectSetMainPage_SelectButton;
  public static String ExportProjectSetMainPage_WorkspaceButton;
  public static String ExportProjectSetMainPage_WorkspaceDialogErrorFilenameSegments;
  public static String ExportProjectSetMainPage_WorkspaceDialogErrorNoFilename;
  public static String ExportProjectSetMainPage_WorkspaceDialogFilename;
  public static String ExportProjectSetMainPage_WorkspaceDialogMessage;
  public static String ExportProjectSetMainPage_WorkspaceDialogTitle;
  public static String ExportProjectSetMainPage_WorkspaceDialogTitleMessage;
  public static String GenericHistoryView_1;
  public static String GenericHistoryView_2;
  public static String HistoryPageCompareEditorInput_0;
  public static String ImportProjectSetMainPage_AddToWorkingSet;
  public static String ImportProjectSetMainPage_Project_Set_File;
  public static String ImportProjectSetMainPage_Project_Set_Url;
  public static String ImportProjectSetMainPage_Browse;
  public static String ImportProjectSetDialog_duplicatedWorkingSet_title;
  public static String ImportProjectSetDialog_duplicatedWorkingSet_message;
  public static String ImportProjectSetDialog_duplicatedWorkingSet_replace;
  public static String ImportProjectSetDialog_duplicatedWorkingSet_merge;
  public static String ImportProjectSetDialog_duplicatedWorkingSet_skip;
  public static String ImportProjectSetDialog_duplicatedWorkingSet_applyToAll;
  public static String ImportProjectSetDialog_malformed_url;
  public static String information;
  public static String ConfigureProjectAction_configureProject;
  public static String ConfigureProjectWizard_configureProject;
  public static String ConfigureSynchronizeScheduleComposite_0;
  public static String ConfigureSynchronizeScheduleComposite_1;
  public static String ConfigureProjectWizard_description;
  public static String ConfigureProjectWizard_title;
  public static String ConfigureProjectWizardMainPage_selectRepository;
  public static String IgnorePreferencePage_description;
  public static String IgnorePreferencePage_add;
  public static String IgnorePreferencePage_enterPatternLong;
  public static String IgnorePreferencePage_enterPatternShort;
  public static String IgnorePreferencePage_ignorePatterns;
  public static String IgnorePreferencePage_patternExistsLong;
  public static String IgnorePreferencePage_patternExistsShort;
  public static String IgnorePreferencePage_remove;
  public static String LocalHistoryPage_0;
  public static String LocalHistoryPage_1;
  public static String LocalHistoryPage_CollapseAllAction;
  public static String LocalHistoryPage_CollapseAllTip;
  public static String LocalHistoryPage_CompareAction;
  public static String LocalHistoryPage_CompareModeAction;
  public static String LocalHistoryPage_CompareModeTip;
  public static String LocalHistoryPage_FetchLocalHistoryMessage;
  public static String LocalHistoryPage_GetContents;
  public static String LocalHistoryPage_GroupRevisionsByDateAction;
  public static String LocalHistoryPage_GroupRevisionsByDateTip;
  public static String LocalHistoryPage_NoRevisionsFound;
  public static String LocalHistoryPage_OpenAction;
  public static String LocalHistoryPage_OpenWithMenu;
  public static String LocalHistoryPage_OpenWithMenu_Other;
  public static String LocalHistoryPage_OpenWithMenu_OtherDialogDescription;
  public static String LocalHistoryPage_OpenWithMenu_DefaultEditorDescription;
  public static String LocalHistoryPage_OpenEditorError;
  public static String LocalHistoryPage_OverwriteMessage;
  public static String LocalHistoryPage_OverwriteTitle;
  public static String MergeAllActionHandler_0;
  public static String MergeAllActionHandler_1;
  public static String MergeAllActionHandler_2;
  public static String MergeAllActionHandler_3;
  public static String ModelCompareEditorInput_0;
  public static String ModelCompareEditorInput_1;
  public static String ModelCompareEditorInput_2;
  public static String ModelElementSelectionPage_AllModelsDisabledMessage;
  public static String ModelElementSelectionPage_AllModelsDisabledTitle;
  public static String ModelEnablementPreferencePage_0;
  public static String ModelEnablementPreferencePage_1;
  public static String ModelMergeOperation_3;
  public static String ModelSelectionDropDownAction_2;
  public static String ParticipantPageCompareEditorInput_0;
  public static String RegistryReader_0;
  public static String ReplaceLocalHistory_0;
  public static String ReplaceLocalHistory_1;
  public static String ResourceMarkAsMergedHandler_0;
  public static String ResourceMarkAsMergedHandler_1;
  public static String ResourceMergeHandler_0;
  public static String ResourceMergeHandler_1;
  public static String ResourceMergeHandler_2;
  public static String ResourceMergeHandler_3;
  public static String ResourceMergeHandler_4;
  public static String ResourceMergeHandler_5;
  public static String ResourceMergeHandler_6;
  public static String ResourceMergeHandler_7;
  public static String ResourceModelLabelProvider_0;
  public static String ResourceModelPreferencePage_0;
  public static String RevisionAnnotationController_0;
  public static String SaveableCompareEditorInput_0;
  public static String SaveablesCompareEditorInput_twoWayTitle;
  public static String SaveablesCompareEditorInput_twoWayTooltip;
  public static String SaveablesCompareEditorInput_threeWayTitle;
  public static String SaveablesCompareEditorInput_threeWayTooltip;
  public static String ShowLocalHistory_0;
  public static String ShowLocalHistory_2;
  public static String simpleInternal;
  public static String exception;
  public static String StartupPreferencePage_0;
  public static String StartupPreferencePage_1;
  public static String StartupPreferencePage_2;
  public static String StartupPreferencePage_3;
  public static String StartupPreferencePage_4;
  public static String StartupPreferencePage_5;
  public static String SyncInfoCompareInput_localLabel;
  public static String SyncInfoCompareInput_localLabelExists;
  public static String SyncInfoCompareInput_localLabelAuthorExists;
  public static String SyncInfoCompareInput_remoteLabel;
  public static String SyncInfoCompareInput_baseLabel;
  public static String SyncInfoCompareInput_remoteLabelExists;
  public static String SyncInfoCompareInput_remoteLabelAuthorExists;
  public static String SyncInfoCompareInput_baseLabelExists;
  public static String SyncInfoCompareInput_baseLabelAuthorExists;
  public static String SyncInfoCompareInput_title;
  public static String SyncInfoCompareInput_0;
  public static String SyncInfoCompareInput_1;
  public static String SyncInfoCompareInput_2;
  public static String SyncInfoCompareInput_3;
  public static String SyncInfoCompareInput_tooltip;
  public static String SyncViewerPreferencePage_43;
  public static String SyncViewerPreferencePage_44;
  public static String SyncViewerPreferencePage_45;
  public static String SyncViewerPreferencePage_46;
  public static String SyncViewerPreferencePage_47;
  public static String TeamAction_internal;
  public static String TextPreferencePage_add;
  public static String TextPreferencePage_0;
  public static String TextPreferencePage_2;
  public static String TextPreferencePage_3;
  public static String TextPreferencePage_5;
  public static String TextPreferencePage_6;
  public static String TextPreferencePage_7;
  public static String TextPreferencePage_1;
  public static String TextPreferencePage_change;
  public static String TextPreferencePage_enterExtensionLong;
  public static String TextPreferencePage_enterExtensionShort;
  public static String TextPreferencePage_extensionExistsLong;
  public static String TextPreferencePage_extensionExistsShort;
  public static String TextPreferencePage_remove;
  public static String SynchronizationViewPreference_defaultPerspectiveNone;
  public static String SynchronizationViewPreference_defaultPerspectiveDescription;
  public static String SynchronizationViewPreference_defaultPerspectiveLabel;
  public static String ExportProjectSetMainPage_Select_the_projects_to_include_in_the_project_set__2;
  public static String ExportProjectSetMainPage_Project_Set_File_Name__3;
  public static String ExportProjectSetMainPage_Browse_4;
  public static String ExportProjectSetMainPage_You_have_speci
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