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

esourcesToRemove.add(resource);
          }
        }
        else
        {
          resourcesToRemove.add(resource);
          resourcesToAdd.addAll(Arrays.asList(getSyncInfosForFileMembers((IContainer)resource)));
        }
      }
    }
    if (!resourcesToRemove.isEmpty()) {
      removeFromViewer((IResource[])resourcesToRemove.toArray(new IResource[resourcesToRemove.size()]));
    }
    if (!resourcesToAdd.isEmpty()) {
      addResources((SyncInfo[])resourcesToAdd.toArray(new SyncInfo[resourcesToAdd.size()]));
    }
  }
  
  protected int getLogicalModelDepth(IResource resource)
  {
    if (resource.getType() == 4) {
      return 2;
    }
    return 1;
  }
  
  private boolean isCompressedParentEmpty(IResource resource)
  {
    IContainer parent = resource.getParent();
    if ((parent == null) || 
      (parent.getType() == 8) || 
      (parent.getType() == 4)) {
      return false;
    }
    return !hasFileMembers(parent);
  }
  
  private boolean hasFileMembers(IContainer parent)
  {
    IResource[] members = getSyncInfoTree().members(parent);
    for (int i = 0; i < members.length; i++)
    {
      IResource member = members[i];
      if (member.getType() == 1) {
        return true;
      }
    }
    return false;
  }
  
  private SyncInfo[] getSyncInfosForFileMembers(IContainer parent)
  {
    List result = new ArrayList();
    IResource[] members = getSyncInfoTree().members(parent);
    for (int i = 0; i < members.length; i++)
    {
      SyncInfo info = getSyncInfoTree().getSyncInfo(members[i]);
      if (info != null) {
        result.add(info);
      }
      if ((members[i] instanceof IContainer)) {
        result.addAll(Arrays.asList(getSyncInfosForFileMembers((IContainer)members[i])));
      }
    }
    return (SyncInfo[])result.toArray(new SyncInfo[result.size()]);
  }
}

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

class ConfigureRefreshScheduleDialog$1
  implements IPageValidator
{
  final ConfigureRefreshScheduleDialog this$0;
  
  ConfigureRefreshScheduleDialog$1(ConfigureRefreshScheduleDialog paramConfigureRefreshScheduleDialog)
  {
    this$0 = paramConfigureRefreshScheduleDialog;
  }
  
  public void setComplete(String errorMessage)
  {
    ConfigureRefreshScheduleDialog.access$0(this$0, errorMessage == null);
    ConfigureRefreshScheduleDialog.access$1(this$0, errorMessage);
  }
}

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

import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.team.internal.ui.TeamUIMessages;
import org.eclipse.team.internal.ui.Utils;
import org.eclipse.team.internal.ui.dialogs.DetailsDialog;

public class ConfigureRefreshScheduleDialog
  extends DetailsDialog
{
  private ConfigureSynchronizeScheduleComposite scheduleComposite;
  private SubscriberRefreshSchedule schedule;
  
  public ConfigureRefreshScheduleDialog(Shell parentShell, SubscriberRefreshSchedule schedule)
  {
    super(parentShell, NLS.bind(TeamUIMessages.ConfigureRefreshScheduleDialog_0, new String[] { Utils.getTypeName(schedule.getParticipant()) }));
    this.schedule = schedule;
  }
  
  protected void createMainDialogArea(Composite parent)
  {
    IPageValidator validator = new IPageValidator()
    {
      public void setComplete(String errorMessage)
      {
        setPageComplete(errorMessage == null);
        setErrorMessage(errorMessage);
      }
    };
    scheduleComposite = new ConfigureSynchronizeScheduleComposite(parent, schedule, validator);
    Dialog.applyDialogFont(parent);
  }
  
  protected void okPressed()
  {
    scheduleComposite.saveValues();
    super.okPressed();
  }
  
  protected boolean includeDetailsButton()
  {
    return false;
  }
  
  protected Composite createDropDownDialogArea(Composite parent)
  {
    return null;
  }
  
  protected void updateEnablements() {}
  
  protected String getHelpContextId()
  {
    return "org.eclipse.team.ui.configre_refresh_schedule_dialog_context";
  }
}

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

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

class ConfigureSynchronizeScheduleComposite$1
  implements SelectionListener
{
  final ConfigureSynchronizeScheduleComposite this$0;
  
  ConfigureSynchronizeScheduleComposite$1(ConfigureSynchronizeScheduleComposite paramConfigureSynchronizeScheduleComposite)
  {
    this$0 = paramConfigureSynchronizeScheduleComposite;
  }
  
  public void widgetSelected(SelectionEvent e)
  {
    this$0.updateEnablements();
  }
  
  public void widgetDefaultSelected(SelectionEvent e) {}
}

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

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

