Lines 17-22
Link Here
|
17 |
import org.eclipse.jface.viewers.IStructuredSelection; |
17 |
import org.eclipse.jface.viewers.IStructuredSelection; |
18 |
import org.eclipse.jpt.core.JpaStructureNode; |
18 |
import org.eclipse.jpt.core.JpaStructureNode; |
19 |
import org.eclipse.jpt.core.context.JpaContextNode; |
19 |
import org.eclipse.jpt.core.context.JpaContextNode; |
|
|
20 |
import org.eclipse.jpt.core.context.JpaRootContextNode; |
20 |
import org.eclipse.jpt.ui.internal.JptUiMessages; |
21 |
import org.eclipse.jpt.ui.internal.JptUiMessages; |
21 |
import org.eclipse.jpt.ui.internal.selection.DefaultJpaSelection; |
22 |
import org.eclipse.jpt.ui.internal.selection.DefaultJpaSelection; |
22 |
import org.eclipse.jpt.ui.internal.selection.JpaSelectionManager; |
23 |
import org.eclipse.jpt.ui.internal.selection.JpaSelectionManager; |
Lines 39-44
Link Here
|
39 |
} |
40 |
} |
40 |
|
41 |
|
41 |
|
42 |
|
|
|
43 |
@Override |
42 |
public boolean updateSelection(IStructuredSelection s) { |
44 |
public boolean updateSelection(IStructuredSelection s) { |
43 |
selectedNode = null; |
45 |
selectedNode = null; |
44 |
|
46 |
|
Lines 50-55
Link Here
|
50 |
return false; |
52 |
return false; |
51 |
} |
53 |
} |
52 |
|
54 |
|
|
|
55 |
if (s.getFirstElement() instanceof JpaRootContextNode) { |
56 |
return false; |
57 |
} |
58 |
|
53 |
selectedNode = (JpaContextNode) s.getFirstElement(); |
59 |
selectedNode = (JpaContextNode) s.getFirstElement(); |
54 |
|
60 |
|
55 |
return true; |
61 |
return true; |