Feature/plug existing refactoring actions to quickfix proposals #86

Merged
merged 5 commits into from Apr 6, 2012

Conversation

Projects
None yet
4 participants
@dankilman
Contributor

dankilman commented Apr 4, 2012

This pull request includes the following refactoring actions: extract method, inline local, extract local and rename
and makes them available using quickfix (CTRL+1).
It does some checking before inserting each proposal to verify that only valid refactoring options are presented.

@tonit

This comment has been minimized.

Show comment
Hide comment
@tonit

tonit Apr 5, 2012

Cool! Much appreciated addition!

tonit commented Apr 5, 2012

Cool! Much appreciated addition!

@dragos

This comment has been minimized.

Show comment
Hide comment
@dragos

dragos Apr 5, 2012

Member

Looks great!

Member

dragos commented Apr 5, 2012

Looks great!

@misto

View changes

...ide.sdt.core/src/scala/tools/eclipse/quickfix/ExtractLocalProposal.scala
+
+object ExtractLocalProposal
+ extends ProposalRefactoringActionAdapter(
+ new ExtractLocalAction, 100, "Extract to local value")

This comment has been minimized.

@misto

misto Apr 5, 2012

Member

Why not put that 100 into the ProposalRefactoringActionAdapter as the default value for the relevance?

@misto

misto Apr 5, 2012

Member

Why not put that 100 into the ProposalRefactoringActionAdapter as the default value for the relevance?

This comment has been minimized.

@dankilman

dankilman Apr 5, 2012

Contributor

good idea.

@dankilman

dankilman Apr 5, 2012

Contributor

good idea.

@misto

View changes

.../src/scala/tools/eclipse/quickfix/ProposalRefactoringActionAdapter.scala
+import scala.tools.eclipse.logging.HasLogger
+
+abstract class ProposalRefactoringActionAdapter(
+ val action: ActionAdapter,

This comment has been minimized.

@misto

misto Apr 5, 2012

Member

Is is necessary that action has a getter?

@misto

misto Apr 5, 2012

Member

Is is necessary that action has a getter?

This comment has been minimized.

@dankilman

dankilman Apr 5, 2012

Contributor

no, initially I though each subclass would implement the isValidProposal differently and forget to remove this.

@dankilman

dankilman Apr 5, 2012

Contributor

no, initially I though each subclass would implement the isValidProposal differently and forget to remove this.

@dankilman

This comment has been minimized.

Show comment
Hide comment
@dankilman

dankilman Apr 5, 2012

Contributor

I signed the CLA, so feel free to merge :)

Contributor

dankilman commented Apr 5, 2012

I signed the CLA, so feel free to merge :)

dragos added a commit that referenced this pull request Apr 6, 2012

Merge pull request #86 from dankilman/master
Feature/plug existing refactoring actions to quickfix proposals

@dragos dragos merged commit ef0c9d0 into scala-ide:master Apr 6, 2012

@dragos

This comment has been minimized.

Show comment
Hide comment
@dragos

dragos Apr 6, 2012

Member

Thank you!

Member

dragos commented Apr 6, 2012

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment