Mercurial > hg > thermostat-tools-eclipse
changeset 24:f947d19cca31
Some widgets to display basics about a command
It's not connected to the mode; so it's just garbage data at this
point.
author | Omair Majid <omajid@redhat.com> |
---|---|
date | Wed, 04 Dec 2013 14:23:03 -0500 |
parents | 680d63274cbc |
children | 6488970a81e8 |
files | src/com/redhat/thermostat/plugin/eclipse/editor/CommandEditPage.java |
diffstat | 1 files changed, 44 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/com/redhat/thermostat/plugin/eclipse/editor/CommandEditPage.java Wed Dec 04 13:31:53 2013 -0500 +++ b/src/com/redhat/thermostat/plugin/eclipse/editor/CommandEditPage.java Wed Dec 04 14:23:03 2013 -0500 @@ -4,7 +4,11 @@ import org.eclipse.swt.SWT; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.layout.RowLayout; +import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Label; +import org.eclipse.swt.widgets.Text; import org.eclipse.ui.forms.IDetailsPage; import org.eclipse.ui.forms.IFormPart; import org.eclipse.ui.forms.IManagedForm; @@ -72,9 +76,49 @@ section.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); section.setText("Command details"); + section.setDescription("Items marked with * are required"); Composite sectionContents = toolkit.createComposite(section); section.setClient(sectionContents); + sectionContents.setLayout(new GridLayout()); + + createBasicSection(sectionContents); + + createArgumentsAndOptionsSection(sectionContents); + createBundlesSection(sectionContents); } + + private void createBasicSection(Composite sectionContents) { + Section basics = toolkit.createSection(sectionContents, Section.TITLE_BAR); + basics.setText("Basics"); + + Composite basicContents = toolkit.createComposite(basics); + basics.setClient(basicContents); + basicContents.setLayout(new GridLayout(2, false)); + + Label commandNameLabel = toolkit.createLabel(basicContents, "Name:"); + Text commandName = toolkit.createText(basicContents, "<command name here>"); + + Label commandUsageLabel = toolkit.createLabel(basicContents, "Usage:"); + Text commandUsage = toolkit.createText(basicContents, "<usage>"); + + Label commandDescriptionLabel = toolkit.createLabel(basicContents, "Description:"); + Text commandDescription = toolkit.createText(basicContents, "<description>"); + + Label environmentsLabel = toolkit.createLabel(basicContents, "Environments"); + Composite environmentsComposite = toolkit.createComposite(basicContents); + environmentsComposite.setLayout(new RowLayout()); + Button cli = toolkit.createButton(environmentsComposite, "CLI", SWT.CHECK); + Button shell = toolkit.createButton(environmentsComposite, "Shell", SWT.CHECK); + } + + private void createArgumentsAndOptionsSection(Composite sectionContents) { + // TODO Auto-generated method stub + } + + private void createBundlesSection(Composite sectionContents) { + // TODO Auto-generated method stub + } + } \ No newline at end of file