1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25 package org.utgenome.shell;
26
27 import java.io.IOException;
28
29 import org.utgenome.config.UTGBConfig;
30 import org.xerial.util.log.Logger;
31
32
33
34
35
36
37
38 public class GWT extends UTGBShellCommand {
39
40 private static Logger _logger = Logger.getLogger(GWT.class);
41
42 @Override
43 public void execute(String[] args) throws Exception {
44 UTGBConfig config = loadUTGBConfig();
45
46 if (!isInProjectRoot())
47 throw new UTGBShellException("must be in the project root");
48
49 String packageName = config.javaPackage;
50 String projectName = config.projectName;
51
52 ScaffoldGenerator generator = new ScaffoldGenerator(globalOption.projectDir, new Create.CreateAllScaffoldFileFilter());
53 try {
54 generator.createGWTModuleScaffold(config);
55 }
56 catch (IOException e) {
57 _logger.error("failed to craate GWT module: " + e.getMessage());
58 }
59
60 }
61
62 @Override
63 public String name() {
64 return "gwt";
65 }
66
67 public String getOneLinerDescription() {
68 return "create a GWT interface";
69 }
70
71 }