aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbveliev2011-10-22 07:38:36 (EDT)
committerbveliev2011-10-22 07:38:36 (EDT)
commitad0480267e6d84e1335fedc5ebd1182df5e0a7c4 (patch)
tree77210a462b3b5c5506678e12c9c2879d25d01e15
parent40720c658e0ad12df8647b94ac03f63da7e2a494 (diff)
downloadorg.eclipse.rtp-ad0480267e6d84e1335fedc5ebd1182df5e0a7c4.zip
org.eclipse.rtp-ad0480267e6d84e1335fedc5ebd1182df5e0a7c4.tar.gz
org.eclipse.rtp-ad0480267e6d84e1335fedc5ebd1182df5e0a7c4.tar.bz2
NEW - bug 361726: [Configurator] Configurator console help is not
integrated into OSGi console help https://bugs.eclipse.org/bugs/show_bug.cgi?id=361726
-rw-r--r--bundles/org.eclipse.rtp.configurator.console/src/org/eclipse/rtp/configurator/console/CommandDelegate.java2
-rw-r--r--bundles/org.eclipse.rtp.configurator.console/src/org/eclipse/rtp/configurator/console/CommandDelegateImpl.java13
-rw-r--r--bundles/org.eclipse.rtp.configurator.console/src/org/eclipse/rtp/configurator/console/RTCommandProvider.java4
3 files changed, 13 insertions, 6 deletions
diff --git a/bundles/org.eclipse.rtp.configurator.console/src/org/eclipse/rtp/configurator/console/CommandDelegate.java b/bundles/org.eclipse.rtp.configurator.console/src/org/eclipse/rtp/configurator/console/CommandDelegate.java
index aa90980..4b7b501 100644
--- a/bundles/org.eclipse.rtp.configurator.console/src/org/eclipse/rtp/configurator/console/CommandDelegate.java
+++ b/bundles/org.eclipse.rtp.configurator.console/src/org/eclipse/rtp/configurator/console/CommandDelegate.java
@@ -26,4 +26,6 @@ public interface CommandDelegate {
void list();
void updateWorld();
+
+ String getHelp();
}
diff --git a/bundles/org.eclipse.rtp.configurator.console/src/org/eclipse/rtp/configurator/console/CommandDelegateImpl.java b/bundles/org.eclipse.rtp.configurator.console/src/org/eclipse/rtp/configurator/console/CommandDelegateImpl.java
index 9be3c81..b029dc4 100644
--- a/bundles/org.eclipse.rtp.configurator.console/src/org/eclipse/rtp/configurator/console/CommandDelegateImpl.java
+++ b/bundles/org.eclipse.rtp.configurator.console/src/org/eclipse/rtp/configurator/console/CommandDelegateImpl.java
@@ -36,8 +36,10 @@ public class CommandDelegateImpl implements CommandDelegate {
System.out.println( help );
}
- private String getHelp() {
+ @Override
+ public String getHelp() {
StringBuilder help = new StringBuilder();
+ addRTHeader( help );
addHeader( "Update Commands", help );
addCommand( "install",
"Installs a feature. The name of the feature is the first entry. If "
@@ -59,10 +61,15 @@ public class CommandDelegateImpl implements CommandDelegate {
return help.toString();
}
+ private void addRTHeader( StringBuilder help ) {
+ help.append( "---RT Commands---" ); //$NON-NLS-1$
+ help.append( NEW_LINE );
+ }
+
private void addHeader( String header, StringBuilder help ) {
- help.append( "---" ); //$NON-NLS-1$
+ help.append( " -" ); //$NON-NLS-1$
help.append( header );
- help.append( "---" ); //$NON-NLS-1$
+ help.append( "-" ); //$NON-NLS-1$
help.append( NEW_LINE );
}
diff --git a/bundles/org.eclipse.rtp.configurator.console/src/org/eclipse/rtp/configurator/console/RTCommandProvider.java b/bundles/org.eclipse.rtp.configurator.console/src/org/eclipse/rtp/configurator/console/RTCommandProvider.java
index f9fd5f8..8ecaeef 100644
--- a/bundles/org.eclipse.rtp.configurator.console/src/org/eclipse/rtp/configurator/console/RTCommandProvider.java
+++ b/bundles/org.eclipse.rtp.configurator.console/src/org/eclipse/rtp/configurator/console/RTCommandProvider.java
@@ -76,8 +76,6 @@ public class RTCommandProvider implements CommandProvider {
@Override
public String getHelp() {
- StringBuffer buffer = new StringBuffer();
- buffer.append( "---RT Commands---\n" );
- return buffer.toString();
+ return delegate.getHelp();
}
}