Jump to: navigation, search

E4/UI/Smart Import

< E4‎ | UI
Warning2.png
The framework in now part of Platform/UI, this documentation should be considered as obsolete.

Smarter import framework

Purpose

Currently, when importing a project, users are facing the difficult choices of What project they're importing and How to import it. The various technologies involved in a project can easily be detected by some automated check, such as presence of some file, some content in a file, some files with some extension. The purpose of the framework is to use such interesting data to automatically detect what is a project and automatically configure it as best, with very minimal effort from user.

This is targeting all users, not only newbies, since the diversity of technologies become something that affect all developers. A regular project can easily blend half a dozen "structuring" technologies (programming languages, build and dependencies management tools, frameworks...).

Since projects are also modular, and that a real-life project is actually a set of Eclipse projects, the framework also does its best to detect the various modules, by crawling the source tree and reporting some directories as Eclipse projects when they have strong enough markers (pom.xml, MANIFEST.MF and other files that make it sure a given folder is an Eclipse project).

Get it

Description p2 repo URL Source Comment
Framework and UI entries Part of org.eclipse.ui.ide 3.12 since Platform 4.6.M6
JDT extensions https://git.eclipse.org/r/#/c/68710/ https://git.eclipse.org/r/#/c/68710/ Targeted for Neon M7
EGit integration http://download.eclipse.org/egit/updates-nightly http://git.eclipse.org/c/egit/egit.git/tree/org.eclipse.egit.ui.importer Additional EGit clone/import wizard delegating to Smart Import. Since version 4.0
JSDT integration http://download.eclipse.org/webtools/jsdt/snapshots/ http://git.eclipse.org/c/jsdt/webtools.jsdt.git/tree/bundles/org.eclipse.wst.jsdt.ui.importer
Thym/Cordova integration http://download.eclipse.org/thym/snapshots (starting from April 15th 2015) https://github.com/eclipse/thym/tree/master/plugins/org.eclipse.thym.ui.importer
Maven integration http://download.eclipse.org/technology/m2e/snapshots/1.7.0/ (starting from January 24 2016) https://github.com/eclipse/m2e-core/tree/master/org.eclipse.m2e.importer
JBoss Tools Playground (WTP Java EE) extensions http://download.jboss.org/jbosstools/mars/snapshots/builds/jbosstools-playground_master/ or http://download.jboss.org/jbosstools/neon/snapshots/builds/jbosstools-playground_master/ https://github.com/jbosstools/jbosstools-playground plugins/org.jboss.tools.easymport* This is meant to be moved to individual projects\\

Pending Contributions:

Gradle Integration (In progress) Currently unavailable https://github.com/Ian-Stewart-Binks/buildship/tree/smart-import-rebase WIP. p2 repo url will be updated when ready. Source url likely to change soon, and will promptly be updated when changed.
Oomph integration http://update-site.bonitasoft.com/oomph/ https://github.com/apupier/eclipse-oomph-smart-importer
Legacy/deprecated Framework + JDT & PDE extensions http://download.eclipse.org/e4/snapshots/org.eclipse.e4.ui http://git.eclipse.org/c/e4/org.eclipse.e4.ui.git/ bundles/org.eclipse.e4.ui.importer*
PDT integration http://download.eclipse.org/tools/pdt/updates/latest-nightly/ https://git.eclipse.org/c/pdt/org.eclipse.pdt.git/tree/plugins/org.eclipse.php.ui.importer


Extensions in JBoss Tools Playgroundare moving to their related projects (JSDT, WTP, EGit...) and will be listed there as they get available for installation

UI entry points

This new framework has 3 main entry points so far:

  • One is a Import project(s) from Folder... under the file menu. This menu entry is inspired by the "Open Project"
  • Another is in the Import wizard, under the General category: Local folder as project(s) into workspace
  • If you have installed EGit extension, there is also another EGit Import wizard that instead of asking user to select how to import working directory will delegate it to this import framework

Add support for a new project type

The extension point is org.eclipse.ui.ide.projectConfigurators from org.eclipse.ui.ide version 3.12/M6

See as example http://git.eclipse.org/c/e4/org.eclipse.e4.ui.git/tree/bundles/org.eclipse.e4.ui.importer.java/ for an implementation, only the extension point needs to be updated compared to this version.

In plugin.xml define an extension for your project type. Don't forget to add a good activeWhen expression in order to avoid useless loading of some bundles affecting IDE performances. Then implement a ProjectConfigurator. Project Configurator will be responsible for doing fine-grained checks on the imported working directory and decide whether some directory must become an Eclipse project (method shouldBeAnEclipseProject), whether it can contribute to the configuration of an Eclipse project (method configure) and then what to do to configure the project.

Contribute