Author: akazakov
Date: 2011-05-31 19:57:29 -0400 (Tue, 31 May 2011)
New Revision: 31706
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIUtil.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamUtil.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetAbstractInstallDelegate.java
Log:
https://issues.jboss.org/browse/JBIDE-9028
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIUtil.java
===================================================================
---
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIUtil.java 2011-05-31
23:27:46 UTC (rev 31705)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIUtil.java 2011-05-31
23:57:29 UTC (rev 31706)
@@ -62,6 +62,7 @@
import org.jboss.tools.common.zip.UnzipOperation;
import org.jboss.tools.jst.web.WebModelPlugin;
import org.jboss.tools.jst.web.kb.IKbProject;
+import org.jboss.tools.jst.web.kb.internal.KbBuilder;
import org.osgi.framework.Bundle;
/**
@@ -79,9 +80,7 @@
*/
public static void enableCDI(IProject project, boolean genearteBeansXml,
IProgressMonitor monitor) {
try {
- if (!project.hasNature(IKbProject.NATURE_ID)) {
- EclipseResourceUtil.addNatureToProject(project, IKbProject.NATURE_ID);
- }
+ WebModelPlugin.addNatureToProjectWithValidationSupport(project, KbBuilder.BUILDER_ID,
IKbProject.NATURE_ID);
WebModelPlugin.addNatureToProjectWithValidationSupport(project,
CDICoreBuilder.BUILDER_ID, CDICoreNature.NATURE_ID);
if(genearteBeansXml) {
File beansXml = getBeansXml(project);
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamUtil.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamUtil.java 2011-05-31
23:27:46 UTC (rev 31705)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamUtil.java 2011-05-31
23:57:29 UTC (rev 31706)
@@ -39,6 +39,7 @@
import org.jboss.tools.common.text.ITextSourceReference;
import org.jboss.tools.jst.web.WebModelPlugin;
import org.jboss.tools.jst.web.kb.IKbProject;
+import org.jboss.tools.jst.web.kb.internal.KbBuilder;
import org.jboss.tools.seam.core.project.facet.SeamRuntime;
import org.jboss.tools.seam.internal.core.AbstractContextVariable;
import org.jboss.tools.seam.internal.core.SeamComponentDeclaration;
@@ -53,11 +54,7 @@
return;
}
try {
-// EclipseResourceUtil.addNatureToProject(project, ISeamProject.NATURE_ID);
- if(!project.hasNature(IKbProject.NATURE_ID)) {
- EclipseResourceUtil.addNatureToProject(project, IKbProject.NATURE_ID);
- }
-// EclipseResourceUtil.addBuilderToProject(project,
ValidationPlugin.VALIDATION_BUILDER_ID);
+ WebModelPlugin.addNatureToProjectWithValidationSupport(project, KbBuilder.BUILDER_ID,
IKbProject.NATURE_ID);
WebModelPlugin.addNatureToProjectWithValidationSupport(project,
SeamCoreBuilder.BUILDER_ID, ISeamProject.NATURE_ID);
} catch (CoreException e) {
SeamCorePlugin.getPluginLog().logError(e);
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetAbstractInstallDelegate.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetAbstractInstallDelegate.java 2011-05-31
23:27:46 UTC (rev 31705)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetAbstractInstallDelegate.java 2011-05-31
23:57:29 UTC (rev 31706)
@@ -866,7 +866,8 @@
if(projectType != ProjectType.EAR) {
ClasspathHelper.addClasspathEntries(project, fv);
createSeamProjectPreferenes(project, model);
- EclipseResourceUtil.addNatureToProject(project, ISeamProject.NATURE_ID);
+// EclipseResourceUtil.addNatureToProject(project, ISeamProject.NATURE_ID);
+ SeamUtil.enableSeamSupport(project);
}
project.refreshLocal(IResource.DEPTH_INFINITE, monitor);