Skip to content
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

Provide smart import support #356

Closed
donat opened this issue Feb 8, 2017 · 14 comments · Fixed by #1219
Closed

Provide smart import support #356

donat opened this issue Feb 8, 2017 · 14 comments · Fixed by #1219

Comments

@donat
Copy link
Contributor

donat commented Feb 8, 2017

Original post: https://bugs.eclipse.org/bugs/show_bug.cgi?id=469636

@armandomejiam
Copy link

+1

@donat
Copy link
Contributor Author

donat commented Aug 30, 2018

A few tips on how to implement smart import support is provided by @mickaelistria at #751.

@donat
Copy link
Contributor Author

donat commented Sep 6, 2019

Another request for smart import in Bugzilla: https://bugs.eclipse.org/bugs/show_bug.cgi?id=549760

@thokuest
Copy link

Yet another request for smart import in Bugzilla: https://bugs.eclipse.org/bugs/show_bug.cgi?id=559074

@maxandersen
Copy link

I opened https://bugs.eclipse.org/bugs/show_bug.cgi?id=559074 as https://projects.eclipse.org/projects/tools.buildship/developer points to bugzilla :)

But since then I found this issue is open for smart import for gradle.

I've read through the various comments I honestly don't follow what the remaining blockers are for providing a basic 'if build.gradle file available, mark it as a gradle project and trigger import" feature ? vscode-java support does auto-import and it seem to work quite well (maybe @fbricon can comment on how they did it).

it is literally the one thing that makes eclipse gradle experience stand out from from vscode and intellij that with both of those plain eclipse, maven and gradle projects "just opens" but for eclipse it is everything but Gradle that is handled.

Would be great to see if we could get this enabled for gradle - willing to submit patches/test it out if can get an update on what are the knowns blocker if any.

@donat
Copy link
Contributor Author

donat commented Jan 13, 2020

@maxandersen

projects.eclipse.org/projects/tools.buildship/developer points to bugzilla :)

Unfortunately, there's no way to configure the bug tracker on the project page.

I've read through the various comments I honestly don't follow what the remaining blockers are for providing a basic 'if build.gradle file available, mark it as a gradle project and trigger import.

I think there should not be any blockers to implement this feature, at least not big ones. We simply had bigger issues/missing features at our hands to work on.

Would be great to see if we could get this enabled for gradle - willing to submit patches/test it out if can get an update on what are the knowns blocker if any.

Awesome, thanks for volunteering. Well, for started I'd recommend reading through the initial conversation on the topic why we didn't implement this feature right away. I think the problems are still valid now: the importer works per project folder whereas Gradle can import one build (containing multiple projects) at a time.

If you have an idea how to implement this feature then I'd suggest you to just create a rough prototype implementation. It doesn't have to be perfect or even pretty, just demonstrate the proposed solution. I'll be more than happy to review it and guide you forward. With regards to the IDE setup, you'll find instructions here.

If you are stuck with anything let me know. I'm happy to give guidance.

@mickaelistria
Copy link

mickaelistria commented Jan 13, 2020 via email

@maxandersen
Copy link

Awesome, thanks for volunteering. Well, for started I'd recommend reading through the initial conversation on the topic why we didn't implement this feature right away. I think the problems are still valid now: the importer works per project folder whereas Gradle can import one build (containing multiple projects) at a time.

Yeah, so I'm trying to grok why gradle import is any different than maven here ? it should/would have the same issue here I reckon ?

@donat
Copy link
Contributor Author

donat commented Jan 13, 2020

@mickaelistria I didn't know that's a possibility. I'll contact the webmaster soon.

@maxandersen Correct. I don't know about Maven, but it's highly likely that they have the same problem.

@mickaelistria
Copy link

I don't know about Maven, but it's highly likely that they have the same problem.

Which in practice was never reported as a problem by users ;) So it could be that this problem doesn't often exist in real life.
That said, I think the ProjectConfigurator.findConfigurableLocations() doesn't prevent from importing files from another branch.

@laeubi
Copy link
Member

laeubi commented Jan 5, 2023

Is there any progress on this? I'm asking because this was complained about at EclipseCon 2022 that we have bad user experience with m2e when importing junit5 project, but the real problem is/was that junit5 is actually a gradle project but don't support the smart-import.

I have read through the linked tickets and beside they are quite old I think the very minimal step would be to simply if the user selects a "project root" it is reported as a (single) gradel project, then when this project is imported it can do all the efficient things and detect sub projects and so on I get when I choose "import existing gradle project".

So to bring this forward I can offer:

  • help with initial implementation proposal
  • improving the platform-API if required

I'm just not familiar enough with gradle itself, so would need assistance (and probably improvement of initial contribution) by buildship committers.

FYI @vogella

laeubi added a commit to laeubi/buildship that referenced this issue Jan 5, 2023
Currently gradle projects are not detected when using smart import.

This adds the necessary ProjectConfigurator to support importing gradle
projects this way.

Fix eclipse#356
Signed-off-by: Christoph Läubrich <laeubi@laeubi-soft.de>
@laeubi
Copy link
Member

laeubi commented Jan 5, 2023

I have now created a PR here:

any help / feedback would be appreciated.

laeubi added a commit to laeubi/buildship that referenced this issue Jan 5, 2023
Currently gradle projects are not detected when using smart import.

This adds the necessary ProjectConfigurator to support importing gradle
projects this way.

Fix eclipse#356
Signed-off-by: Christoph Läubrich <laeubi@laeubi-soft.de>
@donat donat added this to the 3.1.7 milestone Jan 25, 2023
@laeubi
Copy link
Member

laeubi commented Mar 3, 2023

@donat any chance to review the PR? It sadly already missed the 2023-03 release :-\

laeubi added a commit to laeubi/buildship that referenced this issue Mar 10, 2023
Currently gradle projects are not detected when using smart import.

This adds the necessary ProjectConfigurator to support importing gradle
projects this way.

Fix eclipse#356
Signed-off-by: Christoph Läubrich <laeubi@laeubi-soft.de>
laeubi added a commit to laeubi/buildship that referenced this issue Mar 10, 2023
Currently gradle projects are not detected when using smart import.

This adds the necessary ProjectConfigurator to support importing gradle
projects this way.

Fix eclipse#356
@vogella
Copy link
Contributor

vogella commented Jun 2, 2023

Thanks @laeubi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants