diff --git a/org.fortiss.af3.rcp.application/src/org/fortiss/af3/rcp/application/advisors/.ratings b/org.fortiss.af3.rcp.application/src/org/fortiss/af3/rcp/application/advisors/.ratings index 5e303ec353a5d29656dd19e81cd44dd5a42ad85d..357347053bd46fe9718d6f24beb6e20b92354337 100644 --- a/org.fortiss.af3.rcp.application/src/org/fortiss/af3/rcp/application/advisors/.ratings +++ b/org.fortiss.af3.rcp.application/src/org/fortiss/af3/rcp/application/advisors/.ratings @@ -1,5 +1,5 @@ ApplicationActionBarAdvisor.java 3e7c0fd992586e6ca7724b871eb0b2cf59244028 GREEN ApplicationWorkbenchAdvisor.java ef25d5783a4f75e88334fd679834a6e0421f8c2f GREEN ApplicationWorkbenchWindowAdvisor.java da5cb38300b384579532c678fbc9faa961c2ca6b GREEN -CurrentObjectiveContributionItem.java 30b220758a01e1ac6b6b67bdcfce76ade789ed4e RED -UpcomingObjectiveContributionItem.java 61822c03cec6f5a00434153e101f4762d112e4ae RED +CurrentObjectiveContributionItem.java 59e0a8730d46eb55f365b1df3308aad878ab041c RED +UpcomingObjectiveContributionItem.java f9ec7ba28ff7473a09767ef94ccf548dd11c2e23 RED diff --git a/org.fortiss.af3.rcp.application/src/org/fortiss/af3/rcp/application/advisors/CurrentObjectiveContributionItem.java b/org.fortiss.af3.rcp.application/src/org/fortiss/af3/rcp/application/advisors/CurrentObjectiveContributionItem.java index 30b220758a01e1ac6b6b67bdcfce76ade789ed4e..59e0a8730d46eb55f365b1df3308aad878ab041c 100644 --- a/org.fortiss.af3.rcp.application/src/org/fortiss/af3/rcp/application/advisors/CurrentObjectiveContributionItem.java +++ b/org.fortiss.af3.rcp.application/src/org/fortiss/af3/rcp/application/advisors/CurrentObjectiveContributionItem.java @@ -35,10 +35,10 @@ import org.eclipse.emf.ecore.EObject; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.ITreeSelection; import org.eclipse.swt.SWT; +import org.eclipse.swt.custom.CCombo; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.graphics.RGB; -import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Combo; import org.eclipse.swt.widgets.Composite; @@ -82,7 +82,7 @@ class CurrentObjectiveContributionItem extends WorkbenchWindowControlContributio private String initialObjective = "No modeling objective selected"; /** The Combo holding the time between the simulation steps. */ - private Combo currentObjectiveCombo; + private CCombo currentObjectiveCombo; /** The control object holding the combo. */ // private ToolItem toolitem; @@ -116,17 +116,14 @@ class CurrentObjectiveContributionItem extends WorkbenchWindowControlContributio protected Control createControl(Composite parent) { composite = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(2, false); - layout.marginWidth = 0; - layout.verticalSpacing = 0; + layout.marginHeight = 0; composite.setLayout(layout); - GridData gridData = new GridData(SWT.NONE, SWT.FILL, false, false, 2, 1); - composite.setLayoutData(gridData); Label label = new Label(composite, SWT.TRANSPARENT); label.setText("Current Objective"); // Objective Combo - currentObjectiveCombo = new Combo(composite, SWT.DROP_DOWN); + currentObjectiveCombo = new CCombo(composite, SWT.DROP_DOWN); currentObjectiveCombo.setItems(initialSetOfObjectives); currentObjectiveCombo.setText(initialObjective); currentObjectiveCombo.setToolTipText("Set the next modelling objective."); @@ -140,7 +137,7 @@ class CurrentObjectiveContributionItem extends WorkbenchWindowControlContributio } }); - parent.setSize(composite.computeSize(SWT.DEFAULT, SWT.DEFAULT)); + parent.setSize(composite.computeSize(SWT.DEFAULT, SWT.DEFAULT, true)); return composite; } diff --git a/org.fortiss.af3.rcp.application/src/org/fortiss/af3/rcp/application/advisors/UpcomingObjectiveContributionItem.java b/org.fortiss.af3.rcp.application/src/org/fortiss/af3/rcp/application/advisors/UpcomingObjectiveContributionItem.java index 61822c03cec6f5a00434153e101f4762d112e4ae..f9ec7ba28ff7473a09767ef94ccf548dd11c2e23 100644 --- a/org.fortiss.af3.rcp.application/src/org/fortiss/af3/rcp/application/advisors/UpcomingObjectiveContributionItem.java +++ b/org.fortiss.af3.rcp.application/src/org/fortiss/af3/rcp/application/advisors/UpcomingObjectiveContributionItem.java @@ -32,11 +32,11 @@ import org.eclipse.emf.ecore.EObject; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.ITreeSelection; import org.eclipse.swt.SWT; +import org.eclipse.swt.custom.CCombo; import org.eclipse.swt.events.FocusEvent; import org.eclipse.swt.events.FocusListener; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.events.SelectionListener; -import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Combo; import org.eclipse.swt.widgets.Composite; @@ -79,7 +79,7 @@ public class UpcomingObjectiveContributionItem extends WorkbenchWindowControlCon private String initialObjective = "No upcoming objective available"; /** The Combo holding the upcoming objectives. */ - private Combo upcomingObjectiveCombo; + private CCombo upcomingObjectiveCombo; /** Configuration of the current project selected in the combo box. */ private ConstraintBasedDevelopmentProcess currentDevelopmentProcess = null; @@ -113,8 +113,6 @@ public class UpcomingObjectiveContributionItem extends WorkbenchWindowControlCon layout.marginWidth = 0; layout.verticalSpacing = 0; composite.setLayout(layout); - GridData gridData = new GridData(SWT.NONE, SWT.FILL, false, false, 3, 1); - composite.setLayoutData(gridData); // Add a separator to the current objective combo. new Label(composite, SWT.HORIZONTAL); @@ -123,7 +121,7 @@ public class UpcomingObjectiveContributionItem extends WorkbenchWindowControlCon label.setText("Upcoming Objective"); // Objective Combo - upcomingObjectiveCombo = new Combo(composite, SWT.DROP_DOWN); + upcomingObjectiveCombo = new CCombo(composite, SWT.DROP_DOWN); upcomingObjectiveCombo.setItems(initialSetOfObjectives); upcomingObjectiveCombo.setText(initialObjective); upcomingObjectiveCombo.setToolTipText("Set the next modelling objective.");