Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Schindl2014-05-13 16:51:25 -0400
committerTom Schindl2014-05-13 16:51:25 -0400
commit2eac066505880b4e0802b7147e8668316b97fca4 (patch)
tree1b6eb6bf5cee35c7234445b2e45d9545cff9bfe1
parent495bb93c44a760f011315adce5ad59716c91fb30 (diff)
downloadorg.eclipse.efxclipse-2eac066505880b4e0802b7147e8668316b97fca4.tar.gz
org.eclipse.efxclipse-2eac066505880b4e0802b7147e8668316b97fca4.tar.xz
org.eclipse.efxclipse-2eac066505880b4e0802b7147e8668316b97fca4.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/DefPartRenderer.java31
1 files changed, 17 insertions, 14 deletions
diff --git a/bundles/runtime/org.eclipse.fx.ui.workbench.renderers.fx/src/org/eclipse/fx/ui/workbench/renderers/fx/DefPartRenderer.java b/bundles/runtime/org.eclipse.fx.ui.workbench.renderers.fx/src/org/eclipse/fx/ui/workbench/renderers/fx/DefPartRenderer.java
index 093845ce8..593a39f8d 100755
--- a/bundles/runtime/org.eclipse.fx.ui.workbench.renderers.fx/src/org/eclipse/fx/ui/workbench/renderers/fx/DefPartRenderer.java
+++ b/bundles/runtime/org.eclipse.fx.ui.workbench.renderers.fx/src/org/eclipse/fx/ui/workbench/renderers/fx/DefPartRenderer.java
@@ -112,14 +112,16 @@ public class DefPartRenderer extends BasePartRenderer<Pane, Node, Node> {
public void handle(MouseEvent event) {
event.consume();
MPart domElement = getDomElement();
- PartImpl.this.service.activate(domElement, true);
- if (!checkFocusControl() && (domElement.getObject() != null)) {
- // ContextInjectionFactory.invoke(domElement.getObject(),
- // Focus.class, domElement.getContext(), null);
- // if (!checkFocusControl()) {
- // p.requestFocus();
- // }
- p.requestFocus();
+ if( domElement != null ) {
+ PartImpl.this.service.activate(domElement, true);
+ if (!checkFocusControl() && (domElement.getObject() != null)) {
+ // ContextInjectionFactory.invoke(domElement.getObject(),
+ // Focus.class, domElement.getContext(), null);
+ // if (!checkFocusControl()) {
+ // p.requestFocus();
+ // }
+ p.requestFocus();
+ }
}
}
});
@@ -213,12 +215,12 @@ public class DefPartRenderer extends BasePartRenderer<Pane, Node, Node> {
getStaticLayoutNode();
this.toolbarGroup = new StackPane();
-
- if (getDomElement().getTags().contains(TOOL_BAR_FULL_SPAN_TAG)) {
+ MPart element = getDomElement();
+ if (element != null && element.getTags().contains(TOOL_BAR_FULL_SPAN_TAG)) {
final BorderPane p = new BorderPane();
p.setCenter(this.toolbarGroup);
p.getStyleClass().add(CSS_CLASS_VIEW_TOOLBAR_CONTAINER);
- if (getDomElement().getTags().contains(TOOLBAR_MENU_FLOAT_TAG)) {
+ if (element.getTags().contains(TOOLBAR_MENU_FLOAT_TAG)) {
AnchorPane.setLeftAnchor(p, Double.valueOf(0.0));
AnchorPane.setRightAnchor(p, Double.valueOf(0.0));
AnchorPane.setTopAnchor(p, Double.valueOf(0.0));
@@ -233,7 +235,7 @@ public class DefPartRenderer extends BasePartRenderer<Pane, Node, Node> {
}
});
} else {
- if (getDomElement().getTags().contains(TOOLBAR_MENU_BOTTOM_TAG)) {
+ if (element.getTags().contains(TOOLBAR_MENU_BOTTOM_TAG)) {
this.dataArea.setBottom(p);
} else {
this.dataArea.setTop(p);
@@ -243,7 +245,7 @@ public class DefPartRenderer extends BasePartRenderer<Pane, Node, Node> {
BorderPane p = new BorderPane();
p.setRight(this.toolbarGroup);
p.getStyleClass().add(CSS_CLASS_VIEW_TOOLBAR_CONTAINER);
- if (getDomElement().getTags().contains(TOOLBAR_MENU_BOTTOM_TAG)) {
+ if (element != null && element.getTags().contains(TOOLBAR_MENU_BOTTOM_TAG)) {
this.dataArea.setBottom(p);
} else {
this.dataArea.setTop(p);
@@ -267,7 +269,8 @@ public class DefPartRenderer extends BasePartRenderer<Pane, Node, Node> {
@Override
public void handle(MouseEvent event) {
- if (getDomElement().getTags().contains(TOOLBAR_MENU_FLOAT_TAG)) {
+ MPart element = getDomElement();
+ if (element != null && element.getTags().contains(TOOLBAR_MENU_FLOAT_TAG)) {
PartImpl.this.toolbarGroup.getParent().setVisible(false);
}
}

Back to the top