[
https://issues.jboss.org/browse/JBIDE-13848?page=com.atlassian.jira.plugi...
]
Snjezana Peco edited comment on JBIDE-13848 at 4/11/13 4:52 PM:
----------------------------------------------------------------
{quote}
A bit off-topic : I just checked the .classpath file is changed to
<classpathentry kind="lib" path="lib/commons-lang-2.6.jar"
sourcepath="D:/Dev/maven/repository/commons-lang/commons-lang/2.6/commons-lang-2.6-sources.jar"/>
Hard coded path is obviously non-portable so definitively wrong. Since source lookup
requires m2e, you should assume the M2E_REPO variable is available and use it instead. The
automatic source lookup behavior on projects should also probably be turned off/on in the
project/workspace preferences.
{quote}
The feature I have mentioned is already implemented.
Steps to reproduce (I suppose
"D:/Dev/maven/repository/commons-lang/commons-lang/2.6/commons-lang-2.6-sources.jar
is a valid path)
- close all editors
- edit the classpath and set an invalid path -
"D:/Dev/maven/repository/commons-lang/commons-lang/2.6/XXX.jar", for instance
- rebuild the project
- assert the source attachment is invalid
- assert the "Automatically configure the Java Source Attachment" preference is
checked
- open some class from the commons-lang.jar
The Source Lookup will recreate a valid path.
I have also added the "Automatically configure the Java Source Attachment"
preference to disable/enable this feature.
I have added tests for these features.
was (Author: snjeza):
{quote}
A bit off-topic : I just checked the .classpath file is changed to
<classpathentry kind="lib" path="lib/commons-lang-2.6.jar"
sourcepath="D:/Dev/maven/repository/commons-lang/commons-lang/2.6/commons-lang-2.6-sources.jar"/>
Hard coded path is obviously non-portable so definitively wrong. Since source lookup
requires m2e, you should assume the M2E_REPO variable is available and use it instead. The
automatic source lookup behavior on projects should also probably be turned off/on in the
project/workspace preferences.
{quote}
The feature I have mentioned is already implemented.
Steps to reproduce (I suppose
"D:/Dev/maven/repository/commons-lang/commons-lang/2.6/commons-lang-2.6-sources.jar
is a valid path)
- close all editors
- edit the classpath and set an invalid path -
"D:/Dev/maven/repository/commons-lang/commons-lang/2.6/XXX.jar", for instance
- rebuild the project
- assert the source attachment is invalid
- assert the "Automatically configure the Java Source Attachment" preference is
checked
- open some class from the commons-lang.jar
The Source Lookup will recreate a valid path.
I have also added the("Automatically configure the Java Source Attachment")
preference to disable/enable this feature.
I have added tests for these features.
Issue caused by changing editor ID for ClassFileEditor in Juno
--------------------------------------------------------------
Key: JBIDE-13848
URL:
https://issues.jboss.org/browse/JBIDE-13848
Project: Tools (JBoss Tools)
Issue Type: Sub-task
Components: maven
Affects Versions: 4.1.0.Alpha1
Reporter: Snjezana Peco
Assignee: Snjezana Peco
Attachments: test13848.zip
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira