Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Customizing the .project file(Custom tags/information in ".project" fille)
Customizing the .project file [message #544778] Mon, 05 July 2010 09:42 Go to next message
Timotei D is currently offline Timotei D
Messages: 89
Registered: March 2010
Member
Hi!
We all know there is the .project file that stores some project-related info. Now, the thing is, how can I "extend" that file to allow some custom tags (made by me) so I can add extra information?

Is there any way to extend the ".project" file processor, so it can parse some extra tags?

I would like something like:

<myinfo>
my content Smile
</myinfo>

in the file, maybe at the end after .project specific tags so there isn't any conflict?

Thanks,
Timotei
Re: Customizing the .project file [message #544983 is a reply to message #544778] Tue, 06 July 2010 05:24 Go to previous messageGo to next message
Timotei D is currently offline Timotei D
Messages: 89
Registered: March 2010
Member
Or, put it other way, is there any method to store some project related settings somewhere other than in auxilliary file? So when "coping" the project folder, that settings can won't lose.
Re: Customizing the .project file [message #545150 is a reply to message #544983] Tue, 06 July 2010 15:02 Go to previous message
Konstantin Komissarchik is currently offline Konstantin Komissarchik
Messages: 940
Registered: July 2009
Senior Member
You cannot extend the .project file, but there is a standard location under project root (the .settings folder) that's used to store all sorts of additional project metadata. You can write to this location by either using ProjectScope class or by using standard Eclipse IFile IO operations if your requirements don't fit well with Eclipse preferences API used by ProjectScope. If you choose to do your own IO, just choose your file name wisely to avoid clashes with other plugins. A good convention to use is to incorporate your bundle or feature id into the file name.

Hope this helps.

- Konstantin
Previous Topic:Setting http.useragent for eclipse updates
Next Topic:How to extract history of eclipse versions (metadata)
Goto Forum:
  


Current Time: Wed Aug 27 05:03:52 EDT 2014

Powered by FUDForum. Page generated in 0.21706 seconds