Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Michel-Lemieux2003-10-15 02:54:36 +0000
committerJean Michel-Lemieux2003-10-15 02:54:36 +0000
commitee2ae506fcecf711e08f887d451159dbd4e26958 (patch)
treeadc86812c04b2d31d4c150004d9ef8ae76257667
parent4dad004d73d63cf1aa95a6e30af6bcd9072e8d7f (diff)
downloadeclipse.platform.team-ee2ae506fcecf711e08f887d451159dbd4e26958.tar.gz
eclipse.platform.team-ee2ae506fcecf711e08f887d451159dbd4e26958.tar.xz
eclipse.platform.team-ee2ae506fcecf711e08f887d451159dbd4e26958.zip
*** empty log message ***
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSUIPlugin.java8
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ICVSUIConstants.java1
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/SyncAction.java2
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/MergeWizard.java2
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/SharingWizard.java2
-rw-r--r--bundles/org.eclipse.team.ui/plugin.xml8
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIPlugin.java21
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/pages/NewSynchronizeView.java12
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/pages/ShowSynchronizeViewPage.java43
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/pages/SubscriberSynchronizeViewPage.java679
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/pages/SynchronizePageDropDownAction.java137
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/views/ViewStatusInformation.java4
12 files changed, 866 insertions, 53 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSUIPlugin.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSUIPlugin.java
index 0b8060306..c39d4a31a 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSUIPlugin.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSUIPlugin.java
@@ -48,7 +48,10 @@ import org.eclipse.team.internal.ccvs.ui.repo.RepositoryManager;
import org.eclipse.team.internal.ccvs.ui.repo.RepositoryRoot;
import org.eclipse.team.internal.ui.TeamUIPlugin;
import org.eclipse.team.internal.ui.Utils;
+import org.eclipse.team.internal.ui.sync.pages.SubscriberSynchronizeViewPage;
import org.eclipse.team.ui.TeamUI;
+import org.eclipse.team.ui.sync.ISynchronizeViewPage;
+import org.eclipse.team.ui.sync.SubscriberPage;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.IWorkingSet;
@@ -347,6 +350,7 @@ public class CVSUIPlugin extends AbstractUIPlugin {
createImageDescriptor(ICVSUIConstants.IMG_COLLAPSE_ALL, baseURL);
createImageDescriptor(ICVSUIConstants.IMG_COLLAPSE_ALL_ENABLED, baseURL);
createImageDescriptor(ICVSUIConstants.IMG_NEWLOCATION, baseURL);
+ createImageDescriptor(ICVSUIConstants.IMG_CVSLOGO, baseURL);
createImageDescriptor(ICVSUIConstants.IMG_TAG, baseURL);
createImageDescriptor(ICVSUIConstants.IMG_MODULE, baseURL);
createImageDescriptor(ICVSUIConstants.IMG_CLEAR, baseURL);
@@ -648,6 +652,10 @@ public class CVSUIPlugin extends AbstractUIPlugin {
Console.startup();
// Commented out until we have fully ported the CVS console to the new API
//ConsolePlugin.getDefault().getConsoleManager().addConsoles(new IConsole[] {new CVSOutputConsole()});
+ TeamUI.getSynchronizeManager().addSynchronizePages(new ISynchronizeViewPage[] {
+ new SubscriberPage(CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber(),
+ "CVS Workspace",
+ CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_CVSLOGO))});
}
public static IWorkingSet getWorkingSet(IResource[] resources, String name) {
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ICVSUIConstants.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ICVSUIConstants.java
index dea0cd3db..860b71a90 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ICVSUIConstants.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ICVSUIConstants.java
@@ -53,6 +53,7 @@ public interface ICVSUIConstants {
// wizards
public final String IMG_NEWLOCATION = "wizards/newlocation_wiz.gif"; //$NON-NLS-1$
+ public final String IMG_CVSLOGO = "wizards/newconnect_wiz.gif"; //$NON-NLS-1$
// preferences
public final String PREF_SHOW_COMMENTS = "pref_show_comments"; //$NON-NLS-1$
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/SyncAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/SyncAction.java
index cfba29bf5..47ca97b68 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/SyncAction.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/SyncAction.java
@@ -43,7 +43,7 @@ public class SyncAction extends WorkspaceAction {
if(view != null) {
CVSWorkspaceSubscriber cvsWorkspaceSubscriber = CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber();
view.setWorkingSet(workingSet);
- view.display(cvsWorkspaceSubscriber);
+ view.selectSubscriber(cvsWorkspaceSubscriber);
view.refreshWithRemote(cvsWorkspaceSubscriber, resources);
} else {
CVSUIPlugin.openError(getShell(), Policy.bind("error"), Policy.bind("Error.unableToShowSyncView"), null); //$NON-NLS-1$ //$NON-NLS-2$
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/MergeWizard.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/MergeWizard.java
index 80c20d0a7..582ae672e 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/MergeWizard.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/MergeWizard.java
@@ -68,7 +68,7 @@ public class MergeWizard extends Wizard {
ISynchronizeView view = TeamUI.showSyncViewInActivePage(null);
if(view != null) {
view.setWorkingSet(null); /* show all resources in the merge */
- view.display(s);
+ view.selectSubscriber(s);
view.refreshWithRemote(s, resources);
} else {
CVSUIPlugin.openError(getShell(), Policy.bind("error"), Policy.bind("Error.unableToShowSyncView"), null); //$NON-NLS-1$ //$NON-NLS-2$
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/SharingWizard.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/SharingWizard.java
index 4321ebd7f..29527dbe4 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/SharingWizard.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/SharingWizard.java
@@ -302,7 +302,7 @@ public class SharingWizard extends Wizard implements IConfigurationWizard {
if(view != null) {
IWorkingSet workingSet = CVSUIPlugin.getWorkingSet(new IResource[] {project}, Policy.bind("SyncAction.workingSetName")); //$NON-NLS-1$)
view.setWorkingSet(workingSet);
- view.display(CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber());
+ view.selectSubscriber(CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber());
view.setMode(ISynchronizeView.OUTGOING_MODE);
} else {
CVSUIPlugin.openError(getContainer().getShell(), Policy.bind("error"), Policy.bind("Error.unableToShowSyncView"), null); //$NON-NLS-1$ //$NON-NLS-2$
diff --git a/bundles/org.eclipse.team.ui/plugin.xml b/bundles/org.eclipse.team.ui/plugin.xml
index a0afb6871..048f8931b 100644
--- a/bundles/org.eclipse.team.ui/plugin.xml
+++ b/bundles/org.eclipse.team.ui/plugin.xml
@@ -212,6 +212,14 @@
class="org.eclipse.team.internal.ui.sync.views.SynchronizeView"
id="org.eclipse.team.sync.views.SynchronizeView">
</view>
+ <view
+ name="Newer Sync View"
+ icon="icons/full/cview16/synch_synch.gif"
+ fastViewWidthRatio="0.25"
+ category="org.eclipse.team.ui"
+ class="org.eclipse.team.internal.ui.sync.pages.NewSynchronizeView"
+ id="org.eclipse.team.sync.views.SynchronizeView2">
+ </view>
</extension>
<!-- **************** Synchronizing Perspective ******************* -->
<extension
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIPlugin.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIPlugin.java
index 7dfcd5741..da33f7341 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIPlugin.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIPlugin.java
@@ -18,18 +18,14 @@ import java.util.Hashtable;
import java.util.Iterator;
import java.util.List;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtension;
-import org.eclipse.core.runtime.IPluginDescriptor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.*;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.swt.custom.BusyIndicator;
import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Display;
import org.eclipse.team.internal.ui.jobs.RefreshSubscriberInputJob;
import org.eclipse.team.internal.ui.jobs.RefreshSubscriberJob;
import org.eclipse.team.internal.ui.sync.views.SyncViewerTableSorter;
@@ -374,6 +370,19 @@ public class TeamUIPlugin extends AbstractUIPlugin implements IPropertyChangeLis
}
}
+ /**
+ * Returns the standard display to be used. The method first checks, if
+ * the thread calling this method has an associated display. If so, this
+ * display is returned. Otherwise the method returns the default display.
+ */
+ public static Display getStandardDisplay() {
+ Display display= Display.getCurrent();
+ if (display == null) {
+ display= Display.getDefault();
+ }
+ return display;
+ }
+
public void propertyChange(PropertyChangeEvent event) {
// update the background sync delay
if(event.getProperty().equals(IPreferenceIds.SYNCVIEW_DELAY)) {
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/pages/NewSynchronizeView.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/pages/NewSynchronizeView.java
index 92c0cd2e7..5933bac7a 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/pages/NewSynchronizeView.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/pages/NewSynchronizeView.java
@@ -54,6 +54,8 @@ public class NewSynchronizeView extends PageBookView implements INewSynchronizeV
private Map fPartToPage;
// actions
+ private SynchronizePageDropDownAction fPageDropDown;
+
private boolean isAvailable() {
return getPageBook() != null && !getPageBook().isDisposed();
}
@@ -98,11 +100,11 @@ public class NewSynchronizeView extends PageBookView implements INewSynchronizeV
* Updates the view title based on the active console
*/
protected void updateTitle() {
- ISynchronizeViewPage console = getSynchronizeTarget();
- if (console == null) {
+ ISynchronizeViewPage page = getSynchronizeTarget();
+ if (page == null) {
setTitle("Synchronize View");
} else {
- setTitle("Synch");
+ setTitle("Synchronize View - " + page.getName());
}
}
@@ -242,14 +244,14 @@ public class NewSynchronizeView extends PageBookView implements INewSynchronizeV
protected void createActions() {
//fPinAction = new PinConsoleAction(this);
- //fDisplayConsoleAction = new ConsoleDropDownAction(this);
+ fPageDropDown = new SynchronizePageDropDownAction(this);
}
protected void configureToolBar(IToolBarManager mgr) {
// mgr.add(new Separator(IConsoleConstants.LAUNCH_GROUP));
// mgr.add(new Separator(IConsoleConstants.OUTPUT_GROUP));
// mgr.add(fPinAction);
-// mgr.add(fDisplayConsoleAction);
+ mgr.add(fPageDropDown);
}
/* (non-Javadoc)
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/pages/ShowSynchronizeViewPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/pages/ShowSynchronizeViewPage.java
new file mode 100644
index 000000000..b8de9de93
--- /dev/null
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/pages/ShowSynchronizeViewPage.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2003 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.team.internal.ui.sync.pages;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.team.ui.sync.INewSynchronizeView;
+import org.eclipse.team.ui.sync.ISynchronizeViewPage;
+
+public class ShowSynchronizeViewPage extends Action {
+ private ISynchronizeViewPage fPage;
+ private INewSynchronizeView fView;
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.action.IAction#run()
+ */
+ public void run() {
+ if (!fPage.equals(fView.getSynchronizeTarget())) {
+ // only change if required (and un-pin the console if pinned)
+ fView.display(fPage);
+ }
+ }
+
+ /**
+ * Constructs an action to display the given page.
+ *
+ * @param view the synchronize view in which the given page is contained
+ * @param console the console
+ */
+ public ShowSynchronizeViewPage(INewSynchronizeView view, ISynchronizeViewPage page) {
+ super(page.getName(), Action.AS_RADIO_BUTTON);
+ fPage = page;
+ fView = view;
+ setImageDescriptor(page.getImageDescriptor());
+ }
+}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/pages/SubscriberSynchronizeViewPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/pages/SubscriberSynchronizeViewPage.java
index a4d5d2466..d3b218180 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/pages/SubscriberSynchronizeViewPage.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/pages/SubscriberSynchronizeViewPage.java
@@ -1,76 +1,681 @@
package org.eclipse.team.internal.ui.sync.pages;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
+import java.lang.reflect.InvocationTargetException;
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.QualifiedName;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.viewers.*;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.*;
+import org.eclipse.team.core.TeamException;
import org.eclipse.team.core.subscribers.TeamSubscriber;
+import org.eclipse.team.internal.core.Assert;
+import org.eclipse.team.internal.ui.IPreferenceIds;
+import org.eclipse.team.internal.ui.Policy;
+import org.eclipse.team.internal.ui.TeamUIPlugin;
+import org.eclipse.team.internal.ui.Utils;
+import org.eclipse.team.internal.ui.actions.TeamAction;
+import org.eclipse.team.internal.ui.jobs.JobBusyCursor;
+import org.eclipse.team.internal.ui.jobs.RefreshSubscriberInputJob;
+import org.eclipse.team.internal.ui.sync.sets.ISyncSetChangedListener;
+import org.eclipse.team.internal.ui.sync.sets.SubscriberInput;
+import org.eclipse.team.internal.ui.sync.sets.SyncSetChangedEvent;
+import org.eclipse.team.internal.ui.sync.views.*;
import org.eclipse.team.ui.sync.INewSynchronizeView;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.PartInitException;
+import org.eclipse.team.ui.sync.actions.*;
+import org.eclipse.ui.*;
+import org.eclipse.ui.actions.ActionContext;
import org.eclipse.ui.part.IPageBookViewPage;
import org.eclipse.ui.part.IPageSite;
+import org.eclipse.ui.part.IShowInSource;
+import org.eclipse.ui.part.ShowInContext;
+import org.eclipse.ui.views.navigator.ResourceSorter;
-public class SubscriberSynchronizeViewPage implements IPageBookViewPage {
-
+public class SubscriberSynchronizeViewPage implements IPageBookViewPage, ISyncSetChangedListener {
+
private IPageSite site;
private TeamSubscriber subscriber;
private INewSynchronizeView view;
-
+
+ public static final int PROP_VIEWTYPE = 1;
+
+ /**
+ * View type constant (value 0) indicating that the synchronize view will be shown
+ * as a tree.
+ */
+ public static final int TREE_VIEW = 0;
+
+ /**
+ * View type constant (value 1) indicating that the synchronize view will be shown
+ * as a table.
+ */
+ public static final int TABLE_VIEW = 1;
+
+ //This view's id. The same value as in the plugin.xml.
+ public static final String VIEW_ID = "org.eclipse.team.sync.views.SynchronizeView"; //$NON-NLS-1$
+
+ // The viewer that is shown in the view. Currently this can be either a table or tree viewer.
+ private StructuredViewer viewer;
+
+ // Parent composite of this view. It is remembered so that we can dispose of its children when
+ // the viewer type is switched.
+ private Composite composite = null;
+ private StatisticsPanel statsPanel;
+
+ // Viewer type constants
+ private int currentViewType;
+
+ // Remembering the current input and the previous.
+ private SubscriberInput input = null;
+
+ // A set of common actions. They are hooked to the active SubscriberInput and must
+ // be reset when the input changes.
+ // private SyncViewerActions actions;
+
+ private JobBusyCursor busyCursor;
+
+ /**
+ * Constructs a new SynchronizeView.
+ */
public SubscriberSynchronizeViewPage(TeamSubscriber subscriber, INewSynchronizeView view) {
this.view = view;
- this.subscriber = subscriber;
+ this.subscriber = subscriber;
+ this.input = new SubscriberInput(subscriber);
+ currentViewType = getStore().getInt(IPreferenceIds.SYNCVIEW_VIEW_TYPE);
+ if (currentViewType != TREE_VIEW) {
+ currentViewType = TABLE_VIEW;
+ }
}
/* (non-Javadoc)
- * @see org.eclipse.ui.part.IPageBookViewPage#getSite()
+ * @see org.eclipse.ui.IWorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
*/
- public IPageSite getSite() {
- return site;
+ public void createPartControl(Composite parent) {
+ composite = new Composite(parent, SWT.NONE);
+ GridLayout gridLayout= new GridLayout();
+ gridLayout.makeColumnsEqualWidth= false;
+ gridLayout.marginWidth= 0;
+ gridLayout.marginHeight = 0;
+ composite.setLayout(gridLayout);
+
+ // Create the busy cursor with no control to start with (createViewer will set it)
+ busyCursor = new JobBusyCursor(null /* control */, SubscriberAction.SUBSCRIBER_JOB_TYPE);
+ createViewer(composite);
+ updateStatusPanel();
+ updateTooltip();
+ initializeSubscriberInput(input);
+ //actions = new SyncViewerActions(this);
+ //actions.setContext(null);
}
-
+
/* (non-Javadoc)
- * @see org.eclipse.ui.part.IPageBookViewPage#init(org.eclipse.ui.part.IPageSite)
+ * @see org.eclipse.ui.IViewPart#init(org.eclipse.ui.IViewSite, org.eclipse.ui.IMemento)
*/
public void init(IPageSite site) throws PartInitException {
- this.site = site;
+ RefreshSubscriberInputJob refreshJob = TeamUIPlugin.getPlugin().getRefreshJob();
+ if(getStore().getBoolean(IPreferenceIds.SYNCVIEW_SCHEDULED_SYNC) && refreshJob.getState() == Job.NONE) {
+ refreshJob.setReschedule(true);
+ // start once the UI has started and stabilized
+ refreshJob.schedule(20000 /* 20 seconds */);
+ }
}
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.part.IPage#createControl(org.eclipse.swt.widgets.Composite)
+
+ /*
+ * This method is synchronized to ensure that all internal state is not corrupted
*/
- public void createControl(Composite parent) {
- // TODO Auto-generated method stub
-
+ public synchronized void initializeSubscriberInput(final SubscriberInput input) {
+ Assert.isNotNull(input);
+
+ // listen to sync set changes in order to update state relating to the
+ // size of the sync sets and update the title
+ disconnectSubscriberInput();
+ input.registerListeners(this);
+
+ Display.getDefault().asyncExec(new Runnable() {
+ public void run() {
+ // create the viewer is it doesn't exist yet.
+ if(viewer == null) {
+ switchViewerType(currentViewType);
+ }
+ ActionContext context = new ActionContext(null);
+ context.setInput(input);
+ //actions.setContext(context);
+ viewer.setInput(input);
+
+ RefreshSubscriberInputJob refreshJob = TeamUIPlugin.getPlugin().getRefreshJob();
+ refreshJob.setSubscriberInput(input);
+ updateStatusPanel();
+ }
+ });
}
-
+
+ private void disconnectSubscriberInput() {
+ if(input != null) {
+ input.deregisterListeners(this);
+ input = null;
+ }
+ }
+ /**
+ * Toggles between label/tree/table viewers.
+ */
+ public void switchViewerType(int viewerType) {
+ if(viewer == null || viewerType != currentViewType) {
+ if (composite == null || composite.isDisposed()) return;
+ IStructuredSelection oldSelection = null;
+ if(viewer != null) {
+ oldSelection = (IStructuredSelection)viewer.getSelection();
+ }
+ currentViewType = viewerType;
+ getStore().setValue(IPreferenceIds.SYNCVIEW_VIEW_TYPE, currentViewType);
+ disposeChildren(composite);
+ createViewer(composite);
+ composite.layout();
+ if(oldSelection == null || oldSelection.size() == 0) {
+ //gotoDifference(INavigableControl.NEXT);
+ } else {
+ viewer.setSelection(oldSelection, true);
+ }
+ updateStatusPanel();
+ }
+ }
+
+ /**
+ * Adds the listeners to the viewer.
+ */
+ protected void initializeListeners() {
+ viewer.addSelectionChangedListener(new ISelectionChangedListener() {
+ public void selectionChanged(SelectionChangedEvent event) {
+ handleSelectionChanged(event);
+ }
+ });
+ viewer.addDoubleClickListener(new IDoubleClickListener() {
+ public void doubleClick(DoubleClickEvent event) {
+ handleDoubleClick(event);
+ }
+ });
+ viewer.addOpenListener(new IOpenListener() {
+ public void open(OpenEvent event) {
+ handleOpen(event);
+ }
+ });
+ }
+
+ protected void createViewer(Composite parent) {
+ statsPanel = new StatisticsPanel(parent);
+ switch(currentViewType) {
+ case TREE_VIEW:
+ createTreeViewerPartControl(parent);
+ break;
+ case TABLE_VIEW:
+ createTableViewerPartControl(parent);
+ break;
+ }
+ viewer.setInput(input);
+ viewer.getControl().setFocus();
+ initializeListeners();
+ busyCursor.setControl(viewer.getControl());
+ }
+
+ protected void createTreeViewerPartControl(Composite parent) {
+ GridData data = new GridData(GridData.FILL_BOTH);
+ viewer = new SyncTreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
+ viewer.setLabelProvider(SyncViewerLabelProvider.getDecoratingLabelProvider());
+ viewer.setSorter(new SyncViewerSorter(ResourceSorter.NAME));
+ ((TreeViewer)viewer).getTree().setLayoutData(data);
+ }
+
+ protected void createTableViewerPartControl(Composite parent) {
+ // Create the table
+ Table table = new Table(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI | SWT.FULL_SELECTION);
+ table.setHeaderVisible(true);
+ table.setLinesVisible(true);
+ GridData data = new GridData(GridData.FILL_BOTH);
+ table.setLayoutData(data);
+
+ // Set the table layout
+ TableLayout layout = new TableLayout();
+ table.setLayout(layout);
+
+ // Create the viewer
+ TableViewer tableViewer = new SyncTableViewer(table);
+
+ // Create the table columns
+ createColumns(table, layout, tableViewer);
+
+ // Set the table contents
+ viewer = tableViewer;
+ viewer.setContentProvider(new SyncSetTableContentProvider());
+ viewer.setLabelProvider(new SyncViewerLabelProvider());
+
+ viewer.setSorter(new SyncViewerTableSorter());
+ }
+
+ /**
+ * Creates the columns for the sync viewer table.
+ */
+ protected void createColumns(Table table, TableLayout layout, TableViewer viewer) {
+ SelectionListener headerListener = SyncViewerTableSorter.getColumnListener(viewer);
+ // revision
+ TableColumn col = new TableColumn(table, SWT.NONE);
+ col.setResizable(true);
+ col.setText("Resource"); //$NON-NLS-1$
+ col.addSelectionListener(headerListener);
+ layout.addColumnData(new ColumnWeightData(30, true));
+
+ // tags
+ col = new TableColumn(table, SWT.NONE);
+ col.setResizable(true);
+ col.setText("In Folder"); //$NON-NLS-1$
+ col.addSelectionListener(headerListener);
+ layout.addColumnData(new ColumnWeightData(50, true));
+ }
+
+ protected void disposeChildren(Composite parent) {
+ // Null out the control of the busy cursor while we are switching viewers
+ busyCursor.setControl(null);
+ Control[] children = parent.getChildren();
+ for (int i = 0; i < children.length; i++) {
+ Control control = children[i];
+ control.dispose();
+ }
+ }
+
+ /**
+ * Handles a selection changed event from the viewer. Updates the status line and the action
+ * bars, and links to editor (if option enabled).
+ *
+ * @param event the selection event
+ */
+ protected void handleSelectionChanged(SelectionChangedEvent event) {
+ final IStructuredSelection sel = (IStructuredSelection) event.getSelection();
+ updateStatusLine(sel);
+ updateActionBars(sel);
+ }
+
+ protected void handleOpen(OpenEvent event) {
+ // actions.open();
+ }
+ /**
+ * Handles a double-click event from the viewer.
+ * Expands or collapses a folder when double-clicked.
+ *
+ * @param event the double-click event
+ * @since 2.0
+ */
+ protected void handleDoubleClick(DoubleClickEvent event) {
+ IStructuredSelection selection = (IStructuredSelection) event.getSelection();
+ Object element = selection.getFirstElement();
+
+ // Double-clicking should expand/collapse containers
+ if (viewer instanceof TreeViewer) {
+ TreeViewer tree = (TreeViewer)viewer;
+ if (tree.isExpandable(element)) {
+ tree.setExpandedState(element, !tree.getExpandedState(element));
+ }
+ }
+
+ }
+
+ protected void updateStatusPanel() {
+ Display.getDefault().asyncExec(new Runnable() {
+ public void run() {
+ SubscriberInput input = getInput();
+ if(input != null && statsPanel != null) {
+ statsPanel.update(new ViewStatusInformation(input));
+ }
+ }
+ });
+ }
+
+ protected void updateTooltip() {
+ Display.getDefault().asyncExec(new Runnable() {
+ public void run() {
+ // SubscriberInput input = getInput();
+ // if(input != null) {
+ // if(input.getWorkingSet() != null) {
+ // String tooltip = Policy.bind("LiveSyncView.titleTooltip", input.getWorkingSet().getName()); //$NON-NLS-1$
+ // setTitleToolTip(tooltip);
+ // } else {
+ // setTitleToolTip(""); //$NON-NLS-1$
+ // }
+ // }
+ }
+ });
+ }
+ /**
+ * Passing the focus request to the viewer's control.
+ */
+ public void setFocus() {
+ if (viewer == null) return;
+ viewer.getControl().setFocus();
+ }
+
+ public StructuredViewer getViewer() {
+ return viewer;
+ }
+
+ private static void handle(Shell shell, Exception exception, String title, String message) {
+ Utils.handleError(shell, exception, title, message);
+ }
+
/* (non-Javadoc)
- * @see org.eclipse.ui.part.IPage#dispose()
+ * @see org.eclipse.ui.IWorkbenchPart#dispose()
*/
public void dispose() {
- // TODO Auto-generated method stub
-
+ // cancel and wait
+ RefreshSubscriberInputJob job = TeamUIPlugin.getPlugin().getRefreshJob();
+ job.setRestartOnCancel(false);
+ job.cancel();
+ try {
+ job.join();
+ } catch (InterruptedException e) {
+ // continue with shutdown
+ }
+ job.setSubscriberInput(null);
+
+ // Cleanup the subscriber inputs
+ input.dispose();
+ busyCursor.dispose();
}
-
+
+ public void run(IRunnableWithProgress runnable) {
+ try {
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().run(true, true, runnable);
+ } catch (InvocationTargetException e) {
+ handle(getSite().getShell(), e, null, null);
+ } catch (InterruptedException e) {
+ // Nothing to be done
+ }
+ }
+
+ public int getViewerType() {
+ return currentViewType;
+ }
+
+ /*
+ * Return the current input for the view.
+ */
+ public SubscriberInput getInput() {
+ return input;
+ }
+
+ /*
+ * Add the subscriber to the view. This method does not activate
+ * the subscriber.
+ */
+ synchronized private void addSubscriber(final TeamSubscriber s) {
+ this.input = new SubscriberInput(s);
+ ActionContext context = new ActionContext(null);
+ context.setInput(input);
+ //actions.addContext(context);
+ }
+
+ synchronized public void removeSubscriber(TeamSubscriber s) {
+ // notify that context is changing
+ ActionContext context = new ActionContext(null);
+ context.setInput(input);
+ //actions.removeContext(context);
+
+ // dispose of the input
+ input.dispose();
+
+ // de-register the subscriber with the platform
+ s.cancel();
+ }
+
+ public void collapseAll() {
+ if (viewer == null || !(viewer instanceof AbstractTreeViewer)) return;
+ viewer.getControl().setRedraw(false);
+ ((AbstractTreeViewer)viewer).collapseToLevel(viewer.getInput(), TreeViewer.ALL_LEVELS);
+ viewer.getControl().setRedraw(true);
+ }
+
+ public ISelection getSelection() {
+ return getViewer().getSelection();
+ }
+
+ /**
+ * This method enables "Show In" support for this view
+ *
+ * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
+ */
+ public Object getAdapter(Class key) {
+ if (key == IShowInSource.class) {
+ return new IShowInSource() {
+ public ShowInContext getShowInContext() {
+ StructuredViewer v = getViewer();
+ if (v == null) return null;
+ return new ShowInContext(null, v.getSelection());
+ }
+ };
+ }
+ return null;
+ }
+
+ /**
+ * Updates the action bar actions.
+ *
+ * @param selection the current selection
+ * @since 2.0
+ */
+ protected void updateActionBars(IStructuredSelection selection) {
+ //if (actions != null) {
+ //ActionContext actionContext = actions.getContext();
+ //if(actionContext != null) {
+ //actionContext.setSelection(selection);
+ //actions.updateActionBars();
+ //}
+ //}
+ }
+
+ /**
+ * Updates the message shown in the status line.
+ *
+ * @param selection the current selection
+ */
+ protected void updateStatusLine(IStructuredSelection selection) {
+ String msg = getStatusLineMessage(selection);
+ //getSite().getActionBars().getStatusLineManager().setMessage(msg);
+ }
+
+ /**
+ * Returns the message to show in the status line.
+ *
+ * @param selection the current selection
+ * @return the status line message
+ * @since 2.0
+ */
+ protected String getStatusLineMessage(IStructuredSelection selection) {
+ if (selection.size() == 1) {
+ IResource resource = getResource(selection.getFirstElement());
+ if (resource == null) {
+ return Policy.bind("SynchronizeView.12"); //$NON-NLS-1$
+ } else {
+ return resource.getFullPath().makeRelative().toString();
+ }
+ }
+ if (selection.size() > 1) {
+ return selection.size() + Policy.bind("SynchronizeView.13"); //$NON-NLS-1$
+ }
+ return ""; //$NON-NLS-1$
+ }
+
+ /**
+ * @param object
+ * @return
+ */
+ private IResource getResource(Object object) {
+ return (IResource)TeamAction.getAdapter(object, IResource.class);
+ }
+
+ /**
+ * Makes this view visible in the active page.
+ */
+ public static SynchronizeView showInActivePage(IWorkbenchPage activePage, boolean allowSwitchingPerspectives) {
+ IWorkbench workbench= TeamUIPlugin.getPlugin().getWorkbench();
+ IWorkbenchWindow window= workbench.getActiveWorkbenchWindow();
+
+ if(allowSwitchingPerspectives && ! TeamUIPlugin.getPlugin().getPreferenceStore().getString(IPreferenceIds.SYNCVIEW_DEFAULT_PERSPECTIVE).equals(IPreferenceIds.SYNCVIEW_DEFAULT_PERSPECTIVE_NONE)) {
+ try {
+ String pId = TeamUIPlugin.getPlugin().getPreferenceStore().getString(IPreferenceIds.SYNCVIEW_DEFAULT_PERSPECTIVE);
+ activePage = workbench.showPerspective(pId, window);
+ } catch (WorkbenchException e) {
+ Utils.handleError(window.getShell(), e, Policy.bind("SynchronizeView.14"), e.getMessage()); //$NON-NLS-1$
+ }
+ }
+ try {
+ if (activePage == null) {
+ activePage = TeamUIPlugin.getActivePage();
+ if (activePage == null) return null;
+ }
+ return (SynchronizeView)activePage.showView(VIEW_ID);
+ } catch (PartInitException pe) {
+ Utils.handleError(window.getShell(), pe, Policy.bind("SynchronizeView.16"), pe.getMessage()); //$NON-NLS-1$
+ return null;
+ }
+ }
+
+ /**
+ * Update the title when either the subscriber or filter sync set changes.
+ */
+ public void syncSetChanged(SyncSetChangedEvent event) {
+ updateStatusPanel();
+ }
+
+ public void selectSubscriber(TeamSubscriber subscriber) {
+ //activateSubscriber(subscriber);
+ }
+
+ /**
+ * Refreshes the resources from the specified subscriber. The working set or filters applied
+ * to the sync view do not affect the sync.
+ */
+ public void refreshWithRemote(TeamSubscriber subscriber, IResource[] resources) {
+ QualifiedName id = subscriber.getId();
+ // if(subscriberInputs.containsKey(id)) {
+ // if(input != null && ! input.getSubscriber().getId().equals(id)) {
+ // initializeSubscriberInput((SubscriberInput)subscriberInputs.get(id));
+ // }
+ // RefreshAction.run(this, resources, subscriber);
+ // }
+ }
+
+ /**
+ * Refreshes the resources in the current input for the given subscriber.
+ */
+ public void refreshWithRemote(TeamSubscriber subscriber) {
+ QualifiedName id = subscriber.getId();
+ // if(input != null && subscriberInputs.containsKey(id)) {
+ // if(! input.getSubscriber().getId().equals(id)) {
+ // initializeSubscriberInput((SubscriberInput)subscriberInputs.get(id));
+ // }
+ // RefreshAction.run(this, input.workingSetRoots(), subscriber);
+ // }
+ }
+
+ /**
+ * Refreshes the resources in the current input for the given subscriber.
+ */
+ public void refreshWithRemote() {
+ if(input != null) {
+ //RefreshAction.run(this, input.workingSetRoots(), input.getSubscriber());
+ }
+ }
+
+ public int getCurrentViewType() {
+ return currentViewType;
+ }
+
+ public void selectAll() {
+ if (getViewerType() == TABLE_VIEW) {
+ TableViewer table = (TableViewer)getViewer();
+ table.getTable().selectAll();
+ } else {
+ // Select All in a tree doesn't really work well
+ }
+ }
+
+ private IPreferenceStore getStore() {
+ return TeamUIPlugin.getPlugin().getPreferenceStore();
+ }
+
+ public SyncSetContentProvider getContentProvider() {
+ return (SyncSetContentProvider)getViewer().getContentProvider();
+ }
+
+ public void setWorkingSet(IWorkingSet workingSet) {
+ //actions.setWorkingSet(workingSet);
+ }
+
+ public void workingSetChanged(IWorkingSet set) {
+ input.setWorkingSet(set);
+ updateTooltip();
+ }
+ /**
+ * Updates the filter applied to the active subscriber input and ensures that selection and expansions
+ * is preserved when the filtered contents are shown.
+ * @param filter
+ */
+ public void updateInputFilter(int[] directions, int[] changeTypes) {
+ try {
+ if(viewer instanceof INavigableControl) {
+ ((INavigableControl)viewer).preserveState(1);
+ }
+ input.setFilter(
+ new AndSyncInfoFilter(
+ new SyncInfoFilter[] {
+ new SyncInfoDirectionFilter(directions),
+ new SyncInfoChangeTypeFilter(changeTypes),
+ new PseudoConflictFilter()
+ }), new NullProgressMonitor());
+ if(viewer instanceof INavigableControl) {
+ ((INavigableControl)viewer).restoreState(1);
+ }
+ } catch (TeamException e) {
+ Utils.handleError(getSite().getShell(), e, Policy.bind("SynchronizeView.16"), e.getMessage()); //$NON-NLS-1$
+ }
+ }
+
+ /**
+ * Allows clients to change the active sync mode.
+ */
+ public void setMode(int mode) {
+ //actions.setMode(mode);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.part.IPageBookViewPage#getSite()
+ */
+ public IPageSite getSite() {
+ return site;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.part.IPage#createControl(org.eclipse.swt.widgets.Composite)
+ */
+ public void createControl(Composite parent) {
+ createPartControl(parent);
+ }
+
/* (non-Javadoc)
* @see org.eclipse.ui.part.IPage#getControl()
*/
public Control getControl() {
- // TODO Auto-generated method stub
- return null;
+ return composite;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.ui.part.IPage#setActionBars(org.eclipse.ui.IActionBars)
*/
public void setActionBars(IActionBars actionBars) {
// TODO Auto-generated method stub
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.part.IPage#setFocus()
- */
- public void setFocus() {
- // TODO Auto-generated method stub
-
+ //actions.fillActionBars(actionBars);
}
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/pages/SynchronizePageDropDownAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/pages/SynchronizePageDropDownAction.java
new file mode 100644
index 000000000..b4ce915b5
--- /dev/null
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/pages/SynchronizePageDropDownAction.java
@@ -0,0 +1,137 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2003 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.team.internal.ui.sync.pages;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.ActionContributionItem;
+import org.eclipse.jface.action.IMenuCreator;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.MenuItem;
+import org.eclipse.team.internal.ui.TeamUIPlugin;
+import org.eclipse.team.internal.ui.Utils;
+import org.eclipse.team.ui.TeamUI;
+import org.eclipse.team.ui.sync.INewSynchronizeView;
+import org.eclipse.team.ui.sync.ISynchronizePageListener;
+import org.eclipse.team.ui.sync.ISynchronizeViewPage;
+import org.eclipse.ui.IKeyBindingService;
+import org.eclipse.ui.texteditor.IUpdate;
+
+public class SynchronizePageDropDownAction extends Action implements IMenuCreator, ISynchronizePageListener, IUpdate {
+
+ private INewSynchronizeView fView;
+ private Menu fMenu;
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.texteditor.IUpdate#update()
+ */
+ public void update() {
+ ISynchronizeViewPage[] pages = TeamUI.getSynchronizeManager().getSynchronizePages();
+ setEnabled(pages.length >= 1);
+ }
+
+ public SynchronizePageDropDownAction(INewSynchronizeView view) {
+ fView= view;
+ Utils.initAction(this, "action.refreshSubscriber."); //$NON-NLS-1$
+ IKeyBindingService kbs = view.getSite().getKeyBindingService();
+ Utils.registerAction(kbs, this, "org.eclipse.team.ui.syncview.syncAll"); //$NON-NLS-1$
+ setMenuCreator(this);
+ TeamUI.getSynchronizeManager().addSynchronizePageListener(this);
+ update();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.action.IMenuCreator#dispose()
+ */
+ public void dispose() {
+ if (fMenu != null) {
+ fMenu.dispose();
+ }
+
+ fView= null;
+ TeamUI.getSynchronizeManager().removeSynchronizePageListener(this);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.action.IMenuCreator#getMenu(org.eclipse.swt.widgets.Menu)
+ */
+ public Menu getMenu(Menu parent) {
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.action.IMenuCreator#getMenu(org.eclipse.swt.widgets.Control)
+ */
+ public Menu getMenu(Control parent) {
+ if (fMenu != null) {
+ fMenu.dispose();
+ }
+ fMenu= new Menu(parent);
+ ISynchronizeViewPage[] pages = TeamUI.getSynchronizeManager().getSynchronizePages();
+ ISynchronizeViewPage current = fView.getSynchronizeTarget();
+ for (int i = 0; i < pages.length; i++) {
+ ISynchronizeViewPage page = pages[i];
+ Action action = new ShowSynchronizeViewPage(fView, page);
+ action.setChecked(page.equals(current));
+ addActionToMenu(fMenu, action);
+ }
+ return fMenu;
+ }
+
+ protected void addActionToMenu(Menu parent, Action action) {
+ ActionContributionItem item= new ActionContributionItem(action);
+ item.fill(parent, -1);
+ }
+
+ protected void addMenuSeparator() {
+ new MenuItem(fMenu, SWT.SEPARATOR);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.action.IAction#run()
+ */
+ public void run() {
+ // do nothing - this is a menu
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.console.IConsoleListener#consolesAdded(org.eclipse.ui.console.IConsole[])
+ */
+ public void consolesAdded(ISynchronizeViewPage[] consoles) {
+ Display display = TeamUIPlugin.getStandardDisplay();
+ display.asyncExec(new Runnable() {
+ public void run() {
+ update();
+ }
+ });
+ }
+
+ /* (non-Javadoc)
+ *
+ * Dispose the menu when a launch is removed, such that the actions in this
+ * menu do not hang on to associated resources.
+ *
+ * @see org.eclipse.ui.console.IConsoleListener#consolesRemoved(org.eclipse.ui.console.IConsole[])
+ */
+ public void consolesRemoved(ISynchronizeViewPage[] consoles) {
+ Display display = TeamUIPlugin.getStandardDisplay();
+ display.asyncExec(new Runnable() {
+ public void run() {
+ if (fMenu != null) {
+ fMenu.dispose();
+ }
+ update();
+ }
+ });
+ }
+}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/views/ViewStatusInformation.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/views/ViewStatusInformation.java
index 02e6603c6..0354e2a16 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/views/ViewStatusInformation.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/views/ViewStatusInformation.java
@@ -13,7 +13,7 @@ package org.eclipse.team.internal.ui.sync.views;
import org.eclipse.team.internal.ui.sync.sets.SubscriberInput;
import org.eclipse.ui.IWorkingSet;
-class ViewStatusInformation {
+public class ViewStatusInformation {
private String subscriberName;
private String workingSetName;
@@ -22,7 +22,7 @@ class ViewStatusInformation {
private long numInWorkspace = 0;
private SubscriberInput input;
- ViewStatusInformation(SubscriberInput input) {
+ public ViewStatusInformation(SubscriberInput input) {
this.subscriberName = input.getSubscriber().getName();
this.input = input;
IWorkingSet set = input.getWorkingSet();

Back to the top