CamouflagePlugin Plugin intention problem

I am seeing the camo "hide" standard intentions. Specifically, consider:

...
private String foo = null;
...

The assignment to null is redundent. Idea shows the yellow marker in the
right gutter. I go the code, put the cursor within 'null' and hit
alt-enter. The intentions displayed are only the camo intentions. I move
the cursor down one line then back and hit alt-enter again. Now the
intention to remove the redundent cast is shown.


8 comments

It seems that even camo adds a new intention after moving down/up. (At
first it shows just two. Then it shows three, along with idea default
for removing the assignment.)

Barry Kaplan wrote:

I am seeing the camo "hide" standard intentions. Specifically, consider:

...
private String foo = null;
...

The assignment to null is redundent. Idea shows the yellow marker in the
right gutter. I go the code, put the cursor within 'null' and hit
alt-enter. The intentions displayed are only the camo intentions. I move
the cursor down one line then back and hit alt-enter again. Now the
intention to remove the redundent cast is shown.


0

I've had this with the IntentionPowerPack/InspectionGadgets plugin too.
When it happens I don't move the cursor; pressing escape then
alt-enter seems to help. I think it might be an IDEA issue rather than a
plugin one.

N.

Barry Kaplan wrote:

It seems that even camo adds a new intention after moving down/up. (At
first it shows just two. Then it shows three, along with idea default
for removing the assignment.)

Barry Kaplan wrote:

>> I am seeing the camo "hide" standard intentions. Specifically, consider:
>>
>> ...
>> private String foo = null;
>> ...
>>
>> The assignment to null is redundent. Idea shows the yellow marker in
>> the right gutter. I go the code, put the cursor within 'null' and hit
>> alt-enter. The intentions displayed are only the camo intentions. I
>> move the cursor down one line then back and hit alt-enter again. Now
>> the intention to remove the redundent cast is shown.
>>


0

Nathan Brown wrote:

I think it might be an IDEA issue rather than a plugin one.



I think it is so.
We, poor plugin-developers, have no control at all on the intentions
displaying (no sort, no priority).

Alain




0

Would one of you plugin developers submit the issue? -- you could
probably provider more useful details tnat I.

Alain Ravet wrote:

Nathan Brown wrote:

>> I think it might be an IDEA issue rather than a plugin one.



I think it is so.
We, poor plugin-developers, have no control at all on the intentions
displaying (no sort, no priority).

Alain




0

Barry Kaplan wrote:

Would one of you plugin developers submit the issue? -- you could
probably provider more useful details tnat I.



If you can reproduce it, that's more than enough to post in the tracker.

Alain

0

Yea, its just so often when I do, I get the response "this is in a
plugin". And since I don't know how the plugins hook into intentions I
won't be able to show the code (which I would think jetbrains would want
to see).

But if you think its better for me to submit, of course I will.


Alain Ravet wrote:

Barry Kaplan wrote:

>> Would one of you plugin developers submit the issue? -- you could
>> probably provider more useful details tnat I.



If you can reproduce it, that's more than enough to post in the tracker.

Alain


0

Barry Kaplan wrote:

.. since I don't know how the plugins hook into intentions




When the caret rests, IDEA asks every intention
"are you available here and now"
Each intention - usually - examines the code around the caret and
replies "true" or "false". If it's "true", IDEA will add it in the
popup-list of available intentions.
That's all. As you can see, nothing fancy, and no way - that I know of -
to mess up with other intentions.

Alain

0

Thanks Alian. Submitted as 20556
(http://www.intellij.net/tracker/idea/viewSCR?publicId=20556)

Alain Ravet wrote:

Barry Kaplan wrote:

>> .. since I don't know how the plugins hook into intentions




When the caret rests, IDEA asks every intention
"are you available here and now"
Each intention - usually - examines the code around the caret and
replies "true" or "false". If it's "true", IDEA will add it in the
popup-list of available intentions.
That's all. As you can see, nothing fancy, and no way - that I know of -
to mess up with other intentions.

Alain


0

Please sign in to leave a comment.