class ConfigureSynchronizeScheduleComposite$2
  implements SelectionListener
{
  final ConfigureSynchronizeScheduleComposite this$0;
  
  ConfigureSynchronizeScheduleComposite$2(ConfigureSynchronizeScheduleComposite paramConfigureSynchronizeScheduleComposite)
  {
    this$0 = paramConfigureSynchronizeScheduleComposite;
  }
  
  public void widgetSelected(SelectionEvent e)
  {
    this$0.updateEnablements();
  }
  
  public void widgetDefaultSelected(SelectionEvent e) {}
}

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

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

class ConfigureSynchronizeScheduleComposite$3
  implements ModifyListener
{
  final ConfigureSynchronizeScheduleComposite this$0;
  
  ConfigureSynchronizeScheduleComposite$3(ConfigureSynchronizeScheduleComposite paramConfigureSynchronizeScheduleComposite)
  {
    this$0 = paramConfigureSynchronizeScheduleComposite;
  }
  
  public void modifyText(ModifyEvent e)
  {
    this$0.updateEnablements();
  }
}

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

import org.eclipse.swt.events.VerifyEvent;
import org.eclipse.swt.events.VerifyListener;

class ConfigureSynchronizeScheduleComposite$4
  implements VerifyListener
{
  final ConfigureSynchronizeScheduleComposite this$0;
  
  ConfigureSynchronizeScheduleComposite$4(ConfigureSynchronizeScheduleComposite paramConfigureSynchronizeScheduleComposite)
  {
    this$0 = paramConfigureSynchronizeScheduleComposite;
  }
  
  public void verifyText(VerifyEvent e)
  {
    String string = text;
    char[] chars = new char[string.length()];
    string.getChars(0, chars.length, chars, 0);
    for (int i = 0; i < chars.length; i++) {
      if (('0' > chars[i]) || (chars[i] > '9'))
      {
        doit = false;
        return;
      }
    }
  }
}

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

import com.ibm.icu.util.Calendar;
import java.util.Date;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.events.VerifyEvent;
import org.eclipse.swt.events.VerifyListener;
import org.eclipse.swt.graphics.FontMetrics;
import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.DateTime;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
import org.eclipse.team.internal.ui.TeamUIMessages;
import org.eclipse.team.internal.ui.Utils;
import org.eclipse.team.ui.synchronize.ISynchronizeParticipant;

