ReplaceFullyQualifiedNameWithImportIntention

Hello Dave Griffith, Bas Leijdekkers and all,

I would like to enhance the functionality of ReplaceFullyQualifiedNameWithImportIntention, currently this intention:
- is replacing the FullyQualifiedName only to the current element, if i have more elements, like the sample below it will replace only the selected one, i would like to replace them all.
- is adding an import even if the class that we refactor is in the same package.
- on expressions like this: org.intellij.idea.plugin.removeFQN.Test.foo() the intention is not working;
- if we try to apply the intention to an element that is in the same class as the element, like the sample below, it will not work :(
Ex:

package org.intellij.idea.plugin.removeFQN;

import java.lang.*;

public class Test {
static org.intellij.idea.plugin.removeFQN.Test test;

public static void main(String[] args) {
String a ="org.intellij.idea.plugin.removeFQN.Test";
org.intellij.idea.plugin.removeFQN.Test t;
org.intellij.idea.plugin.removeFQN.Test.foo();
org.intellij.idea.plugin.removeFQN.Test.test.foo();
org.intellij.idea.plugin.removeFQN.Test.test.test1.foo();
org.intellij.idea.plugin.removeFQN.Test.test.test1.test2.foo();
}
public static org.intellij.idea.plugin.removeFQN.Test foo(){
return null;
}
}

- If we try to refactor any line from this sample, it will not work.

I have a plugin that handles the above issues, i didn't know about this intention :( and I was planning to win the contest :) with this plugin, or at least to get a t-shirt :), but now that i found that this is partially implemented in idea, i would like to integrate my work with this intention, maybe I will get a t-shirt :)
So I would like Dave Griffith, Bas Leijdekkers or somebody else, that is working on this intention, to comment on this, and if you think that my work should be integrated in this intention please tell me how can i submit this?

Thanks,
Dan

Ps. For somebody from JetBrains, please read this and answer to this question: will I qualify to a t-shirt at least :)) or do I need to start a new plugin :)?.

3 comments

Hello again,
Can somebody help me resolve this?
Thanks,
Dan

0

What's the problem? If you have a plugin, just upload it and cross your fingers.
Here are judging criterias http://plugins.intellij.net/contest/criteria/ . You think you pass them, go on, be a tiger.
Another option is to write email to Alex Tkachman with the title: "Give me please that bloody t-shirt" :)

0

What's the problem? If you have a plugin, just upload
it and cross your fingers.
Here are judging criterias
http://plugins.intellij.net/contest/criteria/ . You
think you pass them, go on, be a tiger.
Another option is to write email to Alex Tkachman
with the title: "Give me please that bloody t-shirt"
:)


Thank you for your suggestion. Maybe I will submit this.
I know that this is already in idea, and i come only with some improvements, and my questions was something like this, should i submit a plugin for this and then we will have two inspections for the same thing one better then other :), or i need to give the code to someone from jetbrains or to this inspection author to include this also in his plugin.
Thanks,
Dan

0

Please sign in to leave a comment.