Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » How to remove fixed project facet using API?
How to remove fixed project facet using API? [message #690976] Thu, 30 June 2011 09:49 Go to next message
grid.qian  is currently offline grid.qian
Messages: 47
Registered: July 2009
Member
Hi all,
I want to use some api to remove a facet from a facetedproject. For example, I want to remove 'test.core' facet from a 'facetedproject', I use
Facetedproject.uninstallProjectFacet(facet, Idatamodel, monitor) to remove the facet. It's partly ok.
in .setting folder of the project, org.eclipse.wst.common.project.facet.core.xml
before uninstall
<fixed facet="test.core"/>
<installed facet="test.core" version="1.0"/>
after uninstall
<fixed facet="test.core"/>

I have removed the facet, but the fixed facet is not removed.
I want to remove it, is there any api for this purpose?

Thanks a lot!
Grid






Re: How to remove fixed project facet using API? [message #694519 is a reply to message #690976] Fri, 08 July 2011 14:44 Go to previous messageGo to next message
Konstantin Komissarchik is currently offline Konstantin Komissarchik
Messages: 937
Registered: July 2009
Senior Member
I don't have the API in front of me right now, but there should be IFacetedProject.setFixedFacets call that you can make. Also there is a working copy concept where you create a working copy from IFacetedProject, make all your edits and apply all changes together.

- Konstantin
Re: How to remove fixed project facet using API? [message #695158 is a reply to message #690976] Mon, 11 July 2011 02:47 Go to previous message
grid.qian  is currently offline grid.qian
Messages: 47
Registered: July 2009
Member
Thanks, Konstantin!
I have used IFacetedProject.setFixedFacets to set the new facet, then the old fixed facet will be replaced.
It's what I want.

Grid
Previous Topic:Web Services Explorer blocked by Proxy Authentication
Next Topic:WST: Contributing a wizard page to "Add/Remove" module wizard
Goto Forum:
  


Current Time: Thu Jul 31 15:58:46 EDT 2014

Powered by FUDForum. Page generated in 0.01799 seconds