projects
/
Mograsim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
SBSE is now on per default
[Mograsim.git]
/
plugins
/
net.mograsim.plugin.core
/
src
/
net
/
mograsim
/
plugin
/
nature
/
properties
/
MograsimNaturePropertyPage.java
diff --git
a/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/nature/properties/MograsimNaturePropertyPage.java
b/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/nature/properties/MograsimNaturePropertyPage.java
index
bffceac
..
1b6c3d8
100644
(file)
--- a/
plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/nature/properties/MograsimNaturePropertyPage.java
+++ b/
plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/nature/properties/MograsimNaturePropertyPage.java
@@
-24,9
+24,10
@@
public class MograsimNaturePropertyPage extends PropertyPage
private static final String WARNING = "Changing the Mograsim machine can completely break your project. Be careful.";
private static final String MACHINE_LABEL = "Machine definition";
private static final String MACHINE_PROPERTY = "net.mograsim.projectMachineId";
private static final String WARNING = "Changing the Mograsim machine can completely break your project. Be careful.";
private static final String MACHINE_LABEL = "Machine definition";
private static final String MACHINE_PROPERTY = "net.mograsim.projectMachineId";
- private static final String DEFAULT_MACHINE = "Am2900
Simple
";// TODO don't hardcode that here!
+ private static final String DEFAULT_MACHINE = "Am2900
Teaching
";// TODO don't hardcode that here!
private MachineCombo machineSelect;
private MachineCombo machineSelect;
+ private Label machineDescription;
private MachineDefinition defaultMachineDefinition;
private MachineContext machineContext;
private MachineDefinition defaultMachineDefinition;
private MachineContext machineContext;
@@
-41,7
+42,7
@@
public class MograsimNaturePropertyPage extends PropertyPage
private void addFirstSection(Composite parent)
{
private void addFirstSection(Composite parent)
{
- Composite composite = createDefaultComposite(parent);
+ Composite composite = createDefaultComposite(parent
, false
);
// Label for path field
Label pathLabel = new Label(composite, SWT.NONE);
// Label for path field
Label pathLabel = new Label(composite, SWT.NONE);
@@
-59,7
+60,7
@@
public class MograsimNaturePropertyPage extends PropertyPage
private void addSecondSection(Composite parent)
{
private void addSecondSection(Composite parent)
{
- Composite composite = createDefaultComposite(parent);
+ Composite composite = createDefaultComposite(parent
, true
);
// Label for machine
Label ownerLabel = new Label(composite, SWT.NONE);
// Label for machine
Label ownerLabel = new Label(composite, SWT.NONE);
@@
-68,8
+69,9
@@
public class MograsimNaturePropertyPage extends PropertyPage
// Machine choice
machineSelect = MachineContextSwtTools.createMachineSelector(composite, SWT.NONE);
// Machine choice
machineSelect = MachineContextSwtTools.createMachineSelector(composite, SWT.NONE);
- if (currentId.isPresent())
- machineSelect.add(currentId.get());
+ machineDescription = new Label(composite, SWT.WRAP);
+ machineSelect.addListener(md -> machineDescription.setText(md.getDescription()));
+ machineDescription.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1));
Optional<MachineDefinition> currentMachineDefinition = machineContext.getMachineDefinition();
Optional<MachineDefinition> currentMachineDefinition = machineContext.getMachineDefinition();
@@
-99,7
+101,7
@@
public class MograsimNaturePropertyPage extends PropertyPage
return composite;
}
return composite;
}
- private Composite createDefaultComposite(Composite parent)
+ private Composite createDefaultComposite(Composite parent
, boolean grabExcessVerticalSpace
)
{
Composite composite = new Composite(parent, SWT.NULL);
GridLayout layout = new GridLayout();
{
Composite composite = new Composite(parent, SWT.NULL);
GridLayout layout = new GridLayout();
@@
-109,6
+111,8
@@
public class MograsimNaturePropertyPage extends PropertyPage
GridData data = new GridData();
data.verticalAlignment = GridData.FILL;
data.horizontalAlignment = GridData.FILL;
GridData data = new GridData();
data.verticalAlignment = GridData.FILL;
data.horizontalAlignment = GridData.FILL;
+ data.grabExcessHorizontalSpace = true;
+ data.grabExcessVerticalSpace = grabExcessVerticalSpace;
composite.setLayoutData(data);
return composite;
composite.setLayoutData(data);
return composite;