Skip to content

Attaching sources should use a project relative path, when possible #906

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
fbricon opened this issue Dec 17, 2018 · 0 comments
Closed

Attaching sources should use a project relative path, when possible #906

fbricon opened this issue Dec 17, 2018 · 0 comments
Assignees

Comments

@fbricon
Copy link
Contributor

fbricon commented Dec 17, 2018

when a source file is attached, an absolute path is added to the .classpath file. If the source file belongs to the project, then a relative path should be used instead, to keep .classpath as portable as possible.

See eclipse.jdt.ls/org.eclipse.jdt.ls.tests/projects/eclipse/source-attachment/.classpath after I attached the sources:

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
	<classpathentry kind="lib" path="foo.jar" sourcepath="/Users/fbricon/Dev/projects/eclipse.jdt.ls/org.eclipse.jdt.ls.tests/projects/eclipse/source-attachment/foo-sources.jar"/>
	<classpathentry kind="src" path="src"/>
	<classpathentry kind="output" path="bin"/>
</classpath>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants