Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Hidden projects
Hidden projects [message #489624] Mon, 05 October 2009 11:53 Go to next message
Christoph Höger is currently offline Christoph HögerFriend
Messages: 40
Registered: July 2009
Member
Hi,

after reading about hidden resources I wanted to add a hidden project
for my global linked resources (think of java classpath entrys - it's
roughly the same). That works amazingly well with one notable exception:

1. Setting the project to hidden is only allowed after the project is
created and I need this to happen synchronously (I do not know, can I
use a WorkspaceModifyOperation synchronously?), so sometimes the
navigator picks up the project before it is hidden (classical race
condition), refresh removes it. Is there something I can do about this?
e.g. synchronized(project)?

2. Is there an even more elegant way to handle global external resources?

regards

Christoph
Re: Hidden projects [message #489631 is a reply to message #489624] Mon, 05 October 2009 12:44 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3801
Registered: July 2009
Senior Member
Christoph Höger wrote:
> Hi,
>
> after reading about hidden resources I wanted to add a hidden project
> for my global linked resources (think of java classpath entrys - it's
> roughly the same). That works amazingly well with one notable exception:
>
> 1. Setting the project to hidden is only allowed after the project is
> created
Nope, you can pass IResource#HIDDEN to IProject.create(...)

Dani
> and I need this to happen synchronously (I do not know, can I use a
> WorkspaceModifyOperation synchronously?), so sometimes the navigator
> picks up the project before it is hidden (classical race condition),
> refresh removes it. Is there something I can do about this? e.g.
> synchronized(project)?
>
> 2. Is there an even more elegant way to handle global external resources?
>
> regards
>
> Christoph
>
Re: Hidden projects [message #489646 is a reply to message #489631] Mon, 05 October 2009 13:16 Go to previous messageGo to next message
Christoph Höger is currently offline Christoph HögerFriend
Messages: 40
Registered: July 2009
Member
Am 05.10.2009 14:44, schrieb Daniel Megert:
> Christoph Höger wrote:
>> Hi,
>>
>> after reading about hidden resources I wanted to add a hidden project
>> for my global linked resources (think of java classpath entrys - it's
>> roughly the same). That works amazingly well with one notable exception:
>>
>> 1. Setting the project to hidden is only allowed after the project is
>> created
> Nope, you can pass IResource#HIDDEN to IProject.create(...)

Ah, thanks.
Re: Hidden projects [message #495125 is a reply to message #489631] Tue, 03 November 2009 20:55 Go to previous message
Archana Mansukhani is currently offline Archana MansukhaniFriend
Messages: 1
Registered: July 2009
Junior Member
Christoph,

Thanks a ton for the tip. It isn't obvious from the documentation that you can pass a flag like that in IProject.create().

Archana
Previous Topic:Ant script to exoprt eclipse project
Next Topic:Statusline contribution question
Goto Forum:
  


Current Time: Thu Dec 18 23:59:08 GMT 2014

Powered by FUDForum. Page generated in 0.01658 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software