IntelliJ Community . PluginDevelopmentHowTo00005

 
PluginDevelopmentHowTo00005 

HOME INDEX SEARCH CHANGES GO  

PluginDevelopmentHowTo00005

Problem description

Hi! For my plugin, I need to open java source files at runtime and have all the java editor functionality there like completion. But, if I add an action which opens java source file, it doesn't have any completion, only syntax highlighting. It looks like I need to add my source files directly to the current project and make IDEA parse it and perceive as part of the project.
So, the question is : How can I add my java source to the project dynamically from my plugin, open IDEA java source editor for it, and have completion there?

Another task is to get IDEA java source editor and add it to my complex plugin. Imagine that I have java source as a String in memory. I'd like to initialize IDEA java source editor, put my java source there, add editor to my plugin and let user edit my java source with all features like completion and so on. Then, get result sources from there and use for my needs.
How can I create IDEA built-in java source editor without having file on disk, just from string containing source code? Can I have code completion in such editor?

Related Topics: PluginDevelopmentHowTo, PluginDocumentation, ProjectPluginTemplate, OpenAPI, IntellijPluginDocumentation, IntellijPluginDocumentation, PluginDeployment, IdeasForPlugins

-- EvgenyKorabelnikov - 11 Mar 2005

PluginDevelopmentHowToForm
HowToQuestion: How to add java source dynamically and have completion there
OpenAPI:
HowToStatus?: help.gif

e d i t a t t a c h r e f - b y d i f f s m o r e
Have ideas, requests, problems regarding this site? Send feedback.
Copyright © 2000-2003 by the contributing authors. All materials at intellij.org are the property of the contributing authors.