Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.compare')
-rw-r--r--bundles/org.eclipse.compare/buildnotes_compare.html3
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffTreeViewer.java25
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/buildnotes_compare.html3
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffTreeViewer.java25
4 files changed, 42 insertions, 14 deletions
diff --git a/bundles/org.eclipse.compare/buildnotes_compare.html b/bundles/org.eclipse.compare/buildnotes_compare.html
index 0bfdf93de..8304f53a2 100644
--- a/bundles/org.eclipse.compare/buildnotes_compare.html
+++ b/bundles/org.eclipse.compare/buildnotes_compare.html
@@ -11,7 +11,7 @@
<h1>
Eclipse Platform Build Notes<br>
Compare</h1>
-Eclipse Build Input January ??th 2002
+Eclipse Build Input February 5th 2002
<h2>
What's new in this drop</h2>
@@ -37,6 +37,7 @@ Problem reports fixed</h2>
<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=2707">#2707</a>: Merge viewer should ask for save before releasing (1GI9JXS)<br>
<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=2772">#2772</a>: DCR: Automatic structure compare (1GJ6EUY)<br>
<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=3829">#3829</a>: Smart rename button enabled when no smartness is available (1GEUVHN)<br>
+<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=9089">#9089</a>: Local history - Selecting item in structured compare has no effect<br>
<h2>
Problem reports closed</h2>
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
/**
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/buildnotes_compare.html b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/buildnotes_compare.html
index 0bfdf93de..8304f53a2 100644
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/buildnotes_compare.html
+++ b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/buildnotes_compare.html
@@ -11,7 +11,7 @@
<h1>
Eclipse Platform Build Notes<br>
Compare</h1>
-Eclipse Build Input January ??th 2002
+Eclipse Build Input February 5th 2002
<h2>
What's new in this drop</h2>
@@ -37,6 +37,7 @@ Problem reports fixed</h2>
<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=2707">#2707</a>: Merge viewer should ask for save before releasing (1GI9JXS)<br>
<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=2772">#2772</a>: DCR: Automatic structure compare (1GJ6EUY)<br>
<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=3829">#3829</a>: Smart rename button enabled when no smartness is available (1GEUVHN)<br>
+<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=9089">#9089</a>: Local history - Selecting item in structured compare has no effect<br>
<h2>
Problem reports closed</h2>
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffTreeViewer.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffTreeViewer.java
index 1d715916a..d5930d835 100644
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffTreeViewer.java
+++ b/bundles/org.eclipse.compare/plugins/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