Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Build a project when another is closed
Build a project when another is closed [message #632338] Tue, 12 October 2010 15:46 Go to next message
Cyril Chéné is currently offline Cyril ChénéFriend
Messages: 19
Registered: July 2009
Location: France
Junior Member
Hi

I have my own builder (extends IncrementalProjectBuilder) that uses the project references described in the .project files.

I want to show an error on a project whenever a referenced project is missing / closed / deleted / etc.

At first my builder was not invoked when a required project was closed.

I found that using the forgetLastBuiltState() method made the platform call my builder. But doing this, my builder is invoked too often : when the .project file of a single project is modified, all the projects of the workspace are rebuilt with the FULL_BUILD kind.

Is it the "good" way to achieve this ? Does anybody know another way ?

Cyril
Re: Build a project when another is closed [message #633690 is a reply to message #632338] Mon, 18 October 2010 22:23 Go to previous messageGo to next message
Konstantin Komissarchik is currently offline Konstantin KomissarchikFriend
Messages: 962
Registered: July 2009
Senior Member
The trick is to mind what projects you return from IncrementalProjectBuilder.build call. Make sure that you return all projects you want to notified about.

- Konstantin
Re: Build a project when another is closed [message #641443 is a reply to message #633690] Thu, 25 November 2010 13:53 Go to previous message
Cyril Chéné is currently offline Cyril ChénéFriend
Messages: 19
Registered: July 2009
Location: France
Junior Member
My build method now returns :
getProject().getReferencedProjects();.

Works well !
Thanks for this answer.
Previous Topic:visible tabs
Next Topic:Unable to compile class for JSP
Goto Forum:
  


Current Time: Mon Dec 22 17:58:52 GMT 2014

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

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