• Stars
    star
    655
  • Rank 68,765 (Top 2 %)
  • Language
    Objective-C
  • Created over 10 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Xcode plugin that enables switch cases autocompletion

SCXcodeSwitchExpander

SCXcodeSwitchExpander is a small Xcode plugin that expands switch statements by inserting missing cases.

Features

  • inserts all possible switch cases

  • keeps already used cases and only inserts missing ones (even if the type changes)

  • only keeps the 'default:' case when used with the built-in Xcode snippet

  • works on ivars, properties, method parameters etc.

  • works with nested switches

  • hooks into the undo manager stack (makes it easier to fix typos)

  • fast and reliable (won't affect Xcode's performance in any signinficant way)

Screenshots

  • Replacing the default Xcode snippet DefaultSnippet

  • Inserting missing cases MissingInsertion

Known Issues

  • takes a bit for it to kick in after starting Xcode as it's waiting for the IDEIndexDidChange notification. I found that building the project usually makes that happen.

  • does not work with anonymous enums

Installation

  • Build the project and restart Xcode or ...

  • Download SCXcodeSwitchExpander.xcplugin.zip from the releases tab, unzip and move it to the Xcode plugins folder ~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/SCXcodeSwitchExpander.xcplugin and restart Xcode or ...

  • Get it through Alcatraz

  • If you encounter any issues you can uninstall it by removing the ~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/SCXcodeSwitchExpander.xcplugin folder

Contact

Any suggestions or improvements are more than welcome. Feel free to contact me at [email protected] or @stefanceriu.

License

MIT License

Copyright (c) 2014 Stefan Ceriu

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.

More Repositories

1

SCSiriWaveformView

UIView subclass that reproduces the waveform effect seen in Siri on iOS 7.
Objective-C
1,090
star
2

SCXcodeMiniMap

Sublime Text like Minimap for Xcode
Objective-C
1,026
star
3

SCStringsUtility

OS X / iOS Translations helper
Objective-C
526
star
4

SCSafariPageController

A page view controller component that reproduces Mobile Safari's tab switching behavior
Objective-C
388
star
5

SCPageViewController

Just like UIPageViewController but better.. :)
Objective-C
353
star
6

SCStackViewController

SCStackViewController is a container view controller which allows you to stack other view controllers on the top/left/bottom/right of the root and build custom transitions between them while providing correct physics and appearance calls.
Objective-C
265
star
7

SCSkypeActivityIndicatorView

Activity indicator view similar to the one seen in the Skype apps.
Objective-C
106
star
8

SCXcodeEditorInset

Xcode plugin that adds an empty (configurable) space to the end of the editor text view
Objective-C
63
star
9

SCNavigationController

SCNavigationController is an UINavigationController like container view controller and was built to provide and expose more features and control
Objective-C
46
star
10

SCXcodeTabSwitcher

Enables changing Xcode tabs using the ⌘cmd + [1..9] keys
Objective-C
42
star
11

SCScrollView

UIScrollView subclass that can use a custom easing function to animate the setting of the content offset
Objective-C
20
star
12

Xcode-Headers

Xcode headers dump
Objective-C
18
star
13

UIScrollView-ScrollerAdditions

Customising UIScrollView's scroll bars
Objective-C
17
star
14

SCDragController

SCDragController is a component meant to aid the development of drag & drop behaviors.
Objective-C
10
star
15

SCMarsRover

Simple cocoa application that provides a visual implementation to the Thoughtworks Mars Rover problem
Objective-C
1
star