| How to attach source from file [message #534668] |
Wed, 19 May 2010 15:36  |
Eclipse User |
|
|
|
Hey guys,
When I debug in eclipse, often the flow goes to a class for which eclipse doesn't know where the code is and I get something like:
Class File Editor
Source Not Found
Usually, I have the file handy as a text file--not as a source or zip file. Often the file is in another Eclipse project.
So I click on Attach Source and the Source Attachment Configuration box comes up, but the dialog will only accept a Location variable path. I try to create a vraiable, but eclipse will only only me to create a variable that points to a jar or zip.
What's up with that?
How do I attach source that just lives as plain ol' java files on the files system?
Do I really have to zip them up?
|
|
|
| Re: How to attach source from file [message #534678 is a reply to message #534668] |
Wed, 19 May 2010 15:54   |
Eclipse User |
|
|
|
On 5/19/2010 1:36 PM, Kramer wrote:
> Hey guys,
>
> When I debug in eclipse, often the flow goes to a class for which
> eclipse doesn't know where the code is and I get something like:
>
> Class File Editor
>
> Source Not Found
> Usually, I have the file handy as a text file--not as a source or zip
> file. Often the file is in another Eclipse project.
>
> So I click on Attach Source and the Source Attachment Configuration box
> comes up, but the dialog will only accept a Location variable path. I
> try to create a vraiable, but eclipse will only only me to create a
> variable that points to a jar or zip.
>
> What's up with that?
>
> How do I attach source that just lives as plain ol' java files on the
> files system?
>
> Do I really have to zip them up?
Assuming I've understood your question, the source code in question
would be from a JAR you're consuming and you happen to have the JAR's
project sources in another project (whether or not the same workspace,
it's no matter).
Go back to Build Path -> Configure Build Path -> Libraries and expand
the JAR in question. Then, click on Source attachment, Edit and External
Folder. Navigate to the src folder above your source code.
That should get it for you.
I've written a little more on this topic--assuming it answers your
question--at http://www.javahotchocolate.com/tutorials/jars.html#buildpat h
Hope this helps.
Russ Bateman
|
|
|
|
| Re: How to attach source from file [message #539593 is a reply to message #534678] |
Fri, 11 June 2010 09:01  |
Eclipse User |
|
|
|
Russ Bateman wrote:
> On 5/19/2010 1:36 PM, Kramer wrote:
>> Hey guys,
>>
>> When I debug in eclipse, often the flow goes to a class for which
>> eclipse doesn't know where the code is and I get something like:
>>
>> Class File Editor
>>
>> Source Not Found
>> Usually, I have the file handy as a text file--not as a source or zip
>> file. Often the file is in another Eclipse project.
>>
>> So I click on Attach Source and the Source Attachment Configuration box
>> comes up, but the dialog will only accept a Location variable path. I
>> try to create a vraiable, but eclipse will only only me to create a
>> variable that points to a jar or zip.
>>
>> What's up with that?
>>
>> How do I attach source that just lives as plain ol' java files on the
>> files system?
>>
>> Do I really have to zip them up?
No, you don't: you can also point to a folder and have the files in
there. Not though, that a foo.bar.T.java then needs to be in
<folder>/foo/bar/T.java.
Dani
>
> Assuming I've understood your question, the source code in question
> would be from a JAR you're consuming and you happen to have the JAR's
> project sources in another project (whether or not the same workspace,
> it's no matter).
>
> Go back to Build Path -> Configure Build Path -> Libraries and expand
> the JAR in question. Then, click on Source attachment, Edit and
> External Folder. Navigate to the src folder above your source code.
>
> That should get it for you.
>
> I've written a little more on this topic--assuming it answers your
> question--at
> http://www.javahotchocolate.com/tutorials/jars.html#buildpat h
>
> Hope this helps.
>
> Russ Bateman
>
|
|
|
Powered by
FUDForum. Page generated in 0.08513 seconds