History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEADEV-10476
Type: New Feature New Feature
Status: Open Open
Priority: Critical Critical
Assignee: Dmitry Jemerov
Reporter: Sascha Weinreuter
Votes: 2
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
IDEA: Development

Language API: Add more refactoring support

Created: 21 Jul 06 21:01   Updated: 05 Aug 08 18:44
Component/s: Plugin Support. API
Fix Version/s: Diana Final

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown

Build: 5,557
Severity: Medium


 Description  « Hide
Please extend com.intellij.lang.refactoring.RefactoringSupportProvider to also support "Inline", "Introduce Parameter|Field|Constant" and maybe even "Extract Method". Those refactorings are common to a lot of languages and deserve to be present there to enable a language to re-use the standard actions in a more elegant way.

To be really useful, this depends on IDEA-8359



 All   Comments   Work Log   Change History      Sort Order:
Sascha Weinreuter - 12 Aug 06 14:33
Eugene, do you think this will make it into the final 6.0 release?

Eugene Vigdorchik - 12 Aug 06 16:02
Sascha,
We don't have time to add any additional refactorings before 6.0. As for making "dangling" API, I don't think it is a good idea.

Sascha Weinreuter - 12 Aug 06 16:52
It's not about adding additional refactorings. It's about to make the well-known refactorings and their shortcuts available to custom languages, i.e. to make this simple (though it would break API compatibility) extension to RefactoringSupportProvider and re-wire the current implementations to make use of it:
public interface RefactoringSupportProvider {
  ...

  @Nullable RefactoringActionHandler getInlineHandler();

  @Nullable RefactoringActionHandler getExtractParameterHandler();

  ...
}

Since at least InlineHandler and ExtractParameterHandler already implement RefactoringActionHandler, I suppose this would be a rather simple thing to do.

And it would make the API much more consistent, because just having support for "Introduce Variable" because it's implemented by the JS plugin looks pretty much half-baked - even if you consider it 'dangling' when there's no other (OpenAPI) implementation for those refactorings around.

While I can live with just hooking those actions like I used to, I would have welcomed a proper way, but it's OK. Anyway, thanks for your fast response.


Dave Griffith - 12 Aug 06 17:13
I would also find this very useful.

Sascha Weinreuter - 05 Aug 08 18:44
Except for Introduce Parameter this is obsolete.