Author: scabanovich
Date: 2011-05-31 20:40:30 -0400 (Tue, 31 May 2011)
New Revision: 31714
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/BuilderOrderResolutionGenerator.java
Log:
JBIDE-9028
https://issues.jboss.org/browse/JBIDE-9028
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/BuilderOrderResolutionGenerator.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/BuilderOrderResolutionGenerator.java 2011-06-01
00:40:09 UTC (rev 31713)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/BuilderOrderResolutionGenerator.java 2011-06-01
00:40:30 UTC (rev 31714)
@@ -12,6 +12,7 @@
import org.eclipse.ui.IMarkerResolution2;
import org.eclipse.ui.IMarkerResolutionGenerator2;
import org.eclipse.wst.validation.internal.plugin.ValidationPlugin;
+import org.jboss.tools.jst.web.WebModelPlugin;
import org.jboss.tools.jst.web.kb.WebKbPlugin;
public class BuilderOrderResolutionGenerator implements IMarkerResolutionGenerator2 {
@@ -46,22 +47,10 @@
public void run(IMarker marker) {
IProject project = marker.getResource().getProject();
-
try {
- IProjectDescription d = project.getDescription();
- ICommand[] bs = d.getBuildSpec();
- ICommand v = null;
- for (int i = 0; i < bs.length; i++) {
- if(ValidationPlugin.VALIDATION_BUILDER_ID.equals(bs[i].getBuilderName())) {
- v = bs[i];
- }
- if(v != null) {
- bs[i] = (i + 1 < bs.length) ? bs[i + 1] : v;
- }
+ if(WebModelPlugin.makeBuilderLast(project, ValidationPlugin.VALIDATION_BUILDER_ID)) {
+ project.build(IncrementalProjectBuilder.FULL_BUILD, new NullProgressMonitor());
}
- d.setBuildSpec(bs);
- project.setDescription(d, IProject.FORCE, new NullProgressMonitor());
- project.build(IncrementalProjectBuilder.FULL_BUILD, new NullProgressMonitor());
} catch (CoreException e) {
WebKbPlugin.getDefault().logError(e);
}