public class ConfigureSynchronizeScheduleComposite
  extends Composite
{
  private SubscriberRefreshSchedule schedule;
  private Button enableBackgroundRefresh;
  private Text timeInterval;
  private Combo hoursOrMinutes;
  private IPageValidator validator;
  private DateTime startTime;
  private Button repeatEvery;
  private Label synchronizeAt;
  
  public ConfigureSynchronizeScheduleComposite(Composite parent, SubscriberRefreshSchedule schedule, IPageValidator validator)
  {
    super(parent, 0);
    this.schedule = schedule;
    this.validator = validator;
    createMainDialogArea(parent);
  }
  
  private void initializeValues()
  {
    boolean enableBackground = schedule.isEnabled();
    boolean hours = false;
    
    enableBackgroundRefresh.setSelection(enableBackground);
    
    long seconds = schedule.getRefreshInterval();
    if (seconds <= 60L) {
      seconds = 60L;
    }
    long minutes = seconds / 60L;
    if (minutes >= 60L)
    {
      minutes /= 60L;
      hours = true;
    }
    hoursOrMinutes.select(hours ? 0 : 1);
    timeInterval.setText(Long.toString(minutes));
    repeatEvery.setSelection(!schedule.getRunOnce());
    
    Date start = schedule.getRefreshStartTime();
    Calendar cal = Calendar.getInstance();
    if (start != null)
    {
      cal.setTime(start);
      startTime.setTime(cal.get(11), cal
        .get(12), cal.get(13));
    }
    else
    {
      startTime.setTime(0, 0, 0);
    }
  }
  
  protected void createMainDialogArea(Composite parent)
  {
    GC gc = new GC(parent);
    gc.setFont(JFaceResources.getDialogFont());
    FontMetrics fontMetrics = gc.getFontMetrics();
    gc.dispose();
    GridLayout gridLayout = new GridLayout();
    numColumns = 3;
    marginHeight = 0;
    marginWidth = 0;
    horizontalSpacing = Dialog.convertHorizontalDLUsToPixels(fontMetrics, 4);
    verticalSpacing = Dialog.convertVerticalDLUsToPixels(fontMetrics, 4);
    setLayout(gridLayout);
    setLayoutData(new GridData(4, 4, true, true));
    Composite area = this;
    
    createWrappingLabel(area, NLS.bind(TeamUIMessages.ConfigureRefreshScheduleDialog_1, new String[] { Utils.shortenText(100, schedule.getParticipant().getName()) }), 0, 3);
    
    enableBackgroundRefresh = new Button(area, 32);
    GridData gridData = new GridData();
    horizontalSpan = 3;
    enableBackgroundRefresh.setLayoutData(gridData);
    enableBackgroundRefresh.setText(TeamUIMessages.ConfigureRefreshScheduleDialog_3);
    enableBackgroundRefresh.addSelectionListener(new SelectionListener()
    {
      public void widgetSelected(SelectionEvent e)
      {
        updateEnablements();
      }
      
      public void widgetDefaultSelected(SelectionEvent e) {}
    });
    synchronizeAt = createIndentedLabel(area, TeamUIMessages.ConfigureRefreshScheduleDialog_3a, 20);
    
    startTime = new DateTime(area, 2176);
    gridData = new GridData();
    horizontalSpan = 2;
    startTime.setLayoutData(gridData);
    
    repeatEvery = createIndentedButton(area, TeamUIMessages.ConfigureRefreshScheduleDialog_4, 20);
    repeatEvery.addSelectionListener(new SelectionListener()
    {
      public void widgetSelected(SelectionEvent e)
      {
        updateEnablements();
      }
      
      public void widgetDefaultSelected(SelectionEvent e) {}
    });
    timeInterval = new Text(area, 133120);
    gridData = new GridData();
    widthHint = 35;
    timeInterval.setLayoutData(gridData);
    timeInterval.addModifyListener(new ModifyListener()
    {
      public void modifyText(ModifyEvent e)
      {
        updateEnablements();
      }
    });
    timeInterval.addVerifyListener(new VerifyListener()
    {
      public void verifyText(VerifyEvent e)
      {
        String string = text;
        char[] chars = new char[string.length()];
        string.getChars(0, chars.length, chars, 0);
        for (int i = 0; i < chars.length; i++) {
          if (('0' > chars[i]) || (chars[i] > '9'))
          {
            doit = false;
            return;
          }
        }
      }
    });
    hoursOrMinutes = new Combo(area, 8);
    hoursOrMinutes.setItems(new String[] { TeamUIMessages.ConfigureRefreshScheduleDialog_5, TeamUIMessages.ConfigureRefreshScheduleDialog_6 });
    hoursOrMinutes.setLayoutData(new GridData());
    
    Label label = new Label(area, 64);
    gridData = new GridData(768);
    horizontalSpan = 3;
    label.setLayoutData(gridData);
    label.setText(NLS.bind(TeamUIMessages.ConfigureRefreshScheduleDialog_2, new String[] { SubscriberRefreshSchedule.refreshEventAsString(schedule.getLastRefreshEvent()) }));
    
    initializeValues();
    updateEnablements();
  }
  
  public void saveValues()
  {
    if (enableBackgroundRefresh.getSelection())
    {
      Calendar cal = Calendar.getInstance();
      cal.set(11, startTime.getHours());
      cal.set(12, startTime.getMinutes());
      cal.set(13, startTime.getSeconds());
      schedule.setRefreshStartTime(cal.getTime());
      if (repeatEvery.getSelection())
      {
        int hours = hoursOrMinutes.getSelectionIndex();
        try
        {
          long seconds = Long.parseLong(timeInterval.getText());
          if (hours == 0) {
            seconds *= 3600L;
          } else {
            seconds *= 60L;
          }
          schedule.setRefreshInterval(seconds);
        }
        catch (NumberFormatException localNumberFormatException) {}
      }
      else
      {
        schedule.setRunOnce(true);
      }
    }
    if (schedule.isEnabled() != enableBackgroundRefresh.getSelection()) {
      schedule.setEnabled(enableBackgroundRefresh.getSelection(), true);
    }
    ISynchronizeParticipant participant = schedule.getParticipant();
    if ((!participant.isPinned()) && (schedule.isEnabled())) {
      participant.setPinned(MessageDialog.openQuestion(getShell(), 
        NLS.bind(TeamUIMessages.ConfigureSynchronizeScheduleComposite_0, new String[] { Utils.getTypeName(participant) }), 
        NLS.bind(TeamUIMessages.ConfigureSynchronizeScheduleComposite_1, new String[] { Utils.getTypeName(participant) })));
    }
    schedule.getRefreshable().setRefreshSchedule(schedule);
  }
  
  public void updateEnablements()
  {
    if (!enableBackgroundRefresh.getSelection()) {
      validator.setComplete(null);
    } else if (repeatEvery.getSelection()) {
      try
      {
        long number = Long.parseLong(timeInterval.getText());
        if (number <= 0L) {
          validator.setComplete(TeamUIMessages.ConfigureRefreshScheduleDialog_7);
        } else {
          validator.setComplete(null);
        }
      }
      catch (NumberFormatException localNumberFormatException)
      {
        validator.setComplete(TeamUIMessages.ConfigureRefreshScheduleDialog_7);
      }
    }
    synchronizeAt.setEnabled(enableBackgroundRefresh.getSelection());
    startTime.setEnabled(enableBackgroundRefresh.getSelection());
    repeatEvery.setEnabled(enableBackgroundRefresh.getSelection());
    timeInterval.setEnabled((enableBackgroundRefresh.getSelection()) && (repeatEvery.getSelection()));
    hoursOrMinutes.setEnabled((enableBackgroundRefresh.getSelection()) && (repeatEvery.getSelection()));
  }
  
  private Label createWrappingLabel(Composite parent, String text, int indent, int horizontalSpan)
  {
    Label label = new Label(parent, 16448);
    label.setText(text);
    GridData data = new GridData();
    horizontalSpan = horizontalSpan;
    horizontalAlignment = 4;
    horizontalIndent = indent;
    grabExcessHorizontalSpace = true;
    widthHint = 400;
    label.setLayoutData(data);
    return label;
  }
  
  private static 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;
  }
  
  private static Button createIndentedButton(Composite parent, String text, int indent)
  {
    Button label = new Button(parent, 32);
    label.setText(text);
    GridData data = new GridData();
    horizontalSpan = 1;
    horizontalAlignment = 4;
    horizontalIndent = indent;
    label.setLayoutData(data);
    return label;
  }
}

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

