-
Notifications
You must be signed in to change notification settings - Fork 116
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
Add ability to add source/resource folder outside of the project basedir using linked folder #1603
Conversation
f662785
to
3547584
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this PR.
In general it looks reasonable.
I couldn't try it out yet, but already have some remarks, see below.
Can you please rebase this on top of the current master?
org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/AbstractJavaProjectConfigurator.java
Outdated
Show resolved
Hide resolved
org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/AbstractJavaProjectConfigurator.java
Outdated
Show resolved
Hide resolved
org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/AbstractJavaProjectConfigurator.java
Outdated
Show resolved
Hide resolved
String resourceCanonicalPath = resourceDirectory.getAbsolutePath(); | ||
try { | ||
resourceCanonicalPath = resourceDirectory.getCanonicalPath(); | ||
} catch(IOException ex) { | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have not yet tried this out, but I'm not sure this is correct.
If resource.getDirectory()
is a relative path (haven't checked if that can happen), then it will resolve against the running directory of the application, which will be something like the IDE location.
But here it should be resolved against the project directory, shouldn't it?
Furthermore if resourceDirectory.getAbsolutePath()
is the fall back in case getCanonicalPath()
throws, it should only be called in the catch block.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When i checked resource.getDirectory() were only absolutePath no relativePath
Thx for your kind review ! I would to the changes you ask for. Nice to see that PR are welcomed ;) |
051c886
to
c311bd9
Compare
6acaeb6
to
b7bc379
Compare
@HannesWell All tests are ok now. Can you review ? |
af4122e
to
1de82f8
Compare
@HannesWell Do you have time for a review ? |
Sorry I'm currently in the pre-christmas rush but will review this ASAP hopefully within the next week. |
Ok thx for the reply ;) |
428282d
to
7845e00
Compare
@HannesWell Could you take a look ? |
Thank for your patience and sorry for the delay. I had a coarse look and was wondering if the change in the m2e-tests submodule is still necessary/intended? If yes please open a PR for that in the tesla repository and resolve the conflicts. I'll do a detailed review tomorrow, but I think many changes, if any will be required. |
20ddad8
to
c720015
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change looks almost good (one point below).
I have applied a few minor simplifications.
@RoiSoleil please let me know if the changes in the m2e-tests submodule are still necessary.
org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/AbstractJavaProjectConfigurator.java
Show resolved
Hide resolved
9411e25
to
3ec363d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given the tests pass, this is now fine for me.
@RoiSoleil are you fine with it as well?
I tested it on my use case and it's ok. Thx for your time by the way ;) |
92dec06
to
eb52708
Compare
@HannesWell Do you need help to solde the failing test ? |
Thanks for the offer. I've just looked into it. The previously failing test was fixed with that, lets see if all other pass as well. 🤞🏽 |
3f0cc95
to
fd632d2
Compare
Such source/resource folders outside of the project are made accessible using linked folder. Furthermore fix handling of absolute paths pointing to project-directory in AbstractJavaProjectConfigurator.getFolder().
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Finally the build is green.
Thank you @RoiSoleil for this contribution and your patience.
@HannesWell Thank you for your time and work on this PR. |
Add ability to add source/resource folder outside of the project basedir using linked folder