Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Michel-Lemieux2004-03-05 17:12:22 +0000
committerJean Michel-Lemieux2004-03-05 17:12:22 +0000
commit3d6baf672c070a0545c3edbd9dc6b7a6a938e3fa (patch)
tree655f844afe5bd1be8d8116e07b1378cf0cbebd0e
parent4bcfe9981f824ad2263fa7ac57a14d5900c3b4b8 (diff)
downloadeclipse.platform.team-3d6baf672c070a0545c3edbd9dc6b7a6a938e3fa.tar.gz
eclipse.platform.team-3d6baf672c070a0545c3edbd9dc6b7a6a938e3fa.tar.xz
eclipse.platform.team-3d6baf672c070a0545c3edbd9dc6b7a6a938e3fa.zip
*** empty log message ***
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSCompareSubscriber.java2
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSMergeSubscriber.java5
-rw-r--r--bundles/org.eclipse.team.cvs.ui/plugin.properties2
-rw-r--r--bundles/org.eclipse.team.cvs.ui/plugin.xml699
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSCompareRevisionsInput.java142
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSUIPlugin.java3
-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/CompareWithRevisionAction.java32
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareWithTagAction.java27
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ReplaceWithRevisionAction.java79
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/MergeWizard.java49
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/messages.properties2
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CompareParticipant.java4
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/MergeSynchronizeParticipant.java11
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceSynchronizeParticipant.java4
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/cview16/compare_view.gifbin0 -> 128 bytes
-rw-r--r--bundles/org.eclipse.team.ui/plugin.xml34
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIPlugin.java4
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Utils.java59
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/jobs/RefreshSubscriberJob.java14
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/jobs/RefreshUserNotificationPolicy.java94
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/messages.properties13
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeParticipantDescriptor.java13
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/IRefreshSubscriberListener.java6
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/LocalResourceTypedElement.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshCompleteDialog.java122
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RemoteResourceTypedElement.java13
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeManager.java9
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/GlobalRefreshAction.java140
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/GlobalRefreshResourceSelectionPage.java128
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/GlobalSynchronizeWizard.java45
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/OpenInCompareAction.java5
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/TeamParticipantRefreshAction.java33
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/ISharedImages.java1
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeManager.java7
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipant.java11
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipantDescriptor.java14
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/subscriber/IRefreshEvent.java (renamed from bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/IRefreshEvent.java)2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/subscriber/IRefreshSubscriberListener.java16
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/subscriber/OpenCompareDialogAction.java124
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/subscriber/RefreshAction.java42
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/subscriber/SubscriberParticipant.java55
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/subscriber/SubscriberParticipantPage.java15
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/subscriber/SubscriberRefreshSchedule.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/subscriber/SynchronizeViewerAdvisor.java13
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/viewers/CompareDialog.java134
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/viewers/StructuredViewerAdvisor.java43
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/viewers/SyncInfoCompareInput.java47
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/viewers/SyncInfoModelElement.java35
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/viewers/SynchronizeCompareInput.java114
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/viewers/SynchronizeModelProvider.java14
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/00008.html2
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/00039.html31
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/00040.html6
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/00041.html16
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/00042.html11
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/00043.html14
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/00044.html11
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/00045.html11
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/00046.html11
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/00047.html20
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/html/00048.html32
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/SynchronizeViewTestAdapter.java2
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/toc.xml18
64 files changed, 1897 insertions, 773 deletions
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSCompareSubscriber.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSCompareSubscriber.java
index 6b127b7f5..e5b6b0e59 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSCompareSubscriber.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSCompareSubscriber.java
@@ -35,6 +35,8 @@ import org.eclipse.team.internal.ccvs.core.syncinfo.MultiTagResourceVariantTree;
public class CVSCompareSubscriber extends CVSSyncTreeSubscriber implements ISubscriberChangeListener {
public static final String ID = "org.eclipse.team.cvs.ui.compare-participant";
+ public static final String ID_MODAL = "org.eclipse.team.cvs.ui.compare-participant-modal";
+
public static final String QUALIFIED_NAME = CVSProviderPlugin.ID + ".compare"; //$NON-NLS-1$
private static final String UNIQUE_ID_PREFIX = "compare-"; //$NON-NLS-1$
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSMergeSubscriber.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSMergeSubscriber.java
index cefb2e5b4..4c9c92348 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSMergeSubscriber.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSMergeSubscriber.java
@@ -58,7 +58,8 @@ import org.eclipse.team.internal.ccvs.core.util.Util;
*/
public class CVSMergeSubscriber extends CVSSyncTreeSubscriber implements IResourceChangeListener, ISubscriberChangeListener {
- public static final String QUALIFIED_NAME = "org.eclipse.team.cvs.ui.cvsmerge-participant"; //$NON-NLS-1$
+ public static final String ID = "org.eclipse.team.cvs.ui.cvsmerge-participant"; //$NON-NLS-1$
+ public static final String ID_MODAL = "org.eclipse.team.cvs.ui.cvsmerge-participant-modal"; //$NON-NLS-1$
private static final String UNIQUE_ID_PREFIX = "merge-"; //$NON-NLS-1$
private CVSTag start, end;
@@ -72,7 +73,7 @@ public class CVSMergeSubscriber extends CVSSyncTreeSubscriber implements IResour
private static QualifiedName getUniqueId() {
String uniqueId = Long.toString(System.currentTimeMillis());
- return new QualifiedName(QUALIFIED_NAME, "CVS" + UNIQUE_ID_PREFIX + uniqueId); //$NON-NLS-1$
+ return new QualifiedName(ID, "CVS" + UNIQUE_ID_PREFIX + uniqueId); //$NON-NLS-1$
}
public CVSMergeSubscriber(QualifiedName id, IResource[] roots, CVSTag start, CVSTag end) {
diff --git a/bundles/org.eclipse.team.cvs.ui/plugin.properties b/bundles/org.eclipse.team.cvs.ui/plugin.properties
index 5c2777bc2..eb95820d9 100644
--- a/bundles/org.eclipse.team.cvs.ui/plugin.properties
+++ b/bundles/org.eclipse.team.cvs.ui/plugin.properties
@@ -191,7 +191,7 @@ CVSWorkspaceSubscriber.confirmMerged.tooltip=Mark the conflict as merged by upgr
CVSWorkspaceSubscriber.merge.label=&Update
CVSWorkspaceSubscriber.merge.tooltip=Perform an update merge on the visible resources
-CVSCompareSubscriber.revert.label=Re&vert Local to Remote
+CVSCompareSubscriber.revert.label=&Override and Update
CVSCompareSubscriber.revert.tooltip=Revert the local file contents to match that of their corresponding remotes
WorkInProgress.name=Work In Progress
diff --git a/bundles/org.eclipse.team.cvs.ui/plugin.xml b/bundles/org.eclipse.team.cvs.ui/plugin.xml
index fb55d1d9f..413ef0aa4 100644
--- a/bundles/org.eclipse.team.cvs.ui/plugin.xml
+++ b/bundles/org.eclipse.team.cvs.ui/plugin.xml
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>
<plugin
- id="org.eclipse.team.cvs.ui"
- name="%pluginName"
- version="3.0.0"
- provider-name="%providerName"
- class="org.eclipse.team.internal.ccvs.ui.CVSUIPlugin">
+ id="org.eclipse.team.cvs.ui"
+ name="%pluginName"
+ version="3.0.0"
+ provider-name="%providerName"
+ class="org.eclipse.team.internal.ccvs.ui.CVSUIPlugin">
<runtime>
<library name="teamcvsui.jar">
@@ -14,7 +14,7 @@
</library>
</runtime>
<requires>
- <import plugin="org.eclipse.core.runtime.compatibility"/>
+ <import plugin="org.eclipse.core.runtime.compatibility"/>
<import plugin="org.eclipse.ui.ide" optional="true"/>
<import plugin="org.eclipse.ui.views" optional="true"/>
<import plugin="org.eclipse.jface.text" optional="true"/>
@@ -30,32 +30,32 @@
<import plugin="org.eclipse.compare"/>
</requires>
+
<!-- *************** Synchronize View Participant **************** -->
-<extension
+ <extension
point="org.eclipse.team.ui.synchronizeParticipants">
<participant
name="%CVSWorkspaceParticipant"
+ type="static"
icon="icons/full/cview16/cvs_persp.gif"
class="org.eclipse.team.internal.ccvs.ui.subscriber.WorkspaceSynchronizeParticipant"
- type="static"
id="org.eclipse.team.cvs.ui.cvsworkspace-participant">
</participant>
<participant
name="%CVSMergeParticipant"
+ type="dynamic"
icon="icons/full/clcl16/newstream_wiz.gif"
class="org.eclipse.team.internal.ccvs.ui.subscriber.MergeSynchronizeParticipant"
- type="dynamic"
id="org.eclipse.team.cvs.ui.cvsmerge-participant">
</participant>
<participant
name="%CVSCompareParticipant"
+ type="dynamic"
icon="icons/full/cview16/compare_view.gif"
class="org.eclipse.team.internal.ccvs.ui.subscriber.CompareParticipant"
- type="dynamic"
id="org.eclipse.team.cvs.ui.compare-participant">
</participant>
-</extension>
-
+ </extension>
<!-- *************** Authenticator **************** -->
<extension
point="org.eclipse.team.cvs.core.authenticator">
@@ -88,8 +88,8 @@
<extension
point="org.eclipse.ui.propertyPages">
<page
- objectClass="org.eclipse.core.resources.IFile"
adaptable="true"
+ objectClass="org.eclipse.core.resources.IFile"
name="%CVS"
class="org.eclipse.team.internal.ccvs.ui.CVSFilePropertiesPage"
id="org.eclipse.team.ccvs.ui.propertyPages.CVSFilePropertiesPage">
@@ -99,8 +99,8 @@
</filter>
</page>
<page
- objectClass="org.eclipse.core.resources.IFolder"
adaptable="true"
+ objectClass="org.eclipse.core.resources.IFolder"
name="%CVS"
class="org.eclipse.team.internal.ccvs.ui.CVSFolderPropertiesPage"
id="org.eclipse.team.ccvs.ui.propertyPages.CVSFolderPropertiesPage">
@@ -110,8 +110,8 @@
</filter>
</page>
<page
- objectClass="org.eclipse.core.resources.IProject"
adaptable="true"
+ objectClass="org.eclipse.core.resources.IProject"
name="%CVS"
class="org.eclipse.team.internal.ccvs.ui.CVSProjectPropertiesPage"
id="org.eclipse.team.ccvs.ui.propertyPages.CVSProjectPropertiesPage">
@@ -127,29 +127,27 @@
id="org.eclipse.team.ccvs.ui.propertyPages.CVSRepositoryPropertiesPage">
</page>
</extension>
-
-<!-- ******************* Action Definitions ******************** -->
-
- <extension point="org.eclipse.ui.commands">
+<!-- ******************* Action Definitions ******************** -->
+ <extension
+ point="org.eclipse.ui.commands">
<category
name="%CVSActionSet.categoryName"
description="%CVSActionSet.description"
id="org.eclipse.team.cvs.ui.actionSet">
</category>
<command
- category="org.eclipse.team.cvs.ui.actionSet"
name="%CVSActionSet.newLabel"
description="%CVSActionSet.newTooltip"
+ category="org.eclipse.team.cvs.ui.actionSet"
id="org.eclipse.team.cvs.ui.new.location">
</command>
</extension>
-
<!-- ******************* Menus ******************** -->
<extension
point="org.eclipse.ui.popupMenus">
<objectContribution
- objectClass="org.eclipse.core.resources.IFile"
adaptable="true"
+ objectClass="org.eclipse.core.resources.IFile"
id="org.eclipse.team.ccvs.ui.IFileContributions">
<filter
name="projectPersistentProperty"
@@ -157,74 +155,74 @@
</filter>
<action
label="%IgnoreAction.label"
- tooltip="%IgnoreAction.tooltip"
+ helpContextId="org.eclipse.team.cvs.ui.team_ignore_action_context"
class="org.eclipse.team.internal.ccvs.ui.actions.IgnoreAction"
+ tooltip="%IgnoreAction.tooltip"
menubarPath="team.main/group3"
- helpContextId="org.eclipse.team.cvs.ui.team_ignore_action_context"
id="org.eclipse.team.ccvs.ui.ignore">
</action>
<action
label="%AddAction.label"
- tooltip="%AddAction.tooltip"
+ helpContextId="org.eclipse.team.cvs.ui.team_add_action_context"
class="org.eclipse.team.internal.ccvs.ui.actions.AddAction"
+ tooltip="%AddAction.tooltip"
menubarPath="team.main/group3"
- helpContextId="org.eclipse.team.cvs.ui.team_add_action_context"
id="org.eclipse.team.ccvs.ui.add">
</action>
<action
label="%ShowHistoryAction.label"
- tooltip="%ShowHistoryAction.tooltip"
icon="icons/full/ctool16/history.gif"
+ helpContextId="org.eclipse.team.cvs.ui.show_in_history_action_context"
class="org.eclipse.team.internal.ccvs.ui.actions.ShowResourceInHistoryAction"
+ tooltip="%ShowHistoryAction.tooltip"
menubarPath="team.main/group2"
- helpContextId="org.eclipse.team.cvs.ui.show_in_history_action_context"
id="org.eclipse.team.ccvs.ui.showHistory">
</action>
<action
label="%ShowAnnotationAction.label"
- tooltip="%ShowAnnotationAction.tooltip"
- icon="icons/full/ctool16/annotate.gif"
+ icon="icons/full/ctool16/annotate.gif"
+ helpContextId="org.eclipse.team.cvs.ui.get_annotate_action_context"
class="org.eclipse.team.internal.ccvs.ui.actions.ShowAnnotationAction"
+ tooltip="%ShowAnnotationAction.tooltip"
menubarPath="team.main/group2"
- helpContextId="org.eclipse.team.cvs.ui.get_annotate_action_context"
id="org.eclipse.team.ccvs.ui.showAnnotation">
</action>
<action
label="%CompareWithRevisionAction.label"
- tooltip="%CompareWithRevisionAction.tooltip"
+ helpContextId="org.eclipse.team.cvs.ui.compare_with_revision_action_context"
class="org.eclipse.team.internal.ccvs.ui.actions.CompareWithRevisionAction"
+ tooltip="%CompareWithRevisionAction.tooltip"
menubarPath="compareWithMenu/compareWithGroup"
- helpContextId="org.eclipse.team.cvs.ui.compare_with_revision_action_context"
id="org.eclipse.team.ccvs.ui.compareWithRevision">
</action>
<action
label="%ReplaceWithRevisionAction.label"
+ helpContextId="org.eclipse.team.cvs.ui.replace_with_revision_action_context"
+ class="org.eclipse.team.internal.ccvs.ui.actions.ReplaceWithRevisionAction"
tooltip="%ReplaceWithRevisionAction.tooltip"
- class="org.eclipse.team.internal.ccvs.ui.actions.CompareWithRevisionAction"
menubarPath="replaceWithMenu/replaceWithGroup"
- helpContextId="org.eclipse.team.cvs.ui.replace_with_revision_action_context"
id="org.eclipse.team.ccvs.ui.replaceWithRevision">
</action>
<action
label="%EditAction.label"
- tooltip="%EditAction.tooltip"
+ helpContextId="org.eclipse.team.cvs.ui.team_edit_action_context"
class="org.eclipse.team.internal.ccvs.ui.actions.EditAction"
+ tooltip="%EditAction.tooltip"
menubarPath="team.main/group4"
- helpContextId="org.eclipse.team.cvs.ui.team_edit_action_context"
id="org.eclipse.team.ccvs.ui.edit">
</action>
<action
label="%UneditAction.label"
- tooltip="%UneditAction.tooltip"
+ helpContextId="org.eclipse.team.cvs.ui.team_unedit_action_context"
class="org.eclipse.team.internal.ccvs.ui.actions.UneditAction"
+ tooltip="%UneditAction.tooltip"
menubarPath="team.main/group4"
- helpContextId="org.eclipse.team.cvs.ui.team_unedit_action_context"
id="org.eclipse.team.ccvs.ui.unedit">
</action>
</objectContribution>
<objectContribution
- objectClass="org.eclipse.core.resources.IResource"
adaptable="true"
+ objectClass="org.eclipse.core.resources.IResource"
id="org.eclipse.team.ccvs.ui.ResourceContributions">
<filter
name="projectPersistentProperty"
@@ -232,97 +230,96 @@
</filter>
<action
label="%SetKeywordSubstitutionAction.label"
- tooltip="%SetKeywordSubstitutionAction.tooltip"
+ helpContextId="org.eclipse.team.cvs.ui.team_set_keyword_mode_action_context"
class="org.eclipse.team.internal.ccvs.ui.actions.SetKeywordSubstitutionAction"
+ tooltip="%SetKeywordSubstitutionAction.tooltip"
menubarPath="team.main/group3"
- helpContextId="org.eclipse.team.cvs.ui.team_set_keyword_mode_action_context"
id="org.eclipse.team.ccvs.ui.setKeywordSubstitution">
</action>
<action
label="%MergeAction.label"
- tooltip="%MergeAction.tooltip"
+ helpContextId="org.eclipse.team.cvs.ui.team_merge_action_context"
class="org.eclipse.team.internal.ccvs.ui.actions.MergeAction"
+ tooltip="%MergeAction.tooltip"
menubarPath="team.main/group2"
- helpContextId="org.eclipse.team.cvs.ui.team_merge_action_context"
id="org.eclipse.team.ccvs.ui.merge">
</action>
<action
label="%BranchAction.label"
- tooltip="%BranchAction.tooltip"
+ helpContextId="org.eclipse.team.cvs.ui.team_branch_action_context"
class="org.eclipse.team.internal.ccvs.ui.actions.BranchAction"
+ tooltip="%BranchAction.tooltip"
menubarPath="team.main/group2"
- helpContextId="org.eclipse.team.cvs.ui.team_branch_action_context"
id="org.eclipse.team.ccvs.ui.branch">
</action>
<action
label="%TagAction.label"
- tooltip="%TagAction.tooltip"
+ helpContextId="org.eclipse.team.cvs.ui.team_tag_as_version_action_context"
class="org.eclipse.team.internal.ccvs.ui.actions.TagLocalAction"
+ tooltip="%TagAction.tooltip"
menubarPath="team.main/group2"
- helpContextId="org.eclipse.team.cvs.ui.team_tag_as_version_action_context"
id="org.eclipse.team.ccvs.ui.tag">
</action>
- <action
+ <action
label="%CompareWithTagAction.label"
- tooltip="%CompareWithTagAction.tooltip"
+ helpContextId="org.eclipse.team.cvs.ui.compare_with_tag_action_context"
class="org.eclipse.team.internal.ccvs.ui.actions.CompareWithTagAction"
+ tooltip="%CompareWithTagAction.tooltip"
menubarPath="compareWithMenu/compareWithGroup"
- helpContextId="org.eclipse.team.cvs.ui.compare_with_tag_action_context"
id="org.eclipse.team.ccvs.ui.compareWithTag">
</action>
<action
label="%ReplaceWithTagAction.label"
- tooltip="%ReplaceWithTagAction.tooltip"
+ helpContextId="org.eclipse.team.cvs.ui.replace_with_tag_action_context"
class="org.eclipse.team.internal.ccvs.ui.actions.ReplaceWithTagAction"
+ tooltip="%ReplaceWithTagAction.tooltip"
menubarPath="replaceWithMenu/replaceWithGroup"
- helpContextId="org.eclipse.team.cvs.ui.replace_with_tag_action_context"
id="org.eclipse.team.ccvs.ui.replaceWithTag">
</action>
<action
label="%ReplaceWithAction.label"
- tooltip="%ReplaceWithAction.tooltip"
+ helpContextId="org.eclipse.team.cvs.ui.replace_with_latest_action_context"
class="org.eclipse.team.internal.ccvs.ui.actions.ReplaceWithRemoteAction"
+ tooltip="%ReplaceWithAction.tooltip"
menubarPath="replaceWithMenu/replaceWithGroup"
- helpContextId="org.eclipse.team.cvs.ui.replace_with_latest_action_context"
id="org.eclipse.team.ccvs.ui.replace">
</action>
<action
label="%GenerateDiff.label"
- tooltip="%GenerateDiff.tooltip"
+ helpContextId="org.eclipse.team.cvs.ui.team_create__action_context"
class="org.eclipse.team.internal.ccvs.ui.actions.GenerateDiffFileAction"
+ tooltip="%GenerateDiff.tooltip"
menubarPath="team.main/group1"
- helpContextId="org.eclipse.team.cvs.ui.team_create__action_context"
id="org.eclipse.team.ccvs.ui.GenerateDiff">
</action>
<action
label="%UpdateAction.label"
- tooltip="%UpdateAction.tooltip"
+ helpContextId="org.eclipse.team.cvs.ui.team_update_action_context"
class="org.eclipse.team.internal.ccvs.ui.actions.UpdateAction"
+ tooltip="%UpdateAction.tooltip"
menubarPath="team.main/group1"
- helpContextId="org.eclipse.team.cvs.ui.team_update_action_context"
id="org.eclipse.team.ccvs.ui.update">
</action>
<action
label="%CommitAction.label"
- tooltip="%CommitAction.tooltip"
+ helpContextId="org.eclipse.team.cvs.ui.team_commit_action_context"
class="org.eclipse.team.internal.ccvs.ui.actions.CommitAction"
+ tooltip="%CommitAction.tooltip"
menubarPath="team.main/group1"
- helpContextId="org.eclipse.team.cvs.ui.team_commit_action_context"
id="org.eclipse.team.ccvs.ui.commit">
</action>
<action
label="%Synchronize.label"
- tooltip="%Synchronize.tooltip"
+ helpContextId="org.eclipse.team.cvs.ui.team_synchronize_action_context"
class="org.eclipse.team.internal.ccvs.ui.actions.SyncAction"
+ tooltip="%Synchronize.tooltip"
menubarPath="team.main/group1"
- helpContextId="org.eclipse.team.cvs.ui.team_synchronize_action_context"
id="org.eclipse.team.ccvs.ui.sync">
</action>
</objectContribution>
-
<objectContribution
- objectClass="org.eclipse.core.resources.IResource"
adaptable="true"
+ objectClass="org.eclipse.core.resources.IResource"
id="org.eclipse.team.ccvs.ui.ResourceContributions">
<filter
name="projectPersistentProperty"
@@ -330,21 +327,17 @@
</filter>
<action
label="%ShowEditorsAction.label"
- tooltip="%ShowEditorsAction.tooltip"
+ helpContextId="org.eclipse.team.cvs.ui.team_show_editors_action_context"
class="org.eclipse.team.internal.ccvs.ui.actions.ShowEditorsAction"
+ tooltip="%ShowEditorsAction.tooltip"
menubarPath="team.main/group4"
- helpContextId="org.eclipse.team.cvs.ui.team_show_editors_action_context"
id="org.eclipse.team.ccvs.ui.showeditors">
</action>
</objectContribution>
-
-
- <!-- ************** Project Menu *************** -->
-
-
+<!-- ************** Project Menu *************** -->
<objectContribution
- objectClass="org.eclipse.core.resources.IProject"
adaptable="true"
+ objectClass="org.eclipse.core.resources.IProject"
id="org.eclipse.team.ccvs.ui.IProjectContributions">
<filter
name="projectPersistentProperty"
@@ -352,16 +345,16 @@
</filter>
<action
label="%UnmanageFolder.label"
- tooltip="%UnmanageFolder.tooltip"
+ helpContextId="org.eclipse.team.cvs.ui.team_disconnect_action_context"
class="org.eclipse.team.internal.ccvs.ui.actions.UnmanageAction"
+ tooltip="%UnmanageFolder.tooltip"
menubarPath="team.main/projectGroup"
- helpContextId="org.eclipse.team.cvs.ui.team_disconnect_action_context"
id="org.eclipse.team.ccvs.ui.unmanage">
</action>
</objectContribution>
<objectContribution
- objectClass="org.eclipse.core.resources.IContainer"
adaptable="true"
+ objectClass="org.eclipse.core.resources.IContainer"
id="org.eclipse.team.ccvs.ui.IContainerContributions">
<filter
name="projectPersistentProperty"
@@ -369,16 +362,16 @@
</filter>
<action
label="%RestoreFromRepositoryAction.label"
- tooltip="%RestoreFromRepositoryAction.tooltip"
+ helpContextId="org.eclipse.team.cvs.ui.team_restore_from_repository_action_context"
class="org.eclipse.team.internal.ccvs.ui.actions.RestoreFromRepositoryAction"
+ tooltip="%RestoreFromRepositoryAction.tooltip"
menubarPath="team.main/group4"
- helpContextId="org.eclipse.team.cvs.ui.team_restore_from_repository_action_context"
id="org.eclipse.team.ccvs.ui.restoreFromRepository">
</action>
</objectContribution>
<objectContribution
- objectClass="org.eclipse.core.resources.IFolder"
adaptable="true"
+ objectClass="org.eclipse.core.resources.IFolder"
id="org.eclipse.team.ccvs.ui.IFolderContributions">
<filter
name="projectPersistentProperty"
@@ -386,18 +379,18 @@
</filter>
<action
label="%IgnoreAction.label"
- tooltip="%IgnoreAction.tooltip"
+ helpContextId="org.eclipse.team.cvs.ui.team_ignore_action_context"
class="org.eclipse.team.internal.ccvs.ui.actions.IgnoreAction"
+ tooltip="%IgnoreAction.tooltip"
menubarPath="team.main/group3"
- helpContextId="org.eclipse.team.cvs.ui.team_ignore_action_context"
id="org.eclipse.team.ccvs.ui.ignore">
</action>
<action
label="%AddAction.label"
- tooltip="%AddAction.tooltip"
+ helpContextId="org.eclipse.team.cvs.ui.team_add_action_context"
class="org.eclipse.team.internal.ccvs.ui.actions.AddAction"
+ tooltip="%AddAction.tooltip"
menubarPath="team.main/group3"
- helpContextId="org.eclipse.team.cvs.ui.team_add_action_context"
id="org.eclipse.team.ccvs.ui.add">
</action>
</objectContribution>
@@ -406,61 +399,63 @@
id="org.eclipse.team.ccvs.ui.RemoteFolderContributions">
<action
label="%CheckoutAsAction.label"
+ helpContextId="org.eclipse.team.cvs.ui.checkout_as_action_context"
+ class="org.eclipse.team.internal.ccvs.ui.actions.CheckoutAsAction"
tooltip="%CheckoutAsAction.tooltip"
menubarPath="checkoutGroup"
- class="org.eclipse.team.internal.ccvs.ui.actions.CheckoutAsAction"
- helpContextId="org.eclipse.team.cvs.ui.checkout_as_action_context"
id="org.eclipse.team.ccvs.ui.checkoutAs">
</action>
<action
label="%CheckoutAction.label"
+ helpContextId="org.eclipse.team.cvs.ui.checkout_as_project_action_context"
+ class="org.eclipse.team.internal.ccvs.ui.actions.CheckoutAction"
tooltip="%CheckoutAction.tooltip"
menubarPath="checkoutGroup"
- class="org.eclipse.team.internal.ccvs.ui.actions.CheckoutAction"
- helpContextId="org.eclipse.team.cvs.ui.checkout_as_project_action_context"
id="org.eclipse.team.ccvs.ui.checkout">
</action>
- <action
- id="org.eclipse.team.ccvs.ui.configureTagsOnRemoteFolder"
- label="%ConfigureTags.label"
- menubarPath="miscGroup"
- tooltip="%ConfigureTags.tooltip"
- icon="icons/full/clcl16/newstream_wiz.gif"
- helpContextId="org.eclipse.team.cvs.ui.tag_configuration_overview"
- class="org.eclipse.team.internal.ccvs.ui.actions.ConfigureTagsFromRepoViewOnFolder"/>
- <action
- id="org.eclipse.team.ccvs.ui.addToBranch"
- label="%AddToBranch.label"
- menubarPath="miscGroup"
- tooltip="%ddToBranch.tooltip"
- icon="icons/full/clcl16/newstream_wiz.gif"
- helpContextId="org.eclipse.team.cvs.ui.add_to_branch_context"
- class="org.eclipse.team.internal.ccvs.ui.repo.AddToBranchAction"/>
+ <action
+ label="%ConfigureTags.label"
+ icon="icons/full/clcl16/newstream_wiz.gif"
+ helpContextId="org.eclipse.team.cvs.ui.tag_configuration_overview"
+ class="org.eclipse.team.internal.ccvs.ui.actions.ConfigureTagsFromRepoViewOnFolder"
+ tooltip="%ConfigureTags.tooltip"
+ menubarPath="miscGroup"
+ id="org.eclipse.team.ccvs.ui.configureTagsOnRemoteFolder">
+ </action>
+ <action
+ label="%AddToBranch.label"
+ icon="icons/full/clcl16/newstream_wiz.gif"
+ helpContextId="org.eclipse.team.cvs.ui.add_to_branch_context"
+ class="org.eclipse.team.internal.ccvs.ui.repo.AddToBranchAction"
+ tooltip="%ddToBranch.tooltip"
+ menubarPath="miscGroup"
+ id="org.eclipse.team.ccvs.ui.addToBranch">
+ </action>
</objectContribution>
<objectContribution
objectClass="org.eclipse.team.internal.ccvs.core.ICVSRemoteFile"
id="org.eclipse.team.ccvs.ui.RemoteFileContributions">
<action
label="%OpenRemoteFileAction.label"
- tooltip="%OpenRemoteFileAction.tooltip"
- class="org.eclipse.team.internal.ccvs.ui.actions.OpenRemoteFileAction"
helpContextId="org.eclipse.team.cvs.ui.open_remote_file_action_context"
+ class="org.eclipse.team.internal.ccvs.ui.actions.OpenRemoteFileAction"
+ tooltip="%OpenRemoteFileAction.tooltip"
id="org.eclipse.team.ccvs.ui.openRemoteFile">
</action>
<action
label="%ShowHistoryAction.label"
- tooltip="%ShowHistoryAction.tooltip"
icon="icons/full/ctool16/history.gif"
- class="org.eclipse.team.internal.ccvs.ui.actions.ShowHistoryAction"
helpContextId="org.eclipse.team.cvs.ui.show_in_history_action_context"
+ class="org.eclipse.team.internal.ccvs.ui.actions.ShowHistoryAction"
+ tooltip="%ShowHistoryAction.tooltip"
id="org.eclipse.team.ccvs.ui.showHistory">
</action>
<action
label="%ShowAnnotationAction.label"
- tooltip="%ShowAnnotationAction.tooltip"
icon="icons/full/ctool16/annotate.gif"
- class="org.eclipse.team.internal.ccvs.ui.actions.ShowAnnotationAction"
helpContextId="org.eclipse.team.cvs.ui.get_annotate_action_context"
+ class="org.eclipse.team.internal.ccvs.ui.actions.ShowAnnotationAction"
+ tooltip="%ShowAnnotationAction.tooltip"
id="org.eclipse.team.ccvs.ui.showAnnotation">
</action>
</objectContribution>
@@ -469,71 +464,72 @@
id="org.eclipse.team.ccvs.ui.LogEntryContributions">
<action
label="%OpenLogEntryAction.label"
- tooltip="%OpenLogEntryAction.tooltip"
- class="org.eclipse.team.internal.ccvs.ui.actions.OpenLogEntryAction"
helpContextId="org.eclipse.team.cvs.ui.open_remote_file_action_context"
+ class="org.eclipse.team.internal.ccvs.ui.actions.OpenLogEntryAction"
+ tooltip="%OpenLogEntryAction.tooltip"
id="org.eclipse.team.ccvs.ui.openLogEntry">
</action>
<action
label="%CompareRemoteResourcesAction.label"
- tooltip="%CompareRemoteResourcesAction.tooltip"
+ helpContextId="org.eclipse.team.cvs.ui.compare_remote_resources_action_context"
class="org.eclipse.team.internal.ccvs.ui.actions.CompareRemoteResourcesAction"
+ tooltip="%CompareRemoteResourcesAction.tooltip"
enablesFor="2"
- helpContextId="org.eclipse.team.cvs.ui.compare_remote_resources_action_context"
id="org.eclipse.team.ccvs.ui.compareLogEntries">
</action>
<action
label="%ShowAnnotationAction.label"
- tooltip="%ShowAnnotationAction.tooltip"
icon="icons/full/ctool16/annotate.gif"
- class="org.eclipse.team.internal.ccvs.ui.actions.ShowAnnotationAction"
helpContextId="org.eclipse.team.cvs.ui.get_annotate_action_context"
+ class="org.eclipse.team.internal.ccvs.ui.actions.ShowAnnotationAction"
+ tooltip="%ShowAnnotationAction.tooltip"
id="org.eclipse.team.ccvs.ui.showAnnotation">
</action>
</objectContribution>
<objectContribution
objectClass="org.eclipse.team.internal.ccvs.ui.model.RemoteModule"
id="org.eclipse.team.ccvs.ui.VersionCategoryContributions">
- <action
- id="org.eclipse.team.ccvs.ui.configureTagsOnRemoteModule"
- label="%ConfigureTags.label"
- tooltip="%ConfigureTags.label"
- icon="icons/full/clcl16/newstream_wiz.gif"
- helpContextId="org.eclipse.team.cvs.ui.tag_configuration_overview"
- class="org.eclipse.team.internal.ccvs.ui.actions.ConfigureTagsFromRepoViewOnFolder"/>
+ <action
+ label="%ConfigureTags.label"
+ icon="icons/full/clcl16/newstream_wiz.gif"
+ helpContextId="org.eclipse.team.cvs.ui.tag_configuration_overview"
+ class="org.eclipse.team.internal.ccvs.ui.actions.ConfigureTagsFromRepoViewOnFolder"
+ tooltip="%ConfigureTags.label"
+ id="org.eclipse.team.ccvs.ui.configureTagsOnRemoteModule">
+ </action>
</objectContribution>
<objectContribution
objectClass="org.eclipse.team.internal.ccvs.ui.model.ProjectVersion"
id="org.eclipse.team.ccvs.ui.ProjectVersionContributions">
- <action
- id="org.eclipse.team.ccvs.ui.configureTagsOnProjectVersion"
- label="%ConfigureTags.label"
- tooltip="%ConfigureTags.label"
- icon="icons/full/clcl16/newstream_wiz.gif"
- helpContextId="org.eclipse.team.cvs.ui.tag_configuration_overview"
- class="org.eclipse.team.internal.ccvs.ui.actions.ConfigureTagsFromRepoView"/>
+ <action
+ label="%ConfigureTags.label"
+ icon="icons/full/clcl16/newstream_wiz.gif"
+ helpContextId="org.eclipse.team.cvs.ui.tag_configuration_overview"
+ class="org.eclipse.team.internal.ccvs.ui.actions.ConfigureTagsFromRepoView"
+ tooltip="%ConfigureTags.label"
+ id="org.eclipse.team.ccvs.ui.configureTagsOnProjectVersion">
+ </action>
</objectContribution>
-
<objectContribution
objectClass="org.eclipse.team.internal.ccvs.ui.repo.RepositoryRoot"
id="org.eclipse.team.ccvs.ui.RemoteRootContributions">
<action
label="%CopyRepositoryNameAction.label"
+ helpContextId="org.eclipse.team.cvs.ui.copy_repository_name_action_context"
+ class="org.eclipse.team.internal.ccvs.ui.repo.CopyRepositoryNameAction"
tooltip="%CopyRepositoryNameAction.tooltip"
menubarPath="miscGroup"
- class="org.eclipse.team.internal.ccvs.ui.repo.CopyRepositoryNameAction"
- helpContextId="org.eclipse.team.cvs.ui.copy_repository_name_action_context"
id="org.eclipse.team.ccvs.ui.copyNames">
</action>
<action
label="%RefreshTagsAction.label"
icon="icons/full/clcl16/newstream_wiz.gif"
+ helpContextId="org.eclipse.team.cvs.ui.refresh_tags_action_context"
+ class="org.eclipse.team.internal.ccvs.ui.repo.RefreshTagsAction"
tooltip="%RefreshTagsAction.tooltip"
menubarPath="tagGroup"
- class="org.eclipse.team.internal.ccvs.ui.repo.RefreshTagsAction"
- helpContextId="org.eclipse.team.cvs.ui.refresh_tags_action_context"
id="org.eclipse.team.ccvs.ui.refreshTags">
- </action>
+ </action>
</objectContribution>
<objectContribution
objectClass="org.eclipse.team.internal.ccvs.ui.model.BranchCategory"
@@ -541,218 +537,246 @@
<action
label="%RefreshTagsAction.label"
icon="icons/full/clcl16/newstream_wiz.gif"
+ helpContextId="org.eclipse.team.cvs.ui.refresh_tags_action_context"
+ class="org.eclipse.team.internal.ccvs.ui.repo.RefreshTagsAction"
tooltip="%RefreshTagsAction.tooltip"
menubarPath="tagGroup"
- class="org.eclipse.team.internal.ccvs.ui.repo.RefreshTagsAction"
- helpContextId="org.eclipse.team.cvs.ui.refresh_tags_action_context"
id="org.eclipse.team.ccvs.ui.refreshTags">
- </action>
+ </action>
</objectContribution>
<objectContribution
objectClass="org.eclipse.team.internal.ccvs.core.ICVSRemoteResource"
id="org.eclipse.team.ccvs.ui.RemoteResourceContributions">
<action
label="%CompareRemoteResourcesAction.label"
- menubarPath="miscGroup"
- tooltip="%CompareRemoteResourcesAction.tooltip"
+ helpContextId="org.eclipse.team.cvs.ui.compare_remote_resources_action_context"
class="org.eclipse.team.internal.ccvs.ui.actions.CompareRemoteResourcesAction"
+ tooltip="%CompareRemoteResourcesAction.tooltip"
+ menubarPath="miscGroup"
enablesFor="2"
- helpContextId="org.eclipse.team.cvs.ui.compare_remote_resources_action_context"
id="org.eclipse.team.ccvs.ui.compareRemoteResources">
</action>
<action
label="%CompareRemoteWithTagAction.label"
- menubarPath="miscGroup"
- tooltip="%CompareRemoteWithTagAction.tooltip"
- class="org.eclipse.team.internal.ccvs.ui.actions.CompareRemoteWithTagAction"
helpContextId="org.eclipse.team.cvs.ui.compare_remote_with_tag_action_context"
+ class="org.eclipse.team.internal.ccvs.ui.actions.CompareRemoteWithTagAction"
+ tooltip="%CompareRemoteWithTagAction.tooltip"
+ menubarPath="miscGroup"
id="org.eclipse.team.ccvs.ui.compareRemoteWithTag">
</action>
<action
label="%MoveTagAction.label"
- menubarPath="tagGroup"
- tooltip="%MoveTagAction.tooltip"
- class="org.eclipse.team.internal.ccvs.ui.actions.MoveRemoteTagAction"
helpContextId="org.eclipse.team.cvs.ui.move_remote_tag_action_context"
+ class="org.eclipse.team.internal.ccvs.ui.actions.MoveRemoteTagAction"
+ tooltip="%MoveTagAction.tooltip"
+ menubarPath="tagGroup"
id="org.eclipse.team.ccvs.ui.moveTagInRepository">
</action>
<action
label="%TagInRepositoryAction.label"
- menubarPath="tagGroup"
- tooltip="%TagInRepositoryAction.tooltip"
- class="org.eclipse.team.internal.ccvs.ui.actions.TagInRepositoryAction"
helpContextId="org.eclipse.team.cvs.ui.tag_remote_action_context"
+ class="org.eclipse.team.internal.ccvs.ui.actions.TagInRepositoryAction"
+ tooltip="%TagInRepositoryAction.tooltip"
+ menubarPath="tagGroup"
id="org.eclipse.team.ccvs.ui.tagInRepository">
</action>
</objectContribution>
</extension>
-
<!-- ************* Subscriber Menus ************ -->
-
- <extension
- point="org.eclipse.ui.popupMenus">
- <viewerContribution
- id="org.eclipse.team.ccvs.ui.CVSWorkspaceSubscriberContributions"
- targetID="org.eclipse.team.cvs.ui.cvsworkspace-participant">
- <action
- label="%CVSWorkspaceSubscriber.commit.label"
- menubarPath="SubscriberActionsGroup1"
- tooltip="%CVSWorkspaceSubscriber.commit.tooltip"
- class="org.eclipse.team.internal.ccvs.ui.subscriber.SubscriberCommitAction"
- overrideActionId="org.eclipse.team.ccvs.ui.commit"
- helpContextId="org.eclipse.team.cvs.ui.workspace_subscriber_commit_action"
- id="org.eclipse.team.ccvs.ui.CVSWorkspaceSubscriber.commit">
- </action>
- <action
- label="%CVSWorkspaceSubscriber.update.label"
- menubarPath="SubscriberActionsGroup1"
- tooltip="%CVSWorkspaceSubscriber.update.tooltip"
- class="org.eclipse.team.internal.ccvs.ui.subscriber.WorkspaceUpdateAction"
- overrideActionId="org.eclipse.team.ccvs.ui.update"
- helpContextId="org.eclipse.team.cvs.ui.workspace_subscriber_update_action"
- id="org.eclipse.team.ccvs.ui.CVSWorkspaceSubscriber.update">
- </action>
- <action
+ <extension
+ point="org.eclipse.ui.popupMenus">
+ <viewerContribution
+ targetID="org.eclipse.team.cvs.ui.cvsworkspace-participant"
+ id="org.eclipse.team.ccvs.ui.CVSWorkspaceSubscriberContributions">
+ <action
+ label="%CVSWorkspaceSubscriber.commit.label"
+ helpContextId="org.eclipse.team.cvs.ui.workspace_subscriber_commit_action"
+ overrideActionId="org.eclipse.team.ccvs.ui.commit"
+ class="org.eclipse.team.internal.ccvs.ui.subscriber.SubscriberCommitAction"
+ tooltip="%CVSWorkspaceSubscriber.commit.tooltip"
+ menubarPath="SubscriberActionsGroup1"
+ id="org.eclipse.team.ccvs.ui.CVSWorkspaceSubscriber.commit">
+ </action>
+ <action
+ label="%CVSWorkspaceSubscriber.update.label"
+ helpContextId="org.eclipse.team.cvs.ui.workspace_subscriber_update_action"
+ overrideActionId="org.eclipse.team.ccvs.ui.update"
+ class="org.eclipse.team.internal.ccvs.ui.subscriber.WorkspaceUpdateAction"
+ tooltip="%CVSWorkspaceSubscriber.update.tooltip"
+ menubarPath="SubscriberActionsGroup1"
+ id="org.eclipse.team.ccvs.ui.CVSWorkspaceSubscriber.update">
+ </action>
+ <action
label="%CVSWorkspaceSubscriber.confirmMerged.label"
- menubarPath="SubscriberActionsGroup2"
- tooltip="%CVSWorkspaceSubscriber.confirmMerged.tooltip"
- class="org.eclipse.team.internal.ccvs.ui.subscriber.SubscriberConfirmMergedAction"
helpContextId="org.eclipse.team.cvs.ui.workspace_subscriber_confirm_merged_action"
+ class="org.eclipse.team.internal.ccvs.ui.subscriber.SubscriberConfirmMergedAction"
+ tooltip="%CVSWorkspaceSubscriber.confirmMerged.tooltip"
+ menubarPath="SubscriberActionsGroup2"
id="org.eclipse.team.ccvs.ui.CVSWorkspaceSubscriber.confirmMerged">
- </action>
- <action
- label="%CVSWorkspaceSubscriber.overcommit.label"
- menubarPath="SubscriberActionsGroup2"
- tooltip="%CVSWorkspaceSubscriber.overcommit.tooltip"
- class="org.eclipse.team.internal.ccvs.ui.subscriber.OverrideAndCommitAction"
- helpContextId="org.eclipse.team.cvs.ui.workspace_subscriber_overcommit_action"
- id="org.eclipse.team.ccvs.ui.CVSWorkspaceSubscriber.overcommit">
- </action>
- <action
- label="%CVSWorkspaceSubscriber.overupdate.label"
- menubarPath="SubscriberActionsGroup2"
- tooltip="%CVSWorkspaceSubscriber.overupdate.tooltip"
- class="org.eclipse.team.internal.ccvs.ui.subscriber.OverrideAndUpdateAction"
- helpContextId="org.eclipse.team.cvs.ui.workspace_subscriber_overupdate_action"
- id="org.eclipse.team.ccvs.ui.CVSWorkspaceSubscriber.overupdate">
- </action>
+ </action>
+ <action
+ label="%CVSWorkspaceSubscriber.overcommit.label"
+ helpContextId="org.eclipse.team.cvs.ui.workspace_subscriber_overcommit_action"
+ class="org.eclipse.team.internal.ccvs.ui.subscriber.OverrideAndCommitAction"
+ tooltip="%CVSWorkspaceSubscriber.overcommit.tooltip"
+ menubarPath="SubscriberActionsGroup2"
+ id="org.eclipse.team.ccvs.ui.CVSWorkspaceSubscriber.overcommit">
+ </action>
+ <action
+ label="%CVSWorkspaceSubscriber.overupdate.label"
+ helpContextId="org.eclipse.team.cvs.ui.workspace_subscriber_overupdate_action"
+ class="org.eclipse.team.internal.ccvs.ui.subscriber.OverrideAndUpdateAction"
+ tooltip="%CVSWorkspaceSubscriber.overupdate.tooltip"
+ menubarPath="SubscriberActionsGroup2"
+ id="org.eclipse.team.ccvs.ui.CVSWorkspaceSubscriber.overupdate">
+ </action>
<action
label="%ShowHistoryAction.label"
- tooltip="%ShowHistoryAction.tooltip"
icon="icons/full/ctool16/history.gif"
+ helpContextId="org.eclipse.team.cvs.ui.show_in_history_action_context"
class="org.eclipse.team.internal.ccvs.ui.actions.ShowResourceInHistoryAction"
+ tooltip="%ShowHistoryAction.tooltip"
menubarPath="SubscriberActionsGroup3"
- helpContextId="org.eclipse.team.cvs.ui.show_in_history_action_context"
id="org.eclipse.team.ccvs.ui.showHistory">
</action>
<action
label="%ShowAnnotationAction.label"
- tooltip="%ShowAnnotationAction.tooltip"
icon="icons/full/ctool16/annotate.gif"
+ helpContextId="org.eclipse.team.cvs.ui.get_annotate_action_context"
class="org.eclipse.team.internal.ccvs.ui.actions.ShowAnnotationAction"
+ tooltip="%ShowAnnotationAction.tooltip"
menubarPath="SubscriberActionsGroup3"
- helpContextId="org.eclipse.team.cvs.ui.get_annotate_action_context"
id="org.eclipse.team.ccvs.ui.showAnnotation">
- </action>
+ </action>
<action
label="%BranchAction.label"
- tooltip="%BranchAction.tooltip"
icon="icons/full/clcl16/newstream_wiz.gif"
+ helpContextId="org.eclipse.team.cvs.ui.team_branch_action_context"
class="org.eclipse.team.internal.ccvs.ui.actions.BranchAction"
+ tooltip="%BranchAction.tooltip"
menubarPath="SubscriberActionsGroup3"
- helpContextId="org.eclipse.team.cvs.ui.team_branch_action_context"
id="org.eclipse.team.ccvs.ui.branch">
</action>
<action
label="%GenerateDiff.label"
- tooltip="%GenerateDiff.tooltip"
+ helpContextId="org.eclipse.team.cvs.ui.team_create_patch_action_context"
class="org.eclipse.team.internal.ccvs.ui.actions.GenerateDiffFileAction"
+ tooltip="%GenerateDiff.tooltip"
menubarPath="SubscriberActionsGroup3"
- helpContextId="org.eclipse.team.cvs.ui.team_create_patch_action_context"
id="org.eclipse.team.ccvs.ui.GenerateDiff">
- </action>
+ </action>
<action
label="%IgnoreAction.label"
- tooltip="%IgnoreAction.tooltip"
+ helpContextId="org.eclipse.team.cvs.ui.team_ignore_action_context"
class="org.eclipse.team.internal.ccvs.ui.actions.IgnoreAction"
+ tooltip="%IgnoreAction.tooltip"
menubarPath="SubscriberActionsGroup3"
- helpContextId="org.eclipse.team.cvs.ui.team_ignore_action_context"
id="org.eclipse.team.ccvs.ui.ignore">
- </action>
- </viewerContribution>
-
- <viewerContribution
- id="org.eclipse.team.ccvs.ui.CVSMergeSubscriberContributions"
- targetID="org.eclipse.team.cvs.ui.cvsmerge-participant">
- <action
- label="%CVSWorkspaceSubscriber.confirmMerged.label"
- menubarPath="SubscriberActionsGroup1"
- tooltip="%CVSWorkspaceSubscriber.confirmMerged.tooltip"
- class="org.eclipse.team.internal.ccvs.ui.subscriber.SubscriberConfirmMergedAction"
- helpContextId="org.eclipse.team.cvs.ui.workspace_subscriber_confirm_merged_action"
- id="org.eclipse.team.ccvs.ui.CVSMergeSubscriber.confirmMerged">
- </action>
- <action
- label="%CVSWorkspaceSubscriber.merge.label"
- menubarPath="SubscriberActionsGroup1"
- tooltip="%CVSWorkspaceSubscriber.merge.tooltip"
- class="org.eclipse.team.internal.ccvs.ui.subscriber.MergeUpdateAction"
- overrideActionId="org.eclipse.team.ccvs.ui.update"
- helpContextId="org.eclipse.team.cvs.ui.workspace_subscriber_merge_action"
- id="org.eclipse.team.ccvs.ui.CVSMergeSubscriber.merge">
- </action>
- <action
+ </action>
+ </viewerContribution>
+ <viewerContribution
+ targetID="org.eclipse.team.cvs.ui.cvsmerge-participant"
+ id="org.eclipse.team.ccvs.ui.CVSMergeSubscriberContributions">
+ <action
+ label="%CVSWorkspaceSubscriber.confirmMerged.label"
+ helpContextId="org.eclipse.team.cvs.ui.workspace_subscriber_confirm_merged_action"
+ class="org.eclipse.team.internal.ccvs.ui.subscriber.SubscriberConfirmMergedAction"
+ tooltip="%CVSWorkspaceSubscriber.confirmMerged.tooltip"
+ menubarPath="SubscriberActionsGroup1"
+ id="org.eclipse.team.ccvs.ui.CVSMergeSubscriber.confirmMerged">
+ </action>
+ <action
+ label="%CVSWorkspaceSubscriber.merge.label"
+ helpContextId="org.eclipse.team.cvs.ui.workspace_subscriber_merge_action"
+ overrideActionId="org.eclipse.team.ccvs.ui.update"
+ class="org.eclipse.team.internal.ccvs.ui.subscriber.MergeUpdateAction"
+ tooltip="%CVSWorkspaceSubscriber.merge.tooltip"
+ menubarPath="SubscriberActionsGroup1"
+ id="org.eclipse.team.ccvs.ui.CVSMergeSubscriber.merge">
+ </action>
+ <action
label="%ShowHistoryAction.label"
- tooltip="%ShowHistoryAction.tooltip"
icon="icons/full/ctool16/history.gif"
+ helpContextId="org.eclipse.team.cvs.ui.show_in_history_action_context"
class="org.eclipse.team.internal.ccvs.ui.actions.ShowResourceInHistoryAction"
+ tooltip="%ShowHistoryAction.tooltip"
menubarPath="SubscriberActionsGroup3"
- helpContextId="org.eclipse.team.cvs.ui.show_in_history_action_context"
id="org.eclipse.team.ccvs.ui.showHistory">
</action>
<action
label="%ShowAnnotationAction.label"
- tooltip="%ShowAnnotationAction.tooltip"
icon="icons/full/ctool16/annotate.gif"
+ helpContextId="org.eclipse.team.cvs.ui.get_annotate_action_context"
class="org.eclipse.team.internal.ccvs.ui.actions.ShowAnnotationAction"
+ tooltip="%ShowAnnotationAction.tooltip"
menubarPath="SubscriberActionsGroup3"
- helpContextId="org.eclipse.team.cvs.ui.get_annotate_action_context"
id="org.eclipse.team.ccvs.ui.showAnnotation">
- </action>
- </viewerContribution>
-
- <viewerContribution
- id="org.eclipse.team.ccvs.ui.CVSCompareSubscriberContributions"
- targetID="org.eclipse.team.cvs.ui.compare-participant">
- <action
- label="%CVSCompareSubscriber.revert.label"
- menubarPath="SubscriberActionsGroup1"
- tooltip="%CVSCompareSubscriber.revert.tooltip"
- class="org.eclipse.team.internal.ccvs.ui.subscriber.CompareRevertAction"
- helpContextId="org.eclipse.team.cvs.ui.compare_revert_action"
- id="org.eclipse.team.ccvs.ui.CVSCompareSubscriber.revert">
- </action>
- <action
+ </action>
+ </viewerContribution>
+ <viewerContribution
+ targetID="org.eclipse.team.cvs.ui.cvsmerge-participant-modal"
+ id="org.eclipse.team.ccvs.ui.CVSMergeSubscriberContributions">
+ <action
+ label="%CVSWorkspaceSubscriber.confirmMerged.label"
+ helpContextId="org.eclipse.team.cvs.ui.workspace_subscriber_confirm_merged_action"
+ class="org.eclipse.team.internal.ccvs.ui.subscriber.SubscriberConfirmMergedAction"
+ tooltip="%CVSWorkspaceSubscriber.confirmMerged.tooltip"
+ menubarPath="SubscriberActionsGroup1"
+ id="org.eclipse.team.ccvs.ui.CVSMergeSubscriber.confirmMerged">
+ </action>
+ <action
+ label="%CVSWorkspaceSubscriber.merge.label"
+ helpContextId="org.eclipse.team.cvs.ui.workspace_subscriber_merge_action"
+ overrideActionId="org.eclipse.team.ccvs.ui.update"
+ class="org.eclipse.team.internal.ccvs.ui.subscriber.MergeUpdateAction"
+ tooltip="%CVSWorkspaceSubscriber.merge.tooltip"
+ menubarPath="SubscriberActionsGroup1"
+ id="org.eclipse.team.ccvs.ui.CVSMergeSubscriber.merge">
+ </action>
+ </viewerContribution>
+ <viewerContribution
+ targetID="org.eclipse.team.cvs.ui.compare-participant"
+ id="org.eclipse.team.ccvs.ui.CVSCompareSubscriberContributions">
+ <action
+ label="%CVSCompareSubscriber.revert.label"
+ helpContextId="org.eclipse.team.cvs.ui.compare_revert_action"
+ class="org.eclipse.team.internal.ccvs.ui.subscriber.CompareRevertAction"
+ tooltip="%CVSCompareSubscriber.revert.tooltip"
+ menubarPath="SubscriberActionsGroup1"
+ id="org.eclipse.team.ccvs.ui.CVSCompareSubscriber.revert">
+ </action>
+ <action
label="%ShowHistoryAction.label"
- tooltip="%ShowHistoryAction.tooltip"
icon="icons/full/ctool16/history.gif"
+ helpContextId="org.eclipse.team.cvs.ui.show_in_history_action_context"
class="org.eclipse.team.internal.ccvs.ui.actions.ShowResourceInHistoryAction"
+ tooltip="%ShowHistoryAction.tooltip"
menubarPath="SubscriberActionsGroup3"
- helpContextId="org.eclipse.team.cvs.ui.show_in_history_action_context"
id="org.eclipse.team.ccvs.ui.showHistory">
- </action>
- <action
+ </action>
+ <action
label="%ShowAnnotationAction.label"
- tooltip="%ShowAnnotationAction.tooltip"
icon="icons/full/ctool16/annotate.gif"
+ helpContextId="org.eclipse.team.cvs.ui.get_annotate_action_context"
class="org.eclipse.team.internal.ccvs.ui.actions.ShowAnnotationAction"
+ tooltip="%ShowAnnotationAction.tooltip"
menubarPath="SubscriberActionsGroup3"
- helpContextId="org.eclipse.team.cvs.ui.get_annotate_action_context"
id="org.eclipse.team.ccvs.ui.showAnnotation">
- </action>
- </viewerContribution>
- </extension>
-
+ </action>
+ </viewerContribution>
+ <viewerContribution
+ targetID="org.eclipse.team.cvs.ui.compare-participant-modal"
+ id="org.eclipse.team.ccvs.ui.CVSCompareSubscriberContributions">
+ <action
+ label="%CVSCompareSubscriber.revert.label"
+ helpContextId="org.eclipse.team.cvs.ui.compare_revert_action"
+ class="org.eclipse.team.internal.ccvs.ui.subscriber.CompareRevertAction"
+ tooltip="%CVSCompareSubscriber.revert.tooltip"
+ menubarPath="SubscriberActionsGroup1"
+ id="org.eclipse.team.ccvs.ui.CVSCompareSubscriber.revert">
+ </action>
+ </viewerContribution>
+ </extension>
<!-- ************** Views ********************** -->
<extension
point="org.eclipse.ui.views">
@@ -763,8 +787,8 @@
<view
name="%RepositoriesView.name"
icon="icons/full/cview16/repo_rep.gif"
+ fastViewWidthRatio="0.5"
category="org.eclipse.team.ccvs.ui"
- fastViewWidthRatio="0.5"
class="org.eclipse.team.internal.ccvs.ui.repo.RepositoriesView"
id="org.eclipse.team.ccvs.ui.RepositoriesView">
</view>
@@ -775,7 +799,7 @@
class="org.eclipse.team.internal.ccvs.ui.HistoryView"
id="org.eclipse.team.ccvs.ui.HistoryView">
</view>
- <view
+ <view
name="%EditorsView.name"
icon="icons/full/cview16/rep_editors_view.gif"
category="org.eclipse.team.ccvs.ui"
@@ -836,23 +860,22 @@
id="org.eclipse.team.cvs.ui.WatchEditPreferencePage">
</page>
</extension>
-
<!-- **************** Decorator ******************* -->
<extension
point="org.eclipse.ui.decorators">
<decorator
- objectClass="org.eclipse.core.resources.IResource"
+ lightweight="true"
+ quadrant="BOTTOM_RIGHT"
adaptable="true"
+ objectClass="org.eclipse.core.resources.IResource"
label="%DecoratorStandard.name"
- state="true"
- lightweight= "true"
- quadrant = "BOTTOM_RIGHT"
class="org.eclipse.team.internal.ccvs.ui.CVSLightweightDecorator"
+ state="true"
id="org.eclipse.team.cvs.ui.decorator">
<description>
%DecoratorStandard.desc
- </description>
- </decorator>
+ </description>
+ </decorator>
</extension>
<!-- *************** View Actions **************** -->
<extension
@@ -862,17 +885,16 @@
id="org.eclipse.team.cvs.ui.history">
<action
label="%HistoryFilter.label"
+ hoverIcon="icons/full/clcl16/filter_history.gif"
icon="icons/full/elcl16/filter_history.gif"
- disabledIcon="icons/full/dlcl16/filter_history.gif"
- hoverIcon="icons/full/clcl16/filter_history.gif"
- tooltip="%HistoryFilter.tooltip"
class="org.eclipse.team.internal.ccvs.ui.HistoryFilterAction"
+ tooltip="%HistoryFilter.tooltip"
toolbarPath="actions"
+ disabledIcon="icons/full/dlcl16/filter_history.gif"
id="org.eclipse.team.cvs.ui.historyaction">
</action>
</viewContribution>
</extension>
-
<!-- **************** CVS Perspective ******************* -->
<extension
point="org.eclipse.ui.perspectives">
@@ -891,71 +913,84 @@
<perspectiveShortcut
id="org.eclipse.team.cvs.ui.cvsPerspective">
</perspectiveShortcut>
- <view id="org.eclipse.team.ccvs.ui.console"
- relative="org.eclipse.ui.views.TaskList"
- visible="false"
- relationship="stack"/>
- <view id="org.eclipse.team.ccvs.ui.HistoryView"
- relative="org.eclipse.ui.views.TaskList"
- visible="false"
- relationship="stack"/>
- <view id="org.eclipse.team.ccvs.ui.RepositoriesView"
- relative="org.eclipse.ui.views.ResourceNavigator"
- visible="false"
- relationship="stack"/>
- <view id="org.eclipse.team.ccvs.ui.AnnotateView"
- relative="org.eclipse.ui.views.ResourceNavigator"
- visible="false"
- relationship="stack"/>
+ <view
+ relative="org.eclipse.ui.views.TaskList"
+ visible="false"
+ relationship="stack"
+ id="org.eclipse.team.ccvs.ui.console">
+ </view>
+ <view
+ relative="org.eclipse.ui.views.TaskList"
+ visible="false"
+ relationship="stack"
+ id="org.eclipse.team.ccvs.ui.HistoryView">
+ </view>
+ <view
+ relative="org.eclipse.ui.views.ResourceNavigator"
+ visible="false"
+ relationship="stack"
+ id="org.eclipse.team.ccvs.ui.RepositoriesView">
+ </view>
+ <view
+ relative="org.eclipse.ui.views.ResourceNavigator"
+ visible="false"
+ relationship="stack"
+ id="org.eclipse.team.ccvs.ui.AnnotateView">
+ </view>
+ </perspectiveExtension>
+ <perspectiveExtension
+ targetID="org.eclipse.team.cvs.ui.cvsPerspective">
+ <actionSet
+ id="org.eclipse.team.cvs.ui.CVSActionSet">
+ </actionSet>
+ <view
+ relative="org.eclipse.team.ccvs.ui.RepositoriesView"
+ relationship="stack"
+ id="org.eclipse.team.ccvs.ui.AnnotateView">
+ </view>
</perspectiveExtension>
- <perspectiveExtension
- targetID="org.eclipse.team.cvs.ui.cvsPerspective">
- <actionSet id="org.eclipse.team.cvs.ui.CVSActionSet"/>
- <view id="org.eclipse.team.ccvs.ui.AnnotateView"
- relative="org.eclipse.team.ccvs.ui.RepositoriesView"
- relationship="stack"/>
- </perspectiveExtension>
</extension>
-
- <!-- ************** Project Sets **************** -->
- <extension point="org.eclipse.team.core.projectSets">
- <projectSet id="org.eclipse.team.cvs.core.cvsnature" class="org.eclipse.team.internal.ccvs.ui.CVSProjectSetSerializer"/>
- </extension>
-
- <!-- ********** Action Sets ************** -->
- <extension point="org.eclipse.ui.actionSets">
- <actionSet
- label="%CVS"
- visible="false"
- id="org.eclipse.team.cvs.ui.CVSActionSet"
- description="%CVSActionSet.description">
- <action
- toolbarPath="Normal/CVS"
- label="%CVSActionSet.newLabel"
- tooltip="%CVSActionSet.newTooltip"
- icon="icons/full/wizards/newconnect_wiz.gif"
- class="org.eclipse.team.internal.ccvs.ui.actions.NewRepositoryAction"
- id="org.eclipse.team.cvs.ui.actions.NewRepositoryAction"
- definitionId="org.eclipse.team.cvs.ui.new.location">
- </action>
- </actionSet>
- </extension>
-
- <!-- ********** Font Definitions ************** -->
- <extension
+<!-- ************** Project Sets **************** -->
+ <extension
+ point="org.eclipse.team.core.projectSets">
+ <projectSet
+ class="org.eclipse.team.internal.ccvs.ui.CVSProjectSetSerializer"
+ id="org.eclipse.team.cvs.core.cvsnature">
+ </projectSet>
+ </extension>
+<!-- ********** Action Sets ************** -->
+ <extension
+ point="org.eclipse.ui.actionSets">
+ <actionSet
+ label="%CVS"
+ description="%CVSActionSet.description"
+ visible="false"
+ id="org.eclipse.team.cvs.ui.CVSActionSet">
+ <action
+ definitionId="org.eclipse.team.cvs.ui.new.location"
+ label="%CVSActionSet.newLabel"
+ icon="icons/full/wizards/newconnect_wiz.gif"
+ class="org.eclipse.team.internal.ccvs.ui.actions.NewRepositoryAction"
+ tooltip="%CVSActionSet.newTooltip"
+ toolbarPath="Normal/CVS"
+ id="org.eclipse.team.cvs.ui.actions.NewRepositoryAction">
+ </action>
+ </actionSet>
+ </extension>
+<!-- ********** Font Definitions ************** -->
+ <extension
point="org.eclipse.ui.fontDefinitions">
<fontDefinition
label="%CVSConsoleFont.label"
defaultsTo="org.eclipse.jface.textfont"
id="pref_console_font">
- <description>
- %CVSConsoleFont.description
- </description>
+ <description>
+ %CVSConsoleFont.description
+ </description>
</fontDefinition>
- </extension>
-
- <!-- ********** QuickDiff text editor support ************** -->
- <extension
+ </extension>
+<!-- ********** QuickDiff text editor support ************** -->
+ <extension
point="org.eclipse.ui.workbench.texteditor.quickDiffReferenceProvider">
<referenceprovider
label="%CVSRemoteQuickDiffProvider.label"
@@ -963,5 +998,5 @@
id="org.eclipse.quickdiff.providers.CVSReferenceProvider">
</referenceprovider>
</extension>
-
+
</plugin>
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSCompareRevisionsInput.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSCompareRevisionsInput.java
index 915bf0b16..1dbaef57a 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSCompareRevisionsInput.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSCompareRevisionsInput.java
@@ -27,13 +27,12 @@ import org.eclipse.jface.viewers.*;
import org.eclipse.swt.widgets.*;
import org.eclipse.team.core.RepositoryProvider;
import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.variants.IResourceVariant;
import org.eclipse.team.internal.ccvs.core.*;
import org.eclipse.team.internal.ccvs.core.client.Command;
import org.eclipse.team.internal.ccvs.core.client.Update;
import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
import org.eclipse.team.internal.ccvs.ui.actions.CVSAction;
-import org.eclipse.team.internal.ccvs.ui.actions.ShowAnnotationAction;
+import org.eclipse.team.internal.ui.Utils;
import org.eclipse.ui.actions.WorkspaceModifyOperation;
import org.eclipse.ui.help.WorkbenchHelp;
@@ -41,13 +40,16 @@ public class CVSCompareRevisionsInput extends CompareEditorInput {
IFile resource;
ILogEntry[] editions;
TableViewer viewer;
- Action getContentsAction;
- Action getRevisionAction;
- Action getAnnotateAction;
+ Action getRevisionAction;
Shell shell;
+ // Provide the widget for the history table
private HistoryTableProvider historyTableProvider;
+ /**
+ * Provide a wrapper for a resource node that doesn't buffer. Changes are saved directly to the
+ * underlying file.
+ */
class TypedBufferedContent extends ResourceNode {
public TypedBufferedContent(IFile resource) {
super(resource);
@@ -88,6 +90,9 @@ public class CVSCompareRevisionsInput extends CompareEditorInput {
public ITypedElement replace(ITypedElement child, ITypedElement other) {
return null;
}
+ public void fireChange() {
+ fireContentChanged();
+ }
}
/**
@@ -121,6 +126,7 @@ public class CVSCompareRevisionsInput extends CompareEditorInput {
return super.getName();
}
};
+
/**
* A compare node that gets its label from the right element
*/
@@ -137,7 +143,9 @@ public class CVSCompareRevisionsInput extends CompareEditorInput {
}
return null;
}
-
+ public void fireContentChanges() {
+ fireChange();
+ }
};
/**
* A content provider which knows how to get the children of the diff container
@@ -167,7 +175,7 @@ public class CVSCompareRevisionsInput extends CompareEditorInput {
this.shell = parent.getShell();
viewer = getHistoryTableProvider().createTable(parent);
Table table = viewer.getTable();
- table.setData(CompareUI.COMPARE_VIEWER_TITLE, Policy.bind("CVSCompareRevisionsInput.structureCompare")); //$NON-NLS-1$
+ table.setData(CompareUI.COMPARE_VIEWER_TITLE, getTitle()); //$NON-NLS-1$
viewer.setContentProvider(new VersionCompareContentProvider());
@@ -176,9 +184,7 @@ public class CVSCompareRevisionsInput extends CompareEditorInput {
mm.addMenuListener(
new IMenuListener() {
public void menuAboutToShow(IMenuManager mm) {
- mm.add(getContentsAction);
mm.add(getRevisionAction);
- mm.add(getAnnotateAction);
}
}
);
@@ -187,103 +193,30 @@ public class CVSCompareRevisionsInput extends CompareEditorInput {
public void selectionChanged(SelectionChangedEvent event) {
ISelection selection = event.getSelection();
if (!(selection instanceof IStructuredSelection)) {
- getContentsAction.setEnabled(false);
getRevisionAction.setEnabled(false);
- getAnnotateAction.setEnabled(false);
return;
}
IStructuredSelection ss = (IStructuredSelection)selection;
- getContentsAction.setEnabled(ss.size() == 1);
getRevisionAction.setEnabled(ss.size() == 1);
- getAnnotateAction.setEnabled(ss.size() == 1);
}
});
// Add F1 help.
WorkbenchHelp.setHelp(table, IHelpContextIds.COMPARE_REVISIONS_VIEW);
- WorkbenchHelp.setHelp(getContentsAction, IHelpContextIds.GET_FILE_CONTENTS_ACTION);
- WorkbenchHelp.setHelp(getRevisionAction, IHelpContextIds.GET_FILE_REVISION_ACTION);
- WorkbenchHelp.setHelp(getAnnotateAction, IHelpContextIds.GET_ANNOTATE_ACTION);
-
return viewer;
}
-
+
private void initLabels() {
CompareConfiguration cc = (CompareConfiguration)getCompareConfiguration();
- String resourceName = resource.getName();
-// if (editions[0].isTeamStreamResource()) {
-// setTitle(Policy.bind("CompareResourceEditorInput.compareResourceAndStream", new Object[] {resourceName, editions[0].getTeamStream().getName()}));
-// } else {
-// setTitle(Policy.bind("CompareResourceEditorInput.compareResourceAndVersions", new Object[] {resourceName}));
-// }
- setTitle(Policy.bind("CVSCompareRevisionsInput.compareResourceAndVersions", new Object[] {resourceName})); //$NON-NLS-1$
cc.setLeftEditable(true);
cc.setRightEditable(false);
-
+ String resourceName = resource.getName();
String leftLabel = Policy.bind("CVSCompareRevisionsInput.workspace", new Object[] {resourceName}); //$NON-NLS-1$
cc.setLeftLabel(leftLabel);
String rightLabel = Policy.bind("CVSCompareRevisionsInput.repository", new Object[] {resourceName}); //$NON-NLS-1$
cc.setRightLabel(rightLabel);
}
- private void initializeActions() {
-
- getAnnotateAction = new Action(Policy.bind("HistoryView.getAnnotateAction"), null) { //$NON-NLS-1$
- public void run() {
- try {
- IStructuredSelection selection = (IStructuredSelection)viewer.getSelection();
- if (selection.size() != 1) return;
- VersionCompareDiffNode node = (VersionCompareDiffNode)selection.getFirstElement();
- ResourceEditionNode right = (ResourceEditionNode)node.getRight();
- ICVSRemoteResource edition = right.getRemoteResource();
- ShowAnnotationAction annotateAction = new ShowAnnotationAction();
- annotateAction.execute(edition);
-
- } catch (InterruptedException e) {
- // Do nothing
- return;
- } catch (InvocationTargetException e) {
- handle(e);
- }
- }
- };
-
- getContentsAction = new Action(Policy.bind("HistoryView.getContentsAction"), null) { //$NON-NLS-1$
- public void run() {
- try {
- new ProgressMonitorDialog(shell).run(false, true, new WorkspaceModifyOperation() {
- protected void execute(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- IStructuredSelection selection = (IStructuredSelection)viewer.getSelection();
- if (selection.size() != 1) return;
- VersionCompareDiffNode node = (VersionCompareDiffNode)selection.getFirstElement();
- ResourceEditionNode right = (ResourceEditionNode)node.getRight();
- IResourceVariant edition = (IResourceVariant)right.getRemoteResource();
- // Do the load. This just consists of setting the local contents. We don't
- // actually want to change the base.
- try {
- monitor.beginTask(null, 100);
- InputStream in = edition.getStorage(new SubProgressMonitor(monitor, 50)).getContents();
- resource.setContents(in, false, true, new SubProgressMonitor(monitor, 50));
- } catch (TeamException e) {
- throw new InvocationTargetException(e);
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- } finally {
- monitor.done();
- }
- }
- });
- } catch (InterruptedException e) {
- // Do nothing
- return;
- } catch (InvocationTargetException e) {
- handle(e);
- }
- // recompute the labels on the viewer
- updateCurrentEdition();
- viewer.refresh();
- }
- };
-
+ private void initializeActions() {
getRevisionAction = new Action(Policy.bind("HistoryView.getRevisionAction"), null) { //$NON-NLS-1$
public void run() {
try {
@@ -315,6 +248,12 @@ public class CVSCompareRevisionsInput extends CompareEditorInput {
} catch (InvocationTargetException e) {
handle(e);
}
+ // fire change
+ IStructuredSelection selection = (IStructuredSelection)viewer.getSelection();
+ if (selection.size() != 1) return;
+ VersionCompareDiffNode node = (VersionCompareDiffNode)selection.getFirstElement();
+ TypedBufferedContent left = (TypedBufferedContent)node.getLeft();
+ left.fireChange();
// recompute the labels on the viewer
viewer.refresh();
}
@@ -323,8 +262,8 @@ public class CVSCompareRevisionsInput extends CompareEditorInput {
protected Object prepareInput(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
initLabels();
DiffNode diffRoot = new DiffNode(Differencer.NO_CHANGE);
+ ITypedElement left = new TypedBufferedContent(resource);
for (int i = 0; i < editions.length; i++) {
- ITypedElement left = new TypedBufferedContent(resource);
ITypedElement right = new ResourceRevisionNode(editions[i]);
diffRoot.add(new VersionCompareDiffNode(left, right));
}
@@ -350,5 +289,34 @@ public class CVSCompareRevisionsInput extends CompareEditorInput {
}
return historyTableProvider;
}
-
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.compare.CompareEditorInput#saveChanges(org.eclipse.core.runtime.IProgressMonitor)
+ */
+ public void saveChanges(IProgressMonitor pm) throws CoreException {
+ super.saveChanges(pm);
+ }
+
+ public void replaceLocalWithCurrentlySelectedRevision() throws CoreException {
+ IStructuredSelection selection = (IStructuredSelection)viewer.getSelection();
+ if (selection.size() != 1) return;
+ VersionCompareDiffNode node = (VersionCompareDiffNode)selection.getFirstElement();
+ ResourceRevisionNode right = (ResourceRevisionNode)node.getRight();
+ TypedBufferedContent left = (TypedBufferedContent)node.getLeft();
+ left.setContent(Utils.readBytes(right.getContents()));
+ }
+
+ public Viewer getViewer() {
+ return viewer;
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.compare.CompareEditorInput#getTitle()
+ */
+ public String getTitle() {
+ String resourceName = resource.getName();
+ return Policy.bind("CVSCompareRevisionsInput.compareResourceAndVersions", new Object[] {resourceName}); //$NON-NLS-1$
+ }
}
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 e9334f94d..8f599fb2a 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
@@ -624,6 +624,7 @@ public class CVSUIPlugin extends AbstractUIPlugin {
store.setDefault(ICVSUIConstants.PREF_DETERMINE_SERVER_VERSION, true);
store.setDefault(ICVSUIConstants.PREF_CONFIRM_MOVE_TAG, CVSProviderPlugin.DEFAULT_CONFIRM_MOVE_TAG);
store.setDefault(ICVSUIConstants.PREF_DEBUG_PROTOCOL, false);
+ store.setDefault(ICVSUIConstants.PREF_WARN_REMEMBERING_MERGES, true);
PreferenceConverter.setDefault(store, ICVSUIConstants.PREF_CONSOLE_COMMAND_COLOR, new RGB(0, 0, 0));
PreferenceConverter.setDefault(store, ICVSUIConstants.PREF_CONSOLE_MESSAGE_COLOR, new RGB(0, 0, 255));
@@ -739,7 +740,7 @@ public class CVSUIPlugin extends AbstractUIPlugin {
WorkspaceSynchronizeParticipant cvsPage = CVSUIPlugin.getPlugin().getCvsWorkspaceSynchronizeParticipant();
view.display(cvsPage);
if (resources != null) {
- cvsPage.refreshWithRemote(resources, false);
+ cvsPage.refresh(resources);
}
if (mode != 0) {
cvsPage.setMode(mode);
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 bf8b42192..097f5ecfa 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
@@ -78,6 +78,7 @@ public interface ICVSUIConstants {
public final String PREF_DETERMINE_SERVER_VERSION = "pref_determine_server_version"; //$NON-NLS-1$
public final String PREF_CONFIRM_MOVE_TAG = "pref_confirm_move_tag"; //$NON-NLS-1$
public final String PREF_DEBUG_PROTOCOL = "pref_debug_protocol"; //$NON-NLS-1$
+ public final String PREF_WARN_REMEMBERING_MERGES = "pref_remember_merges"; //$NON-NLS-1$
// console preferences
public final String PREF_CONSOLE_COMMAND_COLOR = "pref_console_command_color"; //$NON-NLS-1$
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareWithRevisionAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareWithRevisionAction.java
index b41b7886f..a769bedc3 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareWithRevisionAction.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareWithRevisionAction.java
@@ -16,9 +16,11 @@ import org.eclipse.compare.CompareUI;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.swt.widgets.Shell;
import org.eclipse.team.core.TeamException;
import org.eclipse.team.internal.ccvs.core.CVSException;
import org.eclipse.team.internal.ccvs.core.ICVSRemoteFile;
@@ -27,7 +29,12 @@ import org.eclipse.team.internal.ccvs.core.ILogEntry;
import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
import org.eclipse.team.internal.ccvs.ui.CVSCompareRevisionsInput;
import org.eclipse.team.internal.ccvs.ui.Policy;
+import org.eclipse.team.ui.synchronize.viewers.CompareDialog;
+/**
+ * Compare with revision will allow a user to browse the history of a file, compare with the
+ * other revisions and merge changes from other revisions into the workspace copy.
+ */
public class CompareWithRevisionAction extends WorkspaceAction {
/**
@@ -85,40 +92,49 @@ public class CompareWithRevisionAction extends WorkspaceAction {
// Show the compare viewer
run(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException {
- CompareUI.openCompareEditorOnPage(
- new CVSCompareRevisionsInput((IFile)getSelectedResources()[0], entries[0]),
- getTargetPage());
+ public void run(IProgressMonitor monitor) throws InterruptedException, InvocationTargetException {
+ CVSCompareRevisionsInput input = new CVSCompareRevisionsInput((IFile)getSelectedResources()[0], entries[0]);
+ // running with a null progress monitor is fine because we have already pre-fetched the log entries above.
+ input.run(new NullProgressMonitor());
+ CompareDialog cd = createCompareDialog(getShell(), input);
+ cd.setBlockOnOpen(true);
+ cd.open();
}
}, false /* cancelable */, PROGRESS_BUSYCURSOR);
}
/**
+ * Return the compare dialog to use to show the compare input.
+ */
+ protected CompareDialog createCompareDialog(Shell shell, CVSCompareRevisionsInput input) {
+ return new CompareDialog(getShell(), "Compare With Revision", input);
+ }
+
+ /* (non-Javadoc)
* @see org.eclipse.team.internal.ccvs.ui.actions.CVSAction#getErrorTitle()
*/
protected String getErrorTitle() {
return Policy.bind("CompareWithRevisionAction.compare"); //$NON-NLS-1$
}
- /**
+ /* (non-Javadoc)
* @see org.eclipse.team.internal.ccvs.ui.actions.WorkspaceAction#isEnabledForCVSResource(org.eclipse.team.internal.ccvs.core.ICVSResource)
*/
protected boolean isEnabledForCVSResource(ICVSResource cvsResource) throws CVSException {
return (!cvsResource.isFolder() && super.isEnabledForCVSResource(cvsResource));
}
- /**
+ /* (non-Javadoc)
* @see org.eclipse.team.internal.ccvs.ui.actions.WorkspaceAction#isEnabledForMultipleResources()
*/
protected boolean isEnabledForMultipleResources() {
return false;
}
- /**
+ /* (non-Javadoc)
* @see org.eclipse.team.internal.ccvs.ui.actions.WorkspaceAction#isEnabledForAddedResources()
*/
protected boolean isEnabledForAddedResources() {
return false;
}
-
}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareWithTagAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareWithTagAction.java
index 34393d71d..f89c97e5a 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareWithTagAction.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareWithTagAction.java
@@ -19,34 +19,23 @@ import org.eclipse.team.internal.ccvs.core.CVSCompareSubscriber;
import org.eclipse.team.internal.ccvs.core.CVSTag;
import org.eclipse.team.internal.ccvs.ui.TagSelectionDialog;
import org.eclipse.team.internal.ccvs.ui.subscriber.CompareParticipant;
-import org.eclipse.team.ui.synchronize.subscriber.SubscriberParticipant;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
+import org.eclipse.team.ui.synchronize.subscriber.OpenCompareDialogAction;
public class CompareWithTagAction extends WorkspaceAction {
public void execute(IAction action) throws InvocationTargetException, InterruptedException {
- IResource[] resources = getSelectedResources();
+ final IResource[] resources = getSelectedResources();
CVSTag tag = promptForTag(resources);
if (tag == null)
return;
- IWorkbenchWindow wWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- IWorkbenchPage activePage = null;
- if (wWindow != null) {
- activePage = wWindow.getActivePage();
- }
- // Create the synchronize view participant
+
+ // Run the comparison
CVSCompareSubscriber s = new CVSCompareSubscriber(resources, tag);
- CompareParticipant participant = (CompareParticipant)SubscriberParticipant.find(s);
- boolean addParticipant = false;
- if(participant == null) {
- participant = new CompareParticipant(s);
- addParticipant = true;
- }
- participant.refreshWithRemote(s.roots(), addParticipant);
+ CompareParticipant participant = new CompareParticipant(s);
+ OpenCompareDialogAction openCompare = new OpenCompareDialogAction(getShell(), CVSCompareSubscriber.ID_MODAL, participant, resources);
+ openCompare.run();
}
-
+
protected CVSTag promptForTag(IResource[] resources) {
IProject[] projects = new IProject[resources.length];
for (int i = 0; i < resources.length; i++) {
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ReplaceWithRevisionAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ReplaceWithRevisionAction.java
new file mode 100644
index 000000000..da01eb866
--- /dev/null
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ReplaceWithRevisionAction.java
@@ -0,0 +1,79 @@
+/*******************************************************************************
+ * 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.ccvs.ui.actions;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.viewers.*;
+import org.eclipse.swt.widgets.*;
+import org.eclipse.team.internal.ccvs.ui.CVSCompareRevisionsInput;
+import org.eclipse.team.internal.ui.Utils;
+import org.eclipse.team.ui.synchronize.viewers.CompareDialog;
+
+/**
+ * Displays a compare dialog and allows the same behavior as the compare. In addition
+ * a replace button is added to the dialog that will replace the local with the currently
+ * selected revision.
+ *
+ * @since 3.0
+ */
+public class ReplaceWithRevisionAction extends CompareWithRevisionAction {
+
+ protected static final int REPLACE_ID = 10;
+
+ protected class ReplaceCompareDialog extends CompareDialog {
+ private Button replaceButton;
+
+ public ReplaceCompareDialog(Shell shell, String title, CVSCompareRevisionsInput input) {
+ super(shell, title, input);
+ }
+
+ /**
+ * Add the replace button to the dialog.
+ */
+ protected void createButtonsForButtonBar(Composite parent) {
+ replaceButton = createButton(parent, REPLACE_ID, "&Replace", false);
+ replaceButton.setEnabled(false);
+ ((CVSCompareRevisionsInput)getCompareEditorInput()).getViewer().addSelectionChangedListener(
+ new ISelectionChangedListener() {
+ public void selectionChanged(SelectionChangedEvent e) {
+ ISelection s= e.getSelection();
+ replaceButton.setEnabled(s != null && ! s.isEmpty());
+ }
+ }
+ );
+ super.createButtonsForButtonBar(parent);
+ }
+
+ /**
+ * If the replace button was pressed.
+ */
+ protected void buttonPressed(int buttonId) {
+ if(buttonId == REPLACE_ID) {
+ CVSCompareRevisionsInput input = (CVSCompareRevisionsInput)getCompareEditorInput();
+ try {
+ input.replaceLocalWithCurrentlySelectedRevision();
+ } catch (CoreException e) {
+ Utils.handle(e);
+ }
+ buttonId = IDialogConstants.OK_ID;
+ }
+ super.buttonPressed(buttonId);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.team.internal.ccvs.ui.actions.CompareWithRevisionAction#createCompareDialog(org.eclipse.swt.widgets.Shell, org.eclipse.team.internal.ccvs.ui.CVSCompareRevisionsInput)
+ */
+ protected CompareDialog createCompareDialog(Shell shell, CVSCompareRevisionsInput input) {
+ return new ReplaceCompareDialog(shell, "Replace With Revision", input);
+ }
+}
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 8f1c0767f..bb972dac1 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
@@ -11,20 +11,23 @@
package org.eclipse.team.internal.ccvs.ui.merge;
+import org.eclipse.compare.CompareEditorInput;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.swt.widgets.Shell;
import org.eclipse.team.internal.ccvs.core.CVSMergeSubscriber;
import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.ICVSUIConstants;
-import org.eclipse.team.internal.ccvs.ui.Policy;
+import org.eclipse.team.internal.ccvs.ui.*;
import org.eclipse.team.internal.ccvs.ui.subscriber.MergeSynchronizeParticipant;
+import org.eclipse.team.ui.synchronize.subscriber.OpenCompareDialogAction;
import org.eclipse.team.ui.synchronize.subscriber.SubscriberParticipant;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
+import org.eclipse.team.ui.synchronize.viewers.CompareDialog;
+import org.eclipse.ui.*;
public class MergeWizard extends Wizard {
MergeWizardStartPage startPage;
@@ -63,12 +66,38 @@ public class MergeWizard extends Wizard {
CVSMergeSubscriber s = new CVSMergeSubscriber(resources, startTag, endTag);
MergeSynchronizeParticipant participant = (MergeSynchronizeParticipant)SubscriberParticipant.find(s);
- boolean addParticipant = false;
if(participant == null) {
participant = new MergeSynchronizeParticipant(s);
- addParticipant = true;
- }
- participant.refreshWithRemote(s.roots(), addParticipant);
+ }
+
+ OpenCompareDialogAction compareAction = new OpenCompareDialogAction(activePage.getWorkbenchWindow().getShell(), CVSMergeSubscriber.ID_MODAL, participant, s.roots()) {
+ protected CompareDialog createCompareDialog(Shell shell, String title, CompareEditorInput input) {
+ return new CompareDialog(shell, title, input) {
+ public boolean close() {
+ final IPreferenceStore store = CVSUIPlugin.getPlugin().getPreferenceStore();
+ if(! isRememberParticipant() && store.getBoolean(ICVSUIConstants.PREF_PROMPT_ON_MIXED_TAGS)) {
+ AvoidableMessageDialog dialog = new AvoidableMessageDialog(
+ getShell(),
+ "Remember the Merge", //$NON-NLS-1$
+ null, // accept the default window icon
+ "Do you want to remember this merge session for later? If you plan on merging changes into your workspace from this merge configuration later on you should save this session. This will make it easier to incrementally merge changes.", //$NON-NLS-1$
+ MessageDialog.WARNING,
+ new String[] {IDialogConstants.OK_LABEL, IDialogConstants.NO_LABEL},
+ 0);
+
+ if(dialog.open() == IDialogConstants.OK_ID) {
+ rememberParticipant();
+ }
+ if(dialog.isDontShowAgain()) {
+ store.setValue(ICVSUIConstants.PREF_WARN_REMEMBERING_MERGES, false);
+ }
+ }
+ return super.close();
+ }
+ };
+ }
+ };
+ compareAction.run();
return true;
}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/messages.properties b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/messages.properties
index af2b1022e..ca27c5ca2 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/messages.properties
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/messages.properties
@@ -116,7 +116,7 @@ CVSCompareEditorInput.noWorkspaceFile=No workspace file
CVSCompareEditorInput.noRepositoryFile=No repository file
CVSCompareRevisionsInput.addToWorkspace=Get
-CVSCompareRevisionsInput.compareResourceAndVersions=Compare {0} <workspace> and versions
+CVSCompareRevisionsInput.compareResourceAndVersions=Revisions of ''{0}''
CVSCompareRevisionsInput.errorReplacingTitle=Unable to Replace
CVSCompareRevisionsInput.errorReplacingMessage=Resource(s) could not be loaded. A communication error may have occurred, or \
the resource(s) may not exist on the server, or you may \
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CompareParticipant.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CompareParticipant.java
index 90c98db82..3462ab803 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CompareParticipant.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CompareParticipant.java
@@ -21,7 +21,7 @@ import org.eclipse.team.ui.TeamUI;
import org.eclipse.team.ui.synchronize.ISynchronizeParticipantDescriptor;
import org.eclipse.team.ui.synchronize.ISynchronizeView;
import org.eclipse.team.ui.synchronize.subscriber.SubscriberParticipant;
-import org.eclipse.ui.part.IPageBookViewPage;
+import org.eclipse.team.ui.synchronize.subscriber.SubscriberParticipantPage;
public class CompareParticipant extends SubscriberParticipant {
@@ -62,7 +62,7 @@ public class CompareParticipant extends SubscriberParticipant {
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.subscriber.SubscriberParticipant#doCreatePage(org.eclipse.team.ui.synchronize.ISynchronizeView)
*/
- protected IPageBookViewPage doCreatePage(ISynchronizeView view) {
+ protected SubscriberParticipantPage doCreatePage(ISynchronizeView view) {
return new CompareParticipantPage(this, view);
}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/MergeSynchronizeParticipant.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/MergeSynchronizeParticipant.java
index 877e8228d..26d207fa6 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/MergeSynchronizeParticipant.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/MergeSynchronizeParticipant.java
@@ -21,11 +21,12 @@ import org.eclipse.team.internal.ccvs.core.*;
import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
import org.eclipse.team.internal.ccvs.ui.Policy;
import org.eclipse.team.ui.TeamUI;
-import org.eclipse.team.ui.synchronize.*;
-import org.eclipse.team.ui.synchronize.subscriber.*;
+import org.eclipse.team.ui.synchronize.ISynchronizeParticipantDescriptor;
+import org.eclipse.team.ui.synchronize.ISynchronizeView;
+import org.eclipse.team.ui.synchronize.subscriber.SubscriberParticipant;
+import org.eclipse.team.ui.synchronize.subscriber.SubscriberParticipantPage;
import org.eclipse.ui.IMemento;
import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.part.IPageBookViewPage;
public class MergeSynchronizeParticipant extends SubscriberParticipant {
@@ -52,7 +53,7 @@ public class MergeSynchronizeParticipant extends SubscriberParticipant {
*/
protected void setSubscriber(Subscriber subscriber) {
super.setSubscriber(subscriber);
- String id = CVSMergeSubscriber.QUALIFIED_NAME;
+ String id = CVSMergeSubscriber.ID;
try {
ISynchronizeParticipantDescriptor descriptor = TeamUI.getSynchronizeManager().getParticipantDescriptor(id);
setInitializationData(descriptor);
@@ -103,7 +104,7 @@ public class MergeSynchronizeParticipant extends SubscriberParticipant {
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.ISynchronizeParticipant#createPage(org.eclipse.team.ui.synchronize.ISynchronizeView)
*/
- protected IPageBookViewPage doCreatePage(ISynchronizeView view) {
+ protected SubscriberParticipantPage doCreatePage(ISynchronizeView view) {
return new MergeSynchronizePage(this, view);
}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceSynchronizeParticipant.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceSynchronizeParticipant.java
index bde067da7..edac01341 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceSynchronizeParticipant.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceSynchronizeParticipant.java
@@ -14,9 +14,9 @@ import org.eclipse.team.core.subscribers.Subscriber;
import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
import org.eclipse.team.ui.synchronize.ISynchronizeView;
import org.eclipse.team.ui.synchronize.subscriber.SubscriberParticipant;
+import org.eclipse.team.ui.synchronize.subscriber.SubscriberParticipantPage;
import org.eclipse.ui.IMemento;
import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.part.IPageBookViewPage;
public class WorkspaceSynchronizeParticipant extends SubscriberParticipant {
@@ -25,7 +25,7 @@ public class WorkspaceSynchronizeParticipant extends SubscriberParticipant {
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.subscriber.SubscriberParticipant#doCreatePage(org.eclipse.team.ui.synchronize.ISynchronizeView)
*/
- protected IPageBookViewPage doCreatePage(ISynchronizeView view) {
+ protected SubscriberParticipantPage doCreatePage(ISynchronizeView view) {
return new WorkspaceSynchronizePage(this, view);
}
diff --git a/bundles/org.eclipse.team.ui/icons/full/cview16/compare_view.gif b/bundles/org.eclipse.team.ui/icons/full/cview16/compare_view.gif
new file mode 100644
index 000000000..41800a0c9
--- /dev/null
+++ b/bundles/org.eclipse.team.ui/icons/full/cview16/compare_view.gif
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/plugin.xml b/bundles/org.eclipse.team.ui/plugin.xml
index 23a969d05..3ca78313d 100644
--- a/bundles/org.eclipse.team.ui/plugin.xml
+++ b/bundles/org.eclipse.team.ui/plugin.xml
@@ -193,14 +193,44 @@
</showInPart>
</perspectiveExtension>
</extension>
-<!-- ***************** Action sets ********************** -->
+<!-- ***************** Actions ********************** -->
+ <extension
+ point="org.eclipse.ui.commands">
+ <category
+ name="%teamCategory.name"
+ description="%teamCategory.description"
+ id="org.eclipse.team.ui.category.team">
+ </category>
+ <command
+ name="%ActionDefinition.synchronizeAll.name"
+ category="org.eclipse.team.ui.category.team"
+ description="%ActionDefinition.synchronizeAll.description"
+ id="org.eclipse.team.ui.synchronizeAll">
+ </command>
+ <keyBinding
+ string=""
+ scope="org.eclipse.ui.globalScope"
+ command="org.eclipse.team.ui.synchronizeAll"
+ configuration="org.eclipse.ui.defaultAcceleratorConfiguration">
+ </keyBinding>
+ </extension>
+<!-- action sets -->
<extension
point="org.eclipse.ui.actionSets">
<actionSet
label="%Team"
description="%ActionSet.description"
- visible="false"
+ visible="true"
id="org.eclipse.team.ui.actionSet">
+ <action
+ label="Synchronize"
+ pulldown="true"
+ style="pulldown"
+ icon="icons/full/cview16/synch_synch.gif"
+ class="org.eclipse.team.internal.ui.synchronize.actions.GlobalRefreshAction"
+ toolbarPath="Normal/Team"
+ id="org.eclipse.team.ui.synchronizeAll">
+ </action>
</actionSet>
</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 5de10c18f..fbdd17aee 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
@@ -288,9 +288,9 @@ public class TeamUIPlugin extends AbstractUIPlugin {
createImageDescriptor(plugin, ISharedImages.IMG_CONFLICT_OVR, baseURL);
createImageDescriptor(plugin, ISharedImages.IMG_CHECKEDIN_OVR, baseURL);
createImageDescriptor(plugin, ISharedImages.IMG_CHECKEDOUT_OVR, baseURL);
-
-
+
createImageDescriptor(plugin, ISharedImages.IMG_SYNC_VIEW, baseURL);
+ createImageDescriptor(plugin, ISharedImages.IMG_COMPARE_VIEW, baseURL);
// Collapse all
createImageDescriptor(plugin, ISharedImages.IMG_COLLAPSE_ALL, baseURL);
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Utils.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Utils.java
index 3a2a29329..a02f4537b 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Utils.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Utils.java
@@ -10,46 +10,30 @@
*******************************************************************************/
package org.eclipse.team.internal.ui;
+import java.io.*;
import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.HashSet;
+import java.util.*;
import java.util.List;
-import java.util.ResourceBundle;
-import java.util.Set;
import org.eclipse.compare.CompareConfiguration;
import org.eclipse.compare.structuremergeviewer.IDiffContainer;
import org.eclipse.compare.structuremergeviewer.IDiffElement;
import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.*;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
+import org.eclipse.jface.dialogs.*;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.*;
import org.eclipse.team.core.TeamException;
import org.eclipse.team.core.synchronize.SyncInfo;
import org.eclipse.team.core.variants.IResourceVariant;
import org.eclipse.team.ui.TeamImages;
import org.eclipse.team.ui.synchronize.subscriber.SubscriberParticipant;
import org.eclipse.team.ui.synchronize.viewers.SynchronizeModelElement;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.IWorkbenchPartSite;
-import org.eclipse.ui.IWorkbenchSite;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.IWorkingSet;
+import org.eclipse.ui.*;
import org.eclipse.ui.progress.IWorkbenchSiteProgressService;
public class Utils {
@@ -470,4 +454,35 @@ public class Utils {
}
job.schedule();
}
+
+ public static byte[] readBytes(InputStream in) {
+ ByteArrayOutputStream bos= new ByteArrayOutputStream();
+ try {
+ while (true) {
+ int c= in.read();
+ if (c == -1)
+ break;
+ bos.write(c);
+ }
+
+ } catch (IOException ex) {
+ return null;
+
+ } finally {
+ if (in != null) {
+ try {
+ in.close();
+ } catch (IOException x) {
+ // silently ignored
+ }
+ }
+ try {
+ bos.close();
+ } catch (IOException x) {
+ // silently ignored
+ }
+ }
+
+ return bos.toByteArray();
+ }
} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/jobs/RefreshSubscriberJob.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/jobs/RefreshSubscriberJob.java
index 439cc04f8..4f2ad9a20 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/jobs/RefreshSubscriberJob.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/jobs/RefreshSubscriberJob.java
@@ -22,8 +22,8 @@ import org.eclipse.team.core.subscribers.*;
import org.eclipse.team.core.synchronize.*;
import org.eclipse.team.internal.ui.Policy;
import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.internal.ui.synchronize.IRefreshEvent;
-import org.eclipse.team.internal.ui.synchronize.IRefreshSubscriberListener;
+import org.eclipse.team.ui.synchronize.subscriber.IRefreshEvent;
+import org.eclipse.team.ui.synchronize.subscriber.IRefreshSubscriberListener;
/**
* Job to refresh a subscriber with its remote state.
@@ -186,7 +186,15 @@ public class RefreshSubscriberJob extends WorkspaceJob {
}
public boolean shouldRun() {
- return collector != null && getSubscriber() != null;
+ // Ensure that any progress shown as a result of this refresh occurs hidden in a progress group.
+ boolean shouldRun = collector != null && getSubscriber() != null;
+ if(shouldRun) {
+ IProgressMonitor group = Platform.getJobManager().createProgressGroup();
+ group.beginTask("Refreshing " + getSubscriber().getName(), 100);
+ setProgressGroup(group, 80);
+ collector.setProgressGroup(group, 20);
+ }
+ return shouldRun;
}
public boolean belongsTo(Object family) {
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/jobs/RefreshUserNotificationPolicy.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/jobs/RefreshUserNotificationPolicy.java
index 52191239a..498554013 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/jobs/RefreshUserNotificationPolicy.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/jobs/RefreshUserNotificationPolicy.java
@@ -1,37 +1,36 @@
package org.eclipse.team.internal.ui.jobs;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
+import java.util.*;
+
+import org.eclipse.compare.CompareUI;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.*;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.team.core.synchronize.SyncInfo;
-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.synchronize.IRefreshEvent;
-import org.eclipse.team.internal.ui.synchronize.IRefreshSubscriberListener;
+import org.eclipse.team.internal.ui.*;
import org.eclipse.team.internal.ui.synchronize.RefreshCompleteDialog;
import org.eclipse.team.ui.TeamUI;
-import org.eclipse.team.ui.synchronize.ISynchronizeManager;
-import org.eclipse.team.ui.synchronize.ISynchronizeParticipant;
import org.eclipse.team.ui.synchronize.ISynchronizeView;
-import org.eclipse.team.ui.synchronize.subscriber.SubscriberParticipant;
+import org.eclipse.team.ui.synchronize.subscriber.*;
+import org.eclipse.team.ui.synchronize.viewers.SyncInfoCompareInput;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.progress.UIJob;
+/**
+ * This class manages the notification and setup that occurs after a refresh is completed.
+ *
+ *
+ */
public class RefreshUserNotificationPolicy implements IRefreshSubscriberListener {
private SubscriberParticipant participant;
- private boolean addIfNeeded;
- public RefreshUserNotificationPolicy(SubscriberParticipant participant, boolean addIfNeeded) {
+ public RefreshUserNotificationPolicy(SubscriberParticipant participant) {
this.participant = participant;
- this.addIfNeeded = addIfNeeded;
}
/*
* (non-Javadoc)
- *
* @see org.eclipse.team.internal.ui.jobs.IRefreshSubscriberListener#refreshStarted(org.eclipse.team.internal.ui.jobs.IRefreshEvent)
*/
public void refreshStarted(IRefreshEvent event) {
@@ -39,22 +38,18 @@ public class RefreshUserNotificationPolicy implements IRefreshSubscriberListener
/*
* (non-Javadoc)
- *
* @see org.eclipse.team.internal.ui.jobs.IRefreshSubscriberListener#refreshDone(org.eclipse.team.internal.ui.jobs.IRefreshEvent)
*/
- public void refreshDone(IRefreshEvent event) {
- if(event.getSubscriber() != participant.getSubscriberSyncInfoCollector().getSubscriber()) return;
-
+ public void refreshDone(final IRefreshEvent event) {
+ if (event.getSubscriber() != participant.getSubscriberSyncInfoCollector().getSubscriber())
+ return;
int type = event.getRefreshType();
-
boolean promptWithChanges = TeamUIPlugin.getPlugin().getPreferenceStore().getBoolean(IPreferenceIds.SYNCVIEW_VIEW_PROMPT_WITH_CHANGES);
boolean promptWhenNoChanges = TeamUIPlugin.getPlugin().getPreferenceStore().getBoolean(IPreferenceIds.SYNCVIEW_VIEW_PROMPT_WHEN_NO_CHANGES);
boolean promptWithChangesBkg = TeamUIPlugin.getPlugin().getPreferenceStore().getBoolean(IPreferenceIds.SYNCVIEW_VIEW_BKG_PROMPT_WITH_CHANGES);
boolean promptWhenNoChangesBkg = TeamUIPlugin.getPlugin().getPreferenceStore().getBoolean(IPreferenceIds.SYNCVIEW_VIEW_BKG_PROMPT_WHEN_NO_CHANGES);
-
boolean shouldPrompt = false;
- SyncInfo[] infos = event.getChanges();
-
+ final SyncInfo[] infos = event.getChanges();
if (type == IRefreshEvent.USER_REFRESH) {
if (promptWhenNoChanges && infos.length == 0) {
shouldPrompt = true;
@@ -68,34 +63,46 @@ public class RefreshUserNotificationPolicy implements IRefreshSubscriberListener
shouldPrompt = true;
}
}
-
- // If there are interesting changes, ensure the sync view is showing them
- // Also, add the participant to the sync view only if changes have been found.
+ // If there are interesting changes, ensure the sync view is showing
+ // them
+ // Also, select them in the sync view
if (infos.length > 0) {
- participant.setMode(SubscriberParticipant.INCOMING_MODE);
- final ISynchronizeManager manager = TeamUI.getSynchronizeManager();
- if (addIfNeeded) {
- manager.addSynchronizeParticipants(new ISynchronizeParticipant[]{participant});
- TeamUIPlugin.getStandardDisplay().asyncExec(new Runnable() {
- public void run() {
- ISynchronizeView view = manager.showSynchronizeViewInActivePage(null);
- if (view != null) {
- view.display(participant);
+ participant.setMode(SubscriberParticipant.BOTH_MODE);
+ }
+ final boolean result[] = {shouldPrompt};
+ TeamUIPlugin.getStandardDisplay().asyncExec(new Runnable() {
+ public void run() {
+ ISynchronizeView view = TeamUI.getSynchronizeManager().showSynchronizeViewInActivePage(null);
+ if (view != null) {
+ view.display(participant);
+ List selectedResources = new ArrayList();
+ selectedResources.addAll(Arrays.asList(event.getResources()));
+ for (int i = 0; i < infos.length; i++) {
+ selectedResources.add(infos[i].getLocal());
+ }
+ IResource[] resources = (IResource[]) selectedResources.toArray(new IResource[selectedResources.size()]);
+ participant.selectResources(resources);
+ if (resources.length == 1 && resources[0].getType() == IResource.FILE) {
+ IResource file = resources[0];
+ SyncInfo info = participant.getSubscriberSyncInfoCollector().getSubscriberSyncInfoSet().getSyncInfo(file);
+ if(info != null) {
+ CompareUI.openCompareEditor(new SyncInfoCompareInput(participant.getName(), info));
+ result[0] = false;
}
}
- });
- }
- }
-
- // Prompt user if preferences are set for this type of refresh.
- if (shouldPrompt) {
- notifyIfNeededModal(event);
- }
+ // Prompt user if preferences are set for this type of refresh.
+ if (result[0]) {
+ notifyIfNeededModal(event);
+ }
+ }
+ }
+ });
RefreshSubscriberJob.removeRefreshListener(this);
}
private void notifyIfNeededModal(final IRefreshEvent event) {
TeamUIPlugin.getStandardDisplay().asyncExec(new Runnable() {
+
public void run() {
RefreshCompleteDialog d = new RefreshCompleteDialog(new Shell(TeamUIPlugin.getStandardDisplay()), event, participant);
d.setBlockOnOpen(false);
@@ -107,6 +114,7 @@ public class RefreshUserNotificationPolicy implements IRefreshSubscriberListener
private void notifyIfNeededNonModal(final IRefreshEvent event) {
String message = Policy.bind("RefreshUserNotificationPolicy.0", event.getSubscriber().getName()); //$NON-NLS-1$
PlatformUI.getWorkbench().getProgressService().requestInUI(new UIJob(message) {
+
public IStatus runInUIThread(IProgressMonitor monitor) {
RefreshCompleteDialog d = new RefreshCompleteDialog(new Shell(TeamUIPlugin.getStandardDisplay()), event, participant);
d.setBlockOnOpen(false);
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 ff1864851..bb90c3ae7 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
@@ -342,15 +342,15 @@ Utils.24=Incoming/Outgoing
Utils.25=Conflicting
Utils.26=unknown mode
RefreshCompleteDialog.4=Team Resfresh Complete - {0}
-RefreshCompleteDialog.5={0} new changes found
-RefreshCompleteDialog.6=No new changes found
+RefreshCompleteDialog.5=Refresh has completed and you have changes to synchronize. The ''{0}'' current has {1} outgoing, {2} incoming, and {3} conflicting changes.
+RefreshCompleteDialog.6=No changes to synchronize.
RefreshCompleteDialog.7=refreshing the following {0} resource(s):
RefreshCompleteDialog.13=SyncViewerPreferencePage.16
RefreshCompleteDialog.14=SyncViewerPreferencePage.17
RefreshCompleteDialog.15=SyncViewerPreferencePage.31
RefreshCompleteDialog.16=SyncViewerPreferencePage.32
-RefreshCompleteDialog.17=Preview Changes >>
-RefreshCompleteDialog.18=<< Preview Changes
+RefreshCompleteDialog.17=Details >>
+RefreshCompleteDialog.18=<< Details
RefreshUserNotificationPolicy.0=Refresh of ''{0}'' Complete.
ConfigureRefreshScheduleDialog.0=Configure Refresh Schedule - {0}
ConfigureRefreshScheduleDialog.1=You can allow ''{0}'' to periodically refresh it's synchronization state in the background.
@@ -372,3 +372,8 @@ RefreshSchedule.12=minute
RefreshSchedule.13=Every {0} {1}
RefreshSchedule.14=Scheduled refresh of ''{0}''
DiffNodeControllerHierarchical.0=Updating labels
+
+OpenComparedDialog.diffViewTitleMany=Changes
+OpenComparedDialog.diffViewTitleOne=Changes
+OpenComparedDialog.noChangeTitle=Operation Complete
+OpenComparedDialog.noChangesMessage=No Changes Found. \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeParticipantDescriptor.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeParticipantDescriptor.java
index f1675c65d..7bfcf122b 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeParticipantDescriptor.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeParticipantDescriptor.java
@@ -23,12 +23,14 @@ public class SynchronizeParticipantDescriptor implements ISynchronizeParticipant
public static final String ATT_ICON = "icon"; //$NON-NLS-1$
public static final String ATT_CLASS = "class"; //$NON-NLS-1$
private static final String ATT_TYPE = "type"; //$NON-NLS-1$
- private static final String TYPE_STATIC = "static"; //$NON-NLS-1$
+ private static final String ATT_TYPE_STATIC = "static"; //$NON-NLS-1$
+ private static final String ATT_SUPPORTS_REFRESH = "supportsRefresh"; //$NON-NLS-1$
private String label;
private String className;
private String type;
private String id;
+ private boolean supportsRefresh;
private ImageDescriptor imageDescriptor;
private String description;
@@ -82,13 +84,17 @@ public class SynchronizeParticipantDescriptor implements ISynchronizeParticipant
return imageDescriptor;
}
- public String getLabel() {
+ public String getName() {
return label;
}
public boolean isStatic() {
if(type == null) return true;
- return type.equals(TYPE_STATIC);
+ return type.equals(ATT_TYPE_STATIC);
+ }
+
+ public boolean doesSupportRefresh() {
+ return supportsRefresh;
}
/**
@@ -99,6 +105,7 @@ public class SynchronizeParticipantDescriptor implements ISynchronizeParticipant
label = configElement.getAttribute(ATT_NAME);
className = configElement.getAttribute(ATT_CLASS);
type = configElement.getAttribute(ATT_TYPE);
+ supportsRefresh = Boolean.valueOf(configElement.getAttribute(ATT_SUPPORTS_REFRESH)).booleanValue();
// Sanity check.
if ((label == null) || (className == null) || (identifier == null)) {
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/IRefreshSubscriberListener.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/IRefreshSubscriberListener.java
deleted file mode 100644
index 12bb707a5..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/IRefreshSubscriberListener.java
+++ /dev/null
@@ -1,6 +0,0 @@
-package org.eclipse.team.internal.ui.synchronize;
-
-public interface IRefreshSubscriberListener {
- public void refreshStarted(IRefreshEvent event);
- public void refreshDone(IRefreshEvent event);
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/LocalResourceTypedElement.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/LocalResourceTypedElement.java
index 237a00fea..09f3e6fef 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/LocalResourceTypedElement.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/LocalResourceTypedElement.java
@@ -78,6 +78,7 @@ public class LocalResourceTypedElement extends ResourceNode {
file.create(is, false, pm);
fDirty= false;
} finally {
+ fireContentChanged();
if (is != null)
try {
is.close();
@@ -124,6 +125,7 @@ public class LocalResourceTypedElement extends ResourceNode {
} catch (CoreException ex) {
}
}
+ fireContentChanged();
return child;
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshCompleteDialog.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshCompleteDialog.java
index 800693903..5a6ad5177 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshCompleteDialog.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshCompleteDialog.java
@@ -11,15 +11,16 @@
package org.eclipse.team.internal.ui.synchronize;
import java.lang.reflect.InvocationTargetException;
+
import org.eclipse.compare.CompareConfiguration;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.viewers.ArrayContentProvider;
-import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
@@ -28,22 +29,26 @@ import org.eclipse.team.core.subscribers.FilteredSyncInfoCollector;
import org.eclipse.team.core.synchronize.*;
import org.eclipse.team.internal.ui.*;
import org.eclipse.team.internal.ui.dialogs.DetailsDialog;
+import org.eclipse.team.ui.synchronize.subscriber.IRefreshEvent;
import org.eclipse.team.ui.synchronize.subscriber.SubscriberParticipant;
-import org.eclipse.team.ui.synchronize.viewers.TreeViewerAdvisor;
import org.eclipse.team.ui.synchronize.viewers.SynchronizeCompareInput;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
+import org.eclipse.team.ui.synchronize.viewers.TreeViewerAdvisor;
public class RefreshCompleteDialog extends DetailsDialog {
+ // For remembering the dialog sizings
private static final String HEIGHT_KEY = "width-key"; //$NON-NLS-1$
- private final static int RESOURCE_LIST_SIZE = 10;
private static final String WIDTH_KEY = "height-key"; //$NON-NLS-1$
+
+ private SyncInfoFilter filter;
private FilteredSyncInfoCollector collector;
private SynchronizeCompareInput compareEditorInput;
private IRefreshEvent event;
private SubscriberParticipant participant;
- private Button promptWhenNoChanges;
- private Button promptWithChanges;
+ private Button currentPersButton;
+ private Button otherPersButton;
+ private Button dontShowAgainButton;
+
private IDialogSettings settings;
private SyncInfoTree syncInfoSet = new SyncInfoTree();
@@ -56,8 +61,7 @@ public class RefreshCompleteDialog extends DetailsDialog {
setImageKey(DLG_IMG_INFO);
// Set-up a sync info set that contains the resources that where found
// when the refresh occured.
- SyncInfoFilter filter = new SyncInfoFilter() {
-
+ filter = new SyncInfoFilter() {
public boolean select(SyncInfo info, IProgressMonitor monitor) {
IResource[] resources = getResources();
for (int i = 0; i < resources.length; i++) {
@@ -123,11 +127,10 @@ public class RefreshCompleteDialog extends DetailsDialog {
protected Composite createDropDownDialogArea(Composite parent) {
try {
CompareConfiguration compareConfig = new CompareConfiguration();
- TreeViewerAdvisor viewerAdvisor = new TreeViewerAdvisor(participant.getId(), null, syncInfoSet);
+ TreeViewerAdvisor viewerAdvisor = new TreeViewerAdvisor(syncInfoSet);
compareEditorInput = new SynchronizeCompareInput(compareConfig, viewerAdvisor) {
-
public String getTitle() {
- return "Resources found during last refresh";
+ return "Changes in " + participant.getName();
}
};
// Preparing the input should be fast since we haven't started the collector
@@ -151,6 +154,22 @@ public class RefreshCompleteDialog extends DetailsDialog {
Control c = compareEditorInput.createContents(result);
data = new GridData(GridData.FILL_BOTH);
c.setLayoutData(data);
+
+ Button onlyNewChangesButton = new Button(result, SWT.CHECK);
+ onlyNewChangesButton.setText("Show only the latest new incoming changes");
+ onlyNewChangesButton.setSelection(true);
+ onlyNewChangesButton.addSelectionListener(new SelectionListener() {
+ public void widgetSelected(SelectionEvent e) {
+ if(((Button)e.getSource()).getSelection()) {
+ collector.setFilter(filter, new NullProgressMonitor());
+ } else {
+ collector.setFilter(new FastSyncInfoFilter(), new NullProgressMonitor());
+ }
+ }
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ });
+
return result;
}
@@ -161,60 +180,38 @@ public class RefreshCompleteDialog extends DetailsDialog {
StringBuffer text = new StringBuffer();
SyncInfo[] changes = event.getChanges();
IResource[] resources = event.getResources();
- if (changes.length != 0) {
- text.append(Policy.bind("RefreshCompleteDialog.5", Integer.toString(changes.length))); //$NON-NLS-1$
+ SyncInfoSet set = getSubscriberSyncInfoSet();
+ if (! set.isEmpty()) {
+ String outgoing = Long.toString(set.countFor(SyncInfo.OUTGOING, SyncInfo.DIRECTION_MASK));
+ String incoming = Long.toString(set.countFor(SyncInfo.INCOMING, SyncInfo.DIRECTION_MASK));
+ String conflicting = Long.toString(set.countFor(SyncInfo.CONFLICTING, SyncInfo.DIRECTION_MASK));
+ text.append(Policy.bind("RefreshCompleteDialog.5", new Object[] {participant.getName(), outgoing, incoming, conflicting})); //$NON-NLS-1$
+ createLabel(parent, text.toString(), 2);
+
+ Group perspectiveSwitchingGroup = new Group(parent, SWT.NULL);
+ perspectiveSwitchingGroup.setLayout(new GridLayout());
+ GridData data = new GridData(GridData.FILL_BOTH);
+ perspectiveSwitchingGroup.setLayoutData(data);
+ perspectiveSwitchingGroup.setText("Select where to show the Synchronize View when there are changes");
+ currentPersButton = new Button(perspectiveSwitchingGroup, SWT.RADIO);
+ currentPersButton.setText("Show in the current perspective");
+ otherPersButton = new Button(perspectiveSwitchingGroup, SWT.RADIO);
+ otherPersButton.setText("Show in the default synchronizing perspective");
+
+ dontShowAgainButton = new Button(parent, SWT.CHECK);
+ dontShowAgainButton.setText("Don't show this dialog again.");
+ dontShowAgainButton.setSelection(false);
} else {
text.append(Policy.bind("RefreshCompleteDialog.6")); //$NON-NLS-1$
}
- text.append(Policy.bind("RefreshCompleteDialog.7", Integer.toString(resources.length))); //$NON-NLS-1$ //$NON-NLS-2$
- createLabel(parent, text.toString(), 2);
- Table table = new Table(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
- GridData data = new GridData(GridData.FILL_BOTH | GridData.GRAB_HORIZONTAL);
- data.horizontalSpan = 2;
- data.widthHint = 200;
- data.heightHint = 125;
- table.setLayoutData(data);
- TableViewer resourceList = new TableViewer(table);
- resourceList.setContentProvider(new ArrayContentProvider());
- resourceList.setLabelProvider(new WorkbenchLabelProvider());
- resourceList.setInput(resources);
- createLabel(parent, "", 2); //$NON-NLS-1$
- promptWhenNoChanges = new Button(parent, SWT.CHECK);
- data = new GridData(GridData.VERTICAL_ALIGN_BEGINNING);
- data.horizontalSpan = 2;
- promptWhenNoChanges.setLayoutData(data);
- promptWithChanges = new Button(parent, SWT.CHECK);
- data = new GridData(GridData.VERTICAL_ALIGN_BEGINNING);
- data.horizontalSpan = 2;
- promptWithChanges.setLayoutData(data);
- if (event.getRefreshType() == IRefreshEvent.USER_REFRESH) {
- promptWhenNoChanges.setText(Policy.bind(Policy.bind("RefreshCompleteDialog.13"))); //$NON-NLS-1$
- promptWhenNoChanges.setSelection(TeamUIPlugin.getPlugin().getPreferenceStore().getBoolean(IPreferenceIds.SYNCVIEW_VIEW_PROMPT_WHEN_NO_CHANGES));
- promptWithChanges.setText(Policy.bind(Policy.bind("RefreshCompleteDialog.14"))); //$NON-NLS-1$
- promptWithChanges.setSelection(TeamUIPlugin.getPlugin().getPreferenceStore().getBoolean(IPreferenceIds.SYNCVIEW_VIEW_PROMPT_WITH_CHANGES));
- } else {
- promptWhenNoChanges.setText(Policy.bind(Policy.bind("RefreshCompleteDialog.15"))); //$NON-NLS-1$
- promptWhenNoChanges.setSelection(TeamUIPlugin.getPlugin().getPreferenceStore().getBoolean(IPreferenceIds.SYNCVIEW_VIEW_BKG_PROMPT_WHEN_NO_CHANGES));
- promptWithChanges.setText(Policy.bind(Policy.bind("RefreshCompleteDialog.16"))); //$NON-NLS-1$
- promptWithChanges.setSelection(TeamUIPlugin.getPlugin().getPreferenceStore().getBoolean(IPreferenceIds.SYNCVIEW_VIEW_BKG_PROMPT_WITH_CHANGES));
- }
+
Dialog.applyDialogFont(parent);
}
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.dialogs.DetailsDialog#getDetailsButtonLabelHide()
- */
- protected String getDetailsButtonLabelHide() {
- return Policy.bind("RefreshCompleteDialog.18");
+ protected SyncInfoSet getSubscriberSyncInfoSet() {
+ return participant.getSubscriberSyncInfoCollector().getSubscriberSyncInfoSet();
}
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.dialogs.DetailsDialog#getDetailsButtonLabelShow()
- */
- protected String getDetailsButtonLabelShow() {
- return Policy.bind("RefreshCompleteDialog.17");
- }
-
+
/* (non-Javadoc)
* @see org.eclipse.jface.window.Window#getInitialSize()
*/
@@ -241,7 +238,7 @@ public class RefreshCompleteDialog extends DetailsDialog {
* @see org.eclipse.team.internal.ui.dialogs.DetailsDialog#includeDetailsButton()
*/
protected boolean includeDetailsButton() {
- return event.getChanges().length != 0;
+ return ! getSubscriberSyncInfoSet().isEmpty();
}
/* (non-Javadoc)
@@ -255,13 +252,13 @@ public class RefreshCompleteDialog extends DetailsDialog {
* @see org.eclipse.jface.dialogs.Dialog#okPressed()
*/
protected void okPressed() {
- if (event.getRefreshType() == IRefreshEvent.USER_REFRESH) {
+ /*if (event.getRefreshType() == IRefreshEvent.USER_REFRESH) {
TeamUIPlugin.getPlugin().getPreferenceStore().setValue(IPreferenceIds.SYNCVIEW_VIEW_PROMPT_WHEN_NO_CHANGES, promptWhenNoChanges.getSelection());
TeamUIPlugin.getPlugin().getPreferenceStore().setValue(IPreferenceIds.SYNCVIEW_VIEW_PROMPT_WITH_CHANGES, promptWithChanges.getSelection());
} else {
TeamUIPlugin.getPlugin().getPreferenceStore().setValue(IPreferenceIds.SYNCVIEW_VIEW_BKG_PROMPT_WHEN_NO_CHANGES, promptWhenNoChanges.getSelection());
TeamUIPlugin.getPlugin().getPreferenceStore().setValue(IPreferenceIds.SYNCVIEW_VIEW_BKG_PROMPT_WITH_CHANGES, promptWithChanges.getSelection());
- }
+ }*/
TeamUIPlugin.getPlugin().savePluginPreferences();
super.okPressed();
}
@@ -277,6 +274,7 @@ public class RefreshCompleteDialog extends DetailsDialog {
label.setText(text);
GridData data = new GridData();
data.horizontalSpan = columns;
+ data.widthHint = 375;
label.setLayoutData(data);
return label;
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RemoteResourceTypedElement.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RemoteResourceTypedElement.java
index 912f874d5..3210ffbaf 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RemoteResourceTypedElement.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RemoteResourceTypedElement.java
@@ -18,6 +18,7 @@ import org.eclipse.core.runtime.*;
import org.eclipse.swt.graphics.Image;
import org.eclipse.team.core.TeamException;
import org.eclipse.team.core.variants.IResourceVariant;
+import org.eclipse.team.internal.core.Assert;
/**
* RemoteResourceTypedElement
@@ -31,6 +32,7 @@ public class RemoteResourceTypedElement extends BufferedContent implements IType
* Creates a new content buffer for the given team node.
*/
public RemoteResourceTypedElement(IResourceVariant remote) {
+ Assert.isNotNull(remote);
this.remote = remote;
}
@@ -112,4 +114,15 @@ public class RemoteResourceTypedElement extends BufferedContent implements IType
public void cacheContents(IProgressMonitor monitor) throws TeamException {
bufferedContents = remote.getStorage(monitor);
}
+
+ /**
+ * Update the remote handle in this typed element.
+ * @param variant the new remote handle
+ */
+ public void update(IResourceVariant variant) {
+ Assert.isNotNull(variant);
+ discardBuffer();
+ remote = variant;
+ fireContentChanged();
+ }
} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeManager.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeManager.java
index 5e6f95f1b..adad5a7cd 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeManager.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeManager.java
@@ -160,7 +160,7 @@ public class SynchronizeManager implements ISynchronizeManager {
participant.init(savedState);
} catch (PartInitException e2) {
participant = null;
- throw new TeamException(Policy.bind("SynchronizeManager.11"), e2);
+ throw new TeamException(Policy.bind("SynchronizeManager.11"), e2); //$NON-NLS-1$
} catch (CoreException e) {
participant = null;
throw TeamException.asTeamException(e);
@@ -300,6 +300,13 @@ public class SynchronizeManager implements ISynchronizeManager {
}
return (ISynchronizeParticipant[]) participants.toArray(new ISynchronizeParticipant[participants.size()]);
}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.team.ui.synchronize.ISynchronizeManager#getParticipantDescriptors()
+ */
+ public ISynchronizeParticipantDescriptor[] getParticipantDescriptors() {
+ return participantRegistry.getSynchronizeParticipants();
+ }
/*
* (non-Javadoc)
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/GlobalRefreshAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/GlobalRefreshAction.java
new file mode 100644
index 000000000..22de9ef87
--- /dev/null
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/GlobalRefreshAction.java
@@ -0,0 +1,140 @@
+/*******************************************************************************
+ * 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.synchronize.actions;
+
+import org.eclipse.jface.action.*;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.wizard.IWizard;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.*;
+import org.eclipse.team.internal.ui.Utils;
+import org.eclipse.team.ui.TeamUI;
+import org.eclipse.team.ui.synchronize.ISynchronizeParticipant;
+import org.eclipse.team.ui.synchronize.ISynchronizeParticipantDescriptor;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.IWorkbenchWindowPulldownDelegate;
+import org.eclipse.ui.texteditor.IUpdate;
+
+public class GlobalRefreshAction extends Action implements IMenuCreator, IWorkbenchWindowPulldownDelegate, IUpdate {
+
+ private Menu fMenu;
+ private IWorkbenchWindow window;
+
+ static class SynchronizeWizardDialog extends WizardDialog {
+ SynchronizeWizardDialog(Shell parent, IWizard wizard) {
+ super(parent, wizard);
+ setShellStyle(getShellStyle());
+ setMinimumPageSize(500, 300);
+ }
+ }
+
+ class RefreshParticipantAction extends Action {
+ private ISynchronizeParticipantDescriptor participantDescriptor;
+
+ public void run() {
+ GlobalSynchronizeWizard wizard = new GlobalSynchronizeWizard(participantDescriptor);
+ SynchronizeWizardDialog dialog = new SynchronizeWizardDialog(window.getShell(), wizard);
+ dialog.open();
+ }
+
+ public RefreshParticipantAction(int prefix, ISynchronizeParticipantDescriptor participantDescriptor) {
+ super("&" + prefix + " " + participantDescriptor.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+ this.participantDescriptor = participantDescriptor;
+ setImageDescriptor(participantDescriptor.getImageDescriptor());
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.texteditor.IUpdate#update()
+ */
+ public void update() {
+ ISynchronizeParticipant[] pages = TeamUI.getSynchronizeManager().getSynchronizeParticipants();
+ setEnabled(pages.length >= 1);
+ }
+
+ public GlobalRefreshAction() {
+ Utils.initAction(this, "action.refreshSubscriber."); //$NON-NLS-1$
+ setMenuCreator(this);
+ update();
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.action.IMenuCreator#dispose()
+ */
+ public void dispose() {
+ if (fMenu != null) {
+ fMenu.dispose();
+ }
+ }
+
+ /*
+ * (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);
+ ISynchronizeParticipantDescriptor[] descriptions = TeamUI.getSynchronizeManager().getParticipantDescriptors();
+ for (int i = 0; i < descriptions.length; i++) {
+ ISynchronizeParticipantDescriptor description = descriptions[i];
+ if (description.doesSupportRefresh()) {
+ Action action = new RefreshParticipantAction(i + 1, description);
+ 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.ui.IWorkbenchWindowActionDelegate#init(org.eclipse.ui.IWorkbenchWindow)
+ */
+ public void init(IWorkbenchWindow window) {
+ this.window = window;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
+ */
+ public void run(IAction action) {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction,
+ * org.eclipse.jface.viewers.ISelection)
+ */
+ public void selectionChanged(IAction action, ISelection selection) {
+ }
+} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/GlobalRefreshResourceSelectionPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/GlobalRefreshResourceSelectionPage.java
new file mode 100644
index 000000000..dc91c56e7
--- /dev/null
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/GlobalRefreshResourceSelectionPage.java
@@ -0,0 +1,128 @@
+/*******************************************************************************
+ * 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.synchronize.actions;
+
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.viewers.*;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.*;
+import org.eclipse.team.ui.synchronize.subscriber.SubscriberParticipant;
+import org.eclipse.ui.internal.dialogs.ContainerCheckedTreeViewer;
+import org.eclipse.ui.model.BaseWorkbenchContentProvider;
+import org.eclipse.ui.model.WorkbenchLabelProvider;
+import org.eclipse.ui.views.navigator.ResourceSorter;
+
+/**
+ * Page that allows the user to select a set of resources that are managed
+ * by a synchronize participant.
+ *
+ * Remembers last selection
+ * Remembers last working set
+ *
+ * @since 3.0
+ */
+public class GlobalRefreshResourceSelectionPage extends WizardPage {
+
+ private SubscriberParticipant participant;
+ private Button dontPrompt;
+ private ContainerCheckedTreeViewer fViewer;
+
+ class MyContentProvider extends BaseWorkbenchContentProvider {
+ public Object[] getChildren(Object element) {
+ if(element instanceof SubscriberParticipant) {
+ return ((SubscriberParticipant)element).getResources();
+ }
+ return super.getChildren(element);
+ }
+ }
+
+ class MyLabelProvider extends LabelProvider {
+ private LabelProvider workbenchProvider = new WorkbenchLabelProvider();
+ public String getText(Object element) {
+ if(element instanceof IContainer) {
+ IContainer c = (IContainer)element;
+ List participantRoots = Arrays.asList(participant.getResources());
+ if(participantRoots.contains(c)) {
+ return c.getFullPath().toString();
+ }
+ }
+ return workbenchProvider.getText(element);
+ }
+ public Image getImage(Object element) {
+ return workbenchProvider.getImage(element);
+ }
+ }
+
+ public GlobalRefreshResourceSelectionPage(SubscriberParticipant participant) {
+ super("Synchronize");
+ this.participant = participant;
+ setDescription("Select the resource to synchronize");
+ setTitle("Synchronize");
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
+ */
+ public void createControl(Composite parent2) {
+ Composite top = new Composite(parent2, SWT.NULL);
+ top.setLayout(new GridLayout());
+ setControl(top);
+
+ Label l = new Label(parent2, SWT.NULL);
+ l.setText("Available resources to Synchronize:");
+ fViewer = new ContainerCheckedTreeViewer(top, SWT.BORDER);
+ GridData data = new GridData(GridData.FILL_BOTH);
+ fViewer.getControl().setLayoutData(data);
+ fViewer.setContentProvider(new MyContentProvider());
+ fViewer.setLabelProvider(new MyLabelProvider());
+ fViewer.addCheckStateListener(new ICheckStateListener() {
+ public void checkStateChanged(CheckStateChangedEvent event) {
+ updateOKStatus();
+ }
+ });
+ fViewer.setSorter(new ResourceSorter(ResourceSorter.NAME));
+
+ fViewer.setInput(participant);
+
+ Button selectAll = new Button(top, SWT.NULL);
+ selectAll.setText("&Select All");
+ selectAll.addSelectionListener(new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent e) {
+ fViewer.setCheckedElements(participant.getResources());
+ }
+ });
+
+ Button deSelectAll = new Button(top, SWT.NULL);
+ deSelectAll.setText("&Deselect All");
+ deSelectAll.addSelectionListener(new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent e) {
+ fViewer.setCheckedElements(new Object[0]);
+ }
+ });
+
+ //dontPrompt = new Button(top, SWT.CHECK);
+ //dontPrompt.setText("Don't prompt for resources anymore. Refresh the selection or the current working set in the Synchronize View.");
+ Dialog.applyDialogFont(parent2);
+ }
+
+ protected void updateOKStatus() {
+ }
+}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/GlobalSynchronizeWizard.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/GlobalSynchronizeWizard.java
new file mode 100644
index 000000000..b045e5c39
--- /dev/null
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/GlobalSynchronizeWizard.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * 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.synchronize.actions;
+
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.team.ui.synchronize.ISynchronizeParticipantDescriptor;
+
+
+public class GlobalSynchronizeWizard extends Wizard {
+
+ private ISynchronizeParticipantDescriptor participantDescriptor;
+ private GlobalRefreshResourceSelectionPage selectionPage;
+
+ public GlobalSynchronizeWizard(ISynchronizeParticipantDescriptor participantDescriptor) {
+ this.participantDescriptor = participantDescriptor;
+ setWindowTitle("Team Synchronize");
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.wizard.Wizard#addPages()
+ */
+ public void addPages() {
+ if(participantDescriptor == null) {
+ // addPage();
+ }
+ selectionPage = new GlobalRefreshResourceSelectionPage();
+ addPage(selectionPage);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.wizard.IWizard#performFinish()
+ */
+ public boolean performFinish() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/OpenInCompareAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/OpenInCompareAction.java
index bb4784fc7..0a99a1f94 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/OpenInCompareAction.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/OpenInCompareAction.java
@@ -10,7 +10,6 @@
*******************************************************************************/
package org.eclipse.team.internal.ui.synchronize.actions;
-import org.eclipse.compare.CompareConfiguration;
import org.eclipse.compare.CompareUI;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
@@ -95,9 +94,7 @@ public class OpenInCompareAction extends Action {
*/
private static SyncInfoCompareInput getCompareInput(ISynchronizeParticipant participant, SyncInfo info) {
if (info != null && info.getLocal() instanceof IFile) {
- CompareConfiguration cc = new CompareConfiguration();
- //cc.setProperty(CompareConfiguration.USE_OUTLINE_VIEW, Boolean.TRUE);
- return new SyncInfoCompareInput(cc, participant.getName(), info);
+ return new SyncInfoCompareInput(participant.getName(), info);
}
return null;
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/TeamParticipantRefreshAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/TeamParticipantRefreshAction.java
deleted file mode 100644
index 1dbb8fce9..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/TeamParticipantRefreshAction.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * 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.synchronize.actions;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.team.internal.ui.jobs.RefreshUserNotificationPolicy;
-import org.eclipse.team.ui.synchronize.subscriber.RefreshAction;
-import org.eclipse.team.ui.synchronize.subscriber.SubscriberParticipant;
-import org.eclipse.ui.IWorkbenchSite;
-
-/**
- * A specialized RefreshAction that extracts the required components from a
- * particpant.
- */
-public class TeamParticipantRefreshAction extends RefreshAction {
-
- public TeamParticipantRefreshAction(ISelectionProvider provider, SubscriberParticipant participant, boolean addIfNeeded, boolean refreshAll) {
- super(provider, participant.getName(), participant.getSubscriberSyncInfoCollector(), new RefreshUserNotificationPolicy(participant, addIfNeeded), refreshAll);
- }
-
- public static void run(IWorkbenchSite site, IResource[] resources, SubscriberParticipant participant, boolean addIfNeeded) {
- run(site, participant.getName(), resources, participant.getSubscriberSyncInfoCollector(), new RefreshUserNotificationPolicy(participant, addIfNeeded));
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/ISharedImages.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/ISharedImages.java
index b827bebb5..81e612616 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/ISharedImages.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/ISharedImages.java
@@ -26,6 +26,7 @@ public interface ISharedImages {
public final String IMG_COLLAPSE_ALL_ENABLED = "elcl16/collapseall.gif"; //$NON-NLS-1$
public final String IMG_SYNC_VIEW = "cview16/synch_synch.gif"; //$NON-NLS-1$
+ public final String IMG_COMPARE_VIEW = "cview16/compare_view.gif"; //$NON-NLS-1$
// local toolbars (colour)
public final String IMG_DLG_SYNC_INCOMING = "clcl16/incom_synch.gif"; //$NON-NLS-1$
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeManager.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeManager.java
index 9c5cdbebc..d32d72620 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeManager.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeManager.java
@@ -87,4 +87,11 @@ public interface ISynchronizeManager {
* <code>null</code> if a descriptor is not found for that id.
*/
public ISynchronizeParticipantDescriptor getParticipantDescriptor(String id);
+
+ /**
+ * Returns the descriptions of the registered synchronize participants.
+ *
+ * @return the descriptions of the registered synchronize participants.
+ */
+ public ISynchronizeParticipantDescriptor[] getParticipantDescriptors();
} \ No newline at end of file
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 4daa0e83f..c34b7fadd 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
@@ -10,9 +10,12 @@
*******************************************************************************/
package org.eclipse.team.ui.synchronize;
+import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.IExecutableExtension;
+import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.wizard.IWizardPage;
import org.eclipse.ui.IMemento;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.part.IPageBookViewPage;
@@ -93,7 +96,13 @@ public interface ISynchronizeParticipant extends IExecutableExtension {
* participant
*/
public IPageBookViewPage createPage(ISynchronizeView view);
-
+
+ /**
+ * Creates and returns a wizard page used to globally refresh this participant.
+ *
+ */
+ public IWizardPage createRefreshPage();
+
/**
* Initializes this participant with the given participant state.
* A memento is passed to the participant which contains a snapshot
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipantDescriptor.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipantDescriptor.java
index 9a0a99fac..0cfbed6f5 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipantDescriptor.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipantDescriptor.java
@@ -25,6 +25,13 @@ import org.eclipse.jface.resource.ImageDescriptor;
*/
public interface ISynchronizeParticipantDescriptor {
/**
+ * Returns the name of this participant. This can be shown to the user.
+ *
+ * @return the name of this participant. This can be shown to the user.
+ */
+ public String getName();
+
+ /**
* Returns a string describing this participant type.
*
* @return a string describing this participant type.
@@ -56,4 +63,11 @@ public interface ISynchronizeParticipantDescriptor {
* <code>false</code> otherwise
*/
public boolean isStatic();
+
+ /**
+ * Returns if this participant supports a global refresh action.
+ *
+ * @return if this participant supports a global refresh action.
+ */
+ public boolean doesSupportRefresh();
} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/IRefreshEvent.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/subscriber/IRefreshEvent.java
index 1fd7579a0..995db2767 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/IRefreshEvent.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/subscriber/IRefreshEvent.java
@@ -8,7 +8,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
-package org.eclipse.team.internal.ui.synchronize;
+package org.eclipse.team.ui.synchronize.subscriber;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.IStatus;
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/subscriber/IRefreshSubscriberListener.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/subscriber/IRefreshSubscriberListener.java
new file mode 100644
index 000000000..ef57f1b5f
--- /dev/null
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/subscriber/IRefreshSubscriberListener.java
@@ -0,0 +1,16 @@
+/*******************************************************************************
+ * 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.subscriber;
+
+public interface IRefreshSubscriberListener {
+ public void refreshStarted(IRefreshEvent event);
+ public void refreshDone(IRefreshEvent event);
+} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/subscriber/OpenCompareDialogAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/subscriber/OpenCompareDialogAction.java
new file mode 100644
index 000000000..fb3e1fad3
--- /dev/null
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/subscriber/OpenCompareDialogAction.java
@@ -0,0 +1,124 @@
+/*******************************************************************************
+ * 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.subscriber;
+
+import java.lang.reflect.InvocationTargetException;
+
+import org.eclipse.compare.*;
+import org.eclipse.compare.CompareConfiguration;
+import org.eclipse.compare.CompareUI;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.team.core.subscribers.Subscriber;
+import org.eclipse.team.core.synchronize.SyncInfo;
+import org.eclipse.team.internal.ui.*;
+import org.eclipse.team.ui.synchronize.viewers.*;
+
+/**
+ * Action to refresh a participant to find changes then display them in a dialog. The user can edit the changes
+ * in the dialog and will be prompted to save the changes when the dialog is closed.
+ *
+ * @since 3.0
+ */
+public class OpenCompareDialogAction {
+
+ private SubscriberParticipant participant;
+ private Shell shell;
+ private IResource[] resources;
+ private boolean rememberInSyncView;
+ private String targetId;
+
+ /**
+ *
+ * @param shell shell to use to open the compare dialog
+ * @param participant the participant to use as a basis for the comparison
+ * @param resources
+ */
+ public OpenCompareDialogAction(Shell shell, String targetId, SubscriberParticipant participant, IResource[] resources) {
+ this.shell = shell;
+ this.targetId = targetId;
+ this.participant = participant;
+ this.resources = resources;
+ }
+
+ public void run() {
+ Subscriber s = participant.getSubscriber();
+ RefreshAction.run(null, participant.getName(), s.roots(), participant.getSubscriberSyncInfoCollector(), new IRefreshSubscriberListener() {
+ public void refreshStarted(IRefreshEvent event) {
+ }
+ public void refreshDone(final IRefreshEvent event) {
+ TeamUIPlugin.getStandardDisplay().asyncExec(new Runnable() {
+ public void run() {
+ if (participant.getSubscriberSyncInfoCollector().getSyncInfoTree().isEmpty()) {
+ MessageDialog.openInformation(getShell(), Policy.bind("OpenComparedDialog.noChangeTitle"), Policy.bind("OpenComparedDialog.noChangesMessage"));
+ return;
+ }
+ if (isSingleFileCompare(resources)) {
+ compareAndOpenEditors(event, participant);
+ } else {
+ compareAndOpenDialog(event, participant);
+ }
+ }
+ });
+ }
+ });
+ }
+
+ protected Shell getShell() {
+ return shell;
+ }
+
+ protected boolean isSingleFileCompare(IResource[] resources) {
+ return resources.length == 1 && resources[0].getType() == IResource.FILE;
+ }
+
+ protected void compareAndOpenEditors(IRefreshEvent event, SubscriberParticipant participant) {
+ SyncInfo[] changes = event.getChanges();
+ for (int i = 0; i < changes.length; i++) {
+ SyncInfo info = changes[i];
+ CompareUI.openCompareEditor(new SyncInfoCompareInput(event.getSubscriber().getName(), info));
+ }
+ }
+
+ protected void compareAndOpenDialog(final IRefreshEvent event, final SubscriberParticipant participant) {
+ TreeViewerAdvisor advisor = new TreeViewerAdvisor(targetId, null, participant.getSubscriberSyncInfoCollector().getSyncInfoTree());
+ CompareConfiguration cc = new CompareConfiguration();
+ SynchronizeCompareInput input = new SynchronizeCompareInput(cc, advisor) {
+ public String getTitle() {
+ int numChanges = participant.getSubscriberSyncInfoCollector().getSyncInfoTree().size();
+ if(numChanges > 1) {
+ return Policy.bind("OpenComparedDialog.diffViewTitleMany", Integer.toString(numChanges));
+ } else {
+ return Policy.bind("OpenComparedDialog.diffViewTitleOne", Integer.toString(numChanges));
+ }
+ }
+ };
+ try {
+ // model will be built in the background since we know the compare input was
+ // created with a subscriber participant
+ input.run(new NullProgressMonitor());
+ } catch (InterruptedException e) {
+ Utils.handle(e);
+ } catch (InvocationTargetException e) {
+ Utils.handle(e);
+ }
+ CompareDialog dialog = createCompareDialog(getShell(), participant.getName(), input);
+ dialog.setSynchronizeParticipant(participant);
+ dialog.setBlockOnOpen(true);
+ dialog.open();
+ }
+
+ protected CompareDialog createCompareDialog(Shell shell, String title, CompareEditorInput input) {
+ return new CompareDialog(shell, title, input);
+ }
+}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/subscriber/RefreshAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/subscriber/RefreshAction.java
index a3b999a5a..5ff05a326 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/subscriber/RefreshAction.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/subscriber/RefreshAction.java
@@ -11,20 +11,17 @@
package org.eclipse.team.ui.synchronize.subscriber;
import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.Platform;
import org.eclipse.jface.action.Action;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.*;
import org.eclipse.team.core.subscribers.SubscriberSyncInfoCollector;
-import org.eclipse.team.internal.ui.Policy;
import org.eclipse.team.internal.ui.Utils;
import org.eclipse.team.internal.ui.jobs.RefreshSubscriberJob;
-import org.eclipse.team.internal.ui.synchronize.IRefreshSubscriberListener;
import org.eclipse.ui.IWorkbenchSite;
/**
* A general refresh action that will refresh a subscriber in the background.
+ *
+ * @since 3.0
*/
public class RefreshAction extends Action {
@@ -56,13 +53,34 @@ public class RefreshAction extends Action {
}
}
- public static void run(IWorkbenchSite site, String description, IResource[] resources, final SubscriberSyncInfoCollector collector, IRefreshSubscriberListener listener) {
- // Cancel the scheduled background refresh or any other refresh that is happening.
- // The scheduled background refresh will restart automatically.
- Platform.getJobManager().cancel(RefreshSubscriberJob.getFamily());
- RefreshSubscriberJob job = new RefreshSubscriberJob(Policy.bind("SyncViewRefresh.taskName", description), resources, collector); //$NON-NLS-1$
+ /**
+ * Policy.bind("SyncViewRefresh.taskName");
+ *
+ * @param site
+ * @param taskName
+ * @param description
+ * @param resources
+ * @param collector
+ * @param listener
+ */
+ public static void run(IWorkbenchSite site, String taskName, IResource[] resources, final SubscriberSyncInfoCollector collector, final IRefreshSubscriberListener listener) {
+ RefreshSubscriberJob job = new RefreshSubscriberJob(taskName, resources, collector); //$NON-NLS-1$
+ IRefreshSubscriberListener autoListener = new IRefreshSubscriberListener() {
+ public void refreshStarted(IRefreshEvent event) {
+ if(listener != null) {
+ listener.refreshStarted(event);
+ }
+ }
+ public void refreshDone(IRefreshEvent event) {
+ if(listener != null) {
+ listener.refreshDone(event);
+ RefreshSubscriberJob.removeRefreshListener(this);
+ }
+ }
+ };
+
if (listener != null) {
- RefreshSubscriberJob.addRefreshListener(listener);
+ RefreshSubscriberJob.addRefreshListener(autoListener);
}
Utils.schedule(job, site);
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/subscriber/SubscriberParticipant.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/subscriber/SubscriberParticipant.java
index 5a9ef43d3..d53c94b13 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/subscriber/SubscriberParticipant.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/subscriber/SubscriberParticipant.java
@@ -11,25 +11,20 @@
package org.eclipse.team.ui.synchronize.subscriber;
import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.jface.wizard.IWizardPage;
import org.eclipse.team.core.subscribers.Subscriber;
import org.eclipse.team.core.subscribers.SubscriberSyncInfoCollector;
import org.eclipse.team.core.synchronize.FastSyncInfoFilter;
import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.internal.ui.IPreferenceIds;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.internal.ui.synchronize.actions.TeamParticipantRefreshAction;
+import org.eclipse.team.internal.ui.*;
+import org.eclipse.team.internal.ui.jobs.RefreshUserNotificationPolicy;
+import org.eclipse.team.internal.ui.synchronize.actions.GlobalRefreshResourceSelectionPage;
import org.eclipse.team.ui.TeamUI;
-import org.eclipse.team.ui.synchronize.AbstractSynchronizeParticipant;
-import org.eclipse.team.ui.synchronize.ISynchronizeParticipant;
-import org.eclipse.team.ui.synchronize.ISynchronizeView;
-import org.eclipse.ui.IMemento;
-import org.eclipse.ui.IWorkbenchSite;
-import org.eclipse.ui.IWorkingSet;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
+import org.eclipse.team.ui.synchronize.*;
+import org.eclipse.ui.*;
import org.eclipse.ui.part.IPageBookViewPage;
/**
@@ -50,7 +45,7 @@ public abstract class SubscriberParticipant extends AbstractSynchronizeParticipa
private ISynchronizeView view;
- private boolean starting = true;
+ private SubscriberParticipantPage page;
/**
* Key for settings in memento
@@ -101,13 +96,21 @@ public abstract class SubscriberParticipant extends AbstractSynchronizeParticipa
*/
public final IPageBookViewPage createPage(ISynchronizeView view) {
this.view = view;
- return doCreatePage(view);
+ this.page = doCreatePage(view);
+ return this.page;
}
- protected IPageBookViewPage doCreatePage(ISynchronizeView view) {
+ protected SubscriberParticipantPage doCreatePage(ISynchronizeView view) {
return new SubscriberParticipantPage(this, view);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.team.ui.synchronize.ISynchronizeParticipant#createRefreshPage()
+ */
+ public IWizardPage createRefreshPage() {
+ return new GlobalRefreshResourceSelectionPage(this);
+ }
+
public void setMode(int mode) {
int oldMode = getMode();
if(oldMode == mode) return;
@@ -144,13 +147,27 @@ public abstract class SubscriberParticipant extends AbstractSynchronizeParticipa
return workingSet;
}
- public void refreshWithRemote(IResource[] resources, boolean addIfNeeded) {
+ public void selectResources(IResource[] resources) {
+ page.setSelection(resources, true);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.team.ui.synchronize.ISynchronizeParticipant#getResources()
+ */
+ public IResource[] getResources() {
+ return collector.getSubscriber().roots();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.team.ui.synchronize.ISynchronizeParticipant#refresh(org.eclipse.core.resources.IResource[])
+ */
+ public void refresh(IResource[] resources) {
IWorkbenchSite site = view != null ? view.getSite() : null;
+ IResource[] resourcesToRefresh = resources;
if((resources == null || resources.length == 0)) {
- TeamParticipantRefreshAction.run(site, collector.getWorkingSet(), this, addIfNeeded);
- } else {
- TeamParticipantRefreshAction.run(site, resources, this, addIfNeeded);
+ resourcesToRefresh = collector.getWorkingSet();
}
+ RefreshAction.run(site, getName(), resourcesToRefresh, getSubscriberSyncInfoCollector(), new RefreshUserNotificationPolicy(this));
}
/* (non-Javadoc)
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/subscriber/SubscriberParticipantPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/subscriber/SubscriberParticipantPage.java
index 712c82176..fe705c96b 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/subscriber/SubscriberParticipantPage.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/subscriber/SubscriberParticipantPage.java
@@ -11,6 +11,7 @@
package org.eclipse.team.ui.synchronize.subscriber;
import org.eclipse.compare.internal.INavigatable;
+import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.jface.action.*;
import org.eclipse.jface.util.IPropertyChangeListener;
@@ -21,10 +22,12 @@ import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.*;
import org.eclipse.team.internal.ui.*;
+import org.eclipse.team.internal.ui.jobs.RefreshUserNotificationPolicy;
import org.eclipse.team.internal.ui.synchronize.ChangesSection;
import org.eclipse.team.internal.ui.synchronize.ConfigureRefreshScheduleDialog;
import org.eclipse.team.internal.ui.synchronize.actions.*;
import org.eclipse.team.ui.synchronize.ISynchronizeView;
+import org.eclipse.team.ui.synchronize.viewers.StructuredViewerAdvisor;
import org.eclipse.team.ui.synchronize.viewers.TreeViewerAdvisor;
import org.eclipse.ui.*;
import org.eclipse.ui.part.*;
@@ -58,7 +61,7 @@ public class SubscriberParticipantPage implements IPageBookViewPage, IPropertyCh
private NavigateAction gotoPrevious;
private Action configureSchedule;
private SyncViewerShowPreferencesAction showPreferences;
- private TeamParticipantRefreshAction refreshAllAction;
+ private RefreshAction refreshAllAction;
private Action collapseAll;
private WorkingSetFilterActionGroup workingSetGroup;
private StatusLineContributionGroup statusLine;
@@ -101,7 +104,7 @@ public class SubscriberParticipantPage implements IPageBookViewPage, IPropertyCh
};
gotoNext = new NavigateAction(view, nav, true /*next*/);
gotoPrevious = new NavigateAction(view, nav, false /*previous*/);
- refreshAllAction = new TeamParticipantRefreshAction(getSite().getSelectionProvider(), getParticipant(), false, true /* refresh all */);
+ refreshAllAction = new RefreshAction(getSite().getSelectionProvider(), getParticipant().getName(), getParticipant().getSubscriberSyncInfoCollector(), new RefreshUserNotificationPolicy(getParticipant()), true /* refresh all */);
refreshAllAction.setWorkbenchSite(view.getSite());
collapseAll = new Action() {
public void run() {
@@ -297,8 +300,8 @@ public class SubscriberParticipantPage implements IPageBookViewPage, IPropertyCh
getSite().setSelectionProvider(viewer);
return viewer;
}
-
- public TreeViewerAdvisor getViewerConfiguration() {
+
+ public StructuredViewerAdvisor getViewerConfiguration() {
return viewerAdvisor;
}
@@ -309,4 +312,8 @@ public class SubscriberParticipantPage implements IPageBookViewPage, IPropertyCh
protected SynchronizeViewerAdvisor createSynchronizeViewerAdvisor() {
return new SynchronizeViewerAdvisor(getSynchronizeView(), getParticipant());
}
+
+ public void setSelection(IResource[] resources, boolean reveal) {
+ getViewerConfiguration().setSelection(resources, reveal);
+ }
} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/subscriber/SubscriberRefreshSchedule.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/subscriber/SubscriberRefreshSchedule.java
index 1b8a8c7f8..17acfd648 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/subscriber/SubscriberRefreshSchedule.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/subscriber/SubscriberRefreshSchedule.java
@@ -9,8 +9,6 @@ import org.eclipse.team.core.synchronize.SyncInfoSet;
import org.eclipse.team.internal.ui.Policy;
import org.eclipse.team.internal.ui.TeamUIPlugin;
import org.eclipse.team.internal.ui.jobs.RefreshSubscriberJob;
-import org.eclipse.team.internal.ui.synchronize.IRefreshEvent;
-import org.eclipse.team.internal.ui.synchronize.IRefreshSubscriberListener;
import org.eclipse.ui.IMemento;
public class SubscriberRefreshSchedule {
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/subscriber/SynchronizeViewerAdvisor.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/subscriber/SynchronizeViewerAdvisor.java
index 427c714c5..b3b00ce68 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/subscriber/SynchronizeViewerAdvisor.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/subscriber/SynchronizeViewerAdvisor.java
@@ -16,9 +16,12 @@ import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.Separator;
import org.eclipse.jface.viewers.*;
import org.eclipse.team.internal.ui.Policy;
-import org.eclipse.team.internal.ui.synchronize.actions.*;
-import org.eclipse.team.ui.synchronize.*;
-import org.eclipse.team.ui.synchronize.viewers.*;
+import org.eclipse.team.internal.ui.jobs.RefreshUserNotificationPolicy;
+import org.eclipse.team.internal.ui.synchronize.actions.OpenWithActionGroup;
+import org.eclipse.team.internal.ui.synchronize.actions.RefactorActionGroup;
+import org.eclipse.team.ui.synchronize.ISynchronizeView;
+import org.eclipse.team.ui.synchronize.viewers.SyncInfoModelElement;
+import org.eclipse.team.ui.synchronize.viewers.TreeViewerAdvisor;
/**
* Overrides the SyncInfoDiffViewerConfiguration to configure the diff viewer
@@ -30,7 +33,7 @@ public class SynchronizeViewerAdvisor extends TreeViewerAdvisor {
private SubscriberParticipant participant;
private OpenWithActionGroup openWithActions;
private RefactorActionGroup refactorActions;
- private TeamParticipantRefreshAction refreshSelectionAction;
+ private RefreshAction refreshSelectionAction;
public SynchronizeViewerAdvisor(ISynchronizeView view, SubscriberParticipant participant) {
super(participant.getId(), view.getViewSite(), participant.getSubscriberSyncInfoCollector().getSyncInfoTree());
@@ -46,7 +49,7 @@ public class SynchronizeViewerAdvisor extends TreeViewerAdvisor {
super.initializeActions(treeViewer);
openWithActions = new OpenWithActionGroup(view, participant);
refactorActions = new RefactorActionGroup(view);
- refreshSelectionAction = new TeamParticipantRefreshAction(treeViewer, participant, false /* refresh */, false);
+ refreshSelectionAction = new RefreshAction(view.getSite().getSelectionProvider(), getParticipant().getName(), getParticipant().getSubscriberSyncInfoCollector(), new RefreshUserNotificationPolicy(getParticipant()), true /* refresh all */);
refreshSelectionAction.setWorkbenchSite(view.getSite());
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/viewers/CompareDialog.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/viewers/CompareDialog.java
new file mode 100644
index 000000000..beef71402
--- /dev/null
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/viewers/CompareDialog.java
@@ -0,0 +1,134 @@
+/*******************************************************************************
+ * 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.viewers;
+
+import org.eclipse.compare.CompareEditorInput;
+import org.eclipse.compare.internal.ResizableDialog;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jface.dialogs.*;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.util.*;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.BusyIndicator;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.*;
+import org.eclipse.team.internal.ui.Utils;
+import org.eclipse.team.ui.TeamUI;
+import org.eclipse.team.ui.synchronize.*;
+
+/**
+ * A compare dialog that displays a comparison.
+ *
+ * @since 3.0
+ */
+public class CompareDialog extends ResizableDialog implements IPropertyChangeListener {
+
+ private CompareEditorInput fCompareEditorInput;
+ private ISynchronizeParticipant participant;
+ private Button saveButton;
+ private Button rememberParticipantButton;
+ private String title;
+ private boolean isDirty = false;
+
+ public CompareDialog(Shell shell, String title, CompareEditorInput input) {
+ super(shell, null);
+ this.title = title;
+ Assert.isNotNull(input);
+ fCompareEditorInput= input;
+ fCompareEditorInput.addPropertyChangeListener(this);
+ }
+
+ public void setSynchronizeParticipant(ISynchronizeParticipant participant) {
+ this.participant = participant;
+ }
+
+ public void propertyChange(PropertyChangeEvent event) {
+ if (fCompareEditorInput != null) {
+ if(fCompareEditorInput.isSaveNeeded()) {
+ // the dirty flag is required because there is a compare bug that causes the dirty bit to be reset sometimes
+ // although the underlying compare editor input is still dirty.
+ isDirty = true;
+ getShell().setText(title + " *");
+ } else {
+ getShell().setText(title);
+ }
+ }
+ }
+
+ /* (non-Javadoc)
+ * Method declared on Dialog.
+ */
+ protected void createButtonsForButtonBar(Composite parent) {
+ createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
+ }
+
+ /* (non-Javadoc)
+ * Method declared on Dialog.
+ */
+ protected Control createDialogArea(Composite parent2) {
+ Composite parent = (Composite) super.createDialogArea(parent2);
+ Control c = fCompareEditorInput.createContents(parent);
+ c.setLayoutData(new GridData(GridData.FILL_BOTH));
+ if (participant != null) {
+ rememberParticipantButton = new Button(parent, SWT.CHECK);
+ rememberParticipantButton.setText("Remember this result by placing it in the Synchronize View.");
+ }
+ Shell shell = c.getShell();
+ shell.setText(title);
+ shell.setImage(fCompareEditorInput.getTitleImage());
+ Dialog.applyDialogFont(parent2);
+ return parent;
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.dialogs.Dialog#buttonPressed(int)
+ */
+ protected void buttonPressed(int buttonId) {
+ if (fCompareEditorInput.isSaveNeeded() && MessageDialog.openConfirm(getShell(), "Confirm Save", "Do you want to save changes?")) {
+ BusyIndicator.showWhile(null, new Runnable() {
+ public void run() {
+ try {
+ fCompareEditorInput.saveChanges(new NullProgressMonitor());
+ } catch (CoreException e) {
+ Utils.handle(e);
+ }
+ }
+ });
+ }
+ if(buttonId == IDialogConstants.OK_ID && isRememberParticipant()) {
+ rememberParticipant();
+ }
+ super.buttonPressed(buttonId);
+ }
+
+ protected boolean isRememberParticipant() {
+ return getParticipant() != null && rememberParticipantButton != null && rememberParticipantButton.getSelection();
+ }
+
+ protected void rememberParticipant() {
+ if(getParticipant() != null) {
+ ISynchronizeManager mgr = TeamUI.getSynchronizeManager();
+ ISynchronizeView view = mgr.showSynchronizeViewInActivePage(null);
+ mgr.addSynchronizeParticipants(new ISynchronizeParticipant[] {participant});
+ view.display(participant);
+ }
+ }
+
+ protected Object getParticipant() {
+ return participant;
+ }
+
+ protected CompareEditorInput getCompareEditorInput() {
+ return fCompareEditorInput;
+ }
+} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/viewers/StructuredViewerAdvisor.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/viewers/StructuredViewerAdvisor.java
index 1ac0f965b..1cf3a918e 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/viewers/StructuredViewerAdvisor.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/viewers/StructuredViewerAdvisor.java
@@ -10,9 +10,7 @@
*******************************************************************************/
package org.eclipse.team.ui.synchronize.viewers;
-import org.eclipse.compare.structuremergeviewer.DiffNode;
-import org.eclipse.compare.structuremergeviewer.ICompareInput;
-import org.eclipse.compare.structuremergeviewer.ICompareInputChangeListener;
+import org.eclipse.compare.structuremergeviewer.*;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.jface.action.ActionContributionItem;
@@ -22,9 +20,7 @@ import org.eclipse.jface.action.IMenuListener;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.util.ListenerList;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.StructuredViewer;
+import org.eclipse.jface.viewers.*;
import org.eclipse.swt.events.MenuEvent;
import org.eclipse.swt.events.MenuListener;
import org.eclipse.swt.widgets.Control;
@@ -74,14 +70,21 @@ import org.eclipse.ui.model.BaseWorkbenchContentProvider;
* @since 3.0
*/
public abstract class StructuredViewerAdvisor {
-
- private SynchronizeModelProvider modelProvider;
- private ListenerList listeners;
- private String targetID;
+
+ // Workbench site is used to register the context menu for the viewer
private IWorkbenchPartSite site;
+ // The id to use for registration of the context menu. If null then menu will not allow viewer contributions.
+ private String targetID;
+ // The physical model shown to the user in the provided viewer. The information in
+ // this set is transformed by the model provider into the actual logical model displayed
+ // in the viewer.
private SyncInfoSet set;
private StructuredViewer viewer;
+ private SynchronizeModelProvider modelProvider;
+
+ // Listeners for model changes
+ private ListenerList listeners;
/**
* Create an advisor that will allow viewer contributions with the given <code>targetID</code>. This
@@ -200,6 +203,26 @@ public abstract class StructuredViewerAdvisor {
public abstract boolean navigate(boolean next);
/**
+ * Sets a new selection for this viewer and optionally makes it visible. The advisor will try and
+ * convert the objects into the appropriate viewer objects. This is required because the model
+ * provider controls the actual model elements in the viewer and must be consulted in order to
+ * understand what objects can be selected in the viewer.
+ *
+ * @param object the objects to select
+ * @param reveal <code>true</code> if the selection is to be made visible, and
+ * <code>false</code> otherwise
+ */
+ public void setSelection(Object[] objects, boolean reveal) {
+ Object[] viewerObjects = new Object[objects.length];
+ if (modelProvider != null) {
+ for (int i = 0; i < objects.length; i++) {
+ viewerObjects[i] = modelProvider.getMapping(objects[i]);
+ }
+ viewer.setSelection(new StructuredSelection(viewerObjects), reveal);
+ }
+ }
+
+ /**
* Creates the model that will be shown in the viewers. This can be called before the
* viewer has been created.
* <p>
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/viewers/SyncInfoCompareInput.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/viewers/SyncInfoCompareInput.java
index 2cea55b65..78d6f250f 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/viewers/SyncInfoCompareInput.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/viewers/SyncInfoCompareInput.java
@@ -12,38 +12,21 @@ package org.eclipse.team.ui.synchronize.viewers;
import java.lang.reflect.InvocationTargetException;
-import org.eclipse.compare.CompareConfiguration;
-import org.eclipse.compare.CompareEditorInput;
-import org.eclipse.compare.IContentChangeListener;
-import org.eclipse.compare.IContentChangeNotifier;
-import org.eclipse.compare.ITypedElement;
+import org.eclipse.compare.*;
import org.eclipse.compare.structuremergeviewer.DiffNode;
import org.eclipse.compare.structuremergeviewer.IDiffContainer;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceChangeEvent;
-import org.eclipse.core.resources.IResourceChangeListener;
-import org.eclipse.core.resources.IResourceDelta;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Status;
+import org.eclipse.core.resources.*;
+import org.eclipse.core.runtime.*;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.swt.graphics.Image;
import org.eclipse.team.core.TeamException;
import org.eclipse.team.core.synchronize.SyncInfo;
import org.eclipse.team.internal.core.Assert;
-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.*;
import org.eclipse.team.internal.ui.synchronize.LocalResourceTypedElement;
import org.eclipse.team.ui.ISharedImages;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IPartListener;
-import org.eclipse.ui.IReusableEditor;
-import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.*;
import org.eclipse.ui.progress.UIJob;
/**
@@ -85,8 +68,8 @@ public final class SyncInfoCompareInput extends CompareEditorInput implements IR
* is displayed to the user.
* @param sync the <code>SyncInfo</code> used as the base for the compare input.
*/
- public SyncInfoCompareInput(CompareConfiguration cc, String description, SyncInfo sync) {
- super(cc);
+ public SyncInfoCompareInput(String description, SyncInfo sync) {
+ super(getDefaultCompareConfiguration());
Assert.isNotNull(sync);
Assert.isNotNull(description);
this.description = description;
@@ -96,6 +79,12 @@ public final class SyncInfoCompareInput extends CompareEditorInput implements IR
initializeResourceChangeListeners();
}
+ private static CompareConfiguration getDefaultCompareConfiguration() {
+ CompareConfiguration cc = new CompareConfiguration();
+ //cc.setProperty(CompareConfiguration.USE_OUTLINE_VIEW, true);
+ return cc;
+ }
+
private void initializeContentChangeListeners() {
ITypedElement te = node.getLeft();
if (te instanceof IContentChangeNotifier) {
@@ -133,6 +122,16 @@ public final class SyncInfoCompareInput extends CompareEditorInput implements IR
}
}
+ /**
+ * We have to hook into the editors lifecycle in order to register/un-register resource
+ * change listeners. CompareEditorInputs aren't aware of the lifecycle of its containing
+ * editor
+ * <p>
+ * The side effect of not calling this method is that the input will not keep in sync with changes
+ * to the workspace resource.
+ * </p>
+ * @param editor the editor showing this input
+ */
public void setCompareEditor(IEditorPart editor) {
Assert.isNotNull(editor);
this.editor = editor;
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/viewers/SyncInfoModelElement.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/viewers/SyncInfoModelElement.java
index 3763b09b1..9f8aa5970 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/viewers/SyncInfoModelElement.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/viewers/SyncInfoModelElement.java
@@ -16,8 +16,9 @@ import org.eclipse.compare.structuremergeviewer.*;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.synchronize.*;
-import org.eclipse.team.core.variants.*;
+import org.eclipse.team.core.synchronize.SyncInfo;
+import org.eclipse.team.core.synchronize.SyncInfoSet;
+import org.eclipse.team.core.variants.IResourceVariant;
import org.eclipse.team.internal.ui.Policy;
import org.eclipse.team.internal.ui.synchronize.LocalResourceTypedElement;
import org.eclipse.team.internal.ui.synchronize.RemoteResourceTypedElement;
@@ -55,19 +56,39 @@ public class SyncInfoModelElement extends SynchronizeModelElement {
*/
public SyncInfoModelElement(IDiffContainer parent, SyncInfo info) {
super(parent);
- update(info);
- }
-
- public void update(SyncInfo info) {
this.info = info;
// update state
setKind(info.getKind());
// local
setLeft(createLocalTypeElement(info));
// remote
- setRight(createRemoteTypeElement(info));
+ setRight(createRemoteTypeElement(info));
// base
setAncestor(createBaseTypeElement(info));
+
+ fireChange();
+ }
+
+ public void update(SyncInfo info) {
+ this.info = info;
+ // update state
+ setKind(info.getKind());
+ // never have to update the local, it's always the workspace resource
+ // remote
+ RemoteResourceTypedElement rightEl = (RemoteResourceTypedElement)getRight();
+ if(rightEl == null && info.getRemote() != null) {
+ setRight(createRemoteTypeElement(info));
+ } else {
+ rightEl.update(info.getRemote());
+ }
+ // base
+ RemoteResourceTypedElement ancestorEl = (RemoteResourceTypedElement)getRight();
+ if(ancestorEl == null && info.getBase() != null) {
+ setAncestor(createBaseTypeElement(info));
+ } else {
+ ancestorEl.update(info.getBase());
+ }
+
fireChange();
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/viewers/SynchronizeCompareInput.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/viewers/SynchronizeCompareInput.java
index 0486ce71f..b3d6fb782 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/viewers/SynchronizeCompareInput.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/viewers/SynchronizeCompareInput.java
@@ -12,29 +12,25 @@ package org.eclipse.team.ui.synchronize.viewers;
import java.lang.reflect.InvocationTargetException;
-import org.eclipse.compare.CompareConfiguration;
-import org.eclipse.compare.CompareEditorInput;
-import org.eclipse.compare.CompareUI;
-import org.eclipse.compare.CompareViewerPane;
-import org.eclipse.compare.NavigationAction;
+import org.eclipse.compare.*;
+import org.eclipse.compare.internal.CompareEditor;
import org.eclipse.compare.internal.INavigatable;
+import org.eclipse.compare.structuremergeviewer.DiffNode;
+import org.eclipse.compare.structuremergeviewer.IDiffElement;
import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.*;
import org.eclipse.jface.action.Separator;
import org.eclipse.jface.action.ToolBarManager;
-import org.eclipse.jface.viewers.IOpenListener;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.OpenEvent;
-import org.eclipse.jface.viewers.StructuredViewer;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.*;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.team.core.TeamException;
import org.eclipse.team.internal.ui.Utils;
+import org.eclipse.team.internal.ui.synchronize.LocalResourceTypedElement;
+import org.eclipse.team.ui.ISharedImages;
+import org.eclipse.team.ui.TeamImages;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.progress.IProgressService;
@@ -48,12 +44,14 @@ import org.eclipse.ui.progress.IProgressService;
*
* @since 3.0
*/
-public class SynchronizeCompareInput extends CompareEditorInput {
+public class SynchronizeCompareInput extends CompareEditorInput implements IContentChangeListener {
private TreeViewerAdvisor diffViewerConfiguration;
private Viewer diffViewer;
private NavigationAction nextAction;
private NavigationAction previousAction;
+
+ private boolean buffered = false;
/**
* Create a <code>SynchronizeCompareInput</code> whose diff viewer is configured
@@ -70,6 +68,12 @@ public class SynchronizeCompareInput extends CompareEditorInput {
this.diffViewer = internalCreateDiffViewer(parent, getViewerConfiguration());
diffViewer.getControl().setData(CompareUI.COMPARE_VIEWER_TITLE, getTitle());
+ // buffered merge mode, don't ask for save when switching nodes since contents will be buffered in diff nodes
+ // and saved when the input is saved.
+ if(isBuffered()) {
+ getCompareConfiguration().setProperty(CompareEditor.CONFIRM_SAVE_PROPERTY, new Boolean(false));
+ }
+
/*
* This viewer can participate in navigation support in compare editor inputs. Note that
* it is currently accessing an internal compare interface that should be made public. See
@@ -87,9 +91,9 @@ public class SynchronizeCompareInput extends CompareEditorInput {
nextAction.setCompareEditorInput(this);
previousAction.setCompareEditorInput(this);
-
initializeToolBar(diffViewer.getControl().getParent());
initializeDiffViewer(diffViewer);
+ diffViewerConfiguration.navigate(true);
return diffViewer;
}
@@ -139,6 +143,7 @@ public class SynchronizeCompareInput extends CompareEditorInput {
IProgressService manager = PlatformUI.getWorkbench().getProgressService();
try {
node.cacheContents(new NullProgressMonitor());
+ hookContentChangeListener(node);
} catch (TeamException e) {
Utils.handle(e);
} finally {
@@ -153,6 +158,17 @@ public class SynchronizeCompareInput extends CompareEditorInput {
}
}
+ private void hookContentChangeListener(DiffNode node) {
+ ITypedElement left = node.getLeft();
+ if(left instanceof IContentChangeNotifier) {
+ ((IContentChangeNotifier)left).addContentChangeListener(this);
+ }
+ ITypedElement right = node.getRight();
+ if(right instanceof IContentChangeNotifier) {
+ ((IContentChangeNotifier)right).addContentChangeListener(this);
+ }
+ }
+
public void contributeToToolBar(ToolBarManager tbm) {
if(nextAction != null && previousAction != null) {
tbm.appendToGroup("navigation", nextAction); //$NON-NLS-1$
@@ -193,4 +209,68 @@ public class SynchronizeCompareInput extends CompareEditorInput {
throw new InvocationTargetException(e);
}
}
-}
+
+ /*
+ * (non-Javadoc)
+ * @see CompareEditorInput#saveChanges(org.eclipse.core.runtime.IProgressMonitor)
+ */
+ public void saveChanges(IProgressMonitor pm) throws CoreException {
+ super.saveChanges(pm);
+ SynchronizeModelElement root = (SynchronizeModelElement)diffViewerConfiguration.getViewer().getInput();
+ if (root != null) {
+ try {
+ commit(pm, root);
+ } finally {
+ setDirty(false);
+ }
+ }
+ }
+
+ private static void commit(IProgressMonitor pm, DiffNode node) throws CoreException {
+ ITypedElement left = node.getLeft();
+ if (left instanceof LocalResourceTypedElement)
+ ((LocalResourceTypedElement) left).commit(pm);
+
+ ITypedElement right = node.getRight();
+ if (right instanceof LocalResourceTypedElement)
+ ((LocalResourceTypedElement) right).commit(pm);
+
+ //node.getC
+ IDiffElement[] children = (IDiffElement[])node.getChildren();
+ for (int i = 0; i < children.length; i++) {
+ commit(pm, (DiffNode)children[i]);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.compare.IContentChangeListener#contentChanged(org.eclipse.compare.IContentChangeNotifier)
+ */
+ public void contentChanged(IContentChangeNotifier source) {
+ try {
+ if (isBuffered()) {
+ setDirty(true);
+ } else if (source instanceof DiffNode) {
+ commit(new NullProgressMonitor(), (DiffNode) source);
+ } else if (source instanceof LocalResourceTypedElement) {
+ ((LocalResourceTypedElement) source).commit(new NullProgressMonitor());
+ }
+ } catch (CoreException e) {
+ Utils.handle(e);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.compare.CompareEditorInput#getImageDescriptor()
+ */
+ public ImageDescriptor getImageDescriptor() {
+ return TeamImages.getImageDescriptor(ISharedImages.IMG_COMPARE_VIEW);
+ }
+
+ /**
+ * Returns <code>true</code> if this compare input will buffer node content changes until the input is saved,
+ * otherwise content changes are saved to disk immediatly when each node is saved in the content merge viewer.
+ */
+ public boolean isBuffered() {
+ return buffered;
+ }
+} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/viewers/SynchronizeModelProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/viewers/SynchronizeModelProvider.java
index 8b6def3e6..e6d9a38c7 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/viewers/SynchronizeModelProvider.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/viewers/SynchronizeModelProvider.java
@@ -161,6 +161,20 @@ public abstract class SynchronizeModelProvider implements ISyncInfoSetChangeList
}
/**
+ * The provider can try and return a mapping for the provided object. Providers often use mappings
+ * to store the source of a logical element they have created. For example, when displaying resource
+ * based logical elements, a provider will cache the resource -> element mapping for quick retrieval
+ * of the element when resource based changes are made.
+ *
+ * @param object the object to query for a mapping
+ * @return an object created by this provider that would be shown in a viewer, or <code>null</code>
+ * if the provided object is not mapped by this provider.
+ */
+ public Object getMapping(Object object) {
+ return resourceMap.get(object);
+ }
+
+ /**
* Dispose of the builder
*/
public void dispose() {
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/00008.html b/tests/org.eclipse.team.tests.cvs.core/html/00008.html
index da57e72b0..6a7d80430 100644
--- a/tests/org.eclipse.team.tests.cvs.core/html/00008.html
+++ b/tests/org.eclipse.team.tests.cvs.core/html/00008.html
@@ -4,6 +4,6 @@
<meta NAME="since" content="">
</head><body><h2>Comparing</h2>
-Answer comes here.
+The CVS plugin supports comparing of resources in the workspace with revision in the repository. You can also compare between two remote elements.
</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/00039.html b/tests/org.eclipse.team.tests.cvs.core/html/00039.html
index b9035d03f..c27630f77 100644
--- a/tests/org.eclipse.team.tests.cvs.core/html/00039.html
+++ b/tests/org.eclipse.team.tests.cvs.core/html/00039.html
@@ -1,10 +1,10 @@
-<html><head><title>Local resources with a repository</title>
+<html><head><title>Compare with another branch or version</title>
<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
<meta NAME="keywords" content="">
<meta NAME="since" content="">
-</head><h2>Local resources with a repository</h2>
+</head><h2>Compare with another branch or version</h2>
<p>Since: M8<br>
-Last Modified: $Date: 2003/11/27 22:04:58 $</p><body>
+Last Modified: $Date: 2004/03/02 05:19:21 $</p><body>
<p>
You should be able to select a project/folder/resource and compare againts
another branch or version. Multi-select should work across projects in
@@ -13,16 +13,27 @@ merge changes into the local workspace.</p>
<p>
We should support multi-selection of files, but I'm not sure what should be
shown to the user in those cases.</p>
-<h3>Comparing with another branch or version</h3>
+<h3>On file selected</h3>
<ul>
-<li>
-</ul>
-<h3>Multi-select files</h3>
-<ul>
-<li>
+<li>If the file has differences open a compare editor and show otherwise a message is shown to indicate that the file is the same.
+<li>should be able to open the history view and link in to the opened compare editor
+<li>the compare editor should update when changes are made to the local file in some other context (e.g other editor, refactoring).
</ul>
+
+<h3>Multiple selection</h3>
+<p>Entire contents of the folder are compared deep. If changes are found the user is notified and they are
+shown in a dialog. If no changes are found the user is notified. The dialog should allow the user to browse
+the changes and merge anything into his workspace. If the user wants to keep the comparison non-model, he
+can add it to the synchronize view. There is a button to do so on the compare dialog.</p>
+
<h3>Merging changes</h3>
+<p>
+When the compare dialog is showing several changes you should be able to selectively merge anything into the local workspace. Specific attention should
+be made to the following cases:
+</p>
<ul>
-<li>
+<li>Edit the local then press ok. You should be prompted to save the changes and the changes should be correctly updated in the corresponding resource.
+<li>Edit the local and browse to another file. You should be prompted to save the changes.
+<li>Press the cancel button with changes, you should be prompted.
</ul>
</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/00040.html b/tests/org.eclipse.team.tests.cvs.core/html/00040.html
index 64163316f..0527e21a9 100644
--- a/tests/org.eclipse.team.tests.cvs.core/html/00040.html
+++ b/tests/org.eclipse.team.tests.cvs.core/html/00040.html
@@ -3,9 +3,9 @@
<meta NAME="keywords" content="">
<meta NAME="since" content="">
</head><h2>Reverting deleted resources</h2>
-<p>Since: <br>
-Last Modified: $Date: 2003/11/27 22:04:58 $</p><body>
+<p>Since: M8<br>
+Last Modified: $Date: 2004/03/01 20:37:55 $</p><body>
-Answer comes here.
+You should be able to restore a deleted revision from the CVS server.
</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/00041.html b/tests/org.eclipse.team.tests.cvs.core/html/00041.html
new file mode 100644
index 000000000..1d5a005d5
--- /dev/null
+++ b/tests/org.eclipse.team.tests.cvs.core/html/00041.html
@@ -0,0 +1,16 @@
+<html><head><title>File Revisions</title>
+<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
+<meta NAME="keywords" content="">
+<meta NAME="since" content="">
+</head><h2>File Revisions</h2>
+<p>Since: M8<br>
+Last Modified: $Date: 2004/03/02 21:34:55 $</p><body>
+
+<h3>Compare the local resource with other revisions</h3>
+<ul>
+<li>If the file isn't managed the action should no appear.
+<li>If the file doesn't have any revisions you should be prompted
+<li>If the file has revisions you should be prompted with the list of revisions in a compare dialog
+<li>In the compare dialog you can select any revision and mreges changes into the local copy
+<li>If you edit the local resource then chose OK, you will be prompted to save changes. Ensure that the changes are saved correctly to the underlying resource.
+<li>Ensure that the titles are ok (e.g. dialog title, structure pane title...) \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/00042.html b/tests/org.eclipse.team.tests.cvs.core/html/00042.html
new file mode 100644
index 000000000..4790d8037
--- /dev/null
+++ b/tests/org.eclipse.team.tests.cvs.core/html/00042.html
@@ -0,0 +1,11 @@
+<html><head><title>CVS Console</title>
+<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
+<meta NAME="keywords" content="">
+<meta NAME="since" content="">
+</head><h2>CVS Console</h2>
+<p>Since: <br>
+Last Modified: $Date: 2003/11/27 22:04:58 $</p><body>
+
+Answer comes here.
+
+</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/00043.html b/tests/org.eclipse.team.tests.cvs.core/html/00043.html
new file mode 100644
index 000000000..fc22247c1
--- /dev/null
+++ b/tests/org.eclipse.team.tests.cvs.core/html/00043.html
@@ -0,0 +1,14 @@
+<html><head><title>Preferences</title>
+<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
+<meta NAME="keywords" content="">
+<meta NAME="since" content="">
+</head><h2>Preferences</h2>
+<p>Since: M8<br>
+Last Modified: $Date: 2003/11/27 22:04:58 $</p><body>
+
+There are a couple of preferences that controls the behavior and presentation of the console. These are:
+<ul>
+<li>font color: message color, error color, command line. Changing these should immediatly update the console view.
+</ul>
+
+</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/00044.html b/tests/org.eclipse.team.tests.cvs.core/html/00044.html
new file mode 100644
index 000000000..31de0ce72
--- /dev/null
+++ b/tests/org.eclipse.team.tests.cvs.core/html/00044.html
@@ -0,0 +1,11 @@
+<html><head><title>Replacing</title>
+<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
+<meta NAME="keywords" content="">
+<meta NAME="since" content="">
+</head><h2>Replacing</h2>
+<p>Since: <br>
+Last Modified: $Date: 2003/11/27 22:04:58 $</p><body>
+
+Answer comes here.
+
+</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/00045.html b/tests/org.eclipse.team.tests.cvs.core/html/00045.html
new file mode 100644
index 000000000..31d2ecca5
--- /dev/null
+++ b/tests/org.eclipse.team.tests.cvs.core/html/00045.html
@@ -0,0 +1,11 @@
+<html><head><title>With latest</title>
+<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
+<meta NAME="keywords" content="">
+<meta NAME="since" content="">
+</head><h2>With latest</h2>
+<p>Since: <br>
+Last Modified: $Date: 2003/11/27 22:04:58 $</p><body>
+
+Answer comes here.
+
+</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/00046.html b/tests/org.eclipse.team.tests.cvs.core/html/00046.html
new file mode 100644
index 000000000..56a3ac669
--- /dev/null
+++ b/tests/org.eclipse.team.tests.cvs.core/html/00046.html
@@ -0,0 +1,11 @@
+<html><head><title>With another branch of version</title>
+<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
+<meta NAME="keywords" content="">
+<meta NAME="since" content="">
+</head><h2>With another branch of version</h2>
+<p>Since: <br>
+Last Modified: $Date: 2003/11/27 22:04:58 $</p><body>
+
+Answer comes here.
+
+</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/00047.html b/tests/org.eclipse.team.tests.cvs.core/html/00047.html
new file mode 100644
index 000000000..b0c44ff4a
--- /dev/null
+++ b/tests/org.eclipse.team.tests.cvs.core/html/00047.html
@@ -0,0 +1,20 @@
+<html><head><title>With file revision</title>
+<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
+<meta NAME="keywords" content="">
+<meta NAME="since" content="">
+</head><h2>With file revision</h2>
+<p>Since: <br>
+Last Modified: $Date: 2003/11/27 22:04:58 $</p><body>
+
+<h3>Replace the local resource with other revisions</h3>
+<ul>
+<li>If the file isn't managed the action should no appear.
+<li>If the file doesn't have any revisions you should be prompted
+<li>If the file has revisions you should be prompted with the list of revisions in a compare dialog
+<li>In the compare dialog you can select any revision and mreges changes into the local copy
+<li>If you edit the local resource then chose OK, you will be prompted to save changes. Ensure that the changes are saved correctly to the underlying resource.
+<li>If a revision is selected the Replace button should be enabled. Otherwise it should be disabled
+<li>If you selected the replace button the file should contain the contents of the revision selected. The dialog will also close.
+<li>Ensure that the titles are ok (e.g. dialog title, structure pane title...)
+
+</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/html/00048.html b/tests/org.eclipse.team.tests.cvs.core/html/00048.html
new file mode 100644
index 000000000..72846530f
--- /dev/null
+++ b/tests/org.eclipse.team.tests.cvs.core/html/00048.html
@@ -0,0 +1,32 @@
+<html><head><title>Refreshing with Remote</title>
+<LINK REL=STYLESHEET HREF=../book.css CHARSET=ISO-8859-1 TYPE=text/css>
+<meta NAME="keywords" content="">
+<meta NAME="since" content="">
+</head><h2>Refreshing with Remote</h2>
+<p>Since: <br>
+Last Modified: $Date: 2003/11/27 22:04:58 $</p><body>
+<p>
+There are a couple of reasons someone may want to synchronize with the remote. There are currently
+two ways of running the refresh operation:
+<ul>
+<li>Directly from the synchronize view
+<li>From Team > Synchronize with Repository
+</ul>
+</p>
+<h3>Notice a file is out-of-sync in another view (e.g. packages explorer, types) and want to see the changes</h3>
+<p>In case you can select a file, it will be refreshed with the server, and if changes are found the compare editor is opened
+that will allow browsing the changes. If no changes are found, you will be prompted.</p>
+
+<h3>From another view would like to browse the outgoing/incoming changes for several resources</h3>
+<p>Select a folder or group of files and Team > Synchronize will open the sync view and automatically refresh with
+the remote repository.</p>
+
+<h3>In the sync view and would like to refresh to see if there are new changes from the server</h3>
+<p>
+
+</p>
+
+Assumption, the sync view may or may not be open when the synchronize is performed. Maybe we need a different prompt
+each case. One for Team > Sync and another for refresh from the sync view.
+
+</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/SynchronizeViewTestAdapter.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/SynchronizeViewTestAdapter.java
index bcdb06441..5e671c603 100644
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/SynchronizeViewTestAdapter.java
+++ b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/SynchronizeViewTestAdapter.java
@@ -123,7 +123,7 @@ public class SynchronizeViewTestAdapter extends SyncInfoSource {
ISynchronizeParticipant[] participants = TeamUI.getSynchronizeManager().getSynchronizeParticipants();
for (int i = 0; i < participants.length; i++) {
ISynchronizeParticipant participant = participants[i];
- if(participant.getId().equals(CVSMergeSubscriber.QUALIFIED_NAME)) {
+ if(participant.getId().equals(CVSMergeSubscriber.ID)) {
TeamUI.getSynchronizeManager().removeSynchronizeParticipants(new ISynchronizeParticipant[] {participant});
}
}
diff --git a/tests/org.eclipse.team.tests.cvs.core/toc.xml b/tests/org.eclipse.team.tests.cvs.core/toc.xml
index 9ce6036d7..6dbd45ca4 100644
--- a/tests/org.eclipse.team.tests.cvs.core/toc.xml
+++ b/tests/org.eclipse.team.tests.cvs.core/toc.xml
@@ -11,16 +11,20 @@
<topic label="Comparing" href="html/00008.html">
<topic label="Remote resources" href="html/00009.html">
</topic>
- <topic label="Local resources with a repository" href="html/00039.html">
+ <topic label="Compare with another branch or version" href="html/00039.html">
</topic>
<topic label="Reverting deleted resources" href="html/00040.html">
</topic>
+ <topic label="File Revisions" href="html/00041.html">
+ </topic>
</topic>
<topic label="Synchronizing" href="html/00010.html">
<topic label="Sync View operations and selection" href="html/00011.html">
</topic>
<topic label="Sync View modes and working sets" href="html/00016.html">
</topic>
+ <topic label="Refreshing with Remote" href="html/00048.html">
+ </topic>
</topic>
<topic label="Merging" href="html/00012.html">
<topic label="Sync View operations and selection" href="html/00013.html">
@@ -76,5 +80,17 @@
<topic label="Decorations in the Synchronize pages" href="html/00038.html">
</topic>
</topic>
+ <topic label="CVS Console" href="html/00042.html">
+ <topic label="Preferences" href="html/00043.html">
+ </topic>
+ </topic>
+ <topic label="Replacing" href="html/00044.html">
+ <topic label="With latest" href="html/00045.html">
+ </topic>
+ <topic label="With another branch of version" href="html/00046.html">
+ </topic>
+ <topic label="With file revision" href="html/00047.html">
+ </topic>
+ </topic>
</topic>
</toc>

Back to the top