[227654] Default presets applied to new FacetWizards
diff --git a/plugins/org.eclipse.wst.web.ui/static_web_ui/org/eclipse/wst/web/ui/internal/wizards/DataModelFacetCreationWizardPage.java b/plugins/org.eclipse.wst.web.ui/static_web_ui/org/eclipse/wst/web/ui/internal/wizards/DataModelFacetCreationWizardPage.java index 3e71983..e44d76b 100644 --- a/plugins/org.eclipse.wst.web.ui/static_web_ui/org/eclipse/wst/web/ui/internal/wizards/DataModelFacetCreationWizardPage.java +++ b/plugins/org.eclipse.wst.web.ui/static_web_ui/org/eclipse/wst/web/ui/internal/wizards/DataModelFacetCreationWizardPage.java
@@ -236,10 +236,14 @@ presetID = RuntimePresetMappingRegistry.INSTANCE.getPresetID(facetRuntimeTypeID, facetRuntimeVersion, facetID, facetVersion); } } - final Set<IProjectFacetVersion> facets = getFacetConfiguration( fv ); - this.fpjwc.setProjectFacets( facets ); - if(presetID != null){ + if( presetID == null ) + { + final Set<IProjectFacetVersion> facets = getFacetConfiguration( fv ); + this.fpjwc.setProjectFacets( facets ); + } + else + { this.fpjwc.setSelectedPreset(presetID); } }
diff --git a/plugins/org.eclipse.wst.web.ui/static_web_ui/org/eclipse/wst/web/ui/internal/wizards/NewProjectDataModelFacetWizard.java b/plugins/org.eclipse.wst.web.ui/static_web_ui/org/eclipse/wst/web/ui/internal/wizards/NewProjectDataModelFacetWizard.java index da29188..48b3dca 100644 --- a/plugins/org.eclipse.wst.web.ui/static_web_ui/org/eclipse/wst/web/ui/internal/wizards/NewProjectDataModelFacetWizard.java +++ b/plugins/org.eclipse.wst.web.ui/static_web_ui/org/eclipse/wst/web/ui/internal/wizards/NewProjectDataModelFacetWizard.java
@@ -260,28 +260,7 @@ dm.setTargetedRuntimes( Collections.singleton( runtime ) ); } - String presetID = FacetedProjectFramework.DEFAULT_CONFIGURATION_PRESET_ID; - - if(beginingPages != null && beginingPages.length > 0 && beginingPages[0] instanceof DataModelFacetCreationWizardPage){ - DataModelFacetCreationWizardPage firstPage = (DataModelFacetCreationWizardPage)beginingPages[0]; - final IProjectFacetVersion fv = firstPage.getPrimaryFacetVersion(); - if( fv != null ) - { - if(runtime != null){ - if(runtime.getRuntimeComponents().size() > 0){ - IRuntimeComponent runtimeComponent = runtime.getRuntimeComponents().get(0); - String facetRuntimeTypeID = runtimeComponent.getRuntimeComponentType().getId(); - String facetRuntimeVersion = runtimeComponent.getRuntimeComponentVersion().getVersionString(); - String facetID = fv.getProjectFacet().getId(); - String facetVersion = fv.getVersionString(); - presetID = RuntimePresetMappingRegistry.INSTANCE.getPresetID(facetRuntimeTypeID, facetRuntimeVersion, facetID, facetVersion); - } - } - } - } - - - dm.setSelectedPreset( presetID ); + dm.setSelectedPreset( FacetedProjectFramework.DEFAULT_CONFIGURATION_PRESET_ID ); } public String getProjectName() {