changeset 97:1c835942f3c2

Add descriptions to Command and Extensions pages
author Omair Majid <omajid@redhat.com>
date Thu, 06 Feb 2014 17:03:49 -0500
parents 10ffc183f39e
children c3002fd38e27
files TODO.md com.redhat.thermostat.tools.eclipse.plugin/src/com/redhat/thermostat/tools/eclipse/plugin/Messages.java com.redhat.thermostat.tools.eclipse.plugin/src/com/redhat/thermostat/tools/eclipse/plugin/editor/BaseMasterDetailsBlock.java com.redhat.thermostat.tools.eclipse.plugin/src/com/redhat/thermostat/tools/eclipse/plugin/editor/CommandEditPage.java com.redhat.thermostat.tools.eclipse.plugin/src/com/redhat/thermostat/tools/eclipse/plugin/editor/CommandsMasterDetailsBlock.java com.redhat.thermostat.tools.eclipse.plugin/src/com/redhat/thermostat/tools/eclipse/plugin/editor/CommandsPage.java com.redhat.thermostat.tools.eclipse.plugin/src/com/redhat/thermostat/tools/eclipse/plugin/editor/ExtensionEditPage.java com.redhat.thermostat.tools.eclipse.plugin/src/com/redhat/thermostat/tools/eclipse/plugin/editor/ExtensionsMasterDetailsBlock.java com.redhat.thermostat.tools.eclipse.plugin/src/com/redhat/thermostat/tools/eclipse/plugin/editor/ExtensionsPage.java com.redhat.thermostat.tools.eclipse.plugin/src/com/redhat/thermostat/tools/eclipse/plugin/messages.properties
diffstat 10 files changed, 41 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- 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.
--- 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;
--- 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();
--- 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.
+ * <p>
+ * The details area of the master-details block.
+ */
 class CommandEditPage implements IDetailsPage {
 
     private FormToolkit toolkit;
--- 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();
     }
--- 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) {
--- 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;
--- 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();
--- 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$
--- 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=...