Bug 408173 - Changing a property in the Scout Object Property view
causes items to be hidden
https://bugs.eclipse.org/bugs/show_bug.cgi?id=408173
dynamic column feature disabled because it was responsible for the
misbehavior of the property view.
Change-Id: If2b1651dc4b027f09ee908b930e459fb57de721f
Reviewed-on: https://git.eclipse.org/r/13235
Tested-by: Hudson CI
Reviewed-by: Matthias Villiger <mvi@bsiag.com>
IP-Clean: Matthias Villiger <mvi@bsiag.com>
diff --git a/org.eclipse.scout.sdk.ui/src/org/eclipse/scout/sdk/ui/internal/view/outline/pages/EditorSelectionVisitor.java b/org.eclipse.scout.sdk.ui/src/org/eclipse/scout/sdk/ui/internal/view/outline/pages/EditorSelectionVisitor.java
index 22848c7..0125331 100644
--- a/org.eclipse.scout.sdk.ui/src/org/eclipse/scout/sdk/ui/internal/view/outline/pages/EditorSelectionVisitor.java
+++ b/org.eclipse.scout.sdk.ui/src/org/eclipse/scout/sdk/ui/internal/view/outline/pages/EditorSelectionVisitor.java
@@ -563,7 +563,7 @@
IType currentElement = (IType) getCurrentElement();
ITypeHierarchy hierarchy = getCachedTypeHierarchy(currentElement);
if (hierarchy != null && hierarchy.contains(TypeUtility.getType(RuntimeClasses.IService))) {
- return CONTINUE_BRANCH;
+ return CONTINUE;
}
}
return CANCEL_SUBTREE;
@@ -588,7 +588,7 @@
IType currentElement = (IType) getCurrentElement();
ITypeHierarchy hierarchy = getCachedTypeHierarchy(currentElement);
if (hierarchy != null && hierarchy.contains(TypeUtility.getType(RuntimeClasses.IService))) {
- return CONTINUE_BRANCH;
+ return CONTINUE;
}
}
return CANCEL_SUBTREE;
diff --git a/org.eclipse.scout.sdk.ui/src/org/eclipse/scout/sdk/ui/view/properties/part/singlepage/ConfigurationMethodSection.java b/org.eclipse.scout.sdk.ui/src/org/eclipse/scout/sdk/ui/view/properties/part/singlepage/ConfigurationMethodSection.java
index 05f29ab..f0617d0 100644
--- a/org.eclipse.scout.sdk.ui/src/org/eclipse/scout/sdk/ui/view/properties/part/singlepage/ConfigurationMethodSection.java
+++ b/org.eclipse.scout.sdk.ui/src/org/eclipse/scout/sdk/ui/view/properties/part/singlepage/ConfigurationMethodSection.java
@@ -19,8 +19,6 @@
import org.eclipse.scout.sdk.workspace.type.config.ConfigPropertyType;
import org.eclipse.scout.sdk.workspace.type.config.ConfigurationMethod;
import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ControlEvent;
-import org.eclipse.swt.events.ControlListener;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
@@ -151,37 +149,39 @@
category.setLayout(catLayout);
category.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL));
- category.addControlListener(new ControlListener() {
- private final int m_columnWidth = 300;
- private int m_numCols = 1;
-
- private void layoutColumns() {
- try {
- category.setRedraw(false);
- parent.setRedraw(false);
- int numCols = Math.max(1, category.getBounds().width / m_columnWidth);
- if (numCols != m_numCols) {
- catLayout.numColumns = numCols;
- m_numCols = numCols;
- section.reflow();
- }
- }
- finally {
- category.setRedraw(true);
- parent.setRedraw(true);
- }
- }
-
- @Override
- public void controlResized(ControlEvent e) {
- layoutColumns();
- }
-
- @Override
- public void controlMoved(ControlEvent e) {
- layoutColumns();
- }
- });
+// dynamic column feature removed because of bug 408173 (https://bugs.eclipse.org/bugs/show_bug.cgi?id=408173)
+// can be re-enabled as soon as a suitable solution is found.
+// category.addControlListener(new ControlListener() {
+// private final int m_columnWidth = 300;
+// private int m_numCols = 1;
+//
+// private void layoutColumns() {
+// try {
+// category.setRedraw(false);
+// parent.setRedraw(false);
+// int numCols = Math.max(1, category.getBounds().width / m_columnWidth);
+// if (numCols != m_numCols) {
+// catLayout.numColumns = numCols;
+// m_numCols = numCols;
+// section.reflow();
+// }
+// }
+// finally {
+// category.setRedraw(true);
+// parent.setRedraw(true);
+// }
+// }
+//
+// @Override
+// public void controlResized(ControlEvent e) {
+// layoutColumns();
+// }
+//
+// @Override
+// public void controlMoved(ControlEvent e) {
+// layoutColumns();
+// }
+// });
return category;
}
diff --git a/org.eclipse.scout.sdk.ui/src/org/eclipse/scout/sdk/ui/view/properties/part/singlepage/JdtTypePropertyPart.java b/org.eclipse.scout.sdk.ui/src/org/eclipse/scout/sdk/ui/view/properties/part/singlepage/JdtTypePropertyPart.java
index 1549b34..138fcbb 100644
--- a/org.eclipse.scout.sdk.ui/src/org/eclipse/scout/sdk/ui/view/properties/part/singlepage/JdtTypePropertyPart.java
+++ b/org.eclipse.scout.sdk.ui/src/org/eclipse/scout/sdk/ui/view/properties/part/singlepage/JdtTypePropertyPart.java
@@ -445,7 +445,7 @@
AbstractMethodPresenter createOperationPresenter(Composite parent, ConfigurationMethod method) {
AbstractMethodPresenter presenter = null;
- if (method.getMethodName().equals("execResetSearchFilter")) {
+ if ("execResetSearchFilter".equals(method.getMethodName())) {
presenter = new ExecResetSearchFilterMethodPresenter(getFormToolkit(), parent);
presenter.setMethod(method);
}
diff --git a/org.eclipse.scout.sdk/src/org/eclipse/scout/sdk/operation/project/ServerProductFileUpgradeOperation.java b/org.eclipse.scout.sdk/src/org/eclipse/scout/sdk/operation/project/ServerProductFileUpgradeOperation.java
index 401c8be..9e531b5 100644
--- a/org.eclipse.scout.sdk/src/org/eclipse/scout/sdk/operation/project/ServerProductFileUpgradeOperation.java
+++ b/org.eclipse.scout.sdk/src/org/eclipse/scout/sdk/operation/project/ServerProductFileUpgradeOperation.java
@@ -32,8 +32,8 @@
@Override
public void validate() throws IllegalArgumentException {
super.validate();
- if (m_serverProdFiles == null || m_serverProdFiles.length != 1) {
- throw new IllegalArgumentException("server development product file not found.");
+ if (m_serverProdFiles == null) {
+ throw new IllegalArgumentException("server development products cannot be null.");
}
}