diff options
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/CDOCommand.java')
-rw-r--r-- | plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/CDOCommand.java | 43 |
1 files changed, 23 insertions, 20 deletions
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/CDOCommand.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/CDOCommand.java index 61a6c49dfd..2186fc0553 100644 --- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/CDOCommand.java +++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/CDOCommand.java @@ -27,14 +27,14 @@ import java.util.Dictionary; * @author Eike Stepper * @since 4.3 */ -public abstract class CDOCommand +public abstract class CDOCommand extends org.eclipse.net4j.util.factory.Factory { + public static final String PRODUCT_GROUP = "org.eclipse.emf.cdo.server.commands"; + public static final String INDENT = " "; //$NON-NLS-1$ private static final CommandParameter[] NO_PARAMETERS = new CommandParameter[0]; - private final String name; - private final String description; private final CommandParameter[] parameters; @@ -43,7 +43,7 @@ public abstract class CDOCommand public CDOCommand(String name, String description, CommandParameter... parameters) { - this.name = name; + super(PRODUCT_GROUP, name); this.description = description; this.parameters = parameters == null ? NO_PARAMETERS : parameters; } @@ -53,6 +53,11 @@ public abstract class CDOCommand this(name, description, NO_PARAMETERS); } + public final CDOCommand create(String description) throws ProductCreationException + { + return this; + } + public final CommandInterpreter getInterpreter() { return interpreter; @@ -65,7 +70,7 @@ public abstract class CDOCommand public final String getName() { - return name; + return getType(); } public final String getDescription() @@ -82,7 +87,7 @@ public abstract class CDOCommand { StringBuilder builder = new StringBuilder(); builder.append("cdo "); - builder.append(name); + builder.append(getName()); for (CommandParameter parameter : parameters) { @@ -341,18 +346,16 @@ public abstract class CDOCommand } } - /** - * @author Eike Stepper - */ - public static abstract class Factory extends org.eclipse.net4j.util.factory.Factory - { - public static final String PRODUCT_GROUP = "org.eclipse.emf.cdo.server.commands"; - - public Factory(String type) - { - super(PRODUCT_GROUP, type); - } - - public abstract CDOCommand create(String description) throws ProductCreationException; - } + // /** + // * @author Eike Stepper + // */ + // public static abstract class Factory extends org.eclipse.net4j.util.factory.Factory + // { + // public Factory(String type) + // { + // super(CDOCommand.PRODUCT_GROUP, type); + // } + // + // public abstract CDOCommand create(String description) throws ProductCreationException; + // } } |