List of usage examples for com.google.gwt.eclipse.core.speedtracer SpeedTracerLaunchConfiguration TYPE_ID
String TYPE_ID
To view the source code for com.google.gwt.eclipse.core.speedtracer SpeedTracerLaunchConfiguration TYPE_ID.
Click Source Link
From source file:com.google.gdt.eclipse.suite.launch.processors.PortArgumentProcessor.java
License:Open Source License
public String validate(ILaunchConfiguration launchConfig, IJavaProject javaProject, List<String> programArgs, List<String> vmArgs) throws CoreException { // Only validate for main types we know about if (!MainTypeProcessor.isMainTypeFromSdk(launchConfig)) { return null; }// ww w. j a v a 2 s .co m /* * Speed Tracer launch configurations require a port to be defined. Parse * the current arguments and ensure the launch is not using automatic port * selection. */ PortParser portParser = PortParser.parse(programArgs); if (SpeedTracerLaunchConfiguration.TYPE_ID.equals(launchConfig.getType().getIdentifier()) && (!portParser.isPresent || portParser.isAuto)) { return "Please specify a port number (automatic port selection is not supported by Speed Tracer launch configurations)"; } if (!portParser.isPresent) { return null; } IProject project = javaProject.getProject(); boolean isGwtProject = GWTNature.isGWTProject(project); boolean isGaeProject = GaeNature.isGaeProject(project); if (isGwtProject && portParser.portArgStyle != PortArgStyle.GWT || isGaeProject && !isGwtProject && !portParser.portArgStyle.isGae()) { return INVALID_PORT_ARGUMENT_STYLE; } return null; }