Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Schindl2014-05-13 16:43:13 -0400
committerTom Schindl2014-05-13 16:43:13 -0400
commitab7b5d53a1b8f5fd7bde667b77387a7e5331e904 (patch)
tree06c737ab8b9b2f7bda34d893ca75fd9430ebfb4e
parent0106b4fcea288beb2cd49f6ef09193d3ff1c0679 (diff)
downloadorg.eclipse.efxclipse-ab7b5d53a1b8f5fd7bde667b77387a7e5331e904.tar.gz
org.eclipse.efxclipse-ab7b5d53a1b8f5fd7bde667b77387a7e5331e904.tar.xz
org.eclipse.efxclipse-ab7b5d53a1b8f5fd7bde667b77387a7e5331e904.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/DefSashRenderer.java44
1 files changed, 31 insertions, 13 deletions
diff --git a/bundles/runtime/org.eclipse.fx.ui.workbench.renderers.fx/src/org/eclipse/fx/ui/workbench/renderers/fx/DefSashRenderer.java b/bundles/runtime/org.eclipse.fx.ui.workbench.renderers.fx/src/org/eclipse/fx/ui/workbench/renderers/fx/DefSashRenderer.java
index 2b540cb17..443c50785 100755
--- a/bundles/runtime/org.eclipse.fx.ui.workbench.renderers.fx/src/org/eclipse/fx/ui/workbench/renderers/fx/DefSashRenderer.java
+++ b/bundles/runtime/org.eclipse.fx.ui.workbench.renderers.fx/src/org/eclipse/fx/ui/workbench/renderers/fx/DefSashRenderer.java
@@ -93,12 +93,16 @@ public class DefSashRenderer extends BaseSashRenderer<Node> {
Node n = (Node) widget.getStaticLayoutNode();
GridLayoutPane p = getWidget();
- if (getDomElement().isHorizontal()) {
+ MPartSashContainer element = getDomElement();
+ if ( element != null && element.isHorizontal()) {
p.setNumColumns(p.getNumColumns() + 1);
}
- GridData gd = toGridData(widget.getDomElement().getPersistedState());
- GridLayoutPane.setConstraint(n, gd);
+ MPartSashContainerElement domElement2 = widget.getDomElement();
+ if( domElement2 != null ) {
+ GridData gd = toGridData(domElement2.getPersistedState());
+ GridLayoutPane.setConstraint(n, gd);
+ }
p.getChildren().add(n);
}
@@ -114,13 +118,17 @@ public class DefSashRenderer extends BaseSashRenderer<Node> {
for (WLayoutedWidget<MPartSashContainerElement> w : list) {
Node n = (Node) w.getStaticLayoutNode();
-
- GridData gd = toGridData(w.getDomElement().getPersistedState());
- GridLayoutPane.setConstraint(n, gd);
+
+ MPartSashContainerElement element = w.getDomElement();
+ if( element != null ) {
+ GridData gd = toGridData(element.getPersistedState());
+ GridLayoutPane.setConstraint(n, gd);
+ }
nodeList.add(n);
}
- if (getDomElement().isHorizontal()) {
+ MPartSashContainer element = getDomElement();
+ if (element != null && element.isHorizontal()) {
p.setNumColumns(p.getNumColumns() + nodeList.size());
}
@@ -134,13 +142,17 @@ public class DefSashRenderer extends BaseSashRenderer<Node> {
for (WLayoutedWidget<MPartSashContainerElement> w : list) {
Node n = (Node) w.getStaticLayoutNode();
-
- GridData gd = toGridData(w.getDomElement().getPersistedState());
- GridLayoutPane.setConstraint(n, gd);
+
+ MPartSashContainerElement element = w.getDomElement();
+ if( element != null ) {
+ GridData gd = toGridData(element.getPersistedState());
+ GridLayoutPane.setConstraint(n, gd);
+ }
nodeList.add(n);
}
- if (getDomElement().isHorizontal()) {
+ MPartSashContainer element = getDomElement();
+ if (element != null && element.isHorizontal()) {
p.setNumColumns(p.getNumColumns() + nodeList.size());
}
@@ -209,10 +221,16 @@ public class DefSashRenderer extends BaseSashRenderer<Node> {
return;
}
for (double d : getWidget().getDividerPositions()) {
- this.items.get(idx++).getDomElement().setContainerData((d - prev) * 10 + ""); //$NON-NLS-1$
+ MPartSashContainerElement element = this.items.get(idx++).getDomElement();
+ if( element != null ) {
+ element.setContainerData((d - prev) * 10 + ""); //$NON-NLS-1$
+ }
prev = d;
}
- this.items.get(this.items.size() - 1).getDomElement().setContainerData((1.0 - prev) * 10 + ""); //$NON-NLS-1$
+ MPartSashContainerElement element = this.items.get(this.items.size() - 1).getDomElement();
+ if( element != null ) {
+ element.setContainerData((1.0 - prev) * 10 + ""); //$NON-NLS-1$
+ }
}
@Override

Back to the top