21 comments


Looking over the Source Insight web page, I don't see anything there that IDEA doesn't already do. What's the value add of this plugin.

(Not trying to be snarky, here. After all, the first plugin I wrote didn't do anything IDEA didn't already support!)

--Dave

0

"Dave Griffith" <dave.griffith@trilogy.com> wrote in message
news:3802602.1043271588219.JavaMail.jrun@is.intellij.net...
>

Looking over the Source Insight web page, I don't see anything there
that IDEA doesn't already do. What's the value add of this plugin.

>

(Not trying to be snarky, here. After all, the first plugin I wrote
didn't do anything IDEA didn't already support!)


It also wasn't clear to me when reading the description, but now that I've
tried it, I love it! (I made a similar feature request a while back.)

In case the description wasn't clear enough to everyone, here's my
description of it: when you click on a method name, it will show the
implementation of that method (i.e., the code) in the "Context Viewer"
window. When you click on a variable name, it will show the declaration of
the variable.

I'm having a little problem with it though: the only way I can seem to get
it to work is to lock the Context Viewer window open and then click on a
method/variable name. It would be nice if it would show the context for the
method/variable that the text cursor is currently in; that way, I could
assign a shortcut key to show the context window just when I need it (my 19"
monitor isn't big enough to have all the windows open that I want to have
open; this plugin is making me contemplate buying a second monitor...).



Erik




0

It would also be great if this plugin would work with the methods in the
autocompletion popup. That way, one could see the implementation of the
methods one is trying to choose from.


0

Erik Hanson wrote:

I'm having a little problem with it though: the only way I can seem to get
it to work is to lock the Context Viewer window open and then click on a
method/variable name. It would be nice if it would show the context for the
method/variable that the text cursor is currently in; that way, I could
assign a shortcut key to show the context window just when I need it (my 19"
monitor isn't big enough to have all the windows open that I want to have
open; this plugin is making me contemplate buying a second monitor...).


Try this: Turn off docking or turn off pinning on the Context Viewer
window. Go to Options->Keymaps and assign shortcut to Main
Menu->Window->Context Viewer. This should allow you to move around your
classes with the keyboard and then press your shortcut to display the
Context Viewer window for that symbol. Pressing Escape then closes the
window and returns you to the editor.

Quite nifty.

Ciao,
Gordon

--
Gordon Tyler
Software Developer, R&D
Sitraka (now part of Quest Software)
"Performance is Mission Critical"

0

Hi kesh,

A very cool plugin! Great for those times when you quickly need to see
the code for another class without moving your cursor.

One bit of odd behaviour that I came across: Click a symbol to show it's
context in the window and then navigate to the definition of that symbol
using Ctrl-Left click or Ctrl-B or whatever. Then press Ctrl-Alt-Left to
navigate back to where you were. The Context Viewer shows "No Context
Available" and will not show the context for the original symbol until I
click on a different symbol. It will not show the context even if I
click off the symbol on whitespace and then back. I have to click a
different symbol for which it does show the context and then I can go
back to the original symbol.

Ciao,
Gordon

--
Gordon Tyler
Software Developer, R&D
Sitraka (now part of Quest Software)
"Performance is Mission Critical"

0

"Gordon Tyler" <gordon.tyler@sitraka.com> wrote in message
news:b0n5sq$q5e$1@is.intellij.net...

Erik Hanson wrote:

I'm having a little problem with it though: the only way I can seem to

get

it to work is to lock the Context Viewer window open and then click on a
method/variable name. It would be nice if it would show the context for

the

method/variable that the text cursor is currently in; that way, I could
assign a shortcut key to show the context window just when I need it (my

19"

monitor isn't big enough to have all the windows open that I want to

have

open; this plugin is making me contemplate buying a second monitor...).

>

Try this: Turn off docking or turn off pinning on the Context Viewer
window. Go to Options->Keymaps and assign shortcut to Main
Menu->Window->Context Viewer. This should allow you to move around your
classes with the keyboard and then press your shortcut to display the
Context Viewer window for that symbol. Pressing Escape then closes the
window and returns you to the editor.


Ah, now it works. Very cool.


Erik


0

Sorry if my description wasn't that clear to everybody.

Regarding your first request, it is already in my todo list for the next version of the plugin. Taking about your second comment, unfortunatelly it seems that there's no API available to access the content of the autocompletion popup. So I think it would be almost impossible to implement as a plugin.

/kesha

0

