All Projects → johnno1962 → Refactorator

johnno1962 / Refactorator

Licence: mit
Xcode Plugin that Refactors Swift & Objective-C

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Refactorator

Pragmatic
⚙An Xcode Source Editor extension for simplifying common pragma driven tasks
Stars: ✭ 24 (-97.58%)
Mutual labels:  xcode-plugin
Xcode Wakatime
Xcode plugin for automatic time tracking and metrics generated from your programming activity.
Stars: ✭ 360 (-63.75%)
Mutual labels:  xcode-plugin
Peckham
Add #import-s from anywhere in the code.
Stars: ✭ 719 (-27.59%)
Mutual labels:  xcode-plugin
AMLocalizedStringBuilder-Xcode-Plugin
AMLocalizedStringBuilder is the localized string helper which help you build your "Localizable.strings" file to class with shortcut ctrl+f.
Stars: ✭ 29 (-97.08%)
Mutual labels:  xcode-plugin
Clangformat Xcode
Xcode plug-in to to use clang-format from in Xcode and consistently format your code with Clang
Stars: ✭ 2,852 (+187.21%)
Mutual labels:  xcode-plugin
Xprobeplugin
Live Memory Browser for Apps & Xcode
Stars: ✭ 382 (-61.53%)
Mutual labels:  xcode-plugin
Showingithub
Xcode plugin to open the GitHub page of the commit of the currently selected line in the editor window.
Stars: ✭ 243 (-75.53%)
Mutual labels:  xcode-plugin
Import
Xcode extension for adding imports from anywhere in the code ☝️
Stars: ✭ 818 (-17.62%)
Mutual labels:  xcode-plugin
Xalign
An amazing Xcode Source Editor extension to align regular code. It can align Xnything in any way you want.
Stars: ✭ 2,898 (+191.84%)
Mutual labels:  xcode-plugin
Scxcodeswitchexpander
Xcode plugin that enables switch cases autocompletion
Stars: ✭ 662 (-33.33%)
Mutual labels:  xcode-plugin
AMEGetterMaker
A lazyload getter maker without resign for Xcode
Stars: ✭ 42 (-95.77%)
Mutual labels:  xcode-plugin
Dxxcodeconsoleunicodeplugin
转换Xcode控制台中一些不可阅读的字符,比如 \u22AD 这种
Stars: ✭ 268 (-73.01%)
Mutual labels:  xcode-plugin
Swiftai
SwiftAI, write Swift code smart. SwiftAI can generate Model class from JSON now. Codable and HandyJSON is supported. More features will be add.
Stars: ✭ 470 (-52.67%)
Mutual labels:  xcode-plugin
ViewGenerator
⚒ ViewGenerator generates view code from variable name automatically in iOS development
Stars: ✭ 75 (-92.45%)
Mutual labels:  xcode-plugin
Remote
Control your iPhone from inside Xcode for end-to-end testing.
Stars: ✭ 732 (-26.28%)
Mutual labels:  xcode-plugin
TrickerX
An Xcode9+ Extension which make CodingKeys automatically.
Stars: ✭ 90 (-90.94%)
Mutual labels:  xcode-plugin
Tulsi
An Xcode Project Generator For Bazel
Stars: ✭ 365 (-63.24%)
Mutual labels:  xcode-plugin
Gitdiff
Highlights deltas against git repo in Xcode
Stars: ✭ 906 (-8.76%)
Mutual labels:  xcode-plugin
Injectionforxcode
Runtime Code Injection for Objective-C & Swift
Stars: ✭ 6,474 (+551.96%)
Mutual labels:  xcode-plugin
Swiftmockgeneratorforxcode
An Xcode extension (plugin) to generate Swift test doubles automatically.
Stars: ✭ 522 (-47.43%)
Mutual labels:  xcode-plugin

Refactorator Xcode Plugin

Due to changes in the index database with Xcode 10 this plugin no longer works.

Refactorator is an Xcode plugin for refactoring Swift & now Objective-C code. It will rename public or internal vars, functions, enums etc. For private and local entities use Xcode's existing "Edit All in Scope" functionality.

Stop Press: Refactorator no longer uses SourceKit directly, rather it accesses the SQLite database Xcode compiles using SourceKit. This makes it both faster as it no longer needs to re-index the sources of your project but also means all targets of a project are included in refactoring including code written in Objectve-C.

An improved version of Refactorator is now available as a standalone App avilable here

Icon

To use, download the source for this project and build to install the plugin then restart Xcode. Not used a Plugin before? Use Alcatraz Package Manager to install it. Select a symbol in a Swift source and use "Right-click/Refactor/Swift !" to list places in the target that declare or refer to that symbol. Enter a new value for the identifier in the bottom textfield and press the "Preview" button to view the changes that would be made. Press the "Save" button to save these changes to disk. Use the "Undo" button to revert the changes if need be.

As a by-product of the analysis performed for refactoring, if you have Graphviz installed, you can view an approximate visualisation of the classes in your project and their interrelationships using the "Edit/Refactor/Visualise !" menu item. Initialiser calls are coloured green, ivar references blue, and method calls red:

Icon

Refactorator was originally suggested as being feasible by @Daniel1of1 shortly after Swift came out building on the work by @jpsim on SourceKitten. The last piece of the puzzle was the Open Sourcing of the SourceKit API by Apple as a part of Swift. Source files are parsed using data from the same XPC calls that Xcode uses when it indexes a project and implemented in a daemon process so as not to affect the stability of Xcode. Invaluable in underdstanding the index database was DB Browser for SQLite and the SQLite Swift code was helped along by reference to the excellent SQLite.swift.

MIT License

Copyright (C) 2015 John Holdsworth

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

This source includes a header file "sourcekit.h" from Apple's Swift distribution under Apache License v2.0

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].