import org.eclipse.jface.viewers.DecoratingLabelProvider;
import org.eclipse.jface.viewers.IColorProvider;
import org.eclipse.jface.viewers.IFontProvider;
import org.eclipse.jface.viewers.ILabelDecorator;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Font;

public class DecoratingColorLabelProvider
  extends DecoratingLabelProvider
  implements IColorProvider, IFontProvider
{
  public DecoratingColorLabelProvider(ILabelProvider provider, ILabelDecorator[] decorators)
  {
    super(provider, new MultiLabelDecorator(decorators));
  }
  
  public Color getForeground(Object element)
  {
    ILabelProvider p = getLabelProvider();
    if ((p instanceof IColorProvider)) {
      return ((IColorProvider)p).getForeground(element);
    }
    return null;
  }
  
  public Color getBackground(Object element)
  {
    ILabelProvider p = getLabelProvider();
    if ((p instanceof IColorProvider)) {
      return ((IColorProvider)p).getBackground(element);
    }
    return null;
  }
  
  public Font getFont(Object element)
  {
    ILabelProvider p = getLabelProvider();
    if ((p instanceof IFontProvider)) {
      return ((IFontProvider)p).getFont(element);
    }
    return null;
  }
}

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

import java.util.List;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.IStatusLineManager;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.commands.ActionHandler;
import org.eclipse.ui.commands.HandlerSubmission;
import org.eclipse.ui.commands.IHandler;
import org.eclipse.ui.commands.IWorkbenchCommandSupport;
import org.eclipse.ui.commands.Priority;
import org.eclipse.ui.services.IServiceLocator;