Yes, I know about that bug. I'll try to fix it in the next version.

Thank you for your feedback.

/kesha

0

Ah, maybe it should have been called DeclarationViewerPlugin instead then :)

Erik Hanson wrote:

In case the description wasn't clear enough to everyone, here's my
description of it: when you click on a method name, it will show the
implementation of that method (i.e., the code) in the "Context Viewer"
window. When you click on a variable name, it will show the
declaration of the variable.

>

I'm having a little problem with it though: the only way I can seem
to get it to work is to lock the Context Viewer window open and then
click on a method/variable name. It would be nice if it would show
the context for the method/variable that the text cursor is currently
in; that way, I could assign a shortcut key to show the context
window just when I need it (my 19" monitor isn't big enough to have
all the windows open that I want to have open; this plugin is making
me contemplate buying a second monitor...).

>
>
>

Erik



0


Got it. Very nice. One odd bit of behaviour, though. If you have the context window floating, and smaller than the width of the file it is showing, the horizontal scroll will end up positioned so that only the right half of the item you selected is visible.

Very nice, indeed.

0

Yeah, I've seen this too. But it seems that this is how
ScrollingModel.scrollTo method works.
Currently I don't know how to fix it. :(

/kesha

"Dave Griffith" <dave.griffith@trilogy.com> wrote in message
news:4329028.1043338082054.JavaMail.jrun@is.intellij.net...
>

Got it. Very nice. One odd bit of behaviour, though. If you have the

context window floating, and smaller than the width of the file it is
showing, the horizontal scroll will end up positioned so that only the right
half of the item you selected is visible.
>

Very nice, indeed.



0

This is great and very useful!

I have the following suggestions:
1. Show (if enabled in the editor) the current scope so that it is obvious
what's the scope of the variable/function.
2. Enable opening the displayed file in the editor.

Amnon

"kesh" <ksibilev@yahoo.com> wrote in message
news:b0n285$l7b$1@is.intellij.net...

ContextViewerPlugin 0.1 has been just released.
http://www.intellij.org/twiki/bin/view/Main/ContextViewerPlugin
Context Viewer provides relevant information while you are viewing and
editing your source code. The idea was stolen from Source Insight 3.5.

>

Your feedback and bug reports are weclome.

>

/kesha

>
>


0

After using it (0.2) for a day, here are small things I would love to see:

1. Make the cursor active without the need to click in the Context panel, so
that keyboard movement in the file will be possible.
2. The color of comments is different than in the editor.

I like it a lot!

Amnon

"kesh" <ksibilev@yahoo.com> wrote in message
news:b0n285$l7b$1@is.intellij.net...

ContextViewerPlugin 0.1 has been just released.
http://www.intellij.org/twiki/bin/view/Main/ContextViewerPlugin
Context Viewer provides relevant information while you are viewing and
editing your source code. The idea was stolen from Source Insight 3.5.

>

Your feedback and bug reports are weclome.

>

/kesha

>
>


0

1. I specifically made context panel inactive when the shortcut action is
clicked, because I thought that the typical usage of this window would be to
have a quick look at the context and go on editing. If you want I can create
another action which will do the same thing plus giving the context panel
focus. I don't know how to call it though.
2. I've fixed comment highlighting in the next build. The whole thing about
highlighting is pretty weird. When I use Editor.createViewer() to create a
viewer from Document, the method returns an instance of an editor which when
shown doesn't highlight any structure elements(like java keywords) but only
class fields. Besides it highlights class fields only in case the file has
been already opened at least once for editing. That is a very strange side
effect. So I had to do my custom highlighting which is by no means compares
to the internal one. Besides it seems that there's no way to access current
color schema via Open API. Any help from the IntelliJ team on this regard?

/kesha

"Amnon I. Govrin" <agovrin@freshwater.com> wrote in message
news:b0ptdi$cug$1@is.intellij.net...

After using it (0.2) for a day, here are small things I would love to see:

>

1. Make the cursor active without the need to click in the Context panel,

so

that keyboard movement in the file will be possible.
2. The color of comments is different than in the editor.

>

I like it a lot!

>

Amnon

>

"kesh" <ksibilev@yahoo.com> wrote in message
news:b0n285$l7b$1@is.intellij.net...

ContextViewerPlugin 0.1 has been just released.
http://www.intellij.org/twiki/bin/view/Main/ContextViewerPlugin
Context Viewer provides relevant information while you are viewing and
editing your source code. The idea was stolen from Source Insight 3.5.

