Author: yradtsevich
Date: 2009-09-25 15:39:23 -0400 (Fri, 25 Sep 2009)
New Revision: 17769
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/selbar/SelectionBar.java
Log:
issue JBIDE-4945: VPE Selection Bar: provide the ability to select tags back and forward.
https://jira.jboss.org/jira/browse/JBIDE-4945
- NPE fixed
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/selbar/SelectionBar.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/selbar/SelectionBar.java 2009-09-25
16:52:55 UTC (rev 17768)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/selbar/SelectionBar.java 2009-09-25
19:39:23 UTC (rev 17769)
@@ -77,6 +77,7 @@
private Splitter splitter;
+ private boolean resizeListenerAdded = false;
private VpeController vpeController = null;
private ToolBar selBar = null;
private FormData selBarData;
@@ -123,11 +124,6 @@
// Main composite of the visible splitter
cmpToolBar = new Composite(splitter, SWT.NONE);
cmpToolBar.setLayout(new FormLayout());
- cmpToolBar.addListener(SWT.Resize, new Listener() {
- public void handleEvent(Event event) {
- updateNodes(true);
- }
- });
final Image closeImage = PlatformUI.getWorkbench().getSharedImages()
.getImage(ISharedImages.IMG_TOOL_DELETE);
@@ -405,6 +401,15 @@
if (node != null && node.getNodeType() == Node.DOCUMENT_NODE) {
addNodeListenerTo(node);
}
+
+ if (!resizeListenerAdded ) {
+ cmpToolBar.addListener(SWT.Resize, new Listener() {
+ public void handleEvent(Event event) {
+ updateNodes(true);
+ }
+ });
+ resizeListenerAdded = true;
+ }
}
/**