[jbosstools-issues] [JBoss JIRA] (JBIDE-13848) Issue caused by changing editor ID for ClassFileEditor in Juno

Snjezana Peco (JIRA) jira-events at lists.jboss.org
Thu Apr 11 16:43:55 EDT 2013


    [ https://issues.jboss.org/browse/JBIDE-13848?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12766621#comment-12766621 ] 

Snjezana Peco commented on JBIDE-13848:
---------------------------------------

{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


More information about the jbosstools-issues mailing list