Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » getting webcontent folder from IDataModel is not consistent
getting webcontent folder from IDataModel is not consistent [message #227547] Fri, 06 February 2009 07:15 Go to previous message
Eclipse User
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
 
Read Message
Read Message
Read Message
Previous Topic:empty server list :(
Next Topic:Publish deletes read-only files
Goto Forum:
  


Current Time: Fri May 24 09:02:23 EDT 2013

Powered by FUDForum. Page generated in 0.01594 seconds