>

Your feedback and bug reports are weclome.

>

/kesha

>
>

>
>


0


"Amnon I. Govrin" <agovrin@freshwater.com> wrote in message
news:b0pr8t$9qt$1@is.intellij.net...

This is great and very useful!

>

I have the following suggestions:
1. Show (if enabled in the editor) the current scope so that it is obvious
what's the scope of the variable/function.


I'm not sure what I mean by that. Can you explain a little bit more.

2. Enable opening the displayed file in the editor.

>

Added in todo list.

Thanx,
/kesha

Amnon

>

"kesh" <ksibilev@yahoo.com> wrote in message
news:b0n285$l7b$1@is.intellij.net...

ContextViewerPlugin 0.1 has been just released.
http://www.intellij.org/twiki/bin/view/Main/ContextViewerPlugin
Context Viewer provides relevant information while you are viewing and
editing your source code. The idea was stolen from Source Insight 3.5.

>

Your feedback and bug reports are weclome.

>

/kesha

>
>

>
>


0


"kesh" <ksibilev@yahoo.com> wrote in message
news:b0pvqd$gc0$1@is.intellij.net...
>

"Amnon I. Govrin" <agovrin@freshwater.com> wrote in message
news:b0pr8t$9qt$1@is.intellij.net...

This is great and very useful!

>

I have the following suggestions:
1. Show (if enabled in the editor) the current scope so that it is

obvious

what's the scope of the variable/function.

>

I'm not sure what I mean by that. Can you explain a little bit more.

In the editor, there is a blue line in the left margin that shows the scope
that the cursor is in, I'd like to see it in the context panel as well.

>

2. Enable opening the displayed file in the editor.

>

>

Added in todo list.

Cool.
>

Thanx,
/kesha

>

Amnon

>

"kesh" <ksibilev@yahoo.com> wrote in message
news:b0n285$l7b$1@is.intellij.net...

ContextViewerPlugin 0.1 has been just released.
http://www.intellij.org/twiki/bin/view/Main/ContextViewerPlugin
Context Viewer provides relevant information while you are viewing and
editing your source code. The idea was stolen from Source Insight 3.5.

>

Your feedback and bug reports are weclome.

>

/kesha

>
>

>
>

>
>


0


"kesh" <ksibilev@yahoo.com> wrote in message
news:b0pvk3$fv2$1@is.intellij.net...

1. I specifically made context panel inactive when the shortcut action is
clicked, because I thought that the typical usage of this window would be

to

have a quick look at the context and go on editing. If you want I can

create

another action which will do the same thing plus giving the context panel
focus. I don't know how to call it though.

