Alex Hoppen
e8d148ab86
[build] Move addition of SWIFT_BUILD_SWIFT_SYNTAX preprocessor flag to top-level CMakeLists.txt
2023-12-12 12:58:15 -08:00
Alex Hoppen
c8a87f091e
[build] Only link swiftIDEUtilsBridging when SWIFT_BUILD_SWIFT_SYNTAX is set
...
https://github.com/apple/swift/pull/70174 change swift-refactor and sourcekitd to not use `NameMatcher` from swift-syntax but it did not remove the link dependency from swiftRefactoring on `swiftIDEUtilsBridging` if `SWIFT_BUILD_SWIFT_SYNTAX` is false. Do so now.
2023-12-06 09:32:47 -08:00
Alex Hoppen
a710111001
[SourceKit] Support building sourcekitd without building swift-syntax
...
This allows building sourcekitd and swift-refactor with `SWIFT_BUILD_SWIFT_SYNTAX=NO`. In these builds, the `relatedidents` and `find-syntactic-rename-ranges` requests will always return an error.
2023-12-04 19:14:01 -08:00
Alex Hoppen
d224549030
[SourceKit] Don’t use C++ to Swift interop to run NameMatcher
2023-11-20 11:30:18 -08:00
Alex Hoppen
8fd025625b
[SourceKit] Use NameMatcher that is rewritten in Swift for syntactic rename
2023-11-17 09:30:04 -08:00
Alex Hoppen
899368037c
[SourceKit] Return results from rename using return values instead of consumers
...
This makes it a lot easier to follow the code.
2023-11-16 16:05:08 -08:00
Alex Hoppen
ec267e2c08
[SourceKit] Hide RenameRangeDetailCollector as an implementation detail
...
The usage becomes a lot clearer if there’s just a top-level function that returns the details for the syntactic rename ranges.
2023-11-16 16:05:08 -08:00
Alex Hoppen
a0313e3005
[SourceKit] Merge Renamer and RenameRangeDetailCollector
...
With `TextReplacementsRenamer` gone, `RenameRangeDetailCollector` was the only remaining subclass of `Renamer`.
2023-11-16 16:05:08 -08:00
Alex Hoppen
55b3404660
[Refactoring] Move syntactic rename to its own file
2023-09-26 20:14:22 -07:00
Alex Hoppen
dd6ddde384
[Refactoring] Move some more code from RefactoringActions.h to a .cpp file
2023-09-13 12:52:02 -07:00
Alex Hoppen
755655ac00
[Refactoring] Move FindRenameRangesAnnotatingConsumer to its own file
2023-09-11 19:06:24 -07:00
Alex Hoppen
cf71a105f2
[Refactoring] Move async refactorings into their own files
2023-09-11 19:05:00 -07:00
Alex Hoppen
3074dbe5c5
[Refactoring] Move LocalRename to its own file
2023-09-11 17:14:29 -07:00
Alex Hoppen
c05c573a04
[Refactoring] Move ExpandMacro and InlineMacro to their own file
2023-09-11 17:01:58 -07:00
Alex Hoppen
10b9daf2b5
[Refactoring] Split ConvertToComputedProperty to its own file
2023-09-11 16:59:27 -07:00
Alex Hoppen
00eaf741ff
[Refactoring] Move TrailingClosure to its own file
2023-09-11 16:57:26 -07:00
Alex Hoppen
c7120f466e
[Refactoring] Move SimplifyNumberLiteral to its own file
2023-09-11 16:55:53 -07:00
Alex Hoppen
5dc7a79a57
[Refactoring] Move ConvertToDoCatch to its own file
2023-09-11 16:54:32 -07:00
Alex Hoppen
1be0c50acf
[Refactoring] Move AddExplicitCodableImplementation to its own file
2023-09-11 16:53:00 -07:00
Alex Hoppen
fdf2586600
[Refactoring] Move AddEquatableConformance to its own file
2023-09-11 16:51:10 -07:00
Alex Hoppen
a48d0f2579
[Refactoring] Move MemberwiseInitLocalRefactoring to its own file
2023-09-11 16:45:31 -07:00
Alex Hoppen
7e87813345
[Refactoring] Move LocalizeString to its own file
2023-09-11 16:43:59 -07:00
Alex Hoppen
94ab95e8c8
[Refactoring] Move ExpandSwitchCases and ExpandDefault to their own file
2023-09-11 16:42:29 -07:00
Alex Hoppen
ef4ee95e24
[Refactoring] Move FillProtocolStubs to its own file
2023-09-11 16:38:01 -07:00
Alex Hoppen
d09be617d2
[Refactoring] Move ExpandTernaryExpr to its own file
2023-09-11 16:35:16 -07:00
Alex Hoppen
563674f888
[Refactoring] Move ExtractExpr to its own file
2023-09-11 16:32:54 -07:00
Alex Hoppen
98f40197a6
[Refactoring] Move ExtractFunction to its own file
2023-09-11 16:31:09 -07:00
Alex Hoppen
d7ada702a2
[Refactoring] Extract Renamer to its own file
2023-09-11 16:24:07 -07:00
Alex Hoppen
53694024fc
[Refactoring] Move ConvertIfLetExprToGuardExpr to its own file
2023-09-11 16:04:24 -07:00
Alex Hoppen
308270c1c5
[Refactoring] Move ConvertGuardExprToIfLetExpr to its own file
2023-09-11 16:02:45 -07:00
Alex Hoppen
fc3f7a0629
[Refactoring] Move ConvertToTernaryExpr to its own file
2023-09-11 16:01:01 -07:00
Alex Hoppen
a45cd0305d
[Refactoring] Move ExtractRepeatedExpr and ConvertToSwitchStmt to its own file
2023-09-11 15:59:04 -07:00
Alex Hoppen
da69dc566b
[Refactoring] Move MoveMembersToExtension to a separate file
2023-09-11 15:30:10 -07:00
Alex Hoppen
514d20a665
[Refactoring] Move ReplaceBodiesWithFatalError to separate file
2023-09-11 15:27:35 -07:00
Alex Hoppen
ec71836b17
[Refactoring] Extract CollapseNestedIfStmt to its own file
2023-09-11 15:25:01 -07:00
Alex Hoppen
6b2e54dc54
Extract RefactoringActionConvertStringsConcatenationToInterpolation to its own file
2023-09-11 15:21:28 -07:00
Rintaro Ishizaki
45828af5ed
[Refactoring] Separate refactoring files to its own library
...
IDE/Refactoring had dependencies to libswiftIndex, but libswiftIndex
also depends on libswiftIDE (SourceEntityWalker, etc.)
To break libswiftIndex <-> libswiftIDE dependency cycle, move
"refactoring" related files to a new library 'libswiftRefactoring'
rdar://101692282
2022-11-02 12:39:26 -07:00