[
https://issues.jboss.org/browse/ERT-568?page=com.atlassian.jira.plugin.sy...
]
Roland Grunberg edited comment on ERT-568 at 12/14/17 11:37 AM:
----------------------------------------------------------------
I've proposed some changes for this, and improved them to reduce amount that is being
exposed as API.
The downside is there's quite a bit of code that has had to be copied over into
internal spots of OrganizeImportsOperation.
Trickiest spots have been de-coupling OrganizeImportsOperation from JDT UI. Two cases
existed :
* Dependence on JDT UI Plugin for the workspace preferences with respect to how imports
are organized. The preference lookup is really part of org.eclipse.core.runtime so moving
some code around handled this (eg. JavaUIPlugin.getInstance().getPreferences() vs.
InstanceScope.getNode(..).get(..))
* Code depended on global ASTProvider stored in the JavaUIPlugin which hooked into various
UI events (eg. editor opened/close). Resolved by moving all non-UI code into a new
CoreASTProvider. This handles all calls that would have gone from SharedASTProvider ->
ASTProvider
I still need to confirm that taking this implementation will work for org.eclipse.jdt.ls,
as their implementation may have hard-coded various things to work their way, while this
proposed upstream implementation attempts to preserve how things worked in the JDT
originally.
was (Author: rgrunber):
I've proposed some changes for this, and improved them to reduce amount that is being
exposed as API.
The downside is there's quite a bit of code that has had to be copied over into
internal spots of OrganizeImportsOperation.
I still need to confirm that taking this implementation will work for org.eclipse.jdt.ls,
but from an upstream point of view this provides OrganizeImportsOperation as API.
[JDT] New API for organize imports
----------------------------------
Key: ERT-568
URL:
https://issues.jboss.org/browse/ERT-568
Project: Eclipse Release Train
Issue Type: Task
Components: Platform
Reporter: Roland Grunberg
Assignee: Roland Grunberg
See
https://bugs.eclipse.org/bugs/show_bug.cgi?id=506239 for full details.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)