Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Incremental compiler classpath
Incremental compiler classpath [message #260498] Mon, 08 June 2009 09:13 Go to next message
Eclipse UserFriend
I noticed that sometimes a reference (such as import) is not found by the
incremental compiler in the Java editor context, even though the build
found no errors.
In particular this happens with some class files that are produced in the
project ‘output’ folder which are not based on source files in the src
folder.

This creates an inconsistent state in which the errors and project panes
show no error marks but the editor shows compilation errors.

This appears to be a bug in the way the incremental Java compiler uses the
project classpath, as it is ignoring the files in the output folder not
present in the same package names in the src folder.

Thanks.

-- Reuben
Re: Incremental compiler classpath [message #260502 is a reply to message #260498] Mon, 08 June 2009 10:06 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse-news.rizzoweb.com

Reuben Sivan wrote:
> I noticed that sometimes a reference (such as import) is not found by
> the incremental compiler in the Java editor context, even though the
> build found no errors.
> In particular this happens with some class files that are produced in
> the project �output� folder which are not based on source files in the
> src folder.
>
> This creates an inconsistent state in which the errors and project panes
> show no error marks but the editor shows compilation errors.
>
> This appears to be a bug in the way the incremental Java compiler uses
> the project classpath, as it is ignoring the files in the output folder
> not present in the same package names in the src folder.

If you have some process that is dumping files into the build output
directory without letting Eclipse know, then it is "working as
designed." By default, Eclipse does not monitor the file system for
arbitrary changes (although there is a preference setting to make it do
that, I think), so if some files are changed or added you have to
Refresh in order for Eclipse to be aware of them.
How are these special files being inserted into the output folder?

Eric
Re: Incremental compiler classpath [message #260506 is a reply to message #260502] Mon, 08 June 2009 11:07 Go to previous messageGo to next message
Eclipse UserFriend
Eric Rizzo wrote:

> Reuben Sivan wrote:
>> I noticed that sometimes a reference (such as import) is not found by
>> the incremental compiler in the Java editor context, even though the
>> build found no errors.
>> In particular this happens with some class files that are produced in
>> the project ᅵoutputᅵ folder which are not based on source files in the
>> src folder.
>>
>> This creates an inconsistent state in which the errors and project panes
>> show no error marks but the editor shows compilation errors.
>>
>> This appears to be a bug in the way the incremental Java compiler uses
>> the project classpath, as it is ignoring the files in the output folder
>> not present in the same package names in the src folder.

> If you have some process that is dumping files into the build output
> directory without letting Eclipse know, then it is "working as
> designed." By default, Eclipse does not monitor the file system for
> arbitrary changes (although there is a preference setting to make it do
> that, I think), so if some files are changed or added you have to
> Refresh in order for Eclipse to be aware of them.
> How are these special files being inserted into the output folder?

> Eric

The files are created by a particular ant task.
I do a source refresh and even a project clean to try and get the
incremental compiler to become aware of the presence of those class files,
but nothing changes on the editor (again, there are no errors on the
project pane).
R
Re: Incremental compiler classpath [message #260510 is a reply to message #260506] Mon, 08 June 2009 11:45 Go to previous messageGo to next message
Eclipse UserFriend
Reuben Sivan wrote:
> Eric Rizzo wrote:
>
>> Reuben Sivan wrote:
>>> I noticed that sometimes a reference (such as import) is not found
>>> by the incremental compiler in the Java editor context, even though
>>> the build found no errors.
>>> In particular this happens with some class files that are produced
>>> in the project ᅵoutputᅵ folder which are not based on source
>>> files in the src folder.
>>>
>>> This creates an inconsistent state in which the errors and project
>>> panes show no error marks but the editor shows compilation errors.
>>>
>>> This appears to be a bug in the way the incremental Java compiler
>>> uses the project classpath, as it is ignoring the files in the
>>> output folder not present in the same package names in the src folder.
>
>> If you have some process that is dumping files into the build output
>> directory without letting Eclipse know, then it is "working as
>> designed." By default, Eclipse does not monitor the file system for
>> arbitrary changes (although there is a preference setting to make it
>> do that, I think), so if some files are changed or added you have to
>> Refresh in order for Eclipse to be aware of them.
>> How are these special files being inserted into the output folder?
>
>> Eric
>
> The files are created by a particular ant task.
That Ant task should generate the class files into a class folder which
resides on the Java build path and not directly into the Java Core owned
bin folder.

Dani
> I do a source refresh and even a project clean to try and get the
> incremental compiler to become aware of the presence of those class
> files, but nothing changes on the editor (again, there are no errors
> on the project pane).
> R
>
>
Re: Incremental compiler classpath [message #260514 is a reply to message #260510] Mon, 08 June 2009 15:14 Go to previous message
Eclipse UserFriend
Daniel Megert wrote:

> Reuben Sivan wrote:
>> Eric Rizzo wrote:
>>
>>> Reuben Sivan wrote:
>>>> I noticed that sometimes a reference (such as import) is not found
>>>> by the incremental compiler in the Java editor context, even though
>>>> the build found no errors.
>>>> In particular this happens with some class files that are produced
>>>> in the project ᅵoutputᅵ folder which are not based on source
>>>> files in the src folder.
>>>>
>>>> This creates an inconsistent state in which the errors and project
>>>> panes show no error marks but the editor shows compilation errors.
>>>>
>>>> This appears to be a bug in the way the incremental Java compiler
>>>> uses the project classpath, as it is ignoring the files in the
>>>> output folder not present in the same package names in the src folder.
>>
>>> If you have some process that is dumping files into the build output
>>> directory without letting Eclipse know, then it is "working as
>>> designed." By default, Eclipse does not monitor the file system for
>>> arbitrary changes (although there is a preference setting to make it
>>> do that, I think), so if some files are changed or added you have to
>>> Refresh in order for Eclipse to be aware of them.
>>> How are these special files being inserted into the output folder?
>>
>>> Eric
>>
>> The files are created by a particular ant task.
> That Ant task should generate the class files into a class folder which
> resides on the Java build path and not directly into the Java Core owned
> bin folder.

> Dani


Great advise, this did the trick. Thanks a lot, Dani
Reuben
Previous Topic:How do I add image files to a java project in Eclipse?
Next Topic:Error from plugin
Goto Forum:
  


Current Time: Thu May 22 17:23:13 EDT 2025

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

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

Back to the top