Hi Mike, You can also use the interface IModelProvider provided by ModelProviderManager to obtain a model object representing web.xml. The returned model object is an EMF object so modifying it is quite easy. Using the IModelProvider you will be able to get model objects for both web 2.4 and web 2.5 projects. Best Regards, Kiril ps:It is also a good idea to wrap modifications in IDataModelOperation so that others can easily reuse them.
________________________________ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Konstantin Komissarchik Sent: Tuesday, 22. July 2008 19:15 To: General discussion of project-wide or architectural issues. Subject: RE: [wtp-dev] Access error overwriting web.xml Mike, This question would be more appropriate on the WTP newsgroup ( http://www.eclipse.org/newsportal/thread.php?group=eclipse.webtools). Please post any follow-on questions there. The best way to modify web.xml is to use the API provided by WTP such as WebArtifactEdit. That way your facet will co-exist peacefully with facets written by other people. If you must replace the file with canned contents, make sure that you are using Eclipse IO (rather than Java IO)... use IFile.setContents(). - Konstantin <http://www.oracle.com/> Konstantin Komissarchik | Principal Member of Technical Staff Phone: +1 425 201 1795 | Mobile: +1 206 898 0611 Oracle Eclipse Tooling 411 108th Ave NE, Suite 2100 | Bellevue, WA 98004 ________________________________ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mike Murphy Sent: Tuesday, July 22, 2008 7:24 AM To: [email protected] Subject: [wtp-dev] Access error overwriting web.xml Hi all -- I am working on a project facet plugin (thanks to Konstantin!) that creates a default template project with a bunch of assets in place. Part of what we need to do is overlay the deployment descriptor with our own stock copy. I am finding that a file copy does not work, I get a strange "(Access Denied)" IOException. Is this because it is in the WEB-INF area? I also tried creating a IO file over the default one, and calling delete() on it, which seems to have no effect? Am I missing some obvious Java IO thing here, or is this something WTP specific about WEB-INF? Thanks- Mike ________________________________ Stay in touch when you're away with Windows Live Messenger. IM anytime you're online. <http://www.windowslive.com/messenger/overview.html?ocid=TXT_TAGLM_WL_me ssenger2_072008>
<<oracle_sig_logo.gif>>
_______________________________________________ wtp-dev mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/wtp-dev
