Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Spungin2014-03-19 00:22:23 -0400
committerOlivier Prouvost2014-03-19 00:47:22 -0400
commitd9b5a4e6142989fb1bc0d416f9c1b4172723894f (patch)
treeeaf8ea544b057f089c01b2c15b1eaeea808a6167
parentc6f9a8fe5714b4a76b30a9581225490bc5a165f9 (diff)
downloadorg.eclipse.e4.tools-d9b5a4e6142989fb1bc0d416f9c1b4172723894f.tar.gz
org.eclipse.e4.tools-d9b5a4e6142989fb1bc0d416f9c1b4172723894f.tar.xz
org.eclipse.e4.tools-d9b5a4e6142989fb1bc0d416f9c1b4172723894f.zip
Bug 430664 - application editor key/value table columns are too large byI20140319-2200
default Change-Id: I54f724c75c874d5dd9d427bf4830e41e29c64c78 Signed-off-by: Steven Spungin <steven@spungin.tv>
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/ControlFactory.java14
1 files changed, 12 insertions, 2 deletions
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/ControlFactory.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/ControlFactory.java
index 969e1814..9c73ca48 100644
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/ControlFactory.java
+++ b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/ControlFactory.java
@@ -8,7 +8,7 @@
* Contributors:
* Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation
* Dirk Fauth <dirk.fauth@googlemail.com> - Bug 426986
- * Steven Spungin <steven@spungin.tv> - Bug 430660
+ * Steven Spungin <steven@spungin.tv> - Bug 430660, 430664
******************************************************************************/
package org.eclipse.e4.tools.emf.ui.internal.common.component;
@@ -99,6 +99,7 @@ import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.swt.widgets.Text;
public class ControlFactory {
@@ -340,6 +341,15 @@ public class ControlFactory {
editor.getEditingDomain().getCommandStack().execute(cmd);
super.okPressed();
}
+
+ // pack the first column
+ if (tableviewer.getTable().getColumns().length > 0) {
+ TableColumn tableColumn = tableviewer.getTable().getColumns()[0];
+ tableColumn.pack();
+ if (tableColumn.getWidth() < 20) {
+ tableColumn.setWidth(20);
+ }
+ }
}
}
};
@@ -903,4 +913,4 @@ public class ControlFactory {
}
});
}
-} \ No newline at end of file
+}

Back to the top