Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Programatically detect if project needs building
Programatically detect if project needs building [message #326209] Tue, 11 March 2008 15:08 Go to next message
Eclipse UserFriend
¿Is there any way to know programatically if a project needs building?
(IE: has been file changes since last build).

Apparently no IResource API exposes this information
Re: Programatically detect if project needs building [message #326211 is a reply to message #326209] Tue, 11 March 2008 15:36 Go to previous messageGo to next message
Eclipse UserFriend
Juan Domínguez wrote:
> ¿Is there any way to know programatically if a project needs building?
> (IE: has been file changes since last build).
>
> Apparently no IResource API exposes this information

Builder :-) There is an article on eclipse.org that tells you about how
to implement incremental/full builders.
Re: Programatically detect if project needs building [message #326214 is a reply to message #326211] Tue, 11 March 2008 19:57 Go to previous messageGo to next message
Eclipse UserFriend
No, no. That's not what I mean.

I'm exploring the steps to fix this bug:

"Build Project" action always enabled

Steps To Reproduce:
1. Disable "Build Automatically"
2. Modify a file
3. Build project.
4. Build project action is still enabled, although no build is needed,
since no files were modified.

If you look at this action code, it just enables when autobuilding is
disabled and there are registered builders in any of the selected
projects descriptions.

So if autobuilding is enabled and (for example) a java project is
selected, the "Build Project" action will be always enabled, because
there's no way to know if any file (potentially interesting for any
registered builder) has changed since a project (or any depending
project) was last built.

AL wrote:

> Juan Domínguez wrote:
>> ¿Is there any way to know programatically if a project needs building?
>> (IE: has been file changes since last build).
>>
>> Apparently no IResource API exposes this information
>
> Builder :-) There is an article on eclipse.org that tells you about how
> to implement incremental/full builders.
Re: Programatically detect if project needs building [message #326237 is a reply to message #326214] Wed, 12 March 2008 10:36 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mark_melvin.amis.com

I think that is more "by design" than a bug, but have a look at the
classes BuildManager and AutoBuildJob. There is useful info in there.
I'll let people who know what they are talking about tell you if this is
by design or not. ;)

M.

On Tue, 11 Mar 2008 19:57:45 -0400, Juan Domínguez <jdomigon@gmail.com>
wrote:

> No, no. That's not what I mean.
>
> I'm exploring the steps to fix this bug:
>
> "Build Project" action always enabled
>
> Steps To Reproduce:
> 1. Disable "Build Automatically"
> 2. Modify a file
> 3. Build project.
> 4. Build project action is still enabled, although no build is needed,
> since no files were modified.
>
> If you look at this action code, it just enables when autobuilding is
> disabled and there are registered builders in any of the selected
> projects descriptions.
>
> So if autobuilding is enabled and (for example) a java project is
> selected, the "Build Project" action will be always enabled, because
> there's no way to know if any file (potentially interesting for any
> registered builder) has changed since a project (or any depending
> project) was last built.
>
> AL wrote:
>
>> Juan Domínguez wrote:
>>> ¿Is there any way to know programatically if a project needs building?
>>> (IE: has been file changes since last build).
>>>
>>> Apparently no IResource API exposes this information
>> Builder :-) There is an article on eclipse.org that tells you about
>> how to implement incremental/full builders.
Re: Programatically detect if project needs building [message #326245 is a reply to message #326237] Wed, 12 March 2008 17:37 Go to previous message
Eclipse UserFriend
https://bugs.eclipse.org/bugs/show_bug.cgi?id=222475

Mark Melvin wrote:
> I think that is more "by design" than a bug, but have a look at the
> classes BuildManager and AutoBuildJob. There is useful info in there.
> I'll let people who know what they are talking about tell you if this is
> by design or not. ;)
>
> M.
>
> On Tue, 11 Mar 2008 19:57:45 -0400, Juan Domínguez <jdomigon@gmail.com>
> wrote:
>
>> No, no. That's not what I mean.
>>
>> I'm exploring the steps to fix this bug:
>>
>> "Build Project" action always enabled
>>
>> Steps To Reproduce:
>> 1. Disable "Build Automatically"
>> 2. Modify a file
>> 3. Build project.
>> 4. Build project action is still enabled, although no build is needed,
>> since no files were modified.
>>
>> If you look at this action code, it just enables when autobuilding is
>> disabled and there are registered builders in any of the selected
>> projects descriptions.
>>
>> So if autobuilding is enabled and (for example) a java project is
>> selected, the "Build Project" action will be always enabled, because
>> there's no way to know if any file (potentially interesting for any
>> registered builder) has changed since a project (or any depending
>> project) was last built.
>>
>> AL wrote:
>>
>>> Juan Domínguez wrote:
>>>> ¿Is there any way to know programatically if a project needs
>>>> building? (IE: has been file changes since last build).
>>>>
>>>> Apparently no IResource API exposes this information
>>> Builder :-) There is an article on eclipse.org that tells you about
>>> how to implement incremental/full builders.
Previous Topic:How to get the list of projects in a workspace?
Next Topic:Error marking
Goto Forum:
  


Current Time: Fri May 02 02:22:33 EDT 2025

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

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

Back to the top