class DialogSynchronizePageSite$1
  implements IActionBars
{
  final DialogSynchronizePageSite this$0;
  private final IToolBarManager val$toolbar;
  
  DialogSynchronizePageSite$1(DialogSynchronizePageSite paramDialogSynchronizePageSite, IToolBarManager paramIToolBarManager)
  {
    this$0 = paramDialogSynchronizePageSite;val$toolbar = paramIToolBarManager;
  }
  
  public void clearGlobalActionHandlers() {}
  
  public IAction getGlobalActionHandler(String actionId)
  {
    return null;
  }
  
  public IMenuManager getMenuManager()
  {
    return null;
  }
  
  public IStatusLineManager getStatusLineManager()
  {
    return null;
  }
  
  public IToolBarManager getToolBarManager()
  {
    return val$toolbar;
  }
  
  public void setGlobalActionHandler(String actionId, IAction action)
  {
    if ((actionId != null) && (!"".equals(actionId)))
    {
      IHandler handler = new ActionHandler(action);
      HandlerSubmission handlerSubmission = new HandlerSubmission(null, DialogSynchronizePageSite.access$0(this$0), null, actionId, handler, Priority.MEDIUM);
      PlatformUI.getWorkbench().getCommandSupport().addHandlerSubmission(handlerSubmission);
      DialogSynchronizePageSite.access$1(this$0).add(handlerSubmission);
    }
  }
  
  public void updateActionBars() {}
  
  public IServiceLocator getServiceLocator()
  {
    return null;
  }
}

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

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.IStatusLineManager;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jface.viewers.ISelectionProvider;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.team.ui.synchronize.ISynchronizePageSite;
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.IKeyBindingService;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.IWorkbenchSite;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.commands.ActionHandler;
import org.eclipse.ui.commands.HandlerSubmission;
import org.eclipse.ui.commands.IHandler;
import org.eclipse.ui.commands.IWorkbenchCommandSupport;
import org.eclipse.ui.commands.Priority;
import org.eclipse.ui.services.IServiceLocator;

public class DialogSynchronizePageSite
  implements ISynchronizePageSite
{
  private final Shell shell;
  private ISelectionProvider selectionProvider;
  private IActionBars actionBars;
  private final boolean isModal;
  private List actionHandlers = new ArrayList(2);
  
  public DialogSynchronizePageSite(Shell shell, boolean isModal)
  {
    this.shell = shell;
    this.isModal = isModal;
  }
  
  public ISelectionProvider getSelectionProvider()
  {
    return selectionProvider;
  }
  
  public Shell getShell()
  {
    return shell;
  }
  
  public void setSelectionProvider(ISelectionProvider provider)
  {
    selectionProvider = provider;
  }
  
  public IWorkbenchSite getWorkbenchSite()
  {
    return null;
  }
  
  public IWorkbenchPart getPart()
  {
    return null;
  }
  
  public IKeyBindingService getKeyBindingService()
  {
    return null;
  }
  
  public void setFocus() {}
  
  public IDialogSettings getPageSettings()
  {
    return null;
  }
  
  public IActionBars getActionBars()
  {
    return actionBars;
  }
  
  public boolean isModal()
  {
    return isModal;
  }
  
  public void createActionBars(IToolBarManager toolbar)
  {
    if (actionBars == null) {
      actionBars = new IActionBars()
      {
        private final IToolBarManager val$toolbar;
        
        public void clearGlobalActionHandlers() {}
        
        public IAction getGlobalActionHandler(String actionId)
        {
          return null;
        }
        
        public IMenuManager getMenuManager()
        {
          return null;
        }
        
        public IStatusLineManager getStatusLineManager()
        {
          return null;
        }
        
        public IToolBarManager getToolBarManager()
        {
          return val$toolbar;
        }
        
        public void setGlobalActionHandler(String actionId, IAction action)
        {
          if ((actionId != null) && (!"".equals(actionId)))
          {
            IHandler handler = new ActionHandler(action);
            HandlerSubmission handlerSubmission = new HandlerSubmission(null, shell, null, actionId, handler, Priority.MEDIUM);
            PlatformUI.getWorkbench().getCommandSupport().addHandlerSubmission(handlerSubmission);
            actionHandlers.add(handlerSubmission);
          }
        }
        
        public void updateActionBars() {}
        
        public IServiceLocator getServiceLocator()
        {
          return null;
        }
      };
    }
  }
  
  public void dispose()
  {
    IWorkbenchCommandSupport cm = PlatformUI.getWorkbench().getCommandSupport();
    for (Iterator it = actionHandlers.iterator(); it.hasNext();)
    {
      HandlerSubmission handler = (HandlerSubmission)it.next();
      cm.removeHandlerSubmission(handler);
    }
  }
}

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

import org.eclipse.compare.structuremergeviewer.DiffNode;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.team.ui.synchronize.ISynchronizeModelElement;
import org.eclipse.ui.model.IWorkbenchAdapter;

public class DiffNodeWorkbenchAdapter
  implements IWorkbenchAdapter
{
  public Object[] getChildren(Object o)
  {
    DiffNode node = getDiffNode(o);
    return node != null ? node.getChildren() : new Object[0];
  }
  
  public ImageDescriptor getImageDescriptor(Object o)
  {
    DiffNode node = getDiffNode(o);
    if ((node instanceof ISynchronizeModelElement)) {
      return ((ISynchronizeModelElement)node).getImageDescriptor(o);
    }
    return null;
  }
  
  public String getLabel(Object o)
  {
    DiffNode node = getDiffNode(o);
    return node != null ? node.getName() : "";
  }
  
  public Object getParent(Object o)
  {
    DiffNode node = getDiffNode(o);
    return node != null ? node.getParent() : null;
  }
  
  private DiffNode getDiffNode(Object element)
  {
    if ((element instanceof DiffNode)) {
      return (DiffNode)element;
    }
    return null;
  }
}

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

