Posts Tagged ‘Renaming’

How to implement the Sync Edit feature from Delphi IDE inside Visual Studio IDE using DXCore

June 22nd, 2011 Comments off

According to the Embarcadero’s docwiki:

Sync Edit mode in Delphi allows you to change all occurrences of an identifier when you change one instance of that identifier. When you enter Sync Edit mode, you can tab to each highlighted identifier in your current Code Editor window.

The difference of the Sync Edit feature in Delphi from the usual Rename refactoring from Refactor! (for example) is that a declaration of an identifier may not exist. In this case the Rename is simple not available.

Read more…

DXCore Services – Searchers

June 19th, 2011 Comments off

The Searchers DXCore service provides access to the extension points (also known as Search Providers) to the Rename refactoring and Coderush Navigation features such as Tab to Next Reference.

Read more…

How to perform an existing refactoring from another one

December 25th, 2010 12 comments

Refactor! Pro has numerous refactorings which perform a single task. What if we could run several refactorings at once?

For example, there is a support for optimizing namespace references added to the Move Type to File refactoring: after the new file is created, the Optimize Namespace References refactoring does its job. Here are other examples of refactoring (code provider) combinations, which can be performed:

  • Introduce Local and Promote to Parameter will create a new refactoring, called something like “Introduce Parameter”.
  • Declare Class (Struct) and Declare Method (Property) will create a new multi-declare code provider, which will declare everything at once.
  • Introduce Parameter Object and Move Type to File will add a new option for the first refactoring to create a new file.
  • And so much more…

Read more…

Refactorings – Rename

December 25th, 2010 Comments off

This refactoring provides an easy way to rename identifiers for code symbols such as locals, type members, types or namespaces and updating all their references.

Rename is one of the most useful refactorings of all. The developer can alter the name of the declaration and its occurrences (references) in the code in the whole solution.

Simply put the caret on the identifier and apply the refactoring. The refactoring will wrap all references and name of the declaration into linked identifiers, that help you easily change all occurrences simultaneously. The preview hint in Rename will show visible references in the code editor. Press Enter when you are done changing the name of the identifier to commit your changes.

Read more…

DXCore Linked Identifiers feature

December 25th, 2010 Comments off

Linked Identifiers are a built-in feature of DXCore, which allows you to simultaneously change similar pieces of the text (code) located in different places. If you change one linked identifier, the others that are associated with it will automatically be changed as well. For instance, linked identifiers are enabled when you apply the Rename refactoring.

DXCore Linked identifiers preview

Read more…