Author: scabanovich
Date: 2012-03-29 13:25:43 -0400 (Thu, 29 Mar 2012)
New Revision: 39920
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebNatureOperation.java
Log:
JBIDE-11425
https://issues.jboss.org/browse/JBIDE-11425
'Disable Library Configuration' library type is set for new JSF projects.
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebNatureOperation.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebNatureOperation.java 2012-03-29
16:16:49 UTC (rev 39919)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebNatureOperation.java 2012-03-29
17:25:43 UTC (rev 39920)
@@ -44,6 +44,8 @@
import
org.eclipse.wst.common.componentcore.datamodel.properties.IFacetProjectCreationDataModelProperties;
import
org.eclipse.wst.common.componentcore.datamodel.properties.IFacetProjectCreationDataModelProperties.FacetDataModelMap;
import
org.eclipse.wst.common.componentcore.internal.operation.FacetProjectCreationOperation;
+import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
+import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelProvider;
import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
import
org.eclipse.wst.common.frameworks.internal.operations.IProjectCreationPropertiesNew;
@@ -387,9 +389,6 @@
projectLocation = createLinks(projectLocation);
}
- WebFacetProjectCreationDataModelProvider modelProvider = new
WebFacetProjectCreationDataModelProvider();
- IDataModel dataModel = DataModelFactory.createDataModel(modelProvider);
-
boolean hasJSTWebFacet = false;
if(exists) {
IFacetedProject fp0 = ProjectFacetsManager.create(getProject());
@@ -405,10 +404,11 @@
}
}
- configFacets(dataModel, projectLocation);
+ AbstractDataModelProvider modelProvider = new
WebFacetProjectCreationDataModelProvider();
+ IDataModel dataModel = DataModelFactory.createDataModel(modelProvider);
modelProvider.setDataModel(dataModel);
- FacetProjectCreationOperation wcco =
(FacetProjectCreationOperation)modelProvider.getDefaultOperation();
+ AbstractDataModelOperation wcco =
(AbstractDataModelOperation)modelProvider.getDefaultOperation();
wcco.setDataModel(dataModel);
dataModel.setProperty(IProjectCreationPropertiesNew.PROJECT_NAME, projectName);
@@ -436,6 +436,7 @@
}
}
if(!exists || !hasJSTWebFacet) {
+ configFacets(dataModel, projectLocation);
return wcco;
} else {
return null;