Editor Usage

I'm developing a plugin that has a preview editor. I would like this viewer to reflect the markup and settings of the orginal file. I am currently creating the editor with the following

Unfortunately, this creates a very limited text viewer.
I have two questions:

1. Is it possible to reflect the markup and settings of the original file?

2. If so, how do you go about doing this? I've looked through this forum and the Wiki site to no avail.

5 comments
Comment actions Permalink

Hi,
What kind of markup?

TIA,
Dmitry

0
Comment actions Permalink

Java...I would like to have keyword, error, etc. highlighting reflected in the preview editor.

0
Comment actions Permalink

Hi,
If I'm remember correctly highlighting depends on file type, so you can try register your extension as java file and experiment with factory methods.

TIA,
Dmitry

0
Comment actions Permalink

Hi,

Try to pass the project instance to factory create call.
You also may be interested in copying EditorSettings from editor to viewer.

Jason Ozias wrote:

I'm developing a plugin that has a preview editor. I would like this viewer to reflect the markup and settings of the orginal file. I am currently creating the editor with the following
EditorFactory.getInstance().createViewer( editor.getDocument() ) > ]]>
Unfortunately, this creates a very limited text viewer.
I have two questions:

1. Is it possible to reflect the markup and settings of the original file?

2. If so, how do you go about doing this? I've looked through this forum and the Wiki site to no avail.



--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0
Comment actions Permalink

Ok...made some progress. I now have variable highlighting and error highlighting. I still seem to be missing java keyword highlighting and some others as well ( like string literals ). I tried copying the EditorSettings and the RangeHighlighters from the source editor, but this did not work. Where do I get the settings for keyword highlighting, etc.

0

Please sign in to leave a comment.