Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Xcode plugin that enables switch cases autocompletion

NotificationsYou must be signed in to change notification settings

stefanceriu/SCXcodeSwitchExpander

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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 snippetDefaultSnippet

  • Inserting missing casesMissingInsertion

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 throughAlcatraz

  • 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 atstefan.ceriu@gmail.com or@stefanceriu.

License

MIT License

Copyright (c) 2014 Stefan CeriuPermission is hereby granted, free of charge, to any person obtaining a copy ofthis software and associated documentation files (the "Software"), to deal inthe Software without restriction, including without limitation the rights to use,copy, modify, merge, publish, distribute, sublicense, and/or sell copies of theSoftware, 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 allcopies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESSFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS ORCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHERIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR INCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

Xcode plugin that enables switch cases autocompletion

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors8


[8]ページ先頭

©2009-2025 Movatter.jp