Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWim Jongman2013-02-20 17:23:31 +0000
committerWim Jongman2013-02-20 17:23:31 +0000
commit7abfb4c70c24f38bda3ee7862c655cbc6903cff6 (patch)
tree3e02f5f3361d0e622452545d94ef7aa9ac42d9da
parent723fc41604b6ae4804e554d6d791fcaec6b78a90 (diff)
downloadorg.eclipse.e4.tools-7abfb4c70c24f38bda3ee7862c655cbc6903cff6.tar.gz
org.eclipse.e4.tools-7abfb4c70c24f38bda3ee7862c655cbc6903cff6.tar.xz
org.eclipse.e4.tools-7abfb4c70c24f38bda3ee7862c655cbc6903cff6.zip
bug 400804: Additional make-up for the model editor
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/ModelFragmentsEditor.java8
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VModelFragmentsEditor.java9
2 files changed, 8 insertions, 9 deletions
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/ModelFragmentsEditor.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/ModelFragmentsEditor.java
index 43227f5e..f4bd0881 100644
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/ModelFragmentsEditor.java
+++ b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/ModelFragmentsEditor.java
@@ -119,8 +119,7 @@ public class ModelFragmentsEditor extends AbstractComponentEditor {
{
Composite fragCompo = new Composite(parent, SWT.NONE);
- fragCompo.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false, 2, 1));
- fragCompo.setLayout(new GridLayout());
+ fragCompo.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true, 3, 1));
GridLayout fragCompoLayout = new GridLayout(1, false);
fragCompoLayout.marginLeft = 0;
fragCompoLayout.marginRight = 0;
@@ -131,8 +130,7 @@ public class ModelFragmentsEditor extends AbstractComponentEditor {
final TableViewer viewer = new TableViewer(fragCompo);
viewer.setContentProvider(new ObservableListContentProvider());
viewer.setLabelProvider(new ComponentLabelProvider(getEditor(), Messages));
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.heightHint = 200;
+ GridData gd = new GridData(GridData.FILL_BOTH);
viewer.getControl().setLayoutData(gd);
IEMFListProperty prop = EMFProperties.list(FragmentPackageImpl.Literals.MODEL_FRAGMENTS__FRAGMENTS);
@@ -140,7 +138,7 @@ public class ModelFragmentsEditor extends AbstractComponentEditor {
Composite buttonComp = new Composite(parent, SWT.NONE);
buttonComp.setLayoutData(new GridData(GridData.FILL, GridData.END, false, false));
- GridLayout gl = new GridLayout();
+ GridLayout gl = new GridLayout(4, false);
gl.marginLeft = 0;
gl.marginRight = 0;
gl.marginWidth = 0;
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VModelFragmentsEditor.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VModelFragmentsEditor.java
index 516e7f2d..d5aa32a9 100644
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VModelFragmentsEditor.java
+++ b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VModelFragmentsEditor.java
@@ -115,11 +115,12 @@ public class VModelFragmentsEditor extends AbstractComponentEditor {
viewer.setLabelProvider(new ComponentLabelProvider(getEditor(), Messages));
GridData gd = new GridData(GridData.FILL_BOTH);
+ gd.horizontalSpan = 3;
viewer.getControl().setLayoutData(gd);
Composite buttonComp = new Composite(parent, SWT.NONE);
buttonComp.setLayoutData(new GridData(GridData.FILL, GridData.END, false, false));
- GridLayout gl = new GridLayout(2, false);
+ GridLayout gl = new GridLayout(4, false);
gl.marginLeft = 0;
gl.marginRight = 0;
gl.marginWidth = 0;
@@ -129,7 +130,7 @@ public class VModelFragmentsEditor extends AbstractComponentEditor {
Button b = new Button(buttonComp, SWT.PUSH | SWT.FLAT);
b.setText(Messages.ModelTooling_Common_Up);
b.setImage(createImage(ResourceProvider.IMG_Obj16_arrow_up));
- b.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false, 2, 1));
+ b.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false, 1, 1));
b.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
@@ -156,7 +157,7 @@ public class VModelFragmentsEditor extends AbstractComponentEditor {
b = new Button(buttonComp, SWT.PUSH | SWT.FLAT);
b.setText(Messages.ModelTooling_Common_Down);
b.setImage(createImage(ResourceProvider.IMG_Obj16_arrow_down));
- b.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false, 2, 1));
+ b.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false, 1, 1));
b.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
@@ -197,7 +198,7 @@ public class VModelFragmentsEditor extends AbstractComponentEditor {
b = new Button(buttonComp, SWT.PUSH | SWT.FLAT);
b.setText(Messages.ModelTooling_Common_Remove);
b.setImage(createImage(ResourceProvider.IMG_Obj16_table_delete));
- b.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false, 2, 1));
+ b.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false, 1, 1));
b.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {

Back to the top