Is refactoring open API available?

I am wondering. If not, maybe it's good idea to open it.
Many programmers would surely develop new useful refactorings in addition to
existing ones.


6 comments
Comment actions Permalink

Hello!
That purpose of refactoring API?

As i know the PSI interface is allow to ged structure of classes...

Thanks!

--
Alexey Efimov, Software Engineer
Sputnik Labs,
http://www.spklabs.com
"Michal Szklanowski" <szklanowski@acn.waw.pl> wrote in message
news:bj31t2$d2f$1@is.intellij.net...

I am wondering. If not, maybe it's good idea to open it.
Many programmers would surely develop new useful refactorings in addition

to

existing ones.

>
>


0
Comment actions Permalink

As i know the PSI interface is allow to ged structure of classes...

>
So why people are creating refactoring plugins?
I think this is because of absence of knowledge about PSI API.
If we have well-documented open API, more people will start to
think about these type of plugins.


Thanks!

>

--
Alexey Efimov, Software Engineer
Sputnik Labs,
http://www.spklabs.com
"Michal Szklanowski" <szklanowski@acn.waw.pl> wrote in message
news:bj31t2$d2f$1@is.intellij.net...

I am wondering. If not, maybe it's good idea to open it.
Many programmers would surely develop new useful refactorings in

addition

to

existing ones.

>
>

>
>


0
Comment actions Permalink

Maybe it not needed? :)

--
Alexey Efimov, Software Engineer
Sputnik Labs,
http://www.spklabs.com
"Michal Szklanowski" <mszklano@wp.pl> wrote in message
news:bj44vj$lv8$1@is.intellij.net...

As i know the PSI interface is allow to ged structure of classes...

>
So why people are creating refactoring plugins?
I think this is because of absence of knowledge about PSI API.
If we have well-documented open API, more people will start to
think about these type of plugins.

>
>
>

Thanks!

>

--
Alexey Efimov, Software Engineer
Sputnik Labs,
http://www.spklabs.com
"Michal Szklanowski" <szklanowski@acn.waw.pl> wrote in message
news:bj31t2$d2f$1@is.intellij.net...

I am wondering. If not, maybe it's good idea to open it.
Many programmers would surely develop new useful refactorings in

addition

to

existing ones.

>
>

>
>

>
>


0
Comment actions Permalink

what do you mean "not needed"?
That there is no PSI API documentation needed
or that there are no additional refactorings needed?

Regarding docs: well I still had no time to look at it,
but theoretically when you look at the available IntentionPlugin, this could be enough.

Regarding additional refactorings: well, maybe YOU
do not need any more, but I personally very often
can think about extensions.
One example, though not really a new refactoring:
If I have not missed something, you currently cannot
apply certain refactorings only once each time,
e.g. I wanted to move 5 or 6 inner classes, all
contained in same class, to upper level.
this can only be done one by one.

Why not enhance it, so that you select all 6
inner classes from structure view, right click
and move them all to upper level at once?
Sure you have to provide names for all of them,
but, on the other hand, why not present a dialog
where you quickly can accept or change the existing
names?

This is just one tiny example,
but things like this could be done by plugins
developers ;)

I think opening the API is not just a "kind move"
from Jetbrains, like "the gods provide access
to the inner sanctum to mortable humans" ;)
but it is a vital step for success!
and the more possibilities the API provices,
the more success for IDEA is granted, IMHO.

I think you can compare the open API to
a level editor for ego shooters. which ego shooters
are most successful? do they have good level editors?

cheers,
Michael

0
Comment actions Permalink


Mostly that's the case, although there are exceptions. IDEA does cover all but two of automatable refactorings that I would use on a day-to-day basis, and (with existing plugins), all but a handful that I would use more than twice a year. The two major missing ones: making "Move" working on instance methods and fields and a generic "Split Class", are so difficult that even I'm not foolhardy enough to do them as a plugin. The minor stuff (things like "Remove static inheritance", "Inline tail recursion to iteration", and "Change variable type") are simply not worth the effort to code as a plugin.

--Dave Griffith

0
Comment actions Permalink

I just can't image such function of refactoring. Refactoring as core code - is some actions performed with code to get result code. Refactorings based on PSI class parsing and then more different operation...
So, can you give example of some refactoring API?

I mean that such API can be "used" for development, each developer must doing hisself realization of refactoring, i guess.

Thanks!

0

Please sign in to leave a comment.