The way it is now, it is partially active, as the panel itself is active (so
you can't type in the editor) but at the same time you can't scroll the
context panel, so why not just enable keyboard entry? What would you lose?

2. I've fixed comment highlighting in the next build. The whole thing

about

highlighting is pretty weird. When I use Editor.createViewer() to create a
viewer from Document, the method returns an instance of an editor which

when

shown doesn't highlight any structure elements(like java keywords) but

only

class fields. Besides it highlights class fields only in case the file has
been already opened at least once for editing. That is a very strange side
effect. So I had to do my custom highlighting which is by no means

compares

to the internal one. Besides it seems that there's no way to access

current

color schema via Open API. Any help from the IntelliJ team on this regard?

This seems like a bug or at least an oversight from IntelliJ, I don't
believe you would have to do highlighting yourself.
>

/kesha

>

"Amnon I. Govrin" <agovrin@freshwater.com> wrote in message
news:b0ptdi$cug$1@is.intellij.net...

After using it (0.2) for a day, here are small things I would love to

see:

>

1. Make the cursor active without the need to click in the Context

panel,

so

that keyboard movement in the file will be possible.
2. The color of comments is different than in the editor.

>

I like it a lot!

>

Amnon

>

"kesh" <ksibilev@yahoo.com> wrote in message
news:b0n285$l7b$1@is.intellij.net...

ContextViewerPlugin 0.1 has been just released.
http://www.intellij.org/twiki/bin/view/Main/ContextViewerPlugin
Context Viewer provides relevant information while you are viewing and
editing your source code. The idea was stolen from Source Insight 3.5.

>

Your feedback and bug reports are weclome.

>

/kesha

>
>

>
>

>
>


0


"Amnon I. Govrin" <agovrin@freshwater.com> wrote in message
news:b0rli2$aod$1@is.intellij.net...
>

"kesh" <ksibilev@yahoo.com> wrote in message
news:b0pvqd$gc0$1@is.intellij.net...
>

"Amnon I. Govrin" <agovrin@freshwater.com> wrote in message
news:b0pr8t$9qt$1@is.intellij.net...

This is great and very useful!

>

I have the following suggestions:
1. Show (if enabled in the editor) the current scope so that it is

obvious

what's the scope of the variable/function.

>

I'm not sure what I mean by that. Can you explain a little bit more.

In the editor, there is a blue line in the left margin that shows the

scope

that the cursor is in, I'd like to see it in the context panel as well.


Unfortunately, it seems that this functionality is available only in editor.
:(

>

>

2. Enable opening the displayed file in the editor.

>

>

Added in todo list.

Cool.
>

Thanx,
/kesha



0


"Amnon I. Govrin" <agovrin@freshwater.com> wrote in message
news:b0rlo0$b53$1@is.intellij.net...
>

"kesh" <ksibilev@yahoo.com> wrote in message
news:b0pvk3$fv2$1@is.intellij.net...

1. I specifically made context panel inactive when the shortcut action

is

clicked, because I thought that the typical usage of this window would

be

to

have a quick look at the context and go on editing. If you want I can

create

another action which will do the same thing plus giving the context

panel

focus. I don't know how to call it though.

The way it is now, it is partially active, as the panel itself is active

(so

you can't type in the editor) but at the same time you can't scroll the
context panel, so why not just enable keyboard entry? What would you lose?


I've found a way to do it without any code changes. Go to the
"Options/Keymaps", then in your current keymap
open "Main menu/Window", find there "ContextViewer" and assign any keystroke
to it. It will do exactly what you want.

/kesha


0

Hehe... I thought I tried that yesterday... Well, it works, thanks a lot!

Again, great plugin.

"kesh" <ksibilev@yahoo.com> wrote in message
news:b0ron6$iai$1@is.intellij.net...
>

"Amnon I. Govrin" <agovrin@freshwater.com> wrote in message
news:b0rlo0$b53$1@is.intellij.net...
>

"kesh" <ksibilev@yahoo.com> wrote in message
news:b0pvk3$fv2$1@is.intellij.net...

1. I specifically made context panel inactive when the shortcut action

is

clicked, because I thought that the typical usage of this window would

be

to

have a quick look at the context and go on editing. If you want I can

create

another action which will do the same thing plus giving the context

panel

focus. I don't know how to call it though.

The way it is now, it is partially active, as the panel itself is active

(so

you can't type in the editor) but at the same time you can't scroll the
context panel, so why not just enable keyboard entry? What would you

lose?
>

I've found a way to do it without any code changes. Go to the
"Options/Keymaps", then in your current keymap
open "Main menu/Window", find there "ContextViewer" and assign any

keystroke

to it. It will do exactly what you want.

>

/kesha

>
>


0

It seems that for some reason this works from the 2nd time I open IntelliJ
after I installed the plugin and on. Strange.

"Amnon I. Govrin" <agovrin@freshwater.com> wrote in message
news:b0rsq2$r89$1@is.intellij.net...

Hehe... I thought I tried that yesterday... Well, it works, thanks a lot!

>

Again, great plugin.

>

"kesh" <ksibilev@yahoo.com> wrote in message
news:b0ron6$iai$1@is.intellij.net...
>

"Amnon I. Govrin" <agovrin@freshwater.com> wrote in message
news:b0rlo0$b53$1@is.intellij.net...
>

"kesh" <ksibilev@yahoo.com> wrote in message
news:b0pvk3$fv2$1@is.intellij.net...

1. I specifically made context panel inactive when the shortcut

action

is

clicked, because I thought that the typical usage of this window

would

be

to

have a quick look at the context and go on editing. If you want I

can

create

another action which will do the same thing plus giving the context

panel

focus. I don't know how to call it though.

The way it is now, it is partially active, as the panel itself is

active

(so

you can't type in the editor) but at the same time you can't scroll

the

context panel, so why not just enable keyboard entry? What would you

lose?
>

I've found a way to do it without any code changes. Go to the
"Options/Keymaps", then in your current keymap
open "Main menu/Window", find there "ContextViewer" and assign any

keystroke

to it. It will do exactly what you want.

>

/kesha

>
>

>
>


0

Please sign in to leave a comment.