public abstract interface EditableSharedDocumentAdapter$ISharedDocumentAdapterListener
{
  public abstract void handleDocumentConnected();
  
  public abstract void handleDocumentDisconnected();
  
  public abstract void handleDocumentFlushed();
  
  public abstract void handleDocumentDeleted();
  
  public abstract void handleDocumentSaved();
}

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

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;
import org.eclipse.ui.texteditor.IElementStateListener;

public class EditableSharedDocumentAdapter
  extends SharedDocumentAdapter
  implements IElementStateListener
{
  private int connectionCount;
  private final ISharedDocumentAdapterListener listener;
  private IEditorInput bufferedKey;
  
  public EditableSharedDocumentAdapter(ISharedDocumentAdapterListener listener)
  {
    this.listener = listener;
  }
  
  public void connect(IDocumentProvider provider, IEditorInput documentKey)
    throws CoreException
  {
    super.connect(provider, documentKey);
    connectionCount += 1;
    if (connectionCount == 1)
    {
      provider.addElementStateListener(this);
      listener.handleDocumentConnected();
    }
  }
  
  /* Error */
  public void disconnect(IDocumentProvider provider, IEditorInput documentKey)
  {
    // Byte code:
    //   0: aload_0
    //   1: aload_1
    //   2: aload_2
    //   3: invokespecial 97	org/eclipse/compare/SharedDocumentAdapter:disconnect	(Lorg/eclipse/ui/texteditor/IDocumentProvider;Lorg/eclipse/ui/IEditorInput;)V
    //   6: goto +46 -> 52
    //   9: astore_3
    //   10: aload_0
    //   11: getfield 92	org/eclipse/team/internal/ui/synchronize/EditableSharedDocumentAdapter:connectionCount	I
    //   14: ifle +13 -> 27
    //   17: aload_0
    //   18: dup
    //   19: getfield 92	org/eclipse/team/internal/ui/synchronize/EditableSharedDocumentAdapter:connectionCount	I
    //   22: iconst_1
    //   23: isub
    //   24: putfield 92	org/eclipse/team/internal/ui/synchronize/EditableSharedDocumentAdapter:connectionCount	I
    //   27: aload_0
    //   28: getfield 92	org/eclipse/team/internal/ui/synchronize/EditableSharedDocumentAdapter:connectionCount	I
    //   31: ifne +19 -> 50
    //   34: aload_1
    //   35: aload_0
    //   36: invokeinterface 111 2 0
    //   41: aload_0
    //   42: getfield 93	org/eclipse/team/internal/ui/synchronize/EditableSharedDocumentAdapter:listener	Lorg/eclipse/team/internal/ui/synchronize/EditableSharedDocumentAdapter$ISharedDocumentAdapterListener;
    //   45: invokeinterface 105 1 0
    //   50: aload_3
    //   51: athrow
    //   52: aload_0
    //   53: getfield 92	org/eclipse/team/internal/ui/synchronize/EditableSharedDocumentAdapter:connectionCount	I
    //   56: ifle +13 -> 69
    //   59: aload_0
    //   60: dup
    //   61: getfield 92	org/eclipse/team/internal/ui/synchronize/EditableSharedDocumentAdapter:connectionCount	I
    //   64: iconst_1
    //   65: isub
    //   66: putfield 92	org/eclipse/team/internal/ui/synchronize/EditableSharedDocumentAdapter:connectionCount	I
    //   69: aload_0
    //   70: getfield 92	org/eclipse/team/internal/ui/synchronize/EditableSharedDocumentAdapter:connectionCount	I
    //   73: ifne +19 -> 92
    //   76: aload_1
    //   77: aload_0
    //   78: invokeinterface 111 2 0
    //   83: aload_0
    //   84: getfield 93	org/eclipse/team/internal/ui/synchronize/EditableSharedDocumentAdapter:listener	Lorg/eclipse/team/internal/ui/synchronize/EditableSharedDocumentAdapter$ISharedDocumentAdapterListener;
    //   87: invokeinterface 105 1 0
    //   92: return
    // Line number table:
    //   Java source line #104	-> byte code offset #0
    //   Java source line #105	-> byte code offset #9
    //   Java source line #106	-> byte code offset #10
    //   Java source line #107	-> byte code offset #17
    //   Java source line #108	-> byte code offset #27
    //   Java source line #109	-> byte code offset #34
    //   Java source line #110	-> byte code offset #41
    //   Java source line #112	-> byte code offset #50
    //   Java source line #106	-> byte code offset #52
    //   Java source line #107	-> byte code offset #59
    //   Java source line #108	-> byte code offset #69
    //   Java source line #109	-> byte code offset #76
    //   Java source line #110	-> byte code offset #83
    //   Java source line #113	-> byte code offset #92
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	93	0	this	EditableSharedDocumentAdapter
    //   0	93	1	provider	IDocumentProvider
    //   0	93	2	documentKey	IEditorInput
    //   9	42	3	localObject	Object
    // Exception table:
    //   from	to	target	type
    //   0	9	9	finally
  }
  
  public boolean isConnected()
  {
    return connectionCount > 0;
  }
  
  /* Error */
  public boolean saveDocument(IEditorInput input, boolean overwrite, org.eclipse.core.runtime.IProgressMonitor monitor)
    throws CoreException
  {
    // Byte code:
    //   0: aload_0
    //   1: invokevirtual 101	org/eclipse/team/internal/ui/synchronize/EditableSharedDocumentAdapter:isConnected	()Z
    //   4: ifeq +44 -> 48
    //   7: aload_1
    //   8: invokestatic 98	org/eclipse/compare/SharedDocumentAdapter:getDocumentProvider	(Lorg/eclipse/ui/IEditorInput;)Lorg/eclipse/ui/texteditor/IDocumentProvider;
    //   11: astore 4
    //   13: aload_0
    //   14: aload 4
    //   16: aload_1
    //   17: aload 4
    //   19: aload_1
    //   20: invokeinterface 112 2 0
    //   25: iload_2
    //   26: aload_3
    //   27: invokevirtual 102	org/eclipse/team/internal/ui/synchronize/EditableSharedDocumentAdapter:saveDocument	(Lorg/eclipse/ui/texteditor/IDocumentProvider;Lorg/eclipse/ui/IEditorInput;Lorg/eclipse/jface/text/IDocument;ZLorg/eclipse/core/runtime/IProgressMonitor;)V
    //   30: goto +12 -> 42
    //   33: astore 5
    //   35: aload_0
    //   36: invokevirtual 99	org/eclipse/team/internal/ui/synchronize/EditableSharedDocumentAdapter:releaseBuffer	()V
    //   39: aload 5
    //   41: athrow
    //   42: aload_0
    //   43: invokevirtual 99	org/eclipse/team/internal/ui/synchronize/EditableSharedDocumentAdapter:releaseBuffer	()V
    //   46: iconst_1
    //   47: ireturn
    //   48: iconst_0
    //   49: ireturn
    // Line number table:
    //   Java source line #133	-> byte code offset #0
    //   Java source line #134	-> byte code offset #7
    //   Java source line #136	-> byte code offset #13
    //   Java source line #137	-> byte code offset #33
    //   Java source line #139	-> byte code offset #35
    //   Java source line #140	-> byte code offset #39
    //   Java source line #139	-> byte code offset #42
    //   Java source line #141	-> byte code offset #46
    //   Java source line #143	-> byte code offset #48
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	50	0	this	EditableSharedDocumentAdapter
    //   0	50	1	input	IEditorInput
    //   0	50	2	overwrite	boolean
    //   0	50	3	monitor	org.eclipse.core.runtime.IProgressMonitor
    //   11	7	4	provider	IDocumentProvider
    //   33	7	5	localObject	Object
    // Exception table:
    //   from	to	target	type
    //   13	33	33	finally
  }
  
  public void releaseBuffer()
  {
    if (bufferedKey != null)
    {
      IDocumentProvider provider = SharedDocumentAdapter.getDocumentProvider(bufferedKey);
      provider.disconnect(bufferedKey);
      bufferedKey = null;
    }
  }
  
  public void flushDocument(IDocumentProvider provider, IEditorInput documentKey, IDocument document, boolean overwrite)
    throws CoreException
  {
    if (!hasBufferedContents())
    {
      bufferedKey = documentKey;
      provider.connect(bufferedKey);
    }
    listener.handleDocumentFlushed();
  }
  
  public void elementContentAboutToBeReplaced(Object element) {}
  
  public void elementContentReplaced(Object element) {}
  
  public void elementDeleted(Object element)
  {
    listener.handleDocumentDeleted();
  }
  
  public void elementDirtyStateChanged(Object element, boolean isDirty)
  {
    if (!isDirty) {
      listener.handleDocumentSaved();
    }
  }
  
  public void elementMoved(Object originalElement, Object movedElement) {}
  
  public boolean hasBufferedContents()
  {
    return bufferedKey != null;
  }
  
  public static abstract interface ISharedDocumentAdapterListener
  {
    public abstract void handleDocumentConnected();
    
    public abstract void handleDocumentDisconnected();
    
    public abstract void handleDocumentFlushed();
    
    public abstract void handleDocumentDeleted();
    
    public abstract void handleDocumentSaved();
  }
}

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

