Skip to main content
summaryrefslogtreecommitdiffstats
path: root/jpa
diff options
context:
space:
mode:
authorkmoore2007-05-15 13:43:13 +0000
committerkmoore2007-05-15 13:43:13 +0000
commitee51286a95ec0ec26a683c6334b45891b6b421d6 (patch)
treedf4618c369694485fabcd38fc3d274295715d0e8 /jpa
parent18d45a9f95f534d79dbcc1d6deae9bdde78584e1 (diff)
downloadwebtools.dali-ee51286a95ec0ec26a683c6334b45891b6b421d6.tar.gz
webtools.dali-ee51286a95ec0ec26a683c6334b45891b6b421d6.tar.xz
webtools.dali-ee51286a95ec0ec26a683c6334b45891b6b421d6.zip
fixed the 'link with editor' action
Diffstat (limited to 'jpa')
-rw-r--r--jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/views/JpaStructureView.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/views/JpaStructureView.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/views/JpaStructureView.java
index 9119a606da..0dd7da45f3 100644
--- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/views/JpaStructureView.java
+++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/views/JpaStructureView.java
@@ -61,6 +61,9 @@ public class JpaStructureView extends AbstractJpaView
setLinkedWithEditor(i != null && i.intValue() == 1);
}
+ else {
+ setLinkedWithEditor(true);
+ }
super.init(site, memento);
}
@@ -104,6 +107,12 @@ public class JpaStructureView extends AbstractJpaView
@Override
public void select(Selection newSelection) {
+ if (!isLinkedWithEditor()) {
+ //The only selection we are concerned with is the editor, so we can select
+ //nothing if the user has set linkedWithEditor to false. If we ever depend
+ //on selection from any other views, this assumption will no longer work
+ return;
+ }
Selection currentSelection = getSelection();
if (newSelection.equals(currentSelection)) {

Back to the top