Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2006-01-28 20:40:38 +0000
committerMichael Valenta2006-01-28 20:40:38 +0000
commita3a3e34ad0645f5100d04e53967fda334b1ef211 (patch)
tree91d0ac27d494d03d9e7da04ab56d893091710a4f /bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeView.java
parent54a53835b44d1715b3ae75b4b9dc69831c166a17 (diff)
downloadeclipse.platform.team-a3a3e34ad0645f5100d04e53967fda334b1ef211.tar.gz
eclipse.platform.team-a3a3e34ad0645f5100d04e53967fda334b1ef211.tar.xz
eclipse.platform.team-a3a3e34ad0645f5100d04e53967fda334b1ef211.zip
Page description indicates the active model
Diffstat (limited to 'bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeView.java')
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeView.java17
1 files changed, 16 insertions, 1 deletions
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeView.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeView.java
index a8a204111..ae06cbe79 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeView.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeView.java
@@ -94,6 +94,12 @@ public class SynchronizeView extends PageBookView implements ISynchronizeView, I
updateTitle();
}
}
+ if (source instanceof ISynchronizePageConfiguration && event.getProperty().equals(ISynchronizePageConfiguration.P_PAGE_DESCRIPTION)) {
+ ISynchronizePageConfiguration configuration = (ISynchronizePageConfiguration) source;
+ if (configuration.getParticipant().equals(getParticipant())) {
+ updateTitle();
+ }
+ }
}
/* (non-Javadoc)
@@ -129,7 +135,13 @@ public class SynchronizeView extends PageBookView implements ISynchronizeView, I
setContentDescription(""); //$NON-NLS-1$
} else {
SynchronizeViewWorkbenchPart part = (SynchronizeViewWorkbenchPart)fParticipantToPart.get(participant);
- setContentDescription(Utils.shortenText(MAX_NAME_LENGTH, part.getParticipant().getName()));
+ ISynchronizePageConfiguration configuration = part.getConfiguration();
+ String description = (String)configuration.getProperty(ISynchronizePageConfiguration.P_PAGE_DESCRIPTION);
+ if (description == null)
+ description = part.getParticipant().getName();
+ // TODO: Get the description from the configuration
+ // TODO: listen to the configuration for description changes
+ setContentDescription(Utils.shortenText(MAX_NAME_LENGTH, description));
}
}
@@ -147,6 +159,7 @@ public class SynchronizeView extends PageBookView implements ISynchronizeView, I
private void clearCrossReferenceCache(IWorkbenchPart part, ISynchronizeParticipant participant) {
participant.removePropertyChangeListener(this);
+ ((SynchronizeViewWorkbenchPart)part).getConfiguration().removePropertyChangeListener(this);
fPartToParticipant.remove(part);
fParticipantToPart.remove(participant);
}
@@ -159,6 +172,8 @@ public class SynchronizeView extends PageBookView implements ISynchronizeView, I
ISynchronizeParticipant participant = part.getParticipant();
participant.addPropertyChangeListener(this);
ISynchronizePageConfiguration configuration = participant.createPageConfiguration();
+ part.setConfiguration(configuration);
+ configuration.addPropertyChangeListener(this);
IPageBookViewPage page = participant.createPage(configuration);
if(page != null) {
initPage(page);

Back to the top