blob: c1a3926d51cf372177cf52dd65291ef3e08ed766 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2008, 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.wst.validation.internal;
import org.eclipse.core.resources.IncrementalProjectBuilder;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.resources.WorkspaceJob;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.wst.validation.internal.plugin.ValidationPlugin;
public class FullBuildJob extends WorkspaceJob {
public FullBuildJob(){
super(ValMessages.JobName);
}
@Override
public IStatus runInWorkspace(IProgressMonitor monitor) throws CoreException {
try {
ResourcesPlugin.getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, monitor);
}
catch (Exception e){
return new Status(IStatus.ERROR,ValidationPlugin.PLUGIN_ID, e.toString(), e);
}
return Status.OK_STATUS;
}
}