Community
Participate
Working Groups
Build Identifier: WTP R-3.0.5-20090521045405 The property FACET_PROJECT_NAME is not updated in the DataModel, when the project name is canged in the New Project wizard, for a facet that is added after opening the new project wizard. This problem is caused during the merge of the original and local IFacetedProjectWorkingCopy objects in class FacetsSelectionDialog. This problem does not occur in newer versions of WTP because the class FacetsSelectionDialog was changed (in version 1.4) to use only one copy of the IFacetedProjectWorkingCopy, taking away this problem (along with the capacity of canceling changes in the Project Facets Dialog, making the Cancel button useless) Reproducible: Always Steps to Reproduce: 1. Open the new project wizard (for example, the new utility project wizard) 2. Type in the name of the project (for example, Test) 3. Click on the modify button for adding a facet 4. Add a facet that uses the FACET_PROJECT_NAME (for example, select the dynamic web module facet - you will have to unlock and remove the utility facet first) and click OK 5. Change the name of the project (for example, Test2) and click Next until you see the Web module panel. Note that the context root (which shows the FACET_PROJECT_NAME property) has the old project name.
Created attachment 189426 [details] patch With this patch, FacetsSelectionDialog will use only one copy of the IFacetedProjectWorkingCopy, fixing the problem reported in this bug (and also will make the Cancel button useless, as I commented in the problem report).
This looks to be a direct back-port of the fix done in a later release. In which case my only concern is making sure that all files changed by the original fix are patched. Unfortunately, it's been long enough that I do not have recollection about which files were affected (or whether this is the only one). May want to search CVS history for other references to the original bug. You may also want to back-port the more recent fix to remove the cancel button.
Created attachment 189637 [details] Patch 2 Updated patch that also removes the Cancel button
I looked on the history of each file in plugins org.eclipse.wst.common.project.facet.core and org.eclipse.wst.common.project.facet.ui for modifications using bugzilla 246448, and found some: GridLayoutUtil FacetedProjectFramework IFacetedProject IFacetedProjectWorkingCopy But looks like none of them are related to the changes included in the patch in this bugzilla
After another search, I found that these were the files changed by bugzilla 246448, but still looks like none of the changes are related to the patch in this bug (except FacetsSelectionDialog) Plugin: org.eclipse.wst.common.project.facet.core: FacetedProjectFramework IFacetedProject IFacetedProjectWorkingCopy DelayedClassLoadingListener FacetedProject FacetedProjectFrameworkImpl FacetedProjectPropertyTester FacetedProjectWorkingCopy PresetsExtensionPoint ProjectFacetPreferences (Created) ProjectFacetPreferencesGroup (Created) RuntimeManagerImpl CollectionsUtil (Created) DomUtil (Created) FileUtil MiscUtil PluginUtil ProgressMonitorUtil XmlParseException (created) XMLWriter (Created) Pluginutil.properties MANIFEST.MF plugin.xml some schemas (coyright) Plugin: org.eclipse.wst.common.project.facet.ui FacetsSelectionDialog EnhancedComposite (Created) GridLayoutUtil TableWrapLayoutUtil plugin.xml some schemas (coyright)
I think there is something wrong with the search methodology. The stated results are improbable. This might be difficult/impractical to do with CVS, so we may need to just assume that all changes were contained in FacetsSelectionDialog and test this patch really well.
Committed to R3_0_5_patches