IconLineMarkerRenderer questions

The current gutter is pretty crowded for the method signature line when it
is a method that both implements an interface and is overridden in derived
classes. For the test plug-in we are trying to put another small icon to
indicate whether there are tests associated to that method.
If the test icon is drawn in the default position (no v/hshift) it will be
half way in the implements icon. Apparently these 2 built-in icons do not
use the same api so I cannot move them up manually using
getAllHighlighters().
The problem comes in when the method is collapsed and only takes one line.
Even putting my icon on the next line won't help here. I might overwrite the
icons of the next method.
Is there anyway to move up the built-in icons a little?

Secondly how should I go about adding clicking behavior to one of these
icons? I want to be able to navigate to the test class when I click on the
icon.

Thanks

Jacques


14 comments

Jacques,

at the moment we're reviewing icons behavior on the gutter and
LineMarkerRenderer API will be changed. Most probably in upcoming build.
So I'd recommend you suspend your activity on this field a little.

--

Best regards,
Maxim Shafirov
JetBrains, Inc / IntelliJ Software
http://www.intellij.com
"Develop with pleasure!"


"Jacques Morel" <jacmorel@yahoo.com> wrote in message
news:b68l7f$60u$1@is.intellij.net...

The current gutter is pretty crowded for the method signature line when it
is a method that both implements an interface and is overridden in derived
classes. For the test plug-in we are trying to put another small icon to
indicate whether there are tests associated to that method.
If the test icon is drawn in the default position (no v/hshift) it will be
half way in the implements icon. Apparently these 2 built-in icons do not
use the same api so I cannot move them up manually using
getAllHighlighters().
The problem comes in when the method is collapsed and only takes one line.
Even putting my icon on the next line won't help here. I might overwrite

the

icons of the next method.
Is there anyway to move up the built-in icons a little?

>

Secondly how should I go about adding clicking behavior to one of these
icons? I want to be able to navigate to the test class when I click on the
icon.

>

Thanks

>

Jacques

>
>


0

Will the new API allows to add action on click and tool tip to gutter icons?

Thanks for the quick anwser, Maxim!

Jacques
"Maxim Shafirov" <max@intellij.net> wrote in message
news:b698sv$mu5$1@is.intellij.net...

Jacques,

>

at the moment we're reviewing icons behavior on the gutter and
LineMarkerRenderer API will be changed. Most probably in upcoming build.
So I'd recommend you suspend your activity on this field a little.

>

--

>

Best regards,
Maxim Shafirov
JetBrains, Inc / IntelliJ Software
http://www.intellij.com
"Develop with pleasure!"

>
>

"Jacques Morel" <jacmorel@yahoo.com> wrote in message
news:b68l7f$60u$1@is.intellij.net...

The current gutter is pretty crowded for the method signature line when

it

is a method that both implements an interface and is overridden in

derived

classes. For the test plug-in we are trying to put another small icon to
indicate whether there are tests associated to that method.
If the test icon is drawn in the default position (no v/hshift) it will

be

half way in the implements icon. Apparently these 2 built-in icons do

not

use the same api so I cannot move them up manually using
getAllHighlighters().
The problem comes in when the method is collapsed and only takes one

line.

Even putting my icon on the next line won't help here. I might overwrite

the

icons of the next method.
Is there anyway to move up the built-in icons a little?

>

Secondly how should I go about adding clicking behavior to one of these
icons? I want to be able to navigate to the test class when I click on

the

icon.

>

Thanks

>

Jacques

>
>

>
>


0

Will the new API allows to add action on click and tool tip to gutter

icons?
Exactly why this change have been taken mosty. Add popup menu there as well.

>

Thanks for the quick anwser, Maxim!

>

Jacques
"Maxim Shafirov" <max@intellij.net> wrote in message
news:b698sv$mu5$1@is.intellij.net...

Jacques,

>

at the moment we're reviewing icons behavior on the gutter and
LineMarkerRenderer API will be changed. Most probably in upcoming build.
So I'd recommend you suspend your activity on this field a little.

>

--

>

Best regards,
Maxim Shafirov
JetBrains, Inc / IntelliJ Software
http://www.intellij.com
"Develop with pleasure!"

>
>

"Jacques Morel" <jacmorel@yahoo.com> wrote in message
news:b68l7f$60u$1@is.intellij.net...

The current gutter is pretty crowded for the method signature line

when

it

is a method that both implements an interface and is overridden in

derived

classes. For the test plug-in we are trying to put another small icon

to

indicate whether there are tests associated to that method.
If the test icon is drawn in the default position (no v/hshift) it

will

be

half way in the implements icon. Apparently these 2 built-in icons do

not

use the same api so I cannot move them up manually using
getAllHighlighters().
The problem comes in when the method is collapsed and only takes one

line.

Even putting my icon on the next line won't help here. I might

overwrite

the

icons of the next method.
Is there anyway to move up the built-in icons a little?

>

Secondly how should I go about adding clicking behavior to one of

these

icons? I want to be able to navigate to the test class when I click on

the

icon.

>

Thanks

>

Jacques

>
>

>
>

>
>


0

Any plans to make the file icons customizable? (in the project three and
also in the
tab bar).
To allow VCS-like plugins to indicate file status.

r.

"Maxim Shafirov" <max@intellij.net> wrote in message
news:b69kq0$idi$1@is.intellij.net...

Will the new API allows to add action on click and tool tip to gutter

icons?
Exactly why this change have been taken mosty. Add popup menu there as

well.


0

Any plans to make the file icons customizable? (in the project three and
also in the
tab bar).
To allow VCS-like plugins to indicate file status.


Seems like a candidate for an SCR. No, we had no ideas like this.


0

I am not sure I understood what you said. Is there already a way to attach an action to a gutter icons like the implements/overwrites icon (I,O)?
We want to have an icon that, when clicked on, will bring up the test class in the editor.

Jacques

0

It would be great if you could use an AnAction to do that. It would make this very uniform. You could just add a new DataContext constant to give the line where the target icon was.

Jacques

0

I started a thead about the new features we need as plugin developers to integrate VCS better with IDEA:
http://www.intellij.net/forums/thread.jsp?nav=false&forum=23&thread=26260

Please post your comments

Jacques

0

It would be great if you could use an AnAction to do that. It would make

this very uniform.
Well, there will be the following class
public abstract class GutterIconRenderer {
public abstract Icon getIcon();

public ActionGroup getPopupMenuActions() {
return null;
}

public String getTooltipText() {
return null;
}

public AnAction getClickAction() {
return null;
}

public boolean isNavigateAction() {
return false;
}
}

in #810 installable to RangeHighlighter instead of LineMarker.

You could just add a new DataContext constant to give the line where the

target icon was.
I'm unsure this is necessary since you can always remember a
RangeHighlighter you've installed your GutterIconRenderer to. And
RangeHighlighter provides getStartOffset(), getEndOffset() with underlying
document changes encountered. Though seems you'd be only interested in start
offset.

--

Best regards,
Maxim Shafirov
JetBrains, Inc / IntelliJ Software
http://www.intellij.com
"Develop with pleasure!"



0

Looks like it will do what we want.
Thanks

0

Will a RangeHighlighter start and end offsets change with text insertion/deletion before/within its range?

Jacques

0

That was a very stupid question since I know already that it does. Sorry.

0

I have another idea:
What is you could associate a highlighter with a psi element? Then when the action is performed on it, it would take it as its psi.Element. This will allow to reuse the exact same actions that could be bound to the editor to a gutter icon.
In the end, especially with icons, aren't they always associated with a psi element?

Jacques

0

Please sign in to leave a comment.