[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 08:18:55 EDT 2013
[ https://issues.jboss.org/browse/JBIDE-13848?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12766450#comment-12766450 ]
Snjezana Peco commented on JBIDE-13848:
---------------------------------------
The issue can happen if a file is being opened when debugging a server and we don't know either a binary or source jar.
The fix has been copied from m2e. See http://git.eclipse.org/c/m2e/m2e-core.git/tree/org.eclipse.m2e.jdt/plugin.xml. The m2e action works only for maven projects. Our action works for any Java project.
Without this fix, the source file won't always be open in Juno/Kepler.
{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.
{quote}
M2_REPO is deprecated and the m2e source attachment action doesn't use it. I will add a better solution: if a source attachment file doesn't exist, the Source Lookup will try to find a new file.
{quote}
The automatic source lookup behavior on projects should also probably be turned off/on in the project/workspace preferences.
{quote}
I have excluded that preference, but will revert it if that is relevant. However, I think a user always wants to see a source file when opening a class. M2e also doesn't contain such a preference.
This feature isn't related to JBIDE-13852.
> 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