Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Schindl2014-05-13 16:51:17 -0400
committerTom Schindl2014-05-13 16:51:17 -0400
commit495bb93c44a760f011315adce5ad59716c91fb30 (patch)
tree3da879de261b858f507ff093d964c4627d292673
parentab7b5d53a1b8f5fd7bde667b77387a7e5331e904 (diff)
downloadorg.eclipse.efxclipse-495bb93c44a760f011315adce5ad59716c91fb30.tar.gz
org.eclipse.efxclipse-495bb93c44a760f011315adce5ad59716c91fb30.tar.xz
org.eclipse.efxclipse-495bb93c44a760f011315adce5ad59716c91fb30.zip
Bug 434803 - Upgrade to jdt.annotation 2.0
-rwxr-xr-xbundles/runtime/org.eclipse.fx.ui.workbench.renderers.fx/src/org/eclipse/fx/ui/workbench/renderers/fx/DefPerspectiveStackRenderer.java27
1 files changed, 18 insertions, 9 deletions
diff --git a/bundles/runtime/org.eclipse.fx.ui.workbench.renderers.fx/src/org/eclipse/fx/ui/workbench/renderers/fx/DefPerspectiveStackRenderer.java b/bundles/runtime/org.eclipse.fx.ui.workbench.renderers.fx/src/org/eclipse/fx/ui/workbench/renderers/fx/DefPerspectiveStackRenderer.java
index 90ad9c7c1..bfac1b791 100755
--- a/bundles/runtime/org.eclipse.fx.ui.workbench.renderers.fx/src/org/eclipse/fx/ui/workbench/renderers/fx/DefPerspectiveStackRenderer.java
+++ b/bundles/runtime/org.eclipse.fx.ui.workbench.renderers.fx/src/org/eclipse/fx/ui/workbench/renderers/fx/DefPerspectiveStackRenderer.java
@@ -130,18 +130,27 @@ public class DefPerspectiveStackRenderer extends BasePerspectiveStackRenderer<Bo
@Override
public void selectItem(int idx) {
WStackItem<PerspectiveStackItem, Node> item = this.items.get(idx);
- Node node = item.getNativeItem().getContent();
- if (getWidget().getCenter() != null && this.perspectiveSwitch != null) {
- AnimationDelegate<BorderPane, Node> a = this.perspectiveSwitch.getDelegate(this.items.get(this.currentIndex).getDomElement(), item.getDomElement());
- if (a == null) {
- getWidget().setCenter(node);
+ PerspectiveStackItem nativeItem = item.getNativeItem();
+ if( nativeItem != null ) {
+ Node node = nativeItem.getContent();
+ if (getWidget().getCenter() != null && this.perspectiveSwitch != null) {
+ MPerspective curDomElement = this.items.get(this.currentIndex).getDomElement();
+ MPerspective nexDomElement = item.getDomElement();
+ if( curDomElement != null && nexDomElement != null ) {
+ AnimationDelegate<BorderPane, Node> a = this.perspectiveSwitch.getDelegate(curDomElement, nexDomElement);
+ if (a == null) {
+ getWidget().setCenter(node);
+ } else {
+ a.animate(getWidget(), node);
+ }
+ } else {
+ getWidget().setCenter(node);
+ }
} else {
- a.animate(getWidget(), node);
+ getWidget().setCenter(node);
}
- } else {
- getWidget().setCenter(node);
+ this.currentIndex = idx;
}
- this.currentIndex = idx;
}
@Override

Back to the top