Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndre Weinand2002-02-05 12:27:30 -0500
committerAndre Weinand2002-02-05 12:27:30 -0500
commit9567cb61cf2b38c8103aa7219ad4699025a3c7af (patch)
tree81f7bb801868fa6b45ab108c6e64501aa2b37e98 /bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer
parentfd475617cee188e1c1c065185107b0d58728e219 (diff)
downloadeclipse.platform.team-9567cb61cf2b38c8103aa7219ad4699025a3c7af.tar.gz
eclipse.platform.team-9567cb61cf2b38c8103aa7219ad4699025a3c7af.tar.xz
eclipse.platform.team-9567cb61cf2b38c8103aa7219ad4699025a3c7af.zip
updated release notesv20020205
Diffstat (limited to 'bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer')
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffTreeViewer.java25
1 files changed, 19 insertions, 6 deletions
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffTreeViewer.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffTreeViewer.java
index 1d715916a..d5930d835 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffTreeViewer.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffTreeViewer.java
@@ -320,20 +320,28 @@ public class DiffTreeViewer extends TreeViewer {
* Clients may extend to track their own property changes.
*/
protected void propertyChange(PropertyChangeEvent event) {
-
- //if (event.getProperty().equals(CompareConfiguration.SHOW_PSEUDO_CONFLICTS))
- // syncShowPseudoConflictFilter();
}
protected void inputChanged(Object in, Object oldInput) {
super.inputChanged(in, oldInput);
- //expandToLevel(2);
if (in != oldInput) {
- navigate(true);
+ initialSelection();
updateActions();
}
}
+
+ /**
+ * This hook method is called from within <code>inputChanged</code>
+ * after a new input has been set but before any controls are updated.
+ * This default implementation calls <code>navigate(true)<code>
+ * to select and expand the first leaf node.
+ * Clients can override this method and are free to decide whether
+ * they want to call the inherited method.
+ */
+ protected void initialSelection() {
+ navigate(true);
+ }
/**
* Overridden to avoid expanding <code>DiffNode</code>s that shouldn't expand
@@ -342,12 +350,17 @@ public class DiffTreeViewer extends TreeViewer {
protected void internalExpandToLevel(Widget node, int level) {
Object data= node.getData();
- if (data instanceof DiffNode && ((DiffNode)data).dontExpand())
+
+ if (dontExpand(data))
return;
super.internalExpandToLevel(node, level);
}
+ protected boolean dontExpand(Object o) {
+ return o instanceof DiffNode && ((DiffNode)o).dontExpand();
+ }
+
//---- merge action support
/**

Back to the top