| getting webcontent folder from IDataModel is not consistent [message #227547] |
Fri, 06 February 2009 07:15  |
|
Originally posted by: ranjeev.backbase.com
Hello there,
I have issues to get the webcontent folder from IDataModel in a
consistent way if the folder value is renamed in the Web Project
Creation Wizard.
We have the following declaration in plugin.xml for our Project Facet,
which copies some files into WebContent folder of an Eclipse Web Project.
<extension
name="Client Edition"
id="xxx.project.facet.id"
point="org.eclipse.wst.common.project.facet.core.facets">
<project-facet id="xxx.facet.project.project-facet">
<label>Client Edition</label>
<category>
xxx.client.facet.category
</category>
</project-facet>
<project-facet-version
facet="xxx.client.bpc.facet.project.project-facet"
version="%project.facet.version">
</project-facet-version>
<action
facet="xxx.bpc.facet.project.project-facet"
id="xxx.facet.project.project-facet.install"
type="install"
version="%project.facet.version">
<delegate class="xxx.facet.actions.BpcClientInstallDelegate"/>
<config-factory
class="xxx.facet.actions.BpcClientActionConfigFactory"/>
</action>
</extension>
I have "xxx.facet.actions.BpcClientActionConfigFactory" which extends
SimpleWebFacetInstallDataModelProvider.
And in my execute method of BpcClientInstallDelegate which implements
IDelegate class, I have the method
public void execute(IProject project, IProjectFacetVersion version,
Object config, IProgressMonitor monitor) throws CoreException {
IDataModel model = (IDataModel) config;
problem here-->> String webContentFolder = (String)
model.getProperty("IStaticWebFacetInstallDataModelProperties.CONTENT_DIR ");
Now, I rename the webContent folder to "BlahContent" while creating
static web project.
If I debug and check the return value of the code:
String webContentFolder = (String)
model.getProperty("IStaticWebFacetInstallDataModelProperties.CONTENT_DIR ")
Sometimes I get webContentFolder value is "BlahContent" as renamed in
the Static Web Project Creation Wizard, but most of the other times, it
returns the default value, "webContent" !
Can somebody explain what is the issue? Looks like the listeners are not
initialised correctly sometimes!
Any help regarding this issue will be much appreciated
Regards
Ranjeev
|
|
|