Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Execute "Organize Imports" from within code?
Execute "Organize Imports" from within code? [message #7415] Mon, 28 April 2003 11:40 Go to next message
Eclipse UserFriend
Originally posted by: thierry.lach.pentamark.com

Is there a way to execute the Organize Imports action from within java code?
I'd like to write an ant task that executes it but haven't been able to
figure out how to call it.
Re: Execute "Organize Imports" from within code? [message #7458 is a reply to message #7415] Mon, 28 April 2003 11:59 Go to previous message
Eclipse UserFriend
There is no real API to invoke Organize import. You have to use the
internal API (OrganizeImportOperation).
You could hack the OrganizeImportAction by passing in a own
WorkbenchSite that returns the CU to work on as IStructuredSelection,
but I would not do that.
Better copy the code from OrganizeImportAction and use the internals.
We have to come up with something for 3.0.

Martin


Thierry Lach wrote:
> Is there a way to execute the Organize Imports action from within java code?
> I'd like to write an ant task that executes it but haven't been able to
> figure out how to call it.
>
>
Previous Topic:single javadoc from multiple projects?
Next Topic:[Java Search] search for methods by return type (and parameter types)?
Goto Forum:
  


Current Time: Thu Jun 05 05:14:13 EDT 2025

Powered by FUDForum. Page generated in 0.05538 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top