import org.eclipse.jface.action.MenuManager;
import org.eclipse.team.internal.ui.TeamUIMessages;
import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
import org.eclipse.team.ui.synchronize.SynchronizePageActionGroup;

public class FlatModelProvider$FlatActionGroup
  extends SynchronizePageActionGroup
{
  private MenuManager sortByResource;
  final FlatModelProvider this$0;
  
  public FlatModelProvider$FlatActionGroup(FlatModelProvider paramFlatModelProvider)
  {
    this$0 = paramFlatModelProvider;
  }
  
  public void initialize(ISynchronizePageConfiguration configuration)
  {
    super.initialize(configuration);
    sortByResource = new MenuManager(TeamUIMessages.FlatModelProvider_6);
    
    appendToGroup(
      "org.eclipse.team.ui.P_CONTEXT_MENU", 
      "sort", 
      sortByResource);
    
    FlatModelProvider.access$2(this$0, configuration);
    
    sortByResource.add(new FlatModelProvider.ToggleSortOrderAction(this$0, TeamUIMessages.FlatModelProvider_8, 2));
    sortByResource.add(new FlatModelProvider.ToggleSortOrderAction(this$0, TeamUIMessages.FlatModelProvider_7, 1));
    sortByResource.add(new FlatModelProvider.ToggleSortOrderAction(this$0, TeamUIMessages.FlatModelProvider_9, 3));
  }
  
  public void dispose()
  {
    sortByResource.dispose();
    sortByResource.removeAll();
    super.dispose();
  }
}

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

