# HG changeset patch # User Omair Majid # Date 1391724229 18000 # Node ID 1c835942f3c2207a081ccd1ba91acdf366f33cea # Parent 10ffc183f39e990225290c6e776955a416c8169d Add descriptions to Command and Extensions pages diff -r 10ffc183f39e -r 1c835942f3c2 TODO.md --- a/TODO.md Thu Feb 06 15:32:06 2014 -0500 +++ b/TODO.md Thu Feb 06 17:03:49 2014 -0500 @@ -10,9 +10,6 @@ - Implement support for options/arguments -- Add some help information distinguishing between Commands and Extensions in - each page as well as the Overview page. - - Modify the bundle loading dialog to be smarter. Offer auto-completion and automatically identify bundle names from all open projects and dependencies, as well as core thermostat bundles. diff -r 10ffc183f39e -r 1c835942f3c2 com.redhat.thermostat.tools.eclipse.plugin/src/com/redhat/thermostat/tools/eclipse/plugin/Messages.java --- a/com.redhat.thermostat.tools.eclipse.plugin/src/com/redhat/thermostat/tools/eclipse/plugin/Messages.java Thu Feb 06 15:32:06 2014 -0500 +++ b/com.redhat.thermostat.tools.eclipse.plugin/src/com/redhat/thermostat/tools/eclipse/plugin/Messages.java Thu Feb 06 17:03:49 2014 -0500 @@ -19,12 +19,14 @@ public static String CommandEditPage_removeButton; public static String CommandEditPage_shellCheckTitle; public static String CommandEditPage_usageLabel; + public static String CommandsMasterDetailsBlock_description; public static String CommandsMasterDetailsBlock_title; public static String CommandsPage_title; public static String ExtensionEditPage_addBundle; public static String ExtensionEditPage_bundlesSectionTitle; public static String ExtensionEditPage_extensionSectionTitle; public static String ExtensionEditPage_removeBundle; + public static String ExtensionsMasterDetailsBlock_description; public static String ExtensionsMasterDetailsBlock_title; public static String ExtensionsPage_title; public static String NewBundleDialog_findOnDisk; diff -r 10ffc183f39e -r 1c835942f3c2 com.redhat.thermostat.tools.eclipse.plugin/src/com/redhat/thermostat/tools/eclipse/plugin/editor/BaseMasterDetailsBlock.java --- a/com.redhat.thermostat.tools.eclipse.plugin/src/com/redhat/thermostat/tools/eclipse/plugin/editor/BaseMasterDetailsBlock.java Thu Feb 06 15:32:06 2014 -0500 +++ b/com.redhat.thermostat.tools.eclipse.plugin/src/com/redhat/thermostat/tools/eclipse/plugin/editor/BaseMasterDetailsBlock.java Thu Feb 06 17:03:49 2014 -0500 @@ -44,8 +44,9 @@ @Override protected void createMasterPart(final IManagedForm managedForm, final Composite parent) { FormToolkit toolkit = managedForm.getToolkit(); - final Section section = toolkit.createSection(parent, Section.TITLE_BAR); + final Section section = toolkit.createSection(parent, Section.TITLE_BAR | Section.DESCRIPTION); section.setText(getSectionTitle()); + section.setDescription(getSectionDescription()); final SectionPart sectionPart = new SectionPart(section); @@ -109,8 +110,10 @@ }); } - /** Return the name of the section */ + /** Return the name of the section containing the model list */ abstract String getSectionTitle(); + /** Return the description for the section containing the model list*/ + abstract String getSectionDescription(); /** Return the model object to use in the master list */ abstract Object[] getListViewModel(); diff -r 10ffc183f39e -r 1c835942f3c2 com.redhat.thermostat.tools.eclipse.plugin/src/com/redhat/thermostat/tools/eclipse/plugin/editor/CommandEditPage.java --- a/com.redhat.thermostat.tools.eclipse.plugin/src/com/redhat/thermostat/tools/eclipse/plugin/editor/CommandEditPage.java Thu Feb 06 15:32:06 2014 -0500 +++ b/com.redhat.thermostat.tools.eclipse.plugin/src/com/redhat/thermostat/tools/eclipse/plugin/editor/CommandEditPage.java Thu Feb 06 17:03:49 2014 -0500 @@ -41,6 +41,11 @@ import com.redhat.thermostat.tools.eclipse.plugin.model.Environments; import com.redhat.thermostat.tools.eclipse.plugin.model.Plugin; +/** + * The page shown for editing aspects of a specific command. + *

