mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
* [IDE] Refactoring: conversion from “force try” do error handled version * Removed unnecessary empty line * Changed name of the refactor * Review fixes * Fixed recognizing try_! location by CursorResolver * Review fixes
56 lines
2.0 KiB
Modula-2
56 lines
2.0 KiB
Modula-2
#ifndef REFACTORING
|
|
#define REFACTORING(KIND, NAME, ID)
|
|
#endif
|
|
|
|
#ifndef SEMANTIC_REFACTORING
|
|
#define SEMANTIC_REFACTORING(KIND, NAME, ID) REFACTORING(KIND, NAME, ID)
|
|
#endif
|
|
|
|
#ifndef RANGE_REFACTORING
|
|
#define RANGE_REFACTORING(KIND, NAME, ID) SEMANTIC_REFACTORING(KIND, NAME, ID)
|
|
#endif
|
|
|
|
#ifndef CURSOR_REFACTORING
|
|
#define CURSOR_REFACTORING(KIND, NAME, ID) SEMANTIC_REFACTORING(KIND, NAME, ID)
|
|
#endif
|
|
|
|
/// Rename and categorise the symbol occurrences at provided locations
|
|
/// (syntactically).
|
|
REFACTORING(GlobalRename, "Global Rename", rename.global)
|
|
|
|
/// Categorize source ranges for symbol occurrences at provided locations
|
|
/// (syntactically).
|
|
REFACTORING(FindGlobalRenameRanges, "Find Global Rename Ranges", rename.global.find-ranges)
|
|
|
|
/// Find and categorize all occurences of the file-local symbol at a given
|
|
/// location.
|
|
REFACTORING(FindLocalRenameRanges, "Find Local Rename Ranges", rename.local.find-ranges)
|
|
|
|
/// Find and rename all occurences of the file-local symbol at a given
|
|
/// location.
|
|
CURSOR_REFACTORING(LocalRename, "Local Rename", rename.local)
|
|
|
|
CURSOR_REFACTORING(FillProtocolStub, "Add Missing Protocol Requirements", fillstub)
|
|
|
|
CURSOR_REFACTORING(ExpandDefault, "Expand Default", expand.default)
|
|
|
|
CURSOR_REFACTORING(LocalizeString, "Localize String", localize.string)
|
|
|
|
CURSOR_REFACTORING(SimplifyNumberLiteral, "Simplify Long Number Literal", simplify.long.number.literal)
|
|
|
|
CURSOR_REFACTORING(CollapseNestedIfExpr, "Collapse Nested If Expression", collapse.nested.if.expr)
|
|
|
|
CURSOR_REFACTORING(ConvertToDoCatch, "Convert To Do/Catch", convert.do.catch)
|
|
|
|
RANGE_REFACTORING(ExtractExpr, "Extract Expression", extract.expr)
|
|
|
|
RANGE_REFACTORING(ExtractFunction, "Extract Method", extract.function)
|
|
|
|
RANGE_REFACTORING(ExtractRepeatedExpr, "Extract Repeated Expression", extract.expr.repeated)
|
|
|
|
RANGE_REFACTORING(ConvertStringsConcatenationToInterpolation, "Convert to String Interpolation", convert.string-concatenation.interpolation)
|
|
#undef CURSOR_REFACTORING
|
|
#undef RANGE_REFACTORING
|
|
#undef SEMANTIC_REFACTORING
|
|
#undef REFACTORING
|