Author: bfitzpat
Date: 2011-12-01 15:16:05 -0500 (Thu, 01 Dec 2011)
New Revision: 36848
Modified:
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/wizards/JBossRSGenerateWizard.java
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/wizards/JBossWSAnnotatedClassWizard.java
Log:
JBIDE-10199 - Updates to JAX-RS service generation wizards to do a clean build if the
wizard adds the jars to the project
Modified:
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/wizards/JBossRSGenerateWizard.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/wizards/JBossRSGenerateWizard.java 2011-12-01
20:09:36 UTC (rev 36847)
+++
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/wizards/JBossRSGenerateWizard.java 2011-12-01
20:16:05 UTC (rev 36848)
@@ -16,6 +16,7 @@
import org.eclipse.core.resources.IFile;
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.IStatus;
@@ -126,13 +127,18 @@
}
}
try {
- if (getAddJarsFromRootRuntime())
+ boolean addedJars = false;
+ if (getAddJarsFromRootRuntime()) {
new AddRestEasyJarsCommand(model).execute(null, null);
+ addedJars = true;
+ }
RSServiceSampleCreationCommand createCommand =
new RSServiceSampleCreationCommand(model);
createCommand.execute(null, null);
getProject().refreshLocal(IProject.DEPTH_INFINITE, new NullProgressMonitor());
+ if (addedJars)
+ getProject().build(IncrementalProjectBuilder.CLEAN_BUILD, null);
if (createCommand.getResource() != null && createCommand.getResource()
instanceof IFile) {
openResource((IFile) createCommand.getResource());
}
Modified:
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/wizards/JBossWSAnnotatedClassWizard.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/wizards/JBossWSAnnotatedClassWizard.java 2011-12-01
20:09:36 UTC (rev 36847)
+++
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/wizards/JBossWSAnnotatedClassWizard.java 2011-12-01
20:16:05 UTC (rev 36848)
@@ -14,6 +14,7 @@
import org.eclipse.core.resources.IFile;
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.IStatus;
@@ -139,8 +140,10 @@
addClassesCommand = new ServiceCreationCommand(model);
}
try {
+ boolean addedJars = false;
if (addJarsCommand != null) {
addJarsCommand.execute(null, null);
+ addedJars = true;
}
if (addClassesCommand != null) {
addClassesCommand.execute(null, null);
@@ -154,6 +157,8 @@
openFile1 = (IFile) cmd.getResource();
}
} else if (addClassesCommand instanceof RSServiceCreationCommand) {
+ if (addedJars)
+ getProject().build(IncrementalProjectBuilder.CLEAN_BUILD, null);
RSServiceCreationCommand cmd = (RSServiceCreationCommand) addClassesCommand;
if (cmd.getAnnotatedClassResource() != null &&
cmd.getAnnotatedClassResource() instanceof IFile) {
openFile1 = (IFile) cmd.getAnnotatedClassResource();
Show replies by date