[ANN] MiniWiki plugin, v0.2
v 0.2:
added : anchors, and super-anchors
-
Anchors are similar to html anchors.
SuperAnchors add a persistent highlighting, and a gutter icon to the
link target. (see attached illustration)
ex. of anchor:
../../bugs.txt#bug001 |
.#bug002 |
../../bugs.txt##bug001
|
this project: |
todo.txt |
bugs.txt |
../../META-INF/plugin.xml |
../doc/documentation.txt |
version.txt |
todo for version 0.3 |
1° fix |
bugs.txt##bug001-001 |
bugs.txt#bug001-002 |
| 2° update version.txt
| 3° update ../../META-INF/plugin.xml
| 4° update ../doc/documentation.txt
file bugs.txt
|
| #bug001-001: gutter icon is too wide
| #bug001-002: gutter icon is too wide
Attachment(s):
MiniWiki-v02.png
Please sign in to leave a comment.
Hi Alain,
thanks a lot for your plugin; this is really very useful functionality!
Here's one suggestion for an extension that I believe would make it even better: Allow Ctrl-B navigation from the output console (currently if I try it, I get a NPE).
I often have information on classes or certain files in the log output, and quicker navigation there would be really cool.
Anyway, thanks again for the work!
Regards,
Jens
YARFE (yet another request for enhancement):
Take attached sources into consideration
(e.g. Ctrl-B on "java.lang.String" only navigates to the compiled class file; not the source)
JetBrains/anybody in the know:
For "java.lang.String",
how can I get a VirtualFile that points to the attached source, and not
the decompiled code, (as happens with the code below ?
PsiClass psiClass = PsiManager.getInstance (i_project).findClass
("java.lang.String");
PsiFile psiFile = psiClass.getContainingFile ();
VirtualFile file = psiFile.getVirtualFile (); // problem: this is the
decompiled code, not the attached source.
TIA
Alain
Hello Alain,
It looks great! One request so far: can you make it work in java files as
well (in comments)? My TODOs would never look the same again. :)
Thx,
Andrei
PsiClass psiClass = PsiManager.getInstance (i_project).findClass
("java.lang.String");
PsiClass psiSourceClass = psiClass.getNavigationElement();
PsiFile psiFile = psiSourceClass.getContainingFile ();
VirtualFile file = psiFile.getVirtualFile ();
Alexei Nikitin wrote:
>psiSourceClass = psiClass.getNavigationElement();
>
Works fine. Thanks.
I noticed every psiElement has a navigationElement. What is it
exactly/does it do? I checked the doc, but found nothing.
Alain
Jens Voss wrote:
>Take attached sources into consideration
>
fixed in v0.3, thanks to Alexei's reply.
Alain
Andrei Oprea wrote:
>
Already planned. Coming. Soon.
Alain
Jens
>Here's one suggestion for an extension that I believe would make it even better: Allow Ctrl-B navigation from the output console (currently if I try it, I get a NPE).
>
This plugin only works in editor (text, and soon java).
I tried pressing Ctrl-B in the output console, but never got an NPE.
Alain
Alain Ravet wrote:
>> psiSourceClass = psiClass.getNavigationElement();
>>
>>
getNavigationElement() returns PsiElement's best possible navigation
counterpart. Thus for compiled classes it returns their source version
if available.
--
Maxim Shafirov
JetBrains Inc.
http://www.jetbrains.com
"Develop with pleasure!"
Maxim,
>
But for compiled classes, when else does it makes sense to use, rather
than the plain element?
Alain
Done, in v0.3
Alain
Alain Ravet wrote:
>> getNavigationElement() returns PsiElement's best possible navigation
>> counterpart. Thus for compiled classes it returns their source version
>> if available.
>>
Accessing compiled classes source counterparts isn't free, right? So we
avoid using those in every case possible. Thus we're able to skip their
indexing while building initial repository at startup.
So, we use .class files in any case we're able to get necessary
information from there. Namely, it's all IDEA's functionality except
request to view/edit source file of course and a workaround of a little
annoyance we need to get method parameters which absent in the compiled
classes.
--
Maxim Shafirov
JetBrains Inc.
http://www.jetbrains.com
"Develop with pleasure!"
Hello Alain,
Works great, thanks.
Andrei
>> can you make it work in java files as well (in comments)? My TODOs
>> would never look the same again. :)
>>