boolean debug = isLocal;
final IJavaProject javaGaeProject = UIUtils.getJavaGaeProject();
if (javaGaeProject != null) {
if (debug) {
final CheckLaunchJob checkLaunchJob = new CheckLaunchJob(
"Checking server for "
+ javaGaeProject.getElementName(),
javaGaeProject, shouldOpenBrowser());
checkLaunchJob.addJobChangeListener(new JobChangeAdapter() {
public void done(IJobChangeEvent event) {
if (event.getResult().isOK()) {
Display.getDefault().asyncExec(new Runnable() {
public void run() {
try {
openViewer(javaGaeProject,
getUrl(checkLaunchJob));
} catch (PartInitException e) {
Activator.log(e);
}
}
});
}
super.done(event);
}
});
checkLaunchJob.schedule();
} else {
try {
IProject project = javaGaeProject.getProject();