├── ITModelPlugin.app.zip ├── ITModelPlugin.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcshareddata │ │ └── IDEWorkspaceChecks.plist │ └── xcuserdata │ │ └── edz.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── xcuserdata │ └── edz.xcuserdatad │ └── xcschemes │ ├── ITModel.xcscheme │ ├── ITModelPlugin.xcscheme │ └── xcschememanagement.plist ├── ITModelPlugin ├── AppDelegate.h ├── AppDelegate.m ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── Contents.json ├── Base.lproj │ └── MainMenu.xib ├── ITModelPlugin.entitlements ├── Info.plist ├── SourceEditorCommand.h ├── SourceEditorCommand.m ├── SourceEditorExtension.h ├── SourceEditorExtension.m └── main.m ├── Image ├── enable.png ├── hotkey.png └── use.gif ├── LICENSE ├── README.md └── ScreenHost.png /ITModelPlugin.app.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/witchan/ITModelPlugin/d9934480ada2c794a5c0a0cea4d4f6d374d5831e/ITModelPlugin.app.zip -------------------------------------------------------------------------------- /ITModelPlugin.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 0080DE39213A715200F74D8A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 0080DE38213A715200F74D8A /* AppDelegate.m */; }; 11 | 0080DE3B213A715200F74D8A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 0080DE3A213A715200F74D8A /* Assets.xcassets */; }; 12 | 0080DE3E213A715200F74D8A /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 0080DE3C213A715200F74D8A /* MainMenu.xib */; }; 13 | 0080DE41213A715300F74D8A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 0080DE40213A715300F74D8A /* main.m */; }; 14 | 0080DE4F213A717100F74D8A /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0080DE4E213A717100F74D8A /* Cocoa.framework */; }; 15 | 0080DE53213A717100F74D8A /* SourceEditorExtension.m in Sources */ = {isa = PBXBuildFile; fileRef = 0080DE52213A717100F74D8A /* SourceEditorExtension.m */; }; 16 | 0080DE56213A717100F74D8A /* SourceEditorCommand.m in Sources */ = {isa = PBXBuildFile; fileRef = 0080DE55213A717100F74D8A /* SourceEditorCommand.m */; }; 17 | 0080DE5B213A717100F74D8A /* ITModelPlugin.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 0080DE4C213A717100F74D8A /* ITModelPlugin.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 18 | /* End PBXBuildFile section */ 19 | 20 | /* Begin PBXContainerItemProxy section */ 21 | 0080DE59213A717100F74D8A /* PBXContainerItemProxy */ = { 22 | isa = PBXContainerItemProxy; 23 | containerPortal = 0080DE2C213A715200F74D8A /* Project object */; 24 | proxyType = 1; 25 | remoteGlobalIDString = 0080DE4B213A717100F74D8A; 26 | remoteInfo = ITModelPlugin; 27 | }; 28 | /* End PBXContainerItemProxy section */ 29 | 30 | /* Begin PBXCopyFilesBuildPhase section */ 31 | 0080DE5F213A717100F74D8A /* Embed App Extensions */ = { 32 | isa = PBXCopyFilesBuildPhase; 33 | buildActionMask = 2147483647; 34 | dstPath = ""; 35 | dstSubfolderSpec = 13; 36 | files = ( 37 | 0080DE5B213A717100F74D8A /* ITModelPlugin.appex in Embed App Extensions */, 38 | ); 39 | name = "Embed App Extensions"; 40 | runOnlyForDeploymentPostprocessing = 0; 41 | }; 42 | /* End PBXCopyFilesBuildPhase section */ 43 | 44 | /* Begin PBXFileReference section */ 45 | 0080DE34213A715200F74D8A /* ITModel.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ITModel.app; sourceTree = BUILT_PRODUCTS_DIR; }; 46 | 0080DE37213A715200F74D8A /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 47 | 0080DE38213A715200F74D8A /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 48 | 0080DE3A213A715200F74D8A /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 49 | 0080DE3D213A715200F74D8A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; 50 | 0080DE3F213A715300F74D8A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 51 | 0080DE40213A715300F74D8A /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 52 | 0080DE42213A715300F74D8A /* ITModelPlugin.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = ITModelPlugin.entitlements; sourceTree = ""; }; 53 | 0080DE4C213A717100F74D8A /* ITModelPlugin.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = ITModelPlugin.appex; sourceTree = BUILT_PRODUCTS_DIR; }; 54 | 0080DE4E213A717100F74D8A /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; 55 | 0080DE51213A717100F74D8A /* SourceEditorExtension.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SourceEditorExtension.h; sourceTree = ""; }; 56 | 0080DE52213A717100F74D8A /* SourceEditorExtension.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SourceEditorExtension.m; sourceTree = ""; }; 57 | 0080DE54213A717100F74D8A /* SourceEditorCommand.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SourceEditorCommand.h; sourceTree = ""; }; 58 | 0080DE55213A717100F74D8A /* SourceEditorCommand.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SourceEditorCommand.m; sourceTree = ""; }; 59 | 0080DE57213A717100F74D8A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 60 | 0080DE58213A717100F74D8A /* ITModelPlugin.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = ITModelPlugin.entitlements; sourceTree = ""; }; 61 | /* End PBXFileReference section */ 62 | 63 | /* Begin PBXFrameworksBuildPhase section */ 64 | 0080DE31213A715200F74D8A /* Frameworks */ = { 65 | isa = PBXFrameworksBuildPhase; 66 | buildActionMask = 2147483647; 67 | files = ( 68 | ); 69 | runOnlyForDeploymentPostprocessing = 0; 70 | }; 71 | 0080DE49213A717100F74D8A /* Frameworks */ = { 72 | isa = PBXFrameworksBuildPhase; 73 | buildActionMask = 2147483647; 74 | files = ( 75 | 0080DE4F213A717100F74D8A /* Cocoa.framework in Frameworks */, 76 | ); 77 | runOnlyForDeploymentPostprocessing = 0; 78 | }; 79 | /* End PBXFrameworksBuildPhase section */ 80 | 81 | /* Begin PBXGroup section */ 82 | 0080DE2B213A715200F74D8A = { 83 | isa = PBXGroup; 84 | children = ( 85 | 0080DE36213A715200F74D8A /* ITModelPlugin */, 86 | 0080DE50213A717100F74D8A /* ITModelPlugin */, 87 | 0080DE4D213A717100F74D8A /* Frameworks */, 88 | 0080DE35213A715200F74D8A /* Products */, 89 | ); 90 | sourceTree = ""; 91 | }; 92 | 0080DE35213A715200F74D8A /* Products */ = { 93 | isa = PBXGroup; 94 | children = ( 95 | 0080DE34213A715200F74D8A /* ITModel.app */, 96 | 0080DE4C213A717100F74D8A /* ITModelPlugin.appex */, 97 | ); 98 | name = Products; 99 | sourceTree = ""; 100 | }; 101 | 0080DE36213A715200F74D8A /* ITModelPlugin */ = { 102 | isa = PBXGroup; 103 | children = ( 104 | 0080DE37213A715200F74D8A /* AppDelegate.h */, 105 | 0080DE38213A715200F74D8A /* AppDelegate.m */, 106 | 0080DE3A213A715200F74D8A /* Assets.xcassets */, 107 | 0080DE3C213A715200F74D8A /* MainMenu.xib */, 108 | 0080DE3F213A715300F74D8A /* Info.plist */, 109 | 0080DE40213A715300F74D8A /* main.m */, 110 | 0080DE42213A715300F74D8A /* ITModelPlugin.entitlements */, 111 | ); 112 | path = ITModelPlugin; 113 | sourceTree = ""; 114 | }; 115 | 0080DE4D213A717100F74D8A /* Frameworks */ = { 116 | isa = PBXGroup; 117 | children = ( 118 | 0080DE4E213A717100F74D8A /* Cocoa.framework */, 119 | ); 120 | name = Frameworks; 121 | sourceTree = ""; 122 | }; 123 | 0080DE50213A717100F74D8A /* ITModelPlugin */ = { 124 | isa = PBXGroup; 125 | children = ( 126 | 0080DE51213A717100F74D8A /* SourceEditorExtension.h */, 127 | 0080DE52213A717100F74D8A /* SourceEditorExtension.m */, 128 | 0080DE54213A717100F74D8A /* SourceEditorCommand.h */, 129 | 0080DE55213A717100F74D8A /* SourceEditorCommand.m */, 130 | 0080DE57213A717100F74D8A /* Info.plist */, 131 | 0080DE58213A717100F74D8A /* ITModelPlugin.entitlements */, 132 | ); 133 | path = ITModelPlugin; 134 | sourceTree = ""; 135 | }; 136 | /* End PBXGroup section */ 137 | 138 | /* Begin PBXNativeTarget section */ 139 | 0080DE33213A715200F74D8A /* ITModel */ = { 140 | isa = PBXNativeTarget; 141 | buildConfigurationList = 0080DE45213A715300F74D8A /* Build configuration list for PBXNativeTarget "ITModel" */; 142 | buildPhases = ( 143 | 0080DE30213A715200F74D8A /* Sources */, 144 | 0080DE31213A715200F74D8A /* Frameworks */, 145 | 0080DE32213A715200F74D8A /* Resources */, 146 | 0080DE5F213A717100F74D8A /* Embed App Extensions */, 147 | ); 148 | buildRules = ( 149 | ); 150 | dependencies = ( 151 | 0080DE5A213A717100F74D8A /* PBXTargetDependency */, 152 | ); 153 | name = ITModel; 154 | productName = ITModelPlugin; 155 | productReference = 0080DE34213A715200F74D8A /* ITModel.app */; 156 | productType = "com.apple.product-type.application"; 157 | }; 158 | 0080DE4B213A717100F74D8A /* ITModelPlugin */ = { 159 | isa = PBXNativeTarget; 160 | buildConfigurationList = 0080DE5C213A717100F74D8A /* Build configuration list for PBXNativeTarget "ITModelPlugin" */; 161 | buildPhases = ( 162 | 0080DE48213A717100F74D8A /* Sources */, 163 | 0080DE49213A717100F74D8A /* Frameworks */, 164 | 0080DE4A213A717100F74D8A /* Resources */, 165 | ); 166 | buildRules = ( 167 | ); 168 | dependencies = ( 169 | ); 170 | name = ITModelPlugin; 171 | productName = ITModelPlugin; 172 | productReference = 0080DE4C213A717100F74D8A /* ITModelPlugin.appex */; 173 | productType = "com.apple.product-type.xcode-extension"; 174 | }; 175 | /* End PBXNativeTarget section */ 176 | 177 | /* Begin PBXProject section */ 178 | 0080DE2C213A715200F74D8A /* Project object */ = { 179 | isa = PBXProject; 180 | attributes = { 181 | LastUpgradeCheck = 0940; 182 | ORGANIZATIONNAME = EDZ; 183 | TargetAttributes = { 184 | 0080DE33213A715200F74D8A = { 185 | CreatedOnToolsVersion = 9.4.1; 186 | }; 187 | 0080DE4B213A717100F74D8A = { 188 | CreatedOnToolsVersion = 9.4.1; 189 | }; 190 | }; 191 | }; 192 | buildConfigurationList = 0080DE2F213A715200F74D8A /* Build configuration list for PBXProject "ITModelPlugin" */; 193 | compatibilityVersion = "Xcode 9.3"; 194 | developmentRegion = en; 195 | hasScannedForEncodings = 0; 196 | knownRegions = ( 197 | en, 198 | Base, 199 | ); 200 | mainGroup = 0080DE2B213A715200F74D8A; 201 | productRefGroup = 0080DE35213A715200F74D8A /* Products */; 202 | projectDirPath = ""; 203 | projectRoot = ""; 204 | targets = ( 205 | 0080DE33213A715200F74D8A /* ITModel */, 206 | 0080DE4B213A717100F74D8A /* ITModelPlugin */, 207 | ); 208 | }; 209 | /* End PBXProject section */ 210 | 211 | /* Begin PBXResourcesBuildPhase section */ 212 | 0080DE32213A715200F74D8A /* Resources */ = { 213 | isa = PBXResourcesBuildPhase; 214 | buildActionMask = 2147483647; 215 | files = ( 216 | 0080DE3B213A715200F74D8A /* Assets.xcassets in Resources */, 217 | 0080DE3E213A715200F74D8A /* MainMenu.xib in Resources */, 218 | ); 219 | runOnlyForDeploymentPostprocessing = 0; 220 | }; 221 | 0080DE4A213A717100F74D8A /* Resources */ = { 222 | isa = PBXResourcesBuildPhase; 223 | buildActionMask = 2147483647; 224 | files = ( 225 | ); 226 | runOnlyForDeploymentPostprocessing = 0; 227 | }; 228 | /* End PBXResourcesBuildPhase section */ 229 | 230 | /* Begin PBXSourcesBuildPhase section */ 231 | 0080DE30213A715200F74D8A /* Sources */ = { 232 | isa = PBXSourcesBuildPhase; 233 | buildActionMask = 2147483647; 234 | files = ( 235 | 0080DE41213A715300F74D8A /* main.m in Sources */, 236 | 0080DE39213A715200F74D8A /* AppDelegate.m in Sources */, 237 | ); 238 | runOnlyForDeploymentPostprocessing = 0; 239 | }; 240 | 0080DE48213A717100F74D8A /* Sources */ = { 241 | isa = PBXSourcesBuildPhase; 242 | buildActionMask = 2147483647; 243 | files = ( 244 | 0080DE53213A717100F74D8A /* SourceEditorExtension.m in Sources */, 245 | 0080DE56213A717100F74D8A /* SourceEditorCommand.m in Sources */, 246 | ); 247 | runOnlyForDeploymentPostprocessing = 0; 248 | }; 249 | /* End PBXSourcesBuildPhase section */ 250 | 251 | /* Begin PBXTargetDependency section */ 252 | 0080DE5A213A717100F74D8A /* PBXTargetDependency */ = { 253 | isa = PBXTargetDependency; 254 | target = 0080DE4B213A717100F74D8A /* ITModelPlugin */; 255 | targetProxy = 0080DE59213A717100F74D8A /* PBXContainerItemProxy */; 256 | }; 257 | /* End PBXTargetDependency section */ 258 | 259 | /* Begin PBXVariantGroup section */ 260 | 0080DE3C213A715200F74D8A /* MainMenu.xib */ = { 261 | isa = PBXVariantGroup; 262 | children = ( 263 | 0080DE3D213A715200F74D8A /* Base */, 264 | ); 265 | name = MainMenu.xib; 266 | sourceTree = ""; 267 | }; 268 | /* End PBXVariantGroup section */ 269 | 270 | /* Begin XCBuildConfiguration section */ 271 | 0080DE43213A715300F74D8A /* Debug */ = { 272 | isa = XCBuildConfiguration; 273 | buildSettings = { 274 | ALWAYS_SEARCH_USER_PATHS = NO; 275 | CLANG_ANALYZER_NONNULL = YES; 276 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 277 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 278 | CLANG_CXX_LIBRARY = "libc++"; 279 | CLANG_ENABLE_MODULES = YES; 280 | CLANG_ENABLE_OBJC_ARC = YES; 281 | CLANG_ENABLE_OBJC_WEAK = YES; 282 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 283 | CLANG_WARN_BOOL_CONVERSION = YES; 284 | CLANG_WARN_COMMA = YES; 285 | CLANG_WARN_CONSTANT_CONVERSION = YES; 286 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 287 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 288 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 289 | CLANG_WARN_EMPTY_BODY = YES; 290 | CLANG_WARN_ENUM_CONVERSION = YES; 291 | CLANG_WARN_INFINITE_RECURSION = YES; 292 | CLANG_WARN_INT_CONVERSION = YES; 293 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 294 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 295 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 296 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 297 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 298 | CLANG_WARN_STRICT_PROTOTYPES = YES; 299 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 300 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 301 | CLANG_WARN_UNREACHABLE_CODE = YES; 302 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 303 | CODE_SIGN_IDENTITY = "Mac Developer"; 304 | COPY_PHASE_STRIP = NO; 305 | DEBUG_INFORMATION_FORMAT = dwarf; 306 | ENABLE_STRICT_OBJC_MSGSEND = YES; 307 | ENABLE_TESTABILITY = YES; 308 | GCC_C_LANGUAGE_STANDARD = gnu11; 309 | GCC_DYNAMIC_NO_PIC = NO; 310 | GCC_NO_COMMON_BLOCKS = YES; 311 | GCC_OPTIMIZATION_LEVEL = 0; 312 | GCC_PREPROCESSOR_DEFINITIONS = ( 313 | "DEBUG=1", 314 | "$(inherited)", 315 | ); 316 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 317 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 318 | GCC_WARN_UNDECLARED_SELECTOR = YES; 319 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 320 | GCC_WARN_UNUSED_FUNCTION = YES; 321 | GCC_WARN_UNUSED_VARIABLE = YES; 322 | MACOSX_DEPLOYMENT_TARGET = 10.11; 323 | MTL_ENABLE_DEBUG_INFO = YES; 324 | ONLY_ACTIVE_ARCH = YES; 325 | SDKROOT = macosx; 326 | }; 327 | name = Debug; 328 | }; 329 | 0080DE44213A715300F74D8A /* Release */ = { 330 | isa = XCBuildConfiguration; 331 | buildSettings = { 332 | ALWAYS_SEARCH_USER_PATHS = NO; 333 | CLANG_ANALYZER_NONNULL = YES; 334 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 335 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 336 | CLANG_CXX_LIBRARY = "libc++"; 337 | CLANG_ENABLE_MODULES = YES; 338 | CLANG_ENABLE_OBJC_ARC = YES; 339 | CLANG_ENABLE_OBJC_WEAK = YES; 340 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 341 | CLANG_WARN_BOOL_CONVERSION = YES; 342 | CLANG_WARN_COMMA = YES; 343 | CLANG_WARN_CONSTANT_CONVERSION = YES; 344 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 345 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 346 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 347 | CLANG_WARN_EMPTY_BODY = YES; 348 | CLANG_WARN_ENUM_CONVERSION = YES; 349 | CLANG_WARN_INFINITE_RECURSION = YES; 350 | CLANG_WARN_INT_CONVERSION = YES; 351 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 352 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 353 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 354 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 355 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 356 | CLANG_WARN_STRICT_PROTOTYPES = YES; 357 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 358 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 359 | CLANG_WARN_UNREACHABLE_CODE = YES; 360 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 361 | CODE_SIGN_IDENTITY = "Mac Developer"; 362 | COPY_PHASE_STRIP = NO; 363 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 364 | ENABLE_NS_ASSERTIONS = NO; 365 | ENABLE_STRICT_OBJC_MSGSEND = YES; 366 | GCC_C_LANGUAGE_STANDARD = gnu11; 367 | GCC_NO_COMMON_BLOCKS = YES; 368 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 369 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 370 | GCC_WARN_UNDECLARED_SELECTOR = YES; 371 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 372 | GCC_WARN_UNUSED_FUNCTION = YES; 373 | GCC_WARN_UNUSED_VARIABLE = YES; 374 | MACOSX_DEPLOYMENT_TARGET = 10.11; 375 | MTL_ENABLE_DEBUG_INFO = NO; 376 | SDKROOT = macosx; 377 | }; 378 | name = Release; 379 | }; 380 | 0080DE46213A715300F74D8A /* Debug */ = { 381 | isa = XCBuildConfiguration; 382 | buildSettings = { 383 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 384 | CODE_SIGN_ENTITLEMENTS = ITModelPlugin/ITModelPlugin.entitlements; 385 | CODE_SIGN_STYLE = Automatic; 386 | COMBINE_HIDPI_IMAGES = YES; 387 | DEVELOPMENT_TEAM = RTCU5UMB9U; 388 | INFOPLIST_FILE = ITModelPlugin/Info.plist; 389 | LD_RUNPATH_SEARCH_PATHS = ( 390 | "$(inherited)", 391 | "@executable_path/../Frameworks", 392 | ); 393 | PRODUCT_BUNDLE_IDENTIFIER = com.wuba.ITModelPlugin; 394 | PRODUCT_NAME = "$(TARGET_NAME)"; 395 | }; 396 | name = Debug; 397 | }; 398 | 0080DE47213A715300F74D8A /* Release */ = { 399 | isa = XCBuildConfiguration; 400 | buildSettings = { 401 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 402 | CODE_SIGN_ENTITLEMENTS = ITModelPlugin/ITModelPlugin.entitlements; 403 | CODE_SIGN_STYLE = Automatic; 404 | COMBINE_HIDPI_IMAGES = YES; 405 | DEVELOPMENT_TEAM = RTCU5UMB9U; 406 | INFOPLIST_FILE = ITModelPlugin/Info.plist; 407 | LD_RUNPATH_SEARCH_PATHS = ( 408 | "$(inherited)", 409 | "@executable_path/../Frameworks", 410 | ); 411 | PRODUCT_BUNDLE_IDENTIFIER = com.wuba.ITModelPlugin; 412 | PRODUCT_NAME = "$(TARGET_NAME)"; 413 | }; 414 | name = Release; 415 | }; 416 | 0080DE5D213A717100F74D8A /* Debug */ = { 417 | isa = XCBuildConfiguration; 418 | buildSettings = { 419 | CODE_SIGN_ENTITLEMENTS = ITModelPlugin/ITModelPlugin.entitlements; 420 | CODE_SIGN_STYLE = Automatic; 421 | COMBINE_HIDPI_IMAGES = YES; 422 | DEVELOPMENT_TEAM = RTCU5UMB9U; 423 | INFOPLIST_FILE = ITModelPlugin/Info.plist; 424 | LD_RUNPATH_SEARCH_PATHS = ( 425 | "$(inherited)", 426 | "@executable_path/../Frameworks", 427 | "@executable_path/../../../../Frameworks", 428 | ); 429 | PRODUCT_BUNDLE_IDENTIFIER = com.wuba.ITModelPlugin.ITModelPlugin; 430 | PRODUCT_NAME = "$(TARGET_NAME)"; 431 | SKIP_INSTALL = YES; 432 | }; 433 | name = Debug; 434 | }; 435 | 0080DE5E213A717100F74D8A /* Release */ = { 436 | isa = XCBuildConfiguration; 437 | buildSettings = { 438 | CODE_SIGN_ENTITLEMENTS = ITModelPlugin/ITModelPlugin.entitlements; 439 | CODE_SIGN_STYLE = Automatic; 440 | COMBINE_HIDPI_IMAGES = YES; 441 | DEVELOPMENT_TEAM = RTCU5UMB9U; 442 | INFOPLIST_FILE = ITModelPlugin/Info.plist; 443 | LD_RUNPATH_SEARCH_PATHS = ( 444 | "$(inherited)", 445 | "@executable_path/../Frameworks", 446 | "@executable_path/../../../../Frameworks", 447 | ); 448 | PRODUCT_BUNDLE_IDENTIFIER = com.wuba.ITModelPlugin.ITModelPlugin; 449 | PRODUCT_NAME = "$(TARGET_NAME)"; 450 | SKIP_INSTALL = YES; 451 | }; 452 | name = Release; 453 | }; 454 | /* End XCBuildConfiguration section */ 455 | 456 | /* Begin XCConfigurationList section */ 457 | 0080DE2F213A715200F74D8A /* Build configuration list for PBXProject "ITModelPlugin" */ = { 458 | isa = XCConfigurationList; 459 | buildConfigurations = ( 460 | 0080DE43213A715300F74D8A /* Debug */, 461 | 0080DE44213A715300F74D8A /* Release */, 462 | ); 463 | defaultConfigurationIsVisible = 0; 464 | defaultConfigurationName = Release; 465 | }; 466 | 0080DE45213A715300F74D8A /* Build configuration list for PBXNativeTarget "ITModel" */ = { 467 | isa = XCConfigurationList; 468 | buildConfigurations = ( 469 | 0080DE46213A715300F74D8A /* Debug */, 470 | 0080DE47213A715300F74D8A /* Release */, 471 | ); 472 | defaultConfigurationIsVisible = 0; 473 | defaultConfigurationName = Release; 474 | }; 475 | 0080DE5C213A717100F74D8A /* Build configuration list for PBXNativeTarget "ITModelPlugin" */ = { 476 | isa = XCConfigurationList; 477 | buildConfigurations = ( 478 | 0080DE5D213A717100F74D8A /* Debug */, 479 | 0080DE5E213A717100F74D8A /* Release */, 480 | ); 481 | defaultConfigurationIsVisible = 0; 482 | defaultConfigurationName = Release; 483 | }; 484 | /* End XCConfigurationList section */ 485 | }; 486 | rootObject = 0080DE2C213A715200F74D8A /* Project object */; 487 | } 488 | -------------------------------------------------------------------------------- /ITModelPlugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ITModelPlugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ITModelPlugin.xcodeproj/project.xcworkspace/xcuserdata/edz.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/witchan/ITModelPlugin/d9934480ada2c794a5c0a0cea4d4f6d374d5831e/ITModelPlugin.xcodeproj/project.xcworkspace/xcuserdata/edz.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /ITModelPlugin.xcodeproj/xcuserdata/edz.xcuserdatad/xcschemes/ITModel.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /ITModelPlugin.xcodeproj/xcuserdata/edz.xcuserdatad/xcschemes/ITModelPlugin.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 6 | 9 | 10 | 16 | 22 | 23 | 24 | 30 | 36 | 37 | 38 | 39 | 40 | 45 | 46 | 47 | 48 | 54 | 55 | 56 | 57 | 58 | 59 | 70 | 72 | 78 | 79 | 80 | 81 | 82 | 83 | 90 | 92 | 98 | 99 | 100 | 101 | 103 | 104 | 107 | 108 | 109 | -------------------------------------------------------------------------------- /ITModelPlugin.xcodeproj/xcuserdata/edz.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | ITModel.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | ITModelPlugin.xcscheme 13 | 14 | orderHint 15 | 1 16 | 17 | 18 | SuppressBuildableAutocreation 19 | 20 | 0080DE33213A715200F74D8A 21 | 22 | primary 23 | 24 | 25 | 0080DE4B213A717100F74D8A 26 | 27 | primary 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /ITModelPlugin/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // ITModelPlugin 4 | // 5 | // Created by EDZ on 2018/9/1. 6 | // Copyright © 2018年 EDZ. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : NSObject 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /ITModelPlugin/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // ITModelPlugin 4 | // 5 | // Created by EDZ on 2018/9/1. 6 | // Copyright © 2018年 EDZ. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @property (weak) IBOutlet NSWindow *window; 14 | @end 15 | 16 | @implementation AppDelegate 17 | 18 | - (void)applicationDidFinishLaunching:(NSNotification *)aNotification { 19 | // Insert code here to initialize your application 20 | } 21 | 22 | 23 | - (void)applicationWillTerminate:(NSNotification *)aNotification { 24 | // Insert code here to tear down your application 25 | } 26 | 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /ITModelPlugin/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "mac", 5 | "size" : "16x16", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "mac", 10 | "size" : "16x16", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "mac", 15 | "size" : "32x32", 16 | "scale" : "1x" 17 | }, 18 | { 19 | "idiom" : "mac", 20 | "size" : "32x32", 21 | "scale" : "2x" 22 | }, 23 | { 24 | "idiom" : "mac", 25 | "size" : "128x128", 26 | "scale" : "1x" 27 | }, 28 | { 29 | "idiom" : "mac", 30 | "size" : "128x128", 31 | "scale" : "2x" 32 | }, 33 | { 34 | "idiom" : "mac", 35 | "size" : "256x256", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "mac", 40 | "size" : "256x256", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "mac", 45 | "size" : "512x512", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "mac", 50 | "size" : "512x512", 51 | "scale" : "2x" 52 | } 53 | ], 54 | "info" : { 55 | "version" : 1, 56 | "author" : "xcode" 57 | } 58 | } -------------------------------------------------------------------------------- /ITModelPlugin/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /ITModelPlugin/Base.lproj/MainMenu.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 363 | 364 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | 376 | 377 | 378 | 379 | 380 | 381 | 382 | 383 | 384 | 385 | 386 | 387 | 388 | 389 | 390 | 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 427 | 428 | 429 | 430 | 431 | 432 | 433 | 434 | 435 | 436 | 437 | 438 | 439 | 440 | 441 | 442 | 443 | 444 | 445 | 446 | 447 | 448 | 449 | 450 | 451 | 452 | 453 | 454 | 455 | 456 | 457 | 458 | 459 | 460 | 461 | 462 | 463 | 464 | 465 | 466 | 467 | 468 | 469 | 470 | 471 | 472 | 473 | 474 | 475 | 476 | 477 | 478 | 479 | 480 | 481 | 482 | 483 | 484 | 485 | 486 | 487 | 488 | 489 | 490 | 491 | 492 | 493 | 494 | 495 | 496 | 497 | 498 | 499 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 509 | 510 | 511 | 512 | 513 | 514 | 515 | 516 | 517 | 518 | 519 | 520 | 521 | 522 | 523 | 524 | 525 | 526 | 527 | 528 | 529 | 530 | 531 | 532 | 533 | 534 | 535 | 536 | 537 | Default 538 | 539 | 540 | 541 | 542 | 543 | 544 | Left to Right 545 | 546 | 547 | 548 | 549 | 550 | 551 | Right to Left 552 | 553 | 554 | 555 | 556 | 557 | 558 | 559 | 560 | 561 | 562 | Default 563 | 564 | 565 | 566 | 567 | 568 | 569 | Left to Right 570 | 571 | 572 | 573 | 574 | 575 | 576 | Right to Left 577 | 578 | 579 | 580 | 581 | 582 | 583 | 584 | 585 | 586 | 587 | 588 | 589 | 590 | 591 | 592 | 593 | 594 | 595 | 596 | 597 | 598 | 599 | 600 | 601 | 602 | 603 | 604 | 605 | 606 | 607 | 608 | 609 | 610 | 611 | 612 | 613 | 614 | 615 | 616 | 617 | 618 | 619 | 620 | 621 | 622 | 623 | 624 | 625 | 626 | 627 | 628 | 629 | 630 | 631 | 632 | 633 | 634 | 635 | 636 | 637 | 638 | 639 | 640 | 641 | 642 | 643 | 644 | 645 | 646 | 647 | 648 | 649 | 650 | 651 | 652 | 653 | 654 | 655 | 656 | 657 | 658 | 659 | 660 | 661 | 662 | 663 | 664 | 665 | 666 | 667 | 668 | 669 | 670 | 671 | 672 | 673 | 674 | 675 | 676 | 677 | 678 | 679 | 680 | 681 | 682 | 683 | 684 | 685 | 686 | 687 | 688 | 689 | 690 | 691 | 692 | 693 | -------------------------------------------------------------------------------- /ITModelPlugin/ITModelPlugin.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ITModelPlugin/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | ITModelPlugin 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | XPC! 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleVersion 22 | 1 23 | LSMinimumSystemVersion 24 | $(MACOSX_DEPLOYMENT_TARGET) 25 | NSExtension 26 | 27 | NSExtensionAttributes 28 | 29 | XCSourceEditorCommandDefinitions 30 | 31 | 32 | XCSourceEditorCommandClassName 33 | SourceEditorCommand 34 | XCSourceEditorCommandIdentifier 35 | $(PRODUCT_BUNDLE_IDENTIFIER).SourceEditorCommand 36 | XCSourceEditorCommandName 37 | Insert Propety 38 | 39 | 40 | XCSourceEditorExtensionPrincipalClass 41 | SourceEditorExtension 42 | 43 | NSExtensionPointIdentifier 44 | com.apple.dt.Xcode.extension.source-editor 45 | 46 | NSHumanReadableCopyright 47 | Copyright © 2018年 EDZ. All rights reserved. 48 | 49 | 50 | -------------------------------------------------------------------------------- /ITModelPlugin/SourceEditorCommand.h: -------------------------------------------------------------------------------- 1 | // 2 | // SourceEditorCommand.h 3 | // ITModelPlugin 4 | // 5 | // Created by EDZ on 2018/9/1. 6 | // Copyright © 2018年 EDZ. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface SourceEditorCommand : NSObject 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /ITModelPlugin/SourceEditorCommand.m: -------------------------------------------------------------------------------- 1 | // 2 | // SourceEditorCommand.m 3 | // ITModelPlugIns 4 | // 5 | // Created by EDZ on 2018/9/1. 6 | // Copyright © 2018年 EDZ. All rights reserved. 7 | // 8 | 9 | #import "SourceEditorCommand.h" 10 | #import 11 | 12 | @implementation SourceEditorCommand 13 | 14 | - (void)performCommandWithInvocation:(XCSourceEditorCommandInvocation *)invocation completionHandler:(void (^)(NSError * _Nullable nilOrError))completionHandler 15 | { 16 | [self generatePropertyCodeWithInvocation:invocation]; 17 | 18 | completionHandler(nil); 19 | } 20 | 21 | 22 | #pragma mark - Public 23 | 24 | - (void)generatePropertyCodeWithInvocation:(XCSourceEditorCommandInvocation *)invocation { 25 | NSPasteboard *pasteboard = [NSPasteboard generalPasteboard]; 26 | 27 | NSString *text = [pasteboard stringForType:NSPasteboardTypeString]; 28 | 29 | NSDictionary *dictionary = [NSJSONSerialization JSONObjectWithData:[text dataUsingEncoding:NSUTF8StringEncoding] options:NSJSONReadingMutableContainers error:nil]; 30 | 31 | if (dictionary.count > 0 && invocation.buffer.selections.count > 0) { 32 | NSString *propertiesCode = [self generatePropertyWithDictionary:dictionary]; 33 | if (propertiesCode.length > 0) { 34 | XCSourceTextRange *textRange = [invocation.buffer.selections firstObject]; 35 | [invocation.buffer.lines insertObject:propertiesCode atIndex:textRange.end.line]; 36 | } 37 | } 38 | } 39 | 40 | - (NSString *)generatePropertyWithDictionary:(NSDictionary *)dictionary { 41 | 42 | NSMutableString *properties = [NSMutableString string]; 43 | 44 | [dictionary enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *stop) { 45 | NSString *property = [self generatePropertyWithKey:key obj:obj]; 46 | if (property.length > 0) { 47 | [properties appendString:property]; 48 | } 49 | }]; 50 | 51 | return properties; 52 | } 53 | 54 | - (NSString *)generatePropertyWithKey:(NSString *)key obj:(id)obj { 55 | 56 | NSString *property = nil; 57 | 58 | if ([obj isKindOfClass:[NSString class]]) { 59 | property = [NSString stringWithFormat:@"@property (copy, nonatomic) NSString *%@;\n", key]; 60 | } else if ([obj isKindOfClass:[NSArray class]]) { 61 | property = [NSString stringWithFormat:@"@property (copy, nonatomic) NSArray *%@;\n", key]; 62 | } else if ([obj isKindOfClass:[NSDictionary class]]) { 63 | property = [NSString stringWithFormat:@"@property (copy, nonatomic) NSDictionary *%@;\n", key]; 64 | } else if ([[obj className] isEqualToString:@"__NSCFBoolean"]) { 65 | property = [NSString stringWithFormat:@"@property (assign, nonatomic, getter=is%@) BOOL %@;\n", [[key copy] capitalizedString], key]; 66 | } else if ([[obj className] isEqualToString:@"__NSCFNumber"]) { 67 | property = [NSString stringWithFormat:@"@property (copy, nonatomic) NSNumber *%@;\n", key]; 68 | } else { 69 | property = [NSString stringWithFormat:@"@property (strong, nonatomic) id %@;\n", key]; 70 | } 71 | return property; 72 | } 73 | 74 | @end 75 | -------------------------------------------------------------------------------- /ITModelPlugin/SourceEditorExtension.h: -------------------------------------------------------------------------------- 1 | // 2 | // SourceEditorExtension.h 3 | // ITModelPlugin 4 | // 5 | // Created by EDZ on 2018/9/1. 6 | // Copyright © 2018年 EDZ. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface SourceEditorExtension : NSObject 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /ITModelPlugin/SourceEditorExtension.m: -------------------------------------------------------------------------------- 1 | // 2 | // SourceEditorExtension.m 3 | // ITModelPlugin 4 | // 5 | // Created by EDZ on 2018/9/1. 6 | // Copyright © 2018年 EDZ. All rights reserved. 7 | // 8 | 9 | #import "SourceEditorExtension.h" 10 | 11 | @implementation SourceEditorExtension 12 | 13 | /* 14 | - (void)extensionDidFinishLaunching 15 | { 16 | // If your extension needs to do any work at launch, implement this optional method. 17 | } 18 | */ 19 | 20 | /* 21 | - (NSArray *> *)commandDefinitions 22 | { 23 | // If your extension needs to return a collection of command definitions that differs from those in its Info.plist, implement this optional property getter. 24 | return @[]; 25 | } 26 | */ 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /ITModelPlugin/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // ITModelPlugin 4 | // 5 | // Created by EDZ on 2018/9/1. 6 | // Copyright © 2018年 EDZ. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, const char * argv[]) { 12 | return NSApplicationMain(argc, argv); 13 | } 14 | -------------------------------------------------------------------------------- /Image/enable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/witchan/ITModelPlugin/d9934480ada2c794a5c0a0cea4d4f6d374d5831e/Image/enable.png -------------------------------------------------------------------------------- /Image/hotkey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/witchan/ITModelPlugin/d9934480ada2c794a5c0a0cea4d4f6d374d5831e/Image/hotkey.png -------------------------------------------------------------------------------- /Image/use.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/witchan/ITModelPlugin/d9934480ada2c794a5c0a0cea4d4f6d374d5831e/Image/use.gif -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 witchan 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | # ITModelPlugin 3 | Xcode 插件: 自动把 json 转换成 Property 并插入到工程 4 | 5 | ## 使用示例 6 | ![use](https://raw.githubusercontent.com/witchan/ITModelPlugin/master/Image/use.gif) 7 | 8 | ## 安装 9 | 1. 下载 [ITModelPlugin.app.zip📎](https://raw.githubusercontent.com/witchan/ITModelPlugin/master/ITModelPlugin.app.zip) 10 | 2. 解压 `ITModelPlugin.zip`并拖动到`/Applications` 目录 11 | 3. 运行`ITModelPlugin` 12 | 4. 启用 ITModelPlugin 13 | 系统偏好设置 -> 扩展 -> Xocde Source Editor -> ITModelPlugin 14 | 15 | ![enable](https://raw.githubusercontent.com/witchan/ITModelPlugin/master/Image/enable.png) 16 | 17 | 5. 在Xcode中设置快捷键 18 | Preferences -> Key bindings -> 搜索: ITModelPlugin 19 | 20 | ![hotkey](https://raw.githubusercontent.com/witchan/ITModelPlugin/master/Image/hotkey.png) 21 | 22 | -------------------------------------------------------------------------------- /ScreenHost.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/witchan/ITModelPlugin/d9934480ada2c794a5c0a0cea4d4f6d374d5831e/ScreenHost.png --------------------------------------------------------------------------------