Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Michel-Lemieux2003-12-07 21:01:53 -0500
committerJean Michel-Lemieux2003-12-07 21:01:53 -0500
commit0b4072d8420b535c2c0cfff99be4873c111c99d8 (patch)
tree45bb0705a3dc8ee47e055ef6d2236ccc85d78476
parentbff77351dff5acfdcfe816a44efaf180d2313534 (diff)
downloadeclipse.platform.team-0b4072d8420b535c2c0cfff99be4873c111c99d8.tar.gz
eclipse.platform.team-0b4072d8420b535c2c0cfff99be4873c111c99d8.tar.xz
eclipse.platform.team-0b4072d8420b535c2c0cfff99be4873c111c99d8.zip
*** empty log message ***
-rw-r--r--bundles/org.eclipse.team.ui/.classpath16
-rw-r--r--bundles/org.eclipse.team.ui/plugin.xml28
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/messages.properties2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/DropDownParticipantSection.java58
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ParticipantComposite.java158
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/SynchronizePageDropDownAction.java14
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipant.java10
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamSubscriberParticipant.java13
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamSubscriberParticipantPage.java66
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TwoSectionParticipantPage.java15
10 files changed, 332 insertions, 48 deletions
diff --git a/bundles/org.eclipse.team.ui/.classpath b/bundles/org.eclipse.team.ui/.classpath
index 065ac06e1..314c603e1 100644
--- a/bundles/org.eclipse.team.ui/.classpath
+++ b/bundles/org.eclipse.team.ui/.classpath
@@ -1,7 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry sourcepath="ORG_ECLIPSE_PLATFORM_SOURCE_SRC/org.eclipse.ui.ide_3.0.0/idesrc.zip" kind="var" path="ECLIPSE_HOME/plugins/org.eclipse.ui.ide_3.0.0/ide.jar"/>
+ <classpathentry sourcepath="ORG_ECLIPSE_PLATFORM_SOURCE_SRC/org.eclipse.ui.views_3.0.0/viewssrc.zip" kind="var" path="ECLIPSE_HOME/plugins/org.eclipse.ui.views_3.0.0/views.jar"/>
+ <classpathentry sourcepath="ORG_ECLIPSE_PLATFORM_SOURCE_SRC/org.eclipse.jface.text_3.0.0/jfacetextsrc.zip" kind="var" path="ECLIPSE_HOME/plugins/org.eclipse.jface.text_3.0.0/jfacetext.jar"/>
+ <classpathentry sourcepath="ORG_ECLIPSE_PLATFORM_SOURCE_SRC/org.eclipse.text_3.0.0/textsrc.zip" kind="var" path="ECLIPSE_HOME/plugins/org.eclipse.text_3.0.0/text.jar"/>
+ <classpathentry sourcepath="ORG_ECLIPSE_PLATFORM_SOURCE_SRC/org.eclipse.ui.workbench.texteditor_3.0.0/texteditorsrc.zip" kind="var" path="ECLIPSE_HOME/plugins/org.eclipse.ui.workbench.texteditor_3.0.0/texteditor.jar"/>
+ <classpathentry sourcepath="ORG_ECLIPSE_PLATFORM_SOURCE_SRC/org.eclipse.ui.editors_3.0.0/editorssrc.zip" kind="var" path="ECLIPSE_HOME/plugins/org.eclipse.ui.editors_3.0.0/editors.jar"/>
+ <classpathentry sourcepath="ORG_ECLIPSE_PLATFORM_SOURCE_SRC/org.eclipse.core.resources_3.0.0/resourcessrc.zip" kind="var" path="ECLIPSE_HOME/plugins/org.eclipse.core.resources_3.0.0/resources.jar"/>
+ <classpathentry kind="src" path="/org.eclipse.team.core"/>
+ <classpathentry sourcepath="ORG_ECLIPSE_PLATFORM_SOURCE_SRC/org.eclipse.ui_3.0.0/uisrc.zip" kind="var" path="ECLIPSE_HOME/plugins/org.eclipse.ui_3.0.0/ui.jar"/>
+ <classpathentry sourcepath="ORG_ECLIPSE_PLATFORM_SOURCE_WIN32_WIN32_X86_SRC/org.eclipse.swt.win32_3.0.0/ws/win32/swtsrc.zip" kind="var" path="ECLIPSE_HOME/plugins/org.eclipse.swt.win32_3.0.0/ws/win32/swt.jar"/>
+ <classpathentry sourcepath="ORG_ECLIPSE_PLATFORM_SOURCE_SRC/org.eclipse.jface_3.0.0/jfacesrc.zip" kind="var" path="ECLIPSE_HOME/plugins/org.eclipse.jface_3.0.0/jface.jar"/>
+ <classpathentry sourcepath="ORG_ECLIPSE_PLATFORM_SOURCE_SRC/org.eclipse.ui.workbench_3.0.0/workbenchsrc.zip" kind="var" path="ECLIPSE_HOME/plugins/org.eclipse.ui.workbench_3.0.0/workbench.jar"/>
+ <classpathentry sourcepath="ORG_ECLIPSE_PLATFORM_SOURCE_SRC/org.eclipse.compare_3.0.0/comparesrc.zip" kind="var" path="ECLIPSE_HOME/plugins/org.eclipse.compare_3.0.0/compare.jar"/>
+ <classpathentry sourcepath="ORG_ECLIPSE_PLATFORM_SOURCE_SRC/org.eclipse.core.boot_3.0.0/bootsrc.zip" kind="var" path="ECLIPSE_HOME/plugins/org.eclipse.core.boot_3.0.0/boot.jar"/>
+ <classpathentry sourcepath="ORG_ECLIPSE_PLATFORM_SOURCE_SRC/org.eclipse.core.runtime_3.0.0/runtimesrc.zip" kind="var" path="ECLIPSE_HOME/plugins/org.eclipse.core.runtime_3.0.0/runtime.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path="bin"/>
</classpath>
diff --git a/bundles/org.eclipse.team.ui/plugin.xml b/bundles/org.eclipse.team.ui/plugin.xml
index 61c69ed72..bbca50c0a 100644
--- a/bundles/org.eclipse.team.ui/plugin.xml
+++ b/bundles/org.eclipse.team.ui/plugin.xml
@@ -20,12 +20,13 @@
<import plugin="org.eclipse.ui.workbench.texteditor" optional="true"/>
<import plugin="org.eclipse.ui.editors" optional="true"/>
<import plugin="org.eclipse.core.resources"/>
- <import plugin="org.eclipse.core.runtime.compatibility"/>
+ <import plugin="org.eclipse.core.runtime.compatibility" optional="true"/>
<import plugin="org.eclipse.team.core"/>
<import plugin="org.eclipse.ui"/>
<import plugin="org.eclipse.compare"/>
</requires>
+
<extension-point id="configurationWizards" name="%configurationWizards" schema="schema/configurationWizards.exsd"/>
<extension-point id="synchronizeParticipants" name="%synchronizeParticipants" schema="schema/synchronizeParticipants.exsd"/>
@@ -54,8 +55,8 @@
<extension
point="org.eclipse.ui.popupMenus">
<objectContribution
- objectClass="org.eclipse.core.resources.IResource"
adaptable="true"
+ objectClass="org.eclipse.core.resources.IResource"
id="org.eclipse.team.ui.ResourceContributions">
<menu
label="%TeamGroupMenu.label"
@@ -100,13 +101,13 @@
</menu>
</objectContribution>
<objectContribution
- objectClass="org.eclipse.core.resources.IProject"
adaptable="true"
+ objectClass="org.eclipse.core.resources.IProject"
id="org.eclipse.team.ui.ProjectContributions">
<action
label="%ConfigureProject.label"
- tooltip="%ConfigureProject.tooltip"
class="org.eclipse.team.internal.ui.actions.ConfigureProjectAction"
+ tooltip="%ConfigureProject.tooltip"
menubarPath="team.main/projectGroup"
enablesFor="1"
id="org.eclipse.team.ui.ConfigureProject">
@@ -123,8 +124,8 @@
<view
name="%SyncView.name"
icon="icons/full/cview16/synch_synch.gif"
- fastViewWidthRatio="0.25"
category="org.eclipse.team.ui"
+ fastViewWidthRatio="0.25"
class="org.eclipse.team.internal.ui.synchronize.SynchronizeView"
id="org.eclipse.team.sync.views.SynchronizeView">
</view>
@@ -134,7 +135,7 @@
point="org.eclipse.ui.perspectives">
<perspective
name="%Synchronizing.perspective"
- icon="icons/full/cview16/synch_synch.gif"
+ icon="icons/full/cview16/synch_synch.gif"
class="org.eclipse.team.internal.ui.synchronize.TeamSynchronizingPerspective"
id="org.eclipse.team.ui.TeamSynchronizingPerspective">
</perspective>
@@ -144,9 +145,9 @@
<perspectiveExtension
targetID="org.eclipse.ui.resourcePerspective">
<perspectiveShortcut
- id="org.eclipse.team.ui.TeamSynchronizingPerspective">
+ id="org.eclipse.team.ui.TeamSynchronizingPerspective">
</perspectiveShortcut>
- </perspectiveExtension>
+ </perspectiveExtension>
</extension>
<!-- ****************** Import Wizards ********************* -->
<extension
@@ -207,17 +208,6 @@
description="%ActionSet.description"
visible="false"
id="org.eclipse.team.ui.actionSet">
-<!-- <action
- definitionId="org.eclipse.team.ui.syncview.syncAll"
- label="%Command.syncAll.name"
- style="pulldown"
- icon="icons/full/cview16/synch_synch.gif"
- tooltip="%Command.syncAll.description"
- class="org.eclipse.team.internal.ui.sync.actions.SyncAllAction"
- toolbarPath="Normal/CVS"
- id="org.eclipse.team.internal.ui.sync.actions.SyncAllAction">
- </action>
- -->
</actionSet>
</extension>
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/messages.properties b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/messages.properties
index 1d551878a..2641b3454 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/messages.properties
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/messages.properties
@@ -458,7 +458,7 @@ SynchronizeManager.7=Error notifying of added/removal of synchronize participant
SynchronizeManager.8=Error initializing participants
SynchronizeManager.9=Synchronize participant with id {0} is not in the registry
SynchronizeManager.10=Error saving synchronize participants
-SynchronizeView.1=Synchronize View
+SynchronizeView.1=Synchronize View - Summary
SynchronizeView.2=Synchronize View -
SyncViewerPreferencePage.19=Show all synchronization information in a resource\'s text label
TeamSubscriberParticipantPage.7=Resource
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/DropDownParticipantSection.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/DropDownParticipantSection.java
new file mode 100644
index 000000000..8e12a6918
--- /dev/null
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/DropDownParticipantSection.java
@@ -0,0 +1,58 @@
+package org.eclipse.team.internal.ui.synchronize;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.team.internal.ui.widgets.FormSection;
+import org.eclipse.team.internal.ui.widgets.FormWidgetFactory;
+import org.eclipse.team.ui.synchronize.ISynchronizeParticipant;
+import org.eclipse.team.ui.synchronize.ISynchronizeView;
+
+public class DropDownParticipantSection extends FormSection {
+
+ private ISynchronizeParticipant participant;
+ private Composite parent;
+ private ParticipantComposite participantComposite;
+ private ISynchronizeView view;
+
+ public DropDownParticipantSection(Composite parent, ISynchronizeParticipant participant, ISynchronizeView view) {
+ this.participant = participant;
+ this.parent = parent;
+ this.view = view;
+ setCollapsable(true);
+ setCollapsed(true);
+ }
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.team.internal.ui.widgets.FormSection#getDescription()
+ */
+ public String getDescription() {
+ return null;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.team.internal.ui.widgets.FormSection#getHeaderText()
+ */
+ public String getHeaderText() {
+ return "Summary";
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.team.internal.ui.widgets.FormSection#createClient(org.eclipse.swt.widgets.Composite,
+ * org.eclipse.team.internal.ui.widgets.FormWidgetFactory)
+ */
+ public Composite createClient(Composite parent, FormWidgetFactory factory) {
+ participantComposite = new ParticipantComposite(parent, participant, view, SWT.NONE);
+ return participantComposite;
+ }
+ protected void reflow() {
+ super.reflow();
+ parent.setRedraw(false);
+ parent.getParent().setRedraw(false);
+ parent.layout(true);
+ parent.getParent().layout(true);
+ parent.setRedraw(true);
+ parent.getParent().setRedraw(true);
+ }
+}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ParticipantComposite.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ParticipantComposite.java
index 70835fd76..39c953d46 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ParticipantComposite.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ParticipantComposite.java
@@ -19,6 +19,7 @@ import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.*;
import org.eclipse.team.internal.ui.TeamUIPlugin;
+import org.eclipse.team.internal.ui.widgets.*;
import org.eclipse.team.internal.ui.widgets.FormSection;
import org.eclipse.team.internal.ui.widgets.FormWidgetFactory;
import org.eclipse.team.ui.ISharedImages;
@@ -87,10 +88,14 @@ public class ParticipantComposite extends Composite {
super.reflow();
setRedraw(false);
getParent().setRedraw(false);
+ getParent().getParent().setRedraw(false);
+ getParent().getParent().getParent().setRedraw(false);
layout(true);
getParent().layout(true);
setRedraw(true);
getParent().setRedraw(true);
+ getParent().getParent().setRedraw(true);
+ getParent().getParent().getParent().setRedraw(true);
}
};
dropDownSection.setCollapsable(true);
@@ -110,6 +115,112 @@ public class ParticipantComposite extends Composite {
layout.marginHeight = 0;
layout.marginWidth = 0;
area.setLayout(layout);
+ FormWidgetFactory factory = new FormWidgetFactory(getDisplay());
+ factory.setBackgroundColor(getBackgroundColor());
+ {
+ final GridData gridData = new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_FILL);
+ area.setLayoutData(gridData);
+ }
+ {
+ final Composite composite = new Composite(area, SWT.NONE);
+ composite.setBackground(getBackgroundColor());
+ composite.setLayoutData(new GridData(GridData.FILL_BOTH));
+ final GridLayout gridLayout = new GridLayout();
+ gridLayout.numColumns = 3;
+ composite.setLayout(gridLayout);
+ {
+ final Label label = new Label(composite, SWT.NONE);
+ final GridData gridData = new GridData(GridData.VERTICAL_ALIGN_BEGINNING);
+ //gridData.verticalSpan = 5;
+ label.setLayoutData(gridData);
+ label.setImage(participantImage);
+ label.setBackground(getBackgroundColor());
+ }
+ {
+ final Label label = new Label(composite, SWT.WRAP);
+ final GridData gridData_1 = new GridData();
+ //gridData_1.
+ label.setLayoutData(gridData_1);
+ label.setFont(JFaceResources.getHeaderFont());
+ label.setText(participant.getName());
+ label.setBackground(getBackgroundColor());
+ }
+ {
+ final Label label = new Label(composite, SWT.NONE);
+ final GridData gridData_1 = new GridData();
+ gridData_1.horizontalAlignment = GridData.END;
+ //gridData_1.verticalSpan = 3;
+ label.setLayoutData(gridData_1);
+ label.setText("Goto page");
+ label.setBackground(getBackgroundColor());
+ factory.turnIntoHyperlink(label, new IHyperlinkListener() {
+ /* (non-Javadoc)
+ * @see org.eclipse.team.internal.ui.widgets.IHyperlinkListener#linkActivated(org.eclipse.swt.widgets.Control)
+ */
+ public void linkActivated(Control linkLabel) {
+ view.display(participant);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.team.internal.ui.widgets.IHyperlinkListener#linkEntered(org.eclipse.swt.widgets.Control)
+ */
+ public void linkEntered(Control linkLabel) {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.team.internal.ui.widgets.IHyperlinkListener#linkExited(org.eclipse.swt.widgets.Control)
+ */
+ public void linkExited(Control linkLabel) {
+ // TODO Auto-generated method stub
+
+ }
+ });
+ }
+
+ {
+ final Composite composite_1 = new Composite(composite, SWT.NONE);
+ final GridData gridData = new GridData(GridData.FILL_BOTH);
+ gridData.horizontalSpan = 3;
+ composite_1.setLayoutData(gridData);
+ final GridLayout gridLayout_1 = new GridLayout();
+ gridLayout_1.marginWidth = 0;
+ gridLayout_1.marginHeight = 0;
+ composite_1.setLayout(gridLayout_1);
+ composite_1.setBackground(getBackgroundColor());
+ participant.createOverviewPage(composite_1, view);
+ }
+
+ {
+ final Composite composite_1 = new Composite(composite, SWT.NONE);
+ final GridData gridData = new GridData(GridData.HORIZONTAL_ALIGN_END);
+ gridData.horizontalSpan = 3;
+ composite_1.setLayoutData(gridData);
+ final GridLayout gridLayout_1 = new GridLayout();
+ gridLayout_1.marginWidth = 0;
+ gridLayout_1.marginHeight = 0;
+ composite_1.setLayout(gridLayout_1);
+ composite_1.setBackground(getBackgroundColor());
+ {
+ final Button button = new Button(composite_1, SWT.FLAT);
+ button.setText("Setup...");
+ GridData gd = new GridData();
+ gd.horizontalAlignment = GridData.END;
+ button.setLayoutData(gd);
+ }
+ }
+ }
+ return area;
+ }
+
+ protected Composite createComposite2(Composite area) {
+ GridLayout layout = new GridLayout();
+ layout.marginHeight = 0;
+ layout.marginWidth = 0;
+ area.setLayout(layout);
+ FormWidgetFactory factory = new FormWidgetFactory(getDisplay());
+ factory.setBackgroundColor(getBackgroundColor());
{
final GridData gridData = new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_FILL);
area.setLayoutData(gridData);
@@ -152,29 +263,42 @@ public class ParticipantComposite extends Composite {
}
{
final Label label = new Label(composite_1, SWT.NONE);
- final GridData gridData_1 = new GridData(GridData.FILL_BOTH);
+ final GridData gridData_1 = new GridData();
gridData_1.horizontalSpan = 2;
gridData_1.verticalSpan = 3;
label.setLayoutData(gridData_1);
- label.setText("This synchronizes all shared projects with their associated remote repositories.");
+ label.setText("Goto page");
label.setBackground(getBackgroundColor());
+ factory.turnIntoHyperlink(label, new IHyperlinkListener() {
+ /* (non-Javadoc)
+ * @see org.eclipse.team.internal.ui.widgets.IHyperlinkListener#linkActivated(org.eclipse.swt.widgets.Control)
+ */
+ public void linkActivated(Control linkLabel) {
+ view.display(participant);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.team.internal.ui.widgets.IHyperlinkListener#linkEntered(org.eclipse.swt.widgets.Control)
+ */
+ public void linkEntered(Control linkLabel) {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.team.internal.ui.widgets.IHyperlinkListener#linkExited(org.eclipse.swt.widgets.Control)
+ */
+ public void linkExited(Control linkLabel) {
+ // TODO Auto-generated method stub
+
+ }
+ });
}
- {
-// final Label label = new Label(composite_1, SWT.NONE);
-// label.setText("Resources:");
-// label.setBackground(getBackgroundColor());
- FormWidgetFactory factory = new FormWidgetFactory(getDisplay());
- factory.setBackgroundColor(getBackgroundColor());
+ {
Control control = dropDownSection.createControl(composite_1, factory);
- control.setBackground(new Color(composite_1.getDisplay(), new RGB(0,0,0)));
- GridData gd = new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_FILL);
- gd.horizontalSpan = 2;
- control.setLayoutData(gd);
- }
- {
-// final Combo combo = new Combo(composite_1, SWT.READ_ONLY);
-// combo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-// combo.setBackground(getBackgroundColor());
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_FILL);
+ gd.horizontalSpan = 2;
+ control.setLayoutData(gd);
}
}
{
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/SynchronizePageDropDownAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/SynchronizePageDropDownAction.java
index e112fe651..917e68bf6 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/SynchronizePageDropDownAction.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/SynchronizePageDropDownAction.java
@@ -29,6 +29,7 @@ import org.eclipse.ui.texteditor.IUpdate;
public class SynchronizePageDropDownAction extends Action implements IMenuCreator, ISynchronizeParticipantListener, IUpdate {
private ISynchronizeView fView;
+ private Action overviewPageAction;
private Menu fMenu;
/* (non-Javadoc)
@@ -44,6 +45,12 @@ public class SynchronizePageDropDownAction extends Action implements IMenuCreato
Utils.initAction(this, "action.refreshSubscriber."); //$NON-NLS-1$
setMenuCreator(this);
TeamUI.getSynchronizeManager().addSynchronizeParticipantListener(this);
+ overviewPageAction = new Action("Overview Page") {
+ public void run() {
+ fView.displayOverviewPage();
+ }
+ };
+
update();
}
@@ -84,11 +91,8 @@ public class SynchronizePageDropDownAction extends Action implements IMenuCreato
}
// Add Overview Page
addMenuSeparator();
- addActionToMenu(fMenu, new Action("Overview Page") {
- public void run() {
- fView.displayOverviewPage();
- }
- });
+ addActionToMenu(fMenu, overviewPageAction);
+ overviewPageAction.setChecked(current == null);
return fMenu;
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipant.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipant.java
index 1b74fe2bf..1081ba57f 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipant.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipant.java
@@ -13,6 +13,7 @@ package org.eclipse.team.ui.synchronize;
import org.eclipse.core.runtime.IExecutableExtension;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.IMemento;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.part.IPageBookViewPage;
@@ -68,6 +69,15 @@ public interface ISynchronizeParticipant extends IExecutableExtension {
public IPageBookViewPage createPage(ISynchronizeView view);
/**
+ * Creates and returns a new composite that describes this participant
+ * and will be shown on the participant overview page in the synchronize
+ * view.
+ * @param view the synchronize view showing this participant
+ * @return a composite showing the overview details about this participant.
+ */
+ public Composite createOverviewPage(Composite parent, ISynchronizeView view);
+
+ /**
* Initializes this participant with the given participant state.
* A memento is passed to the participant which contains a snapshot
* of the participants state from a previous session.
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamSubscriberParticipant.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamSubscriberParticipant.java
index 957b6fb11..38af49084 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamSubscriberParticipant.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamSubscriberParticipant.java
@@ -11,6 +11,9 @@
package org.eclipse.team.ui.synchronize;
import org.eclipse.core.resources.IResource;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
import org.eclipse.team.core.subscribers.TeamSubscriber;
import org.eclipse.team.internal.ui.IPreferenceIds;
import org.eclipse.team.internal.ui.TeamUIPlugin;
@@ -159,6 +162,8 @@ public abstract class TeamSubscriberParticipant extends AbstractSynchronizeParti
}
}
+
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.ISynchronizeParticipant#init(org.eclipse.ui.IMemento)
*/
@@ -197,4 +202,12 @@ public abstract class TeamSubscriberParticipant extends AbstractSynchronizeParti
settings.putString(P_SYNCVIEWPAGE_LAYOUT, Integer.toString(getLayout()));
settings.putString(P_SYNCVIEWPAGE_MODE, Integer.toString(getMode()));
}
+ /* (non-Javadoc)
+ * @see org.eclipse.team.ui.synchronize.ISynchronizeParticipant#createOverviewPage(org.eclipse.swt.widgets.Composite, org.eclipse.team.ui.synchronize.ISynchronizeView)
+ */
+ public Composite createOverviewPage(Composite parent, ISynchronizeView view) {
+ Label l = new Label(parent, SWT.NONE);
+ l.setText("This is a test");
+ return null;
+ }
} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamSubscriberParticipantPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamSubscriberParticipantPage.java
index 21f0ec6ad..ef060045c 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamSubscriberParticipantPage.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamSubscriberParticipantPage.java
@@ -21,8 +21,8 @@ import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.jface.viewers.*;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.*;
-import org.eclipse.swt.events.MenuListener;
-import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.RGB;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.*;
@@ -30,9 +30,12 @@ import org.eclipse.team.core.TeamException;
import org.eclipse.team.core.subscribers.SyncInfo;
import org.eclipse.team.internal.ui.*;
import org.eclipse.team.internal.ui.jobs.JobBusyCursor;
+import org.eclipse.team.internal.ui.synchronize.DropDownParticipantSection;
import org.eclipse.team.internal.ui.synchronize.actions.*;
import org.eclipse.team.internal.ui.synchronize.sets.SubscriberInput;
import org.eclipse.team.internal.ui.synchronize.views.*;
+import org.eclipse.team.internal.ui.widgets.FormSection;
+import org.eclipse.team.internal.ui.widgets.FormWidgetFactory;
import org.eclipse.team.ui.synchronize.actions.SubscriberAction;
import org.eclipse.team.ui.synchronize.actions.SyncInfoFilter;
import org.eclipse.ui.*;
@@ -58,6 +61,8 @@ public class TeamSubscriberParticipantPage implements IPageBookViewPage, IProper
// 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 DropDownParticipantSection participantSection;
+ private FormSection changesSection;
private boolean settingWorkingSet = false;
// Viewer type constants
@@ -123,8 +128,43 @@ public class TeamSubscriberParticipantPage implements IPageBookViewPage, IProper
// Create the busy cursor with no control to start with (createViewer will set it)
busyCursor = new JobBusyCursor(parent.getParent().getParent(), SubscriberAction.SUBSCRIBER_JOB_TYPE);
+ participantSection = new DropDownParticipantSection(parent, getParticipant(), getSynchronizeView());
+ changesSection = new FormSection() {
+ /* (non-Javadoc)
+ * @see org.eclipse.team.internal.ui.widgets.FormSection#getHeaderText()
+ */
+ public String getHeaderText() {
+ return "Changes";
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.team.internal.ui.widgets.FormSection#createClient(org.eclipse.swt.widgets.Composite, org.eclipse.team.internal.ui.widgets.FormWidgetFactory)
+ */
+ public Composite createClient(Composite parent, FormWidgetFactory factory) {
+ Composite top = factory.createComposite(parent);
+ GridLayout layout = new GridLayout();
+ layout.marginHeight = 0;
+ layout.marginWidth = 0;
+ top.setBackground(new Color(parent.getDisplay(), new RGB(123,111,111)));
+ top.setLayout(layout);
+ createChangesSection(top);
+ return top;
+ }
+ protected void reflow() {
+ super.reflow();
+ composite.setRedraw(false);
+ composite.getParent().setRedraw(false);
+ composite.layout(true);
+ composite.getParent().layout(true);
+ composite.setRedraw(true);
+ composite.getParent().setRedraw(true);
+ }
+ };
+ changesSection.setCollapsable(true);
+ changesSection.setCollapsed(false);
+
createViewer(composite);
-
+
// create actions
openWithActions = new OpenWithActionGroup(this);
refactorActions = new RefactorActionGroup(view);
@@ -266,6 +306,20 @@ public class TeamSubscriberParticipantPage implements IPageBookViewPage, IProper
private void createViewer(Composite parent) {
//tbMgr.createControl(parent);
+ FormWidgetFactory factory = new FormWidgetFactory(parent.getDisplay());
+ factory.setBackgroundColor(new Color(parent.getDisplay(), new RGB(255, 255, 255)));
+ // overview section
+ Control control = participantSection.createControl(parent, factory);
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_FILL);
+ control.setLayoutData(gd);
+ // changes section
+ control = changesSection.createControl(parent, factory);
+ gd = new GridData(GridData.FILL_HORIZONTAL | GridData.FILL_VERTICAL);
+ gd.grabExcessVerticalSpace = true;
+ control.setLayoutData(gd);
+ }
+
+ private void createChangesSection(Composite parent) {
switch(layout) {
case TeamSubscriberParticipant.TREE_LAYOUT:
createTreeViewerPartControl(parent);
@@ -285,15 +339,16 @@ public class TeamSubscriberParticipantPage implements IPageBookViewPage, IProper
return new TeamSubscriberParticipantLabelProvider();
}
- private void createTreeViewerPartControl(Composite parent) {
+ private Control createTreeViewerPartControl(Composite parent) {
GridData data = new GridData(GridData.FILL_BOTH);
viewer = new SyncTreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
viewer.setLabelProvider(getLabelProvider());
viewer.setSorter(new SyncViewerSorter(ResourceSorter.NAME));
((TreeViewer)viewer).getTree().setLayoutData(data);
+ return viewer.getControl();
}
- private void createTableViewerPartControl(Composite parent) {
+ private Control 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);
@@ -316,6 +371,7 @@ public class TeamSubscriberParticipantPage implements IPageBookViewPage, IProper
viewer.setContentProvider(new SyncSetTableContentProvider());
viewer.setLabelProvider(getLabelProvider());
viewer.setSorter(new SyncViewerTableSorter());
+ return viewer.getControl();
}
/**
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TwoSectionParticipantPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TwoSectionParticipantPage.java
new file mode 100644
index 000000000..e1fa534f8
--- /dev/null
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TwoSectionParticipantPage.java
@@ -0,0 +1,15 @@
+/*******************************************************************************
+ * 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.ui.synchronize;
+
+public class TwoSectionParticipantPage {
+
+}

Back to the top