Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Java Content Assist in a Wizard
icon5.gif  Java Content Assist in a Wizard [message #1065240] Tue, 25 June 2013 01:50 Go to next message
Todd Schiller is currently offline Todd SchillerFriend
Messages: 3
Registered: June 2013
Location: Seattle
Junior Member
Is there a way to use any of the built-in Java Content Assist APIs for a SourceViewer that isn't backed by a java project (e.g., a code snippet viewer in a Wizard)?

To give some context, the code specified in the SourceViewer is compiled using the javax compiler API (in memory) and is then loaded and called by the plug-in I am writing.

I'd like to avoid maintaining a dummy Java Project on disk; the user-supplied code can refer to Eclipse types (e.g., IResources) and plug-in defined types, so maintaining a project would involve maintaining the class path.

Any ideas/comments/questions would be greatly appreciated.
Re: Java Content Assist in a Wizard [message #1065464 is a reply to message #1065240] Tue, 25 June 2013 19:39 Go to previous message
Stephan Herrmann is currently offline Stephan HerrmannFriend
Messages: 1853
Registered: July 2009
Senior Member
This is not just about API, already the internal CompletionEngine uses an IJavaProject - not for everything, but already the few usages would be difficult to work around. Additionally, a JavaSearchNameEnvironment is needed.

So if maintaining a classpath is what you try to avoid (is that what you are saying?) then I wonder how you would find any types *without* a classpath?
Do you want completion to search the entire host eclipse and the entire workspace for types?

There may be workarounds, I don't know, but JDT is basically about working with java projects, it's hard for me to imagine using a lot of JDT *without* a java project. You simply need the context.
Previous Topic:Programmatically close a Java file?
Next Topic:Any plugin that auto-completes css class names
Goto Forum:
  


Current Time: Fri Apr 26 19:40:53 GMT 2024

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

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

Back to the top