From ee51286a95ec0ec26a683c6334b45891b6b421d6 Mon Sep 17 00:00:00 2001 From: kmoore Date: Tue, 15 May 2007 13:43:13 +0000 Subject: fixed the 'link with editor' action --- .../src/org/eclipse/jpt/ui/internal/views/JpaStructureView.java | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'jpa') 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)) { -- cgit v1.2.3