aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbveliev2011-10-05 12:00:41 (EDT)
committerbveliev2011-10-05 12:00:41 (EDT)
commit2aab7e104708c0ebaf0dd46754695348dbdc81b1 (patch)
treed95cd7a5af5463e6387e1fb59bd77d81117c7f01
parentaa799beba58d159140ddb3b0ffc65f845d0ec480 (diff)
downloadorg.eclipse.rtp-2aab7e104708c0ebaf0dd46754695348dbdc81b1.zip
org.eclipse.rtp-2aab7e104708c0ebaf0dd46754695348dbdc81b1.tar.gz
org.eclipse.rtp-2aab7e104708c0ebaf0dd46754695348dbdc81b1.tar.bz2
* rtp console help added
* june data model added
-rw-r--r--configurator/org.eclipse.rtp.configurator.console/src/org/eclipse/rtp/configurator/console/CommandDelegateImpl.java42
-rw-r--r--core/org.eclipse.rtp.core.service.provider/data/juno-sources.json33
-rw-r--r--core/org.eclipse.rtp.core.service.provider/src/org/eclipse/rtp/configurator/service/provider/internal/util/ConfiguratorModelUtil.java6
3 files changed, 78 insertions, 3 deletions
diff --git a/configurator/org.eclipse.rtp.configurator.console/src/org/eclipse/rtp/configurator/console/CommandDelegateImpl.java b/configurator/org.eclipse.rtp.configurator.console/src/org/eclipse/rtp/configurator/console/CommandDelegateImpl.java
index be2d64d..824c4ae 100644
--- a/configurator/org.eclipse.rtp.configurator.console/src/org/eclipse/rtp/configurator/console/CommandDelegateImpl.java
+++ b/configurator/org.eclipse.rtp.configurator.console/src/org/eclipse/rtp/configurator/console/CommandDelegateImpl.java
@@ -16,6 +16,8 @@ import org.eclipse.rtp.configurator.core.IConfiguratorService;
public class CommandDelegateImpl implements CommandDelegate {
private static IConfiguratorService configurationService;
+ private final static String TAB = "\t"; //$NON-NLS-1$
+ private final static String NEW_LINE = "\r\n"; //$NON-NLS-1$
public static void setUp( IConfiguratorService service ) {
CommandDelegateImpl.configurationService = service;
@@ -30,6 +32,46 @@ public class CommandDelegateImpl implements CommandDelegate {
/*
* Should print out a message with a help how to use the rt command.
*/
+ String help = getHelp();
+ System.out.println( help );
+ }
+
+ private String getHelp() {
+ StringBuilder help = new StringBuilder();
+ addHeader( "Update Commands", help );
+ addCommand( "install",
+ "Installs a feature. The name of the feature is the first entry. If "
+ + "the secodn entry is not an OSGI version than the latest should be installed.",
+ help );
+ addCommand( "update",
+ "Updates a feature. The name of the feature is the first entry. The feature is updated to its latest version.",
+ help );
+ addCommand( "update-world", "Updates all installed feature to their latest version.", help );
+ addCommand( "Remove", "the first entry is the feature which should be removed.", help );
+ addHeader( "Search Commands", help );
+ addCommand( "list", "Lists all available features in the rtp repos.", help );
+ addCommand( "show",
+ "Shows details of a specific component e.g. dependencies, available versions, size and so on. The feature name is the first entry.",
+ help );
+ addCommand( "search",
+ "Lists the available components in the rtp repos which where searched. A phonetic search should is done.",
+ help );
+ return help.toString();
+ }
+
+ private void addHeader( String header, StringBuilder help ) {
+ help.append( "---" ); //$NON-NLS-1$
+ help.append( header );
+ help.append( "---" ); //$NON-NLS-1$
+ help.append( NEW_LINE );
+ }
+
+ private void addCommand( String command, String description, StringBuilder help ) {
+ help.append( TAB );
+ help.append( command );
+ help.append( " - " ); //$NON-NLS-1$
+ help.append( description );
+ help.append( NEW_LINE );
}
@Override
diff --git a/core/org.eclipse.rtp.core.service.provider/data/juno-sources.json b/core/org.eclipse.rtp.core.service.provider/data/juno-sources.json
new file mode 100644
index 0000000..c76f264
--- /dev/null
+++ b/core/org.eclipse.rtp.core.service.provider/data/juno-sources.json
@@ -0,0 +1,33 @@
+{
+ "sources": [
+ {
+ "name": "rap",
+ "description": "The Rich Ajax Platform lets you build rich, Ajax-enabled Web applications by using the Eclipse development model, plug-ins with the well known Eclipse workbench extension points and a widget toolkit with SWT API.",
+ "infoUrl": "http://eclipse.org/rap/",
+ "versions": [
+ {
+ "features": [ { id : "org.eclipse.rap.runtime.feature.group", version : "1.5.0.20110926-1711" } ],
+ "version": "1.5.0",
+ "repositoryUrl": "http://download.eclipse.org/rt/rap/1.5/runtime"
+ },
+ {
+ "features": [ { id : "org.eclipse.rap.runtime.sdk.feature.group", version : "1.4.1.20110914-1945" } ],
+ "version": "1.4.1",
+ "repositoryUrl": "http://download.eclipse.org/rt/rap/1.4/runtime"
+ }
+ ]
+ },
+ {
+ "name": "equinox-server",
+ "description": "Equinox can be used on the server to serve up static content and to run servlets or JSPs.",
+ "infoUrl": "http://eclipse.org/equinox/",
+ "versions": [
+ {
+ "features": [ { id : "org.eclipse.equinox.serverside.sdk.feature.group", version : "3.8.0.v20110912-1543-7u7QFyQFN5Ljx9Z5NRF-qJ7jJWj4" } ],
+ "version": "3.8.0",
+ "repositoryUrl": "http://download.eclipse.org/eclipse/updates/3.8milestones/S-3.8M2-201109151308"
+ }
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/core/org.eclipse.rtp.core.service.provider/src/org/eclipse/rtp/configurator/service/provider/internal/util/ConfiguratorModelUtil.java b/core/org.eclipse.rtp.core.service.provider/src/org/eclipse/rtp/configurator/service/provider/internal/util/ConfiguratorModelUtil.java
index e3ee2cf..4ba769c 100644
--- a/core/org.eclipse.rtp.core.service.provider/src/org/eclipse/rtp/configurator/service/provider/internal/util/ConfiguratorModelUtil.java
+++ b/core/org.eclipse.rtp.core.service.provider/src/org/eclipse/rtp/configurator/service/provider/internal/util/ConfiguratorModelUtil.java
@@ -54,8 +54,8 @@ public class ConfiguratorModelUtil {
URL url = new URL( modelURLs[ i ] );
result = sourceUnMarshaller.marshal( url.openStream() );
} catch( Exception e ) {
- System.out.println( "Failed to load model" );
- e.printStackTrace();
+ // System.out.println( "Failed to load model" );
+ // e.printStackTrace();
}
}
return result;
@@ -65,7 +65,7 @@ public class ConfiguratorModelUtil {
String result = "";
try {
URL unresolvedURL = FileLocator.find( ProviderActivator.getBundleContext().getBundle(),
- new Path( "data/real-sources.json" ),
+ new Path( "data/juno-sources.json" ),
null );
result = FileLocator.resolve( unresolvedURL ).toExternalForm();
} catch( Exception e ) {