List of usage examples for com.google.gwt.eclipse.core.preferences GWTPreferences computeSpeedTracerGeneratedFolderPath
public static IPath computeSpeedTracerGeneratedFolderPath(IPath warOutLocation)
From source file:com.google.gdt.eclipse.suite.launch.SpeedTracerLaunchDelegate.java
License:Open Source License
private static boolean needsGenFiles(IPath warOutLocation) { IPath genFilesPath = GWTPreferences.computeSpeedTracerGeneratedFolderPath(warOutLocation); File genFilesFile = genFilesPath.toFile(); return !ResourceUtils.folderExistsAndHasContents(genFilesFile); }
From source file:com.google.gdt.eclipse.suite.launch.SpeedTracerLaunchDelegate.java
License:Open Source License
private void performGwtCompile(IProject project, File extraDir, List<String> modules, IPath warOutLocation, IProgressMonitor monitor) throws CoreException, IOException, InterruptedException { monitor.beginTask("Performing GWT compile...", 100); try {// w w w . java 2 s . co m GWTCompileSettings compileSettings = GWTProjectProperties.getGwtCompileSettings(project); compileSettings.setEntryPointModules( !modules.isEmpty() ? modules : GWTProjectProperties.getEntryPointModules(project)); compileSettings.setExtraArgs("-extra " + StringUtilities.quote(extraDir.getAbsolutePath()) + " -gen " + StringUtilities.quote( GWTPreferences.computeSpeedTracerGeneratedFolderPath(warOutLocation).toOSString())); // Get a message console for GWT compiler output CustomMessageConsole messageConsole = showGwtCompilationConsole(project); OutputStream consoleOutputStream = messageConsole.newMessageStream(); TerminateProcessAction terminateAction = new TerminateProcessAction(); messageConsole.setTerminateAction(terminateAction); try { GWTCompileRunner.compileWithCancellationSupport(JavaCore.create(project), warOutLocation, compileSettings, consoleOutputStream, terminateAction, monitor, terminateAction); } finally { try { assert (consoleOutputStream != null); consoleOutputStream.close(); } catch (IOException e) { // Ignore IOExceptions during stream close } } // refresh so that eclipse picks up on the gen files project.refreshLocal(IResource.DEPTH_INFINITE, null); } finally { monitor.done(); } }