import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.team.internal.ui.TeamUIMessages;
import org.eclipse.team.ui.TeamImages;

public class FlatModelProvider$FlatModelProviderDescriptor
  implements ISynchronizeModelProviderDescriptor
{
  public static final String ID = "org.eclipse.team.ui.modelprovider_flat";
  
  public String getId()
  {
    return "org.eclipse.team.ui.modelprovider_flat";
  }
  
  public String getName()
  {
    return TeamUIMessages.FlatModelProvider_0;
  }
  
  public ImageDescriptor getImageDescriptor()
  {
    return TeamImages.getImageDescriptor("elcl16/flatLayout.gif");
  }
}

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

import java.text.Collator;
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.IPath;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerSorter;
import org.eclipse.team.ui.synchronize.ISynchronizeModelElement;

public class FlatModelProvider$FlatSorter
  extends ViewerSorter
{
  private int resourceCriteria;
  public static final int NAME = 1;
  public static final int PATH = 2;
  public static final int PARENT_NAME = 3;
  final FlatModelProvider this$0;
  
  public FlatModelProvider$FlatSorter(FlatModelProvider paramFlatModelProvider, int resourceCriteria)
  {
    this$0 = paramFlatModelProvider;
    this.resourceCriteria = resourceCriteria;
  }
  
  protected int classComparison(Object element)
  {
    if ((element instanceof FlatModelProvider.FullPathSyncInfoElement)) {
      return 0;
    }
    return 1;
  }
  
  protected int compareClass(Object element1, Object element2)
  {
    return classComparison(element1) - classComparison(element2);
  }
  
  protected int compareNames(String s1, String s2)
  {
    return collator.compare(s1, s2);
  }
  
  public int compare(Viewer viewer, Object o1, Object o2)
  {
    if (((o1 instanceof FlatModelProvider.FullPathSyncInfoElement)) && ((o2 instanceof FlatModelProvider.FullPathSyncInfoElement)))
    {
      IResource r1 = ((FlatModelProvider.FullPathSyncInfoElement)o1).getResource();
      IResource r2 = ((FlatModelProvider.FullPathSyncInfoElement)o2).getResource();
      if (resourceCriteria == 1) {
        return compareNames(r1.getName(), r2.getName());
      }
      if (resourceCriteria == 2) {
        return compareNames(r1.getFullPath().toString(), r2.getFullPath().toString());
      }
      if (resourceCriteria == 3) {
        return compareNames(r1.getParent().getName(), r2.getParent().getName());
  
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