+ * The details area of the master-details block. + */ class CommandEditPage implements IDetailsPage { private FormToolkit toolkit; diff -r 10ffc183f39e -r 1c835942f3c2 com.redhat.thermostat.tools.eclipse.plugin/src/com/redhat/thermostat/tools/eclipse/plugin/editor/CommandsMasterDetailsBlock.java --- a/com.redhat.thermostat.tools.eclipse.plugin/src/com/redhat/thermostat/tools/eclipse/plugin/editor/CommandsMasterDetailsBlock.java Thu Feb 06 15:32:06 2014 -0500 +++ b/com.redhat.thermostat.tools.eclipse.plugin/src/com/redhat/thermostat/tools/eclipse/plugin/editor/CommandsMasterDetailsBlock.java Thu Feb 06 17:03:49 2014 -0500 @@ -9,6 +9,9 @@ import com.redhat.thermostat.tools.eclipse.plugin.model.Command; import com.redhat.thermostat.tools.eclipse.plugin.model.Plugin; +/** + * The master of the "Commands" page. Shows a list of all commands. + */ public class CommandsMasterDetailsBlock extends BaseMasterDetailsBlock { private CommandEditPage editPage; @@ -34,6 +37,11 @@ } @Override + String getSectionDescription() { + return Messages.CommandsMasterDetailsBlock_description; + } + + @Override Object[] getListViewModel() { return model.getCommandNames().toArray(); } diff -r 10ffc183f39e -r 1c835942f3c2 com.redhat.thermostat.tools.eclipse.plugin/src/com/redhat/thermostat/tools/eclipse/plugin/editor/CommandsPage.java --- a/com.redhat.thermostat.tools.eclipse.plugin/src/com/redhat/thermostat/tools/eclipse/plugin/editor/CommandsPage.java Thu Feb 06 15:32:06 2014 -0500 +++ b/com.redhat.thermostat.tools.eclipse.plugin/src/com/redhat/thermostat/tools/eclipse/plugin/editor/CommandsPage.java Thu Feb 06 17:03:49 2014 -0500 @@ -9,11 +9,15 @@ import com.redhat.thermostat.tools.eclipse.plugin.Messages; import com.redhat.thermostat.tools.eclipse.plugin.model.Plugin; +/** + * The "Commands" tab. + */ public class CommandsPage extends FormPage { static final String ID = "com.redhat.thermostat.tools.eclipse.plugin.editor.CommandsPage"; //$NON-NLS-1$ static final String TITLE = Messages.CommandsPage_title; + private Plugin model; public CommandsPage(FormEditor editor, Plugin model) { diff -r 10ffc183f39e -r 1c835942f3c2 com.redhat.thermostat.tools.eclipse.plugin/src/com/redhat/thermostat/tools/eclipse/plugin/editor/ExtensionEditPage.java --- a/com.redhat.thermostat.tools.eclipse.plugin/src/com/redhat/thermostat/tools/eclipse/plugin/editor/ExtensionEditPage.java Thu Feb 06 15:32:06 2014 -0500 +++ b/com.redhat.thermostat.tools.eclipse.plugin/src/com/redhat/thermostat/tools/eclipse/plugin/editor/ExtensionEditPage.java Thu Feb 06 17:03:49 2014 -0500 @@ -33,6 +33,9 @@ import com.redhat.thermostat.tools.eclipse.plugin.model.Extension; import com.redhat.thermostat.tools.eclipse.plugin.model.Plugin; +/** + * Edits aspects of a single extension. + */ public class ExtensionEditPage implements IDetailsPage { private FormToolkit toolkit; diff -r 10ffc183f39e -r 1c835942f3c2 com.redhat.thermostat.tools.eclipse.plugin/src/com/redhat/thermostat/tools/eclipse/plugin/editor/ExtensionsMasterDetailsBlock.java --- a/com.redhat.thermostat.tools.eclipse.plugin/src/com/redhat/thermostat/tools/eclipse/plugin/editor/ExtensionsMasterDetailsBlock.java Thu Feb 06 15:32:06 2014 -0500 +++ b/com.redhat.thermostat.tools.eclipse.plugin/src/com/redhat/thermostat/tools/eclipse/plugin/editor/ExtensionsMasterDetailsBlock.java Thu Feb 06 17:03:49 2014 -0500 @@ -8,6 +8,9 @@ import com.redhat.thermostat.tools.eclipse.plugin.model.Extension; import com.redhat.thermostat.tools.eclipse.plugin.model.Plugin; +/** + * The master of the "Extensions" page. Shows a list of all extensions. + */ public class ExtensionsMasterDetailsBlock extends BaseMasterDetailsBlock { private ExtensionEditPage editPage; @@ -32,6 +35,12 @@ return Messages.ExtensionsMasterDetailsBlock_title; } + + @Override + String getSectionDescription() { + return Messages.ExtensionsMasterDetailsBlock_description; + } + @Override Object[] getListViewModel() { return model.getExtensionNames().toArray(); diff -r 10ffc183f39e -r 1c835942f3c2 com.redhat.thermostat.tools.eclipse.plugin/src/com/redhat/thermostat/tools/eclipse/plugin/editor/ExtensionsPage.java --- a/com.redhat.thermostat.tools.eclipse.plugin/src/com/redhat/thermostat/tools/eclipse/plugin/editor/ExtensionsPage.java Thu Feb 06 15:32:06 2014 -0500 +++ b/com.redhat.thermostat.tools.eclipse.plugin/src/com/redhat/thermostat/tools/eclipse/plugin/editor/ExtensionsPage.java Thu Feb 06 17:03:49 2014 -0500 @@ -9,7 +9,9 @@ import com.redhat.thermostat.tools.eclipse.plugin.Messages; import com.redhat.thermostat.tools.eclipse.plugin.model.Plugin; - +/** + * The "Extensions" tab. + */ public class ExtensionsPage extends FormPage { static final String ID = "com.redhat.thermostat.tools.eclipse.plugin.editor.ExtensionsPage"; //$NON-NLS-1$ diff -r 10ffc183f39e -r 1c835942f3c2 com.redhat.thermostat.tools.eclipse.plugin/src/com/redhat/thermostat/tools/eclipse/plugin/messages.properties --- a/com.redhat.thermostat.tools.eclipse.plugin/src/com/redhat/thermostat/tools/eclipse/plugin/messages.properties Thu Feb 06 15:32:06 2014 -0500 +++ b/com.redhat.thermostat.tools.eclipse.plugin/src/com/redhat/thermostat/tools/eclipse/plugin/messages.properties Thu Feb 06 17:03:49 2014 -0500 @@ -11,12 +11,14 @@ CommandEditPage_removeButton=Remove CommandEditPage_shellCheckTitle=Shell CommandEditPage_usageLabel=Usage: +CommandsMasterDetailsBlock_description=Commands are completely new commands provided by this plugin. CommandsMasterDetailsBlock_title=Commands provided by the plugin CommandsPage_title=Commands ExtensionEditPage_addBundle=Add ExtensionEditPage_bundlesSectionTitle=Bundles to load ExtensionEditPage_extensionSectionTitle=Extension details ExtensionEditPage_removeBundle=Remove +ExtensionsMasterDetailsBlock_description=Extensions modify existing commands to load new bundles. These existing command might be provided by thermostat or other plugins ExtensionsMasterDetailsBlock_title=Commands extended by the plugin ExtensionsPage_title=Extensions NewBundleDialog_findOnDisk=...