private Response makeDirectoryListPage(Outbox box) throws IOException { SourceMap map = SourceMap.load(box.findSourceMapForOnePermutation()); JsonObject json = exporter.exportSourceMapDirectoryListVars(box, map); return Pages.newHtmlPage("config", json, "directorylist.html"); }
private Response sendFileListPage(Outbox box, String rest) throws IOException { SourceMap map = SourceMap.load(box.findSourceMapForOnePermutation()); JsonObject json = exporter.exportSourceMapFileListVars(box, map, rest); return Pages.newHtmlPage("config", json, "filelist.html"); }
private Response makeModulePage(String moduleName) { Outbox box = outboxes.findByOutputModuleName(moduleName); if (box == null) { return new ErrorPage("No such module: " + moduleName); } JsonObject json = jsonExporter.exportModulePageVars(box); return Pages.newHtmlPage("config", json, "modulepage.html"); }
/** * Reads the GWT-RPC serialization policy manifest in this outbox. * If it's not there, returns the empty list. * @return a PolicyFile record for each entry in the policy file. */ List<PolicyFile> readRpcPolicyManifest() throws IOException { return getOutputDir().readRpcPolicyManifest(getOutputModuleName()); } }
/** * Compiles the first time, while Super Dev Mode is starting up. * Either this method or {@link #initWithoutPrecompile} should be called first. */ synchronized Job.Result precompile(Job job) throws UnableToCompleteException { Result result = compile(job); job.onFinished(result); assert result.isOk(); return result; }
/** * Reports that this job has made progress while compiling. * @throws IllegalStateException if the job is not running. */ synchronized void onProgress(String stepMessage) { checkIsCompiling("onProgress"); publish(makeEvent(Status.COMPILING, stepMessage)); }
/** * Starts the code server. Shuts down the JVM if startup fails. * @param args Command-line options that can be parsed by {@link Options}. */ public static void main(String[] args) throws Exception { Options options = new Options(); if (!options.parseArgs(args)) { System.exit(1); } main(options); }
/** * Exports the template variables for modulepage.html. */ JsonObject exportModulePageVars(Outbox box) { JsonObject result = new JsonObject(); result.put("moduleName", box.getOutputModuleName()); // TODO: rename result.put("files", exportOutputFiles(box)); result.put("isCompiled", !box.containsStubCompile()); return result; }
/** * Returns the location of the compiler output. (Changes after every recompile.) * @param outputModuleName the module name that the GWT compiler used in its output. */ public File getCurrentWarDir(String outputModuleName) { return outboxes.findByOutputModuleName(outputModuleName).getWarDir(); }
/** * Returns a new LauncherDir or null if not enabled. */ static LauncherDir maybeCreate(Options options) { if (options.getLauncherDir() == null) { return null; } return new LauncherDir(options); }
File getWarDir() { return getOutputDir().getWarDir(); }
/** * Creates the response to a /recompile request. */ JsonObject exportRecompileResponse(Result result) { JsonObject out = JsonObject.create(); out.put("status", result.isOk() ? "ok" : "failed"); // This doesn't seem to be used but was there in 2.6.1. // TODO: consider removing for 2.7? out.put("moduleNames", exportOutputModuleNames()); return out; }
private Response makeDirectoryListPage(Outbox box) throws IOException { SourceMap map = SourceMap.load(box.findSourceMapForOnePermutation()); JsonObject json = exporter.exportSourceMapDirectoryListVars(box, map); return Pages.newHtmlPage("config", json, "directorylist.html"); }
private Response sendFileListPage(Outbox box, String rest) throws IOException { SourceMap map = SourceMap.load(box.findSourceMapForOnePermutation()); JsonObject json = exporter.exportSourceMapFileListVars(box, map, rest); return Pages.newHtmlPage("config", json, "filelist.html"); }
private Response makeModulePage(String moduleName) { Outbox box = outboxTable.findByOutputModuleName(moduleName); if (box == null) { return new ErrorPage("No such module: " + moduleName); } JsonObject json = jsonExporter.exportModulePageVars(box); return Pages.newHtmlPage("config", json, "modulepage.html"); }
/** * Reads the GWT-RPC serialization policy manifest in this outbox. * If it's not there, returns the empty list. * @return a PolicyFile record for each entry in the policy file. */ List<PolicyFile> readRpcPolicyManifest() throws IOException { return getOutputDir().readRpcPolicyManifest(getOutputModuleName()); } }
/** * Compiles the first time, while Super Dev Mode is starting up. * Either this method or {@link #initWithoutPrecompile} should be called first. */ synchronized Job.Result precompile(Job job) throws UnableToCompleteException { Result result = compile(job); job.onFinished(result); assert result.isOk(); return result; }
/** * Returns the location of the compiler output. (Changes after every recompile.) * @param outputModuleName the module name that the GWT compiler used in its output. */ public File getCurrentWarDir(String outputModuleName) { return outboxTable.findByOutputModuleName(outputModuleName).getWarDir(); }
/** * Returns a new LauncherDir or null if not enabled. */ static LauncherDir maybeCreate(Options options) { if (options.getLauncherDir() == null) { return null; } return new LauncherDir(options); }