Commit e76dad7e authored by Adam Knapp's avatar Adam Knapp
Browse files

Merge branch 'master' into 'master'

change invokeBuild

See merge request eclipse/titan/titan.EclipsePlug-ins!626
parents 24e2bdd0 e71bbf8d
......@@ -8,11 +8,15 @@
package org.eclipse.titan.designer.application;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IncrementalProjectBuilder;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Platform;
import org.eclipse.titan.designer.core.TITANBuilder;
import org.eclipse.titan.common.logging.ErrorReporter;
* Externally callable application, that takes exactly one argument: the name of the project it should build.
......@@ -34,8 +38,18 @@ public final class InvokeBuild implements IApplication {
final IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
for (final IProject project : projects) {
if (project.getName().equals(projectNames[0])) {
if (project != null && project.getName().equals(projectNames[0])) {
try {
project.refreshLocal(IResource.DEPTH_INFINITE, null);
} catch (CoreException e) {
}, new NullProgressMonitor());
try {
ResourcesPlugin.getWorkspace().save(true, null);
} catch (CoreException e) {
ErrorReporter.logExceptionStackTrace("Error while closing workspace",e);
return EXIT_OK;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment