diff options
Diffstat (limited to 'collaboration')
-rw-r--r-- | collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/java/org/apache/tuscany/sca/diagram/shell/DrawShellCommand.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/java/org/apache/tuscany/sca/diagram/shell/DrawShellCommand.java b/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/java/org/apache/tuscany/sca/diagram/shell/DrawShellCommand.java index 7124525c92..2be3d1dedb 100644 --- a/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/java/org/apache/tuscany/sca/diagram/shell/DrawShellCommand.java +++ b/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/java/org/apache/tuscany/sca/diagram/shell/DrawShellCommand.java @@ -45,7 +45,7 @@ public class DrawShellCommand implements Command { }
public String getShortHelp() {
- return "draw <contributionURI> <compositeURI>";
+ return "draw [DOMAIN | <contributionURI> <compositeURI>]";
}
public String getHelp() {
@@ -53,6 +53,7 @@ public class DrawShellCommand implements Command { helpText.append("Draws a picture of the composite.\n");
helpText.append("\n");
helpText.append("Arguments:\n");
+ helpText.append(" DOMAIN - When the only argument is DOMAIN display the domain composite, otherwise:\n");
helpText.append(" contributionURI - (required) the URI of the installed contribution\n");
helpText.append(" compositeURL - (required) the URI of a started composite\n");
return helpText.toString();
@@ -60,7 +61,12 @@ public class DrawShellCommand implements Command { public boolean invoke(String[] args) throws Exception {
- Composite composite = shell.getNode().getContribution(args[0]).getArtifactModel(args[1]);
+ Composite composite;
+ if ("DOMAIN".equals(args[0])) {
+ composite = shell.getNode().getDomainComposite();
+ } else {
+ composite = shell.getNode().getContribution(args[0]).getArtifactModel(args[1]);
+ }
TuscanyCompositeEntityBuilder eb = new TuscanyCompositeEntityBuilder(composite);
CompositeEntity comp = eb.buildCompositeEntity();
DiagramGenerator dg = new DiagramGenerator(comp);
|