Skip to content

ExtractMethod -- Always extract something, even if advanced techniques cannot be applied #283

@dpoeschl

Description

@dpoeschl

Ported from TFS WorkItem: 1097177


Repro Steps:

Affected Branch:
Affected Build:
Affected Product Language:

Steps to reproduce:

Today, lots of attempts to extract method can fail for difficult-to-determine reasons, but often users would be okay with something happening, even if it's not a perfect experience.

 

If the selection is perfectly extractable without errors, then the user would have the same experience.

 

If the selection contains code that we would not extract today, then we could include the error messages in our summary text in the preview pane (e.g. "The resulting code may contain errors because not all code paths return."), but still offer to do a best-effort refactoring.

 

This avoids the user needing to manually do the extraction whenever something fails (the reason for which can be difficult to discover), and also prevents general annoyance at the partial availability of the feature.


Revisions:

  1. Created By David Poeschl (12/16/2014 2:02:18 PM)

  1. Edited By Kevin Pilch-Bisson (12/17/2014 9:45:39 AM)

We were discussing this at lunch yesterday.  David and Dustin have some ideas here if you need more clarification, but we think this would be an improvement.


Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions