Bug 489869 - Contribute Java project detection to importer framework
Summary: Contribute Java project detection to importer framework
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.5   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 4.6.2   Edit
Assignee: Mickael Istria CLA
QA Contact:
URL:
Whiteboard:
Keywords: noteworthy
Depends on:
Blocks:
 
Reported: 2016-03-17 12:49 EDT by Mickael Istria CLA
Modified: 2016-09-29 07:05 EDT (History)
6 users (show)

See Also:
daniel_megert: pmc_approved+
markus.kell.r: review+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mickael Istria CLA 2016-03-17 12:49:46 EDT
JDT could contribute the mechanism to automatically detect and configure Java projects if those aren't already handled by more "structuring" import (Eclipse, Maven, Gradle...)
Comment 1 Eclipse Genie CLA 2016-03-17 12:55:11 EDT
New Gerrit change created: https://git.eclipse.org/r/68710
Comment 2 Mickael Istria CLA 2016-04-29 03:01:30 EDT
I adapted the suggested patch to use latest version of the importer. Can this be considered for RC1?
Comment 3 Dani Megert CLA 2016-05-02 09:29:07 EDT
(In reply to Mickael Istria from comment #2)
> I adapted the suggested patch to use latest version of the importer. Can
> this be considered for RC1?

Most likely not, as we are busy working on critical fixes during RC*.
Comment 4 Mickael Istria CLA 2016-06-11 03:44:54 EDT
I'd like to target this for 4.6.1 as the simple use-case of importing a plain Java project (no .project, no pom.xml...) doesn't work at the moment with Neon.0.
Adding this to JDT is an "invisible" change, the proposed patch changes nothing existing (just addition), is only used during import and is all internal. So as far as I understand, it can qualify for being part of 4.6.1 technically speaking. Are there some PMC permissions required for that?
Comment 5 Markus Keller CLA 2016-07-13 10:15:08 EDT
The "New > Java Project" wizard already tries to detect a classpath from existing source and libraries. To see this in action, set the location on the first page to a folder that lacks a .classpath but contains Java code.

The implementation is in
org.eclipse.jdt.internal.ui.wizards.ClassPathDetector

Would be good to reuse this detector (and add missing functionality there if necessary).
Comment 6 Mickael Istria CLA 2016-07-18 05:53:14 EDT
Thanks Markus. That class is pretty helpful. I updated the proposal to use this class, and added an automated test to easily detect regressions.
Comment 7 Mickael Istria CLA 2016-07-22 06:37:44 EDT
As EGit seems to be on the track of using the Smart Import dialog as default ( bug 494269), it would be nice to have this available before the next EGit release. Is there anything I can do to make it easier/faster for someone to review soon?
Comment 9 Markus Keller CLA 2016-08-25 14:45:38 EDT
I've adjusted a few things and pushed to master.

Keeping the bug open for backport for 4.6.2 once the feature got some more testing in the field.
Comment 10 Lars Vogel CLA 2016-08-26 09:56:32 EDT
I suggest to add this a the N&N M2.
Comment 11 Eclipse Genie CLA 2016-09-08 10:53:04 EDT
New Gerrit change created: https://git.eclipse.org/r/80709
Comment 12 Mickael Istria CLA 2016-09-08 10:53:32 EDT
(In reply to Eclipse Genie from comment #11)
> New Gerrit change created: https://git.eclipse.org/r/80709

This one is for 4.6.2.
Comment 13 Mickael Istria CLA 2016-09-20 06:02:51 EDT
@Daniel: can you please give PMC approval to merge this in maintenance branch for 4.7.2 ?
Comment 14 Dani Megert CLA 2016-09-26 05:51:54 EDT
(In reply to Mickael Istria from comment #13)
> @Daniel: can you please give PMC approval to merge this in maintenance
> branch for 4.7.2 ?

+1 for 4.6.2 (not 4.7.2).
Comment 15 Eclipse Genie CLA 2016-09-29 06:53:32 EDT
Gerrit change https://git.eclipse.org/r/80709 was merged to [R4_6_maintenance].
Commit: http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=215e58f5c0d5c364361c818e5ba68ab1f453a9b1