Plugin development. Interact with editor

Hi everybody.
My plugin interacts with file that opened in the editor. After action is performed there is some output is presented.
The main goal is to show the line number where error is occured and make this line linkable. After click to the link
cursor should go to the line with this number in the editor. Is that possible?
I know that IDEA shows linked line numbers when, for example, class produces an error.

11 comments
Comment actions Permalink

Hi Anton,

Feel free to check how the links are supported at IJ console - com.intellij.execution.impl.ConsoleViewImpl (the main interest for you there is com.intellij.execution.impl.EditorHyperlinkSupport processing).

Denis

0
Comment actions Permalink

Thnx, Denis.
Is there any examples or tutorials how use this?

0
Comment actions Permalink

You can start Community Edition under debug and check how it processes hyperlinks.

Denis

0
Comment actions Permalink

Intellij IDEA cant find EditorHyperlinkSupport class, but I`ve added Intellij IDEA CE 10.5 source code to the project SDK for plugin.
Directory with this class (platform/platform-impl/src/com/intellij/execution/impl) is in the sourcepath.
What could be the reason?



Attachment(s):
2.png
1.png
0
Comment actions Permalink

Hello Anton,

EditorHyperlinkSupport is a new class in the IDEA 11 development codebase.
It's not available in IDEA 10.5.

Intellij IDEA cant find EditorHyperlinkSupport class, but I`ve added
Intellij IDEA CE 10.5 source code to the project SDK for plugin.

Directory with this class
(platform/platform-impl/src/com/intellij/execution/impl) is in the
sourcepath.

What could be the reason?


--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Comment actions Permalink

Hello, Dmitry. Thnx for answer. Will be waiting for IDEA 11 release and improvising with my subj ~^_^~

0
Comment actions Permalink

You don't have to wait. Community Edition source is available - http://git.jetbrains.org/?p=idea/community.git;a=summary. You can develop against the 'master' branch there.

Denis

0
Comment actions Permalink

When I try to use EditorHyperlinkSupport I can`t compile my plugin.
For example simple line:

EditorHyperlinkSupport ehs = new EditorHyperlinkSupport();

causes "cannot find symbol class EditorHyperlinkSupport" error when I try to compile.

0
Comment actions Permalink

The class is available at the 'master' branch. Looks like you have incorrect setup at the local environment then.

Denis

0
Comment actions Permalink

I`ve done all steps in setting up plugin environment.
You can see screenshots atached to my post above. The sourcepath directory of the last revision of IDEA source is set correctly,
but EditorHyperlinkSupport class is still unavailable.

0
Comment actions Permalink

The plugin project setup doesn't differ from any other java project setup. I.e. you describe a standard problem that particular class can't be found and standard actions should be made then - check that target class is available at the local environment, check that correct SDK is defined for the plugin etc.

Denis

0

Please sign in to leave a comment.