Giter Site home page Giter Site logo

xianjun-ios / xcoderefactoringplus Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kinwahlai/xcoderefactoringplus

1.0 2.0 0.0 5.68 MB

Xcode Refactoring extention

Ruby 0.01% Objective-C 99.96% C 0.01% Objective-C++ 0.01% Swift 0.01% Shell 0.02%

xcoderefactoringplus's Introduction

Xcode Refactoring Plus

Build Status

I miss the refactoring function in eclipse so i create this plugin to extend the current refactoring function of xcode to functionality like move line, delete line, duplicate line.

####Delete Line (cmd+D) Delete the line or current selected lines.

####Duplicate Line (alt+cmd+down) Duplicate the line or current selected lines.

####Move Line (alt+down | alt+up) Move the line or current selected lines

####Extract Local Variable (alt+cmd+l) Extract the inline code into local variable within the method

NOTES: I choose to use placeholder token as solution is to avoid doing any UI implementation for now.

-(void) bar {
    **type** **variable** = NSMakeRange(10, 10);
    [self acceptARange:**variable**];
}

You will need to update the placeholder token manually.

Installation

####Option 1

  • clone this repo
  • build the plugin and it should install at the right directory

####Option 2

  • install from alcatraz
  • restart xcode

Update keybinding:

If you cannot use the keystroke, please resolve conflict keybinding in System Preferences -> Keyboard -> Shortcuts -> App Shortcuts #####Alternative: You can download my keybinding file XcodeRefactoringPlus.idekeybindings and then put it at ~/Library/Developer/Xcode/UserData/KeyBindings/XcodeRefactoringPlus.idekeybindings

What to do if Xcode 6.4 doesn't load the plugin

Apple change the non-Apple plugin handling since Xcode 6.4. Now Xcode will ask you if you want to load the bundle (for once) on startup. However, there are times we accidentally click Skip Bundles, then what should we do?

Don't panic. You can reset the storage of your choice (Load bundle/skip bundles) with this command.


defaults delete com.apple.dt.Xcode DVTPlugInManagerNonApplePlugIns-Xcode-6.4

Restart Xcode and it will should you the prompt again.


License

// Copyright (c) 2014 KinWah
//
// 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.

xcoderefactoringplus's People

Contributors

kinwahlai avatar nachosoto avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.