├── .gitignore ├── LICENSE ├── README.md ├── RRConstraintsPlugin.xcodeproj └── project.pbxproj └── RRConstraintsPlugin ├── Classes ├── Controller │ ├── RRAbstractDocumentEditor.m │ ├── RRAutolayoutConstraintAdditionViewController.m │ ├── RRCanvasViewController.m │ ├── RRInspectorBooleanProperty.m │ ├── RRInspectorReferencingConstraintViewController.m │ ├── RRInspectorReferencingConstraintViewDelegate.h │ ├── RRLayoutConstraintItemInspectorProperty.m │ ├── RROutlineViewController.m │ ├── RRWelcomeWindowController.h │ └── RRWelcomeWindowController.m ├── Model │ ├── RRAutolayoutConstraintDrawable.m │ ├── RRLayoutConstant.m │ ├── RRMenuBuilder.m │ └── RRSubviewEmbeddingPolicy.m ├── RRConstraintsPlugin.h ├── RRConstraintsPlugin.m └── Support │ ├── NSImage (Additions) │ ├── NSImage+RRFilters.h │ └── NSImage+RRFilters.m │ ├── NSObjectAdditions │ ├── NSObject+RRReplaceAdditions.h │ └── NSObject+RRReplaceAdditions.m │ └── XcodeInternals │ ├── Controller │ ├── IBAbstractDocumentEditor.h │ ├── IBAutolayoutConstraintAdditionViewController.h │ ├── IBCanvasViewController.h │ ├── IBHybridStructureViewController.h │ ├── IBInspectorReferencingConstraintViewController.h │ ├── IBLayoutConstraintItemInspectorProperty.h │ ├── IBNavigationOutlineViewController.h │ ├── IBOutlineViewController.h │ ├── IBStoryboardNavigationOutlineViewController.h │ ├── IBStoryboardStructureViewController.h │ ├── IBStructureViewController.h │ ├── IDEInspectorBooleanProperty.h │ ├── IDEInspectorProperty.h │ ├── IDEViewController.h │ └── IDEWorkspaceTabController.h │ ├── Model │ ├── IBAutolayoutConstraintAdditionTypeConfig.h │ ├── IBAutolayoutConstraintDrawable.h │ ├── IBDecimalLayoutConstraintMultiplier.h │ ├── IBDocument.h │ ├── IBDocumentObjectMemberWrapper.h │ ├── IBEmbeddingPolicy.h │ ├── IBLayoutConstant.h │ ├── IBLayoutConstraint.h │ ├── IBLayoutConstraintMultiplier.h │ ├── IBOutlineViewControllerItem.h │ ├── IBSubviewEmbeddingPolicy.h │ ├── IBViewEditor.h │ ├── IDEMenuBuilder.h │ └── IDEMenuKeyBindingSet.h │ ├── Protocol │ ├── IBAutolayoutItem.h │ ├── IBInspectorReferencingConstraintViewControllerDelegate.h │ ├── IBInspectorReferencingConstraintViewDelegate.h │ └── IDEBindableDeclarativeInspectorController.h │ └── View │ ├── IBInspectorReferencingConstraintView.h │ ├── IBNSCustomView.h │ ├── IBOutlineView.h │ ├── IBRemoteView.h │ └── IBUIView.h ├── Prefix.pch └── Resources ├── ChangeLog ├── Images │ ├── color_constraints_based_on_priority.png │ ├── constraint_in_editor_attribute_inspector.png │ ├── distribute_views.png │ ├── double_click_constraint_in_outline_attribute_inspector.png │ ├── features.png │ ├── features.psd │ ├── highlite_in_outline_on_hover.png │ ├── keep_constraints_when_embedding.png │ ├── remove_at_build_time.png │ └── remove_at_build_time_gray_dash.png └── index.html ├── Images └── header@2x.png ├── Info.plist └── UI └── RRWelcomeWindowController.xib /.gitignore: -------------------------------------------------------------------------------- 1 | xcuserdata 2 | *.xcworkspace 3 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013 Rolandas Razma 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![RRConstraintsPlugin](https://raw.github.com/RolandasRazma/RRConstraintsPlugin/master/RRConstraintsPlugin/Resources/Images/header@2x.png) 2 | 3 | 4 | RRConstraintsPlugin is an [open-source](https://github.com/RolandasRazma/RRConstraintsPlugin) plugin for Xcode 6.1. It improves workflow for constraints based layout by adding new features to Xcode Interface Builder. 5 | 6 | 7 | ## Installation 8 | 9 | 1. Download the repository from [GitHub](https://github.com/RolandasRazma/RRConstraintsPlugin) and build the project to install the plugin. The plugin is installed in `~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins/RRConstraintsPlugin.xcplugin`. 10 | 11 | 2. Restart Xcode for the plugin to be activated. 12 | 13 | or 14 | 15 | use [Alcatraz](https://github.com/supermarin/Alcatraz) 16 | 17 | 18 | ## Requirements 19 | 20 | RRConstraintsPlugin for Xcode 6.1 only supports OS X 10.9+. 21 | 22 | 23 | ## Features 24 | 25 | Highlight item in outline also when constraint item hovered 26 | 27 | 28 | 29 | 30 | Grayed out and dashed lines for "Remove at build time" constraints 31 | 32 | 33 | 34 | 35 | Color constraints based on priority (switch on/off in Editor -> Canvas) 36 | 37 | 38 | 39 | 40 | Grayed out icons for "Remove at build time" constraints 41 | 42 | 43 | 44 | 45 | Keep constraints when embedding to view 46 | 47 | 48 | 49 | 50 | Distribute views horizontally/vertically (for same width/height views) 51 | 52 | 53 | 54 | 55 | Clicking constraint in editor will show "Attribute Inspector" in utilities bar 56 | 57 | 58 | 59 | 60 | Double clicking constraint in outline will open "Attribute Inspector" in utilities bar 61 | 62 | 63 | 64 | 65 | ## Uninstall 66 | 67 | Open up your terminal and paste this: 68 | 69 | ```bash 70 | rm -rf ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins/RRConstraintsPlugin.xcplugin 71 | ``` 72 | 73 | ## Contributing 74 | `Dude, this is osom, can I help?` - glad you asked! Ofcourse you can. There is 2 ways of doing this. 75 | 1. fork, fix/add feature, create pull request 76 | 2. create issue and ask for new features 77 | -------------------------------------------------------------------------------- /RRConstraintsPlugin.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 0C7AF650186B4E890064EE7B /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0C7AF64F186B4E890064EE7B /* QuartzCore.framework */; }; 11 | 64EDC501188CB55A00D45F1D /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 64EDC500188CB55A00D45F1D /* Cocoa.framework */; }; 12 | 890A4B43171F031300AFE577 /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 890A4B42171F031300AFE577 /* AppKit.framework */; }; 13 | 890A4B45171F031300AFE577 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 890A4B44171F031300AFE577 /* Foundation.framework */; }; 14 | F00081581A25FFB9008E2211 /* RRAbstractDocumentEditor.m in Sources */ = {isa = PBXBuildFile; fileRef = F00081571A25FFB9008E2211 /* RRAbstractDocumentEditor.m */; }; 15 | F000815B1A260041008E2211 /* RRMenuBuilder.m in Sources */ = {isa = PBXBuildFile; fileRef = F000815A1A260041008E2211 /* RRMenuBuilder.m */; }; 16 | F00BDA6018DB33C7007A3B43 /* highlite_in_outline_on_hover.png in Resources */ = {isa = PBXBuildFile; fileRef = F00BDA5E18DB33C7007A3B43 /* highlite_in_outline_on_hover.png */; }; 17 | F012008318F9A8AC00511F84 /* distribute_views.png in Resources */ = {isa = PBXBuildFile; fileRef = F012008218F9A8AC00511F84 /* distribute_views.png */; }; 18 | F01FCE3C18C3740B00F71C33 /* RRConstraintsPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = F01FCE3B18C3740B00F71C33 /* RRConstraintsPlugin.m */; }; 19 | F0211FF418C65071007E403F /* RROutlineViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F0211FF318C65071007E403F /* RROutlineViewController.m */; }; 20 | F024B35F18FD32C500BA6E1A /* remove_at_build_time_gray_dash.png in Resources */ = {isa = PBXBuildFile; fileRef = F024B35E18FD32C500BA6E1A /* remove_at_build_time_gray_dash.png */; }; 21 | F02F934118CB8A690015A342 /* index.html in Resources */ = {isa = PBXBuildFile; fileRef = F02F934018CB8A690015A342 /* index.html */; }; 22 | F030830318FD23F4003A06B6 /* RRAutolayoutConstraintDrawable.m in Sources */ = {isa = PBXBuildFile; fileRef = F030830218FD23F4003A06B6 /* RRAutolayoutConstraintDrawable.m */; }; 23 | F063112518C5426500B643BE /* RRLayoutConstant.m in Sources */ = {isa = PBXBuildFile; fileRef = F063112418C5426500B643BE /* RRLayoutConstant.m */; }; 24 | F06E79381A386AC800853721 /* RRSubviewEmbeddingPolicy.m in Sources */ = {isa = PBXBuildFile; fileRef = F06E79371A386AC800853721 /* RRSubviewEmbeddingPolicy.m */; }; 25 | F0758FFF18C37E8200B6BE01 /* NSObject+RRReplaceAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = F0758FFE18C37E8200B6BE01 /* NSObject+RRReplaceAdditions.m */; }; 26 | F0AC82731A261B9600BBACB4 /* color_constraints_based_on_priority.png in Resources */ = {isa = PBXBuildFile; fileRef = F0AC82721A261B9600BBACB4 /* color_constraints_based_on_priority.png */; }; 27 | F0CFA88218CA814600D223C6 /* RRCanvasViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F0CFA88118CA814600D223C6 /* RRCanvasViewController.m */; }; 28 | F0D91F4018CBA4E900C95205 /* constraint_in_editor_attribute_inspector.png in Resources */ = {isa = PBXBuildFile; fileRef = F0D91F3918CBA4E900C95205 /* constraint_in_editor_attribute_inspector.png */; }; 29 | F0D91F4218CBA4E900C95205 /* double_click_constraint_in_outline_attribute_inspector.png in Resources */ = {isa = PBXBuildFile; fileRef = F0D91F3B18CBA4E900C95205 /* double_click_constraint_in_outline_attribute_inspector.png */; }; 30 | F0D91F4418CBA4E900C95205 /* remove_at_build_time.png in Resources */ = {isa = PBXBuildFile; fileRef = F0D91F3D18CBA4E900C95205 /* remove_at_build_time.png */; }; 31 | F0E4D42C18C48AF200B2BCAA /* RRInspectorReferencingConstraintViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F0E4D42B18C48AF200B2BCAA /* RRInspectorReferencingConstraintViewController.m */; }; 32 | F0E6217818CB8993004536F0 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F0E6217718CB8993004536F0 /* WebKit.framework */; }; 33 | F0EE69741A38A6A9001E56B1 /* keep_constraints_when_embedding.png in Resources */ = {isa = PBXBuildFile; fileRef = F0EE69731A38A6A9001E56B1 /* keep_constraints_when_embedding.png */; }; 34 | F0EFCACE18F866EB005285CE /* RRAutolayoutConstraintAdditionViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F0EFCACD18F866EB005285CE /* RRAutolayoutConstraintAdditionViewController.m */; }; 35 | F0F456FD18DA093C00CD796E /* RRLayoutConstraintItemInspectorProperty.m in Sources */ = {isa = PBXBuildFile; fileRef = F0F456FC18DA093C00CD796E /* RRLayoutConstraintItemInspectorProperty.m */; }; 36 | F0F8206318CB71C900A99AD3 /* RRWelcomeWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = F0F8206118CB71C900A99AD3 /* RRWelcomeWindowController.m */; }; 37 | F0F8206718CB720100A99AD3 /* RRWelcomeWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = F0F8206618CB720100A99AD3 /* RRWelcomeWindowController.xib */; }; 38 | F0FBFC3F18C664A600F8F2E2 /* RRInspectorBooleanProperty.m in Sources */ = {isa = PBXBuildFile; fileRef = F0FBFC3E18C664A600F8F2E2 /* RRInspectorBooleanProperty.m */; }; 39 | F0FEABB418C3D6E5000B0EEF /* NSImage+RRFilters.m in Sources */ = {isa = PBXBuildFile; fileRef = F0FEABB318C3D6E5000B0EEF /* NSImage+RRFilters.m */; }; 40 | /* End PBXBuildFile section */ 41 | 42 | /* Begin PBXFileReference section */ 43 | 0C7AF64F186B4E890064EE7B /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; 44 | 64EDC500188CB55A00D45F1D /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; 45 | 890A4B3F171F031300AFE577 /* RRConstraintsPlugin.xcplugin */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RRConstraintsPlugin.xcplugin; sourceTree = BUILT_PRODUCTS_DIR; }; 46 | 890A4B42171F031300AFE577 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; 47 | 890A4B44171F031300AFE577 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 48 | 890A4B48171F031300AFE577 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = Resources/Info.plist; sourceTree = ""; }; 49 | 890A4B4F171F031300AFE577 /* Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Prefix.pch; sourceTree = ""; }; 50 | F00081571A25FFB9008E2211 /* RRAbstractDocumentEditor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RRAbstractDocumentEditor.m; sourceTree = ""; }; 51 | F000815A1A260041008E2211 /* RRMenuBuilder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RRMenuBuilder.m; sourceTree = ""; }; 52 | F000815C1A2600F3008E2211 /* IDEMenuBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDEMenuBuilder.h; sourceTree = ""; }; 53 | F0032B4018DB3E110065A2B4 /* IBStoryboardNavigationOutlineViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = IBStoryboardNavigationOutlineViewController.h; sourceTree = ""; }; 54 | F00BDA5E18DB33C7007A3B43 /* highlite_in_outline_on_hover.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = highlite_in_outline_on_hover.png; sourceTree = ""; }; 55 | F012008218F9A8AC00511F84 /* distribute_views.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = distribute_views.png; sourceTree = ""; }; 56 | F012B83C18F9BA0100446352 /* IBInspectorReferencingConstraintViewControllerDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = IBInspectorReferencingConstraintViewControllerDelegate.h; sourceTree = ""; }; 57 | F01FCE3A18C3740B00F71C33 /* RRConstraintsPlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RRConstraintsPlugin.h; sourceTree = ""; }; 58 | F01FCE3B18C3740B00F71C33 /* RRConstraintsPlugin.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RRConstraintsPlugin.m; sourceTree = ""; }; 59 | F0211FF318C65071007E403F /* RROutlineViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RROutlineViewController.m; sourceTree = ""; }; 60 | F02212FE18DAF931002D711C /* IBStructureViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = IBStructureViewController.h; sourceTree = ""; }; 61 | F024B35E18FD32C500BA6E1A /* remove_at_build_time_gray_dash.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = remove_at_build_time_gray_dash.png; sourceTree = ""; }; 62 | F0268EE218DB2DD70083E288 /* IBLayoutConstraintItemInspectorProperty.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = IBLayoutConstraintItemInspectorProperty.h; sourceTree = ""; }; 63 | F02F934018CB8A690015A342 /* index.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = index.html; sourceTree = ""; }; 64 | F030830218FD23F4003A06B6 /* RRAutolayoutConstraintDrawable.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RRAutolayoutConstraintDrawable.m; sourceTree = ""; }; 65 | F03476E718DA15D200B0BD0B /* IBHybridStructureViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = IBHybridStructureViewController.h; sourceTree = ""; }; 66 | F038FA291A26165F009395A6 /* IBViewEditor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IBViewEditor.h; sourceTree = ""; }; 67 | F041CE1E18F89580008A501D /* IBAutolayoutConstraintAdditionViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IBAutolayoutConstraintAdditionViewController.h; sourceTree = ""; }; 68 | F041CE1F18F896FB008A501D /* IBAutolayoutConstraintAdditionTypeConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IBAutolayoutConstraintAdditionTypeConfig.h; sourceTree = ""; }; 69 | F048D7DD1A064470003622E9 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = SOURCE_ROOT; }; 70 | F05CD3AD18DAF4FF00331A6A /* IBOutlineView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = IBOutlineView.h; sourceTree = ""; }; 71 | F063112418C5426500B643BE /* RRLayoutConstant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RRLayoutConstant.m; sourceTree = ""; }; 72 | F063BEA418C533B700695BDE /* RRInspectorReferencingConstraintViewDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RRInspectorReferencingConstraintViewDelegate.h; sourceTree = ""; }; 73 | F06E79351A386A0800853721 /* IBEmbeddingPolicy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = IBEmbeddingPolicy.h; sourceTree = ""; }; 74 | F06E79361A386A2C00853721 /* IBSubviewEmbeddingPolicy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = IBSubviewEmbeddingPolicy.h; sourceTree = ""; }; 75 | F06E79371A386AC800853721 /* RRSubviewEmbeddingPolicy.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RRSubviewEmbeddingPolicy.m; sourceTree = ""; }; 76 | F0758FFD18C37E8200B6BE01 /* NSObject+RRReplaceAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSObject+RRReplaceAdditions.h"; sourceTree = ""; }; 77 | F0758FFE18C37E8200B6BE01 /* NSObject+RRReplaceAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSObject+RRReplaceAdditions.m"; sourceTree = ""; }; 78 | F07EA62018FD2CBE008023F6 /* IBAutolayoutConstraintDrawable.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = IBAutolayoutConstraintDrawable.h; sourceTree = ""; }; 79 | F093812B1A388BC300EA2C26 /* IBUIView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = IBUIView.h; sourceTree = ""; }; 80 | F09549FB1A388EF6004B6CB2 /* IBRemoteView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = IBRemoteView.h; sourceTree = ""; }; 81 | F09549FC1A388F29004B6CB2 /* IBNSCustomView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = IBNSCustomView.h; sourceTree = ""; }; 82 | F09A7A9618CB521C00F698D3 /* IBCanvasViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IBCanvasViewController.h; sourceTree = ""; }; 83 | F09A7A9718CB521C00F698D3 /* IBInspectorReferencingConstraintViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IBInspectorReferencingConstraintViewController.h; sourceTree = ""; }; 84 | F09A7A9818CB521C00F698D3 /* IBOutlineViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IBOutlineViewController.h; sourceTree = ""; }; 85 | F09A7A9918CB521C00F698D3 /* IDEInspectorBooleanProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDEInspectorBooleanProperty.h; sourceTree = ""; }; 86 | F09A7A9A18CB521C00F698D3 /* IDEInspectorProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDEInspectorProperty.h; sourceTree = ""; }; 87 | F09A7A9B18CB521C00F698D3 /* IDEWorkspaceTabController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDEWorkspaceTabController.h; sourceTree = ""; }; 88 | F09A7A9D18CB521C00F698D3 /* IBDocument.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IBDocument.h; sourceTree = ""; }; 89 | F09A7A9E18CB521C00F698D3 /* IBDocumentObjectMemberWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IBDocumentObjectMemberWrapper.h; sourceTree = ""; }; 90 | F09A7A9F18CB521C00F698D3 /* IBLayoutConstant.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IBLayoutConstant.h; sourceTree = ""; }; 91 | F09A7AA018CB521C00F698D3 /* IBLayoutConstraint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IBLayoutConstraint.h; sourceTree = ""; }; 92 | F09A7AA118CB521C00F698D3 /* IBOutlineViewControllerItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IBOutlineViewControllerItem.h; sourceTree = ""; }; 93 | F09A7AA218CB521C00F698D3 /* IDEMenuKeyBindingSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDEMenuKeyBindingSet.h; sourceTree = ""; }; 94 | F09A7AA418CB521C00F698D3 /* IBAutolayoutItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IBAutolayoutItem.h; sourceTree = ""; }; 95 | F09A7AA518CB521C00F698D3 /* IBInspectorReferencingConstraintViewDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IBInspectorReferencingConstraintViewDelegate.h; sourceTree = ""; }; 96 | F09A7AA618CB521C00F698D3 /* IDEBindableDeclarativeInspectorController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDEBindableDeclarativeInspectorController.h; sourceTree = ""; }; 97 | F09A7AA818CB521C00F698D3 /* IBInspectorReferencingConstraintView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IBInspectorReferencingConstraintView.h; sourceTree = ""; }; 98 | F0A12AFB18F99587000C02C0 /* IBDecimalLayoutConstraintMultiplier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IBDecimalLayoutConstraintMultiplier.h; sourceTree = ""; }; 99 | F0A3F82D18CB6B9300C83F38 /* IBAbstractDocumentEditor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = IBAbstractDocumentEditor.h; sourceTree = ""; }; 100 | F0A3F82E18CB6D7900C83F38 /* IDEViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = IDEViewController.h; sourceTree = ""; }; 101 | F0AC82721A261B9600BBACB4 /* color_constraints_based_on_priority.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = color_constraints_based_on_priority.png; sourceTree = ""; }; 102 | F0BC224C18DA1918000EE426 /* IBNavigationOutlineViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = IBNavigationOutlineViewController.h; sourceTree = ""; }; 103 | F0C31C6D18DB3CF100089505 /* IBStoryboardStructureViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = IBStoryboardStructureViewController.h; sourceTree = ""; }; 104 | F0CFA88118CA814600D223C6 /* RRCanvasViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RRCanvasViewController.m; sourceTree = ""; }; 105 | F0D91F3918CBA4E900C95205 /* constraint_in_editor_attribute_inspector.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = constraint_in_editor_attribute_inspector.png; sourceTree = ""; }; 106 | F0D91F3B18CBA4E900C95205 /* double_click_constraint_in_outline_attribute_inspector.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = double_click_constraint_in_outline_attribute_inspector.png; sourceTree = ""; }; 107 | F0D91F3D18CBA4E900C95205 /* remove_at_build_time.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = remove_at_build_time.png; sourceTree = ""; }; 108 | F0E4D42B18C48AF200B2BCAA /* RRInspectorReferencingConstraintViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RRInspectorReferencingConstraintViewController.m; sourceTree = ""; }; 109 | F0E6217718CB8993004536F0 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = System/Library/Frameworks/WebKit.framework; sourceTree = SDKROOT; }; 110 | F0EC52BB18F91FAA00E01BF6 /* IBLayoutConstraintMultiplier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IBLayoutConstraintMultiplier.h; sourceTree = ""; }; 111 | F0EE69731A38A6A9001E56B1 /* keep_constraints_when_embedding.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = keep_constraints_when_embedding.png; sourceTree = ""; }; 112 | F0EFCACD18F866EB005285CE /* RRAutolayoutConstraintAdditionViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RRAutolayoutConstraintAdditionViewController.m; sourceTree = ""; }; 113 | F0F456FC18DA093C00CD796E /* RRLayoutConstraintItemInspectorProperty.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RRLayoutConstraintItemInspectorProperty.m; sourceTree = ""; }; 114 | F0F8206018CB71C900A99AD3 /* RRWelcomeWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RRWelcomeWindowController.h; sourceTree = ""; }; 115 | F0F8206118CB71C900A99AD3 /* RRWelcomeWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RRWelcomeWindowController.m; sourceTree = ""; }; 116 | F0F8206618CB720100A99AD3 /* RRWelcomeWindowController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = RRWelcomeWindowController.xib; sourceTree = ""; }; 117 | F0FBFC3E18C664A600F8F2E2 /* RRInspectorBooleanProperty.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RRInspectorBooleanProperty.m; sourceTree = ""; }; 118 | F0FEABB218C3D6E5000B0EEF /* NSImage+RRFilters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSImage+RRFilters.h"; sourceTree = ""; }; 119 | F0FEABB318C3D6E5000B0EEF /* NSImage+RRFilters.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSImage+RRFilters.m"; sourceTree = ""; }; 120 | /* End PBXFileReference section */ 121 | 122 | /* Begin PBXFrameworksBuildPhase section */ 123 | 890A4B3C171F031300AFE577 /* Frameworks */ = { 124 | isa = PBXFrameworksBuildPhase; 125 | buildActionMask = 2147483647; 126 | files = ( 127 | F0E6217818CB8993004536F0 /* WebKit.framework in Frameworks */, 128 | 64EDC501188CB55A00D45F1D /* Cocoa.framework in Frameworks */, 129 | 0C7AF650186B4E890064EE7B /* QuartzCore.framework in Frameworks */, 130 | 890A4B43171F031300AFE577 /* AppKit.framework in Frameworks */, 131 | 890A4B45171F031300AFE577 /* Foundation.framework in Frameworks */, 132 | ); 133 | runOnlyForDeploymentPostprocessing = 0; 134 | }; 135 | /* End PBXFrameworksBuildPhase section */ 136 | 137 | /* Begin PBXGroup section */ 138 | 890A4B36171F031300AFE577 = { 139 | isa = PBXGroup; 140 | children = ( 141 | F01FCE3918C3740B00F71C33 /* Classes */, 142 | F0F8205A18CB70C500A99AD3 /* Resources */, 143 | 890A4B47171F031300AFE577 /* Supporting Files */, 144 | F01FCE3818C373CA00F71C33 /* Frameworks & Librarys */, 145 | 890A4B40171F031300AFE577 /* Products */, 146 | ); 147 | sourceTree = ""; 148 | }; 149 | 890A4B40171F031300AFE577 /* Products */ = { 150 | isa = PBXGroup; 151 | children = ( 152 | 890A4B3F171F031300AFE577 /* RRConstraintsPlugin.xcplugin */, 153 | ); 154 | name = Products; 155 | sourceTree = ""; 156 | }; 157 | 890A4B41171F031300AFE577 /* Frameworks */ = { 158 | isa = PBXGroup; 159 | children = ( 160 | 64EDC500188CB55A00D45F1D /* Cocoa.framework */, 161 | 0C7AF64F186B4E890064EE7B /* QuartzCore.framework */, 162 | 890A4B42171F031300AFE577 /* AppKit.framework */, 163 | 890A4B44171F031300AFE577 /* Foundation.framework */, 164 | F0E6217718CB8993004536F0 /* WebKit.framework */, 165 | ); 166 | name = Frameworks; 167 | path = ../..; 168 | sourceTree = ""; 169 | }; 170 | 890A4B47171F031300AFE577 /* Supporting Files */ = { 171 | isa = PBXGroup; 172 | children = ( 173 | 890A4B4F171F031300AFE577 /* Prefix.pch */, 174 | 890A4B48171F031300AFE577 /* Info.plist */, 175 | ); 176 | name = "Supporting Files"; 177 | path = RRConstraintsPlugin; 178 | sourceTree = ""; 179 | }; 180 | F01FCE3818C373CA00F71C33 /* Frameworks & Librarys */ = { 181 | isa = PBXGroup; 182 | children = ( 183 | 890A4B41171F031300AFE577 /* Frameworks */, 184 | ); 185 | name = "Frameworks & Librarys"; 186 | path = RRConstraintsPlugin/Library; 187 | sourceTree = ""; 188 | }; 189 | F01FCE3918C3740B00F71C33 /* Classes */ = { 190 | isa = PBXGroup; 191 | children = ( 192 | F0BABD2C18C375A600B8F0B2 /* Support */, 193 | F075900218C3BAC700B6BE01 /* Model */, 194 | F0758FF818C37D2500B6BE01 /* View */, 195 | F075900118C3BAC700B6BE01 /* Controller */, 196 | F01FCE3A18C3740B00F71C33 /* RRConstraintsPlugin.h */, 197 | F01FCE3B18C3740B00F71C33 /* RRConstraintsPlugin.m */, 198 | ); 199 | name = Classes; 200 | path = RRConstraintsPlugin/Classes; 201 | sourceTree = ""; 202 | }; 203 | F02F933F18CB8A690015A342 /* ChangeLog */ = { 204 | isa = PBXGroup; 205 | children = ( 206 | F0D91F3818CBA4E900C95205 /* Images */, 207 | F02F934018CB8A690015A342 /* index.html */, 208 | F048D7DD1A064470003622E9 /* README.md */, 209 | ); 210 | path = ChangeLog; 211 | sourceTree = ""; 212 | }; 213 | F0758FF818C37D2500B6BE01 /* View */ = { 214 | isa = PBXGroup; 215 | children = ( 216 | ); 217 | path = View; 218 | sourceTree = ""; 219 | }; 220 | F0758FFC18C37E8200B6BE01 /* NSObjectAdditions */ = { 221 | isa = PBXGroup; 222 | children = ( 223 | F0758FFD18C37E8200B6BE01 /* NSObject+RRReplaceAdditions.h */, 224 | F0758FFE18C37E8200B6BE01 /* NSObject+RRReplaceAdditions.m */, 225 | ); 226 | path = NSObjectAdditions; 227 | sourceTree = ""; 228 | }; 229 | F075900118C3BAC700B6BE01 /* Controller */ = { 230 | isa = PBXGroup; 231 | children = ( 232 | F0EFCACD18F866EB005285CE /* RRAutolayoutConstraintAdditionViewController.m */, 233 | F0F456FC18DA093C00CD796E /* RRLayoutConstraintItemInspectorProperty.m */, 234 | F063BEA418C533B700695BDE /* RRInspectorReferencingConstraintViewDelegate.h */, 235 | F0E4D42B18C48AF200B2BCAA /* RRInspectorReferencingConstraintViewController.m */, 236 | F0211FF318C65071007E403F /* RROutlineViewController.m */, 237 | F0FBFC3E18C664A600F8F2E2 /* RRInspectorBooleanProperty.m */, 238 | F0CFA88118CA814600D223C6 /* RRCanvasViewController.m */, 239 | F0F8206018CB71C900A99AD3 /* RRWelcomeWindowController.h */, 240 | F0F8206118CB71C900A99AD3 /* RRWelcomeWindowController.m */, 241 | F00081571A25FFB9008E2211 /* RRAbstractDocumentEditor.m */, 242 | ); 243 | path = Controller; 244 | sourceTree = ""; 245 | }; 246 | F075900218C3BAC700B6BE01 /* Model */ = { 247 | isa = PBXGroup; 248 | children = ( 249 | F063112418C5426500B643BE /* RRLayoutConstant.m */, 250 | F030830218FD23F4003A06B6 /* RRAutolayoutConstraintDrawable.m */, 251 | F000815A1A260041008E2211 /* RRMenuBuilder.m */, 252 | F06E79371A386AC800853721 /* RRSubviewEmbeddingPolicy.m */, 253 | ); 254 | path = Model; 255 | sourceTree = ""; 256 | }; 257 | F09A7A9418CB521C00F698D3 /* XcodeInternals */ = { 258 | isa = PBXGroup; 259 | children = ( 260 | F09A7AA318CB521C00F698D3 /* Protocol */, 261 | F09A7A9C18CB521C00F698D3 /* Model */, 262 | F09A7AA718CB521C00F698D3 /* View */, 263 | F09A7A9518CB521C00F698D3 /* Controller */, 264 | ); 265 | path = XcodeInternals; 266 | sourceTree = ""; 267 | }; 268 | F09A7A9518CB521C00F698D3 /* Controller */ = { 269 | isa = PBXGroup; 270 | children = ( 271 | F0A3F82D18CB6B9300C83F38 /* IBAbstractDocumentEditor.h */, 272 | F041CE1E18F89580008A501D /* IBAutolayoutConstraintAdditionViewController.h */, 273 | F09A7A9618CB521C00F698D3 /* IBCanvasViewController.h */, 274 | F03476E718DA15D200B0BD0B /* IBHybridStructureViewController.h */, 275 | F09A7A9718CB521C00F698D3 /* IBInspectorReferencingConstraintViewController.h */, 276 | F09A7A9818CB521C00F698D3 /* IBOutlineViewController.h */, 277 | F0032B4018DB3E110065A2B4 /* IBStoryboardNavigationOutlineViewController.h */, 278 | F0C31C6D18DB3CF100089505 /* IBStoryboardStructureViewController.h */, 279 | F0268EE218DB2DD70083E288 /* IBLayoutConstraintItemInspectorProperty.h */, 280 | F0BC224C18DA1918000EE426 /* IBNavigationOutlineViewController.h */, 281 | F02212FE18DAF931002D711C /* IBStructureViewController.h */, 282 | F09A7A9918CB521C00F698D3 /* IDEInspectorBooleanProperty.h */, 283 | F09A7A9A18CB521C00F698D3 /* IDEInspectorProperty.h */, 284 | F0A3F82E18CB6D7900C83F38 /* IDEViewController.h */, 285 | F09A7A9B18CB521C00F698D3 /* IDEWorkspaceTabController.h */, 286 | ); 287 | path = Controller; 288 | sourceTree = ""; 289 | }; 290 | F09A7A9C18CB521C00F698D3 /* Model */ = { 291 | isa = PBXGroup; 292 | children = ( 293 | F041CE1F18F896FB008A501D /* IBAutolayoutConstraintAdditionTypeConfig.h */, 294 | F0A12AFB18F99587000C02C0 /* IBDecimalLayoutConstraintMultiplier.h */, 295 | F09A7A9D18CB521C00F698D3 /* IBDocument.h */, 296 | F09A7A9E18CB521C00F698D3 /* IBDocumentObjectMemberWrapper.h */, 297 | F06E79351A386A0800853721 /* IBEmbeddingPolicy.h */, 298 | F09A7A9F18CB521C00F698D3 /* IBLayoutConstant.h */, 299 | F09A7AA018CB521C00F698D3 /* IBLayoutConstraint.h */, 300 | F0EC52BB18F91FAA00E01BF6 /* IBLayoutConstraintMultiplier.h */, 301 | F09A7AA118CB521C00F698D3 /* IBOutlineViewControllerItem.h */, 302 | F06E79361A386A2C00853721 /* IBSubviewEmbeddingPolicy.h */, 303 | F07EA62018FD2CBE008023F6 /* IBAutolayoutConstraintDrawable.h */, 304 | F09A7AA218CB521C00F698D3 /* IDEMenuKeyBindingSet.h */, 305 | F000815C1A2600F3008E2211 /* IDEMenuBuilder.h */, 306 | F038FA291A26165F009395A6 /* IBViewEditor.h */, 307 | ); 308 | path = Model; 309 | sourceTree = ""; 310 | }; 311 | F09A7AA318CB521C00F698D3 /* Protocol */ = { 312 | isa = PBXGroup; 313 | children = ( 314 | F09A7AA418CB521C00F698D3 /* IBAutolayoutItem.h */, 315 | F012B83C18F9BA0100446352 /* IBInspectorReferencingConstraintViewControllerDelegate.h */, 316 | F09A7AA518CB521C00F698D3 /* IBInspectorReferencingConstraintViewDelegate.h */, 317 | F09A7AA618CB521C00F698D3 /* IDEBindableDeclarativeInspectorController.h */, 318 | ); 319 | path = Protocol; 320 | sourceTree = ""; 321 | }; 322 | F09A7AA718CB521C00F698D3 /* View */ = { 323 | isa = PBXGroup; 324 | children = ( 325 | F09A7AA818CB521C00F698D3 /* IBInspectorReferencingConstraintView.h */, 326 | F09549FC1A388F29004B6CB2 /* IBNSCustomView.h */, 327 | F05CD3AD18DAF4FF00331A6A /* IBOutlineView.h */, 328 | F09549FB1A388EF6004B6CB2 /* IBRemoteView.h */, 329 | F093812B1A388BC300EA2C26 /* IBUIView.h */, 330 | ); 331 | path = View; 332 | sourceTree = ""; 333 | }; 334 | F0BABD2C18C375A600B8F0B2 /* Support */ = { 335 | isa = PBXGroup; 336 | children = ( 337 | F0758FFC18C37E8200B6BE01 /* NSObjectAdditions */, 338 | F0FEABB118C3D6C2000B0EEF /* NSImage (Additions) */, 339 | F09A7A9418CB521C00F698D3 /* XcodeInternals */, 340 | ); 341 | path = Support; 342 | sourceTree = ""; 343 | }; 344 | F0D91F3818CBA4E900C95205 /* Images */ = { 345 | isa = PBXGroup; 346 | children = ( 347 | F0AC82721A261B9600BBACB4 /* color_constraints_based_on_priority.png */, 348 | F0D91F3918CBA4E900C95205 /* constraint_in_editor_attribute_inspector.png */, 349 | F012008218F9A8AC00511F84 /* distribute_views.png */, 350 | F0D91F3B18CBA4E900C95205 /* double_click_constraint_in_outline_attribute_inspector.png */, 351 | F00BDA5E18DB33C7007A3B43 /* highlite_in_outline_on_hover.png */, 352 | F0EE69731A38A6A9001E56B1 /* keep_constraints_when_embedding.png */, 353 | F024B35E18FD32C500BA6E1A /* remove_at_build_time_gray_dash.png */, 354 | F0D91F3D18CBA4E900C95205 /* remove_at_build_time.png */, 355 | ); 356 | path = Images; 357 | sourceTree = ""; 358 | }; 359 | F0F8205A18CB70C500A99AD3 /* Resources */ = { 360 | isa = PBXGroup; 361 | children = ( 362 | F0F8206518CB720100A99AD3 /* UI */, 363 | F02F933F18CB8A690015A342 /* ChangeLog */, 364 | ); 365 | name = Resources; 366 | path = RRConstraintsPlugin/Resources; 367 | sourceTree = ""; 368 | }; 369 | F0F8206518CB720100A99AD3 /* UI */ = { 370 | isa = PBXGroup; 371 | children = ( 372 | F0F8206618CB720100A99AD3 /* RRWelcomeWindowController.xib */, 373 | ); 374 | path = UI; 375 | sourceTree = ""; 376 | }; 377 | F0FEABB118C3D6C2000B0EEF /* NSImage (Additions) */ = { 378 | isa = PBXGroup; 379 | children = ( 380 | F0FEABB218C3D6E5000B0EEF /* NSImage+RRFilters.h */, 381 | F0FEABB318C3D6E5000B0EEF /* NSImage+RRFilters.m */, 382 | ); 383 | path = "NSImage (Additions)"; 384 | sourceTree = ""; 385 | }; 386 | /* End PBXGroup section */ 387 | 388 | /* Begin PBXNativeTarget section */ 389 | 890A4B3E171F031300AFE577 /* RRConstraintsPlugin */ = { 390 | isa = PBXNativeTarget; 391 | buildConfigurationList = 890A4B52171F031300AFE577 /* Build configuration list for PBXNativeTarget "RRConstraintsPlugin" */; 392 | buildPhases = ( 393 | 890A4B3B171F031300AFE577 /* Sources */, 394 | 890A4B3C171F031300AFE577 /* Frameworks */, 395 | 890A4B3D171F031300AFE577 /* Resources */, 396 | ); 397 | buildRules = ( 398 | ); 399 | dependencies = ( 400 | ); 401 | name = RRConstraintsPlugin; 402 | productName = RRConstraintsPlugin; 403 | productReference = 890A4B3F171F031300AFE577 /* RRConstraintsPlugin.xcplugin */; 404 | productType = "com.apple.product-type.bundle"; 405 | }; 406 | /* End PBXNativeTarget section */ 407 | 408 | /* Begin PBXProject section */ 409 | 890A4B37171F031300AFE577 /* Project object */ = { 410 | isa = PBXProject; 411 | attributes = { 412 | CLASSPREFIX = RR; 413 | LastUpgradeCheck = 0500; 414 | ORGANIZATIONNAME = "Rolandas Razma"; 415 | }; 416 | buildConfigurationList = 890A4B3A171F031300AFE577 /* Build configuration list for PBXProject "RRConstraintsPlugin" */; 417 | compatibilityVersion = "Xcode 3.2"; 418 | developmentRegion = English; 419 | hasScannedForEncodings = 0; 420 | knownRegions = ( 421 | en, 422 | ); 423 | mainGroup = 890A4B36171F031300AFE577; 424 | productRefGroup = 890A4B40171F031300AFE577 /* Products */; 425 | projectDirPath = ""; 426 | projectRoot = ""; 427 | targets = ( 428 | 890A4B3E171F031300AFE577 /* RRConstraintsPlugin */, 429 | ); 430 | }; 431 | /* End PBXProject section */ 432 | 433 | /* Begin PBXResourcesBuildPhase section */ 434 | 890A4B3D171F031300AFE577 /* Resources */ = { 435 | isa = PBXResourcesBuildPhase; 436 | buildActionMask = 2147483647; 437 | files = ( 438 | F0EE69741A38A6A9001E56B1 /* keep_constraints_when_embedding.png in Resources */, 439 | F0D91F4418CBA4E900C95205 /* remove_at_build_time.png in Resources */, 440 | F00BDA6018DB33C7007A3B43 /* highlite_in_outline_on_hover.png in Resources */, 441 | F024B35F18FD32C500BA6E1A /* remove_at_build_time_gray_dash.png in Resources */, 442 | F0D91F4218CBA4E900C95205 /* double_click_constraint_in_outline_attribute_inspector.png in Resources */, 443 | F0F8206718CB720100A99AD3 /* RRWelcomeWindowController.xib in Resources */, 444 | F012008318F9A8AC00511F84 /* distribute_views.png in Resources */, 445 | F02F934118CB8A690015A342 /* index.html in Resources */, 446 | F0AC82731A261B9600BBACB4 /* color_constraints_based_on_priority.png in Resources */, 447 | F0D91F4018CBA4E900C95205 /* constraint_in_editor_attribute_inspector.png in Resources */, 448 | ); 449 | runOnlyForDeploymentPostprocessing = 0; 450 | }; 451 | /* End PBXResourcesBuildPhase section */ 452 | 453 | /* Begin PBXSourcesBuildPhase section */ 454 | 890A4B3B171F031300AFE577 /* Sources */ = { 455 | isa = PBXSourcesBuildPhase; 456 | buildActionMask = 2147483647; 457 | files = ( 458 | F0F456FD18DA093C00CD796E /* RRLayoutConstraintItemInspectorProperty.m in Sources */, 459 | F0E4D42C18C48AF200B2BCAA /* RRInspectorReferencingConstraintViewController.m in Sources */, 460 | F030830318FD23F4003A06B6 /* RRAutolayoutConstraintDrawable.m in Sources */, 461 | F0211FF418C65071007E403F /* RROutlineViewController.m in Sources */, 462 | F01FCE3C18C3740B00F71C33 /* RRConstraintsPlugin.m in Sources */, 463 | F0F8206318CB71C900A99AD3 /* RRWelcomeWindowController.m in Sources */, 464 | F06E79381A386AC800853721 /* RRSubviewEmbeddingPolicy.m in Sources */, 465 | F0FEABB418C3D6E5000B0EEF /* NSImage+RRFilters.m in Sources */, 466 | F0CFA88218CA814600D223C6 /* RRCanvasViewController.m in Sources */, 467 | F0EFCACE18F866EB005285CE /* RRAutolayoutConstraintAdditionViewController.m in Sources */, 468 | F0758FFF18C37E8200B6BE01 /* NSObject+RRReplaceAdditions.m in Sources */, 469 | F000815B1A260041008E2211 /* RRMenuBuilder.m in Sources */, 470 | F00081581A25FFB9008E2211 /* RRAbstractDocumentEditor.m in Sources */, 471 | F0FBFC3F18C664A600F8F2E2 /* RRInspectorBooleanProperty.m in Sources */, 472 | F063112518C5426500B643BE /* RRLayoutConstant.m in Sources */, 473 | ); 474 | runOnlyForDeploymentPostprocessing = 0; 475 | }; 476 | /* End PBXSourcesBuildPhase section */ 477 | 478 | /* Begin XCBuildConfiguration section */ 479 | 890A4B50171F031300AFE577 /* Debug */ = { 480 | isa = XCBuildConfiguration; 481 | buildSettings = { 482 | ALWAYS_SEARCH_USER_PATHS = NO; 483 | CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER = YES; 484 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 485 | CLANG_CXX_LIBRARY = "libc++"; 486 | CLANG_ENABLE_MODULES = YES; 487 | CLANG_ENABLE_OBJC_ARC = YES; 488 | CLANG_WARN_BOOL_CONVERSION = YES; 489 | CLANG_WARN_CONSTANT_CONVERSION = YES; 490 | CLANG_WARN_CXX0X_EXTENSIONS = YES; 491 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 492 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 493 | CLANG_WARN_EMPTY_BODY = YES; 494 | CLANG_WARN_ENUM_CONVERSION = YES; 495 | CLANG_WARN_INT_CONVERSION = YES; 496 | CLANG_WARN_OBJC_EXPLICIT_OWNERSHIP_TYPE = YES; 497 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 498 | CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES; 499 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 500 | COPY_PHASE_STRIP = NO; 501 | GCC_C_LANGUAGE_STANDARD = gnu99; 502 | GCC_ENABLE_OBJC_EXCEPTIONS = YES; 503 | GCC_ENABLE_PASCAL_STRINGS = NO; 504 | GCC_OPTIMIZATION_LEVEL = 0; 505 | GCC_PREPROCESSOR_DEFINITIONS = ( 506 | "CONFIGURATION_DEBUG=1", 507 | "$(inherited)", 508 | ); 509 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 510 | GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES; 511 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 512 | GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES; 513 | GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; 514 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 515 | GCC_WARN_FOUR_CHARACTER_CONSTANTS = YES; 516 | GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES; 517 | GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES; 518 | GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; 519 | GCC_WARN_SIGN_COMPARE = YES; 520 | GCC_WARN_UNDECLARED_SELECTOR = YES; 521 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 522 | GCC_WARN_UNKNOWN_PRAGMAS = YES; 523 | GCC_WARN_UNUSED_FUNCTION = YES; 524 | GCC_WARN_UNUSED_LABEL = YES; 525 | GCC_WARN_UNUSED_VARIABLE = YES; 526 | MACOSX_DEPLOYMENT_TARGET = 10.8; 527 | ONLY_ACTIVE_ARCH = YES; 528 | RUN_CLANG_STATIC_ANALYZER = YES; 529 | SDKROOT = macosx; 530 | WARNING_CFLAGS = "-Wunreachable-code"; 531 | }; 532 | name = Debug; 533 | }; 534 | 890A4B51171F031300AFE577 /* Release */ = { 535 | isa = XCBuildConfiguration; 536 | buildSettings = { 537 | ALWAYS_SEARCH_USER_PATHS = NO; 538 | CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER = YES; 539 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 540 | CLANG_CXX_LIBRARY = "libc++"; 541 | CLANG_ENABLE_MODULES = YES; 542 | CLANG_ENABLE_OBJC_ARC = YES; 543 | CLANG_WARN_BOOL_CONVERSION = YES; 544 | CLANG_WARN_CONSTANT_CONVERSION = YES; 545 | CLANG_WARN_CXX0X_EXTENSIONS = YES; 546 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 547 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 548 | CLANG_WARN_EMPTY_BODY = YES; 549 | CLANG_WARN_ENUM_CONVERSION = YES; 550 | CLANG_WARN_INT_CONVERSION = YES; 551 | CLANG_WARN_OBJC_EXPLICIT_OWNERSHIP_TYPE = YES; 552 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 553 | CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES; 554 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 555 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 556 | GCC_C_LANGUAGE_STANDARD = gnu99; 557 | GCC_ENABLE_OBJC_EXCEPTIONS = YES; 558 | GCC_ENABLE_PASCAL_STRINGS = NO; 559 | GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES; 560 | GCC_UNROLL_LOOPS = YES; 561 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 562 | GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES; 563 | GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; 564 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 565 | GCC_WARN_FOUR_CHARACTER_CONSTANTS = YES; 566 | GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES; 567 | GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES; 568 | GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; 569 | GCC_WARN_SIGN_COMPARE = YES; 570 | GCC_WARN_UNDECLARED_SELECTOR = YES; 571 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 572 | GCC_WARN_UNKNOWN_PRAGMAS = YES; 573 | GCC_WARN_UNUSED_FUNCTION = YES; 574 | GCC_WARN_UNUSED_LABEL = YES; 575 | GCC_WARN_UNUSED_VARIABLE = YES; 576 | LLVM_LTO = YES; 577 | MACOSX_DEPLOYMENT_TARGET = 10.8; 578 | RUN_CLANG_STATIC_ANALYZER = YES; 579 | SDKROOT = macosx; 580 | VALIDATE_PRODUCT = YES; 581 | WARNING_CFLAGS = "-Wunreachable-code"; 582 | }; 583 | name = Release; 584 | }; 585 | 890A4B53171F031300AFE577 /* Debug */ = { 586 | isa = XCBuildConfiguration; 587 | buildSettings = { 588 | COMBINE_HIDPI_IMAGES = YES; 589 | DEPLOYMENT_LOCATION = YES; 590 | DSTROOT = "$(HOME)"; 591 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 592 | GCC_PREFIX_HEADER = RRConstraintsPlugin/Prefix.pch; 593 | INFOPLIST_FILE = RRConstraintsPlugin/Resources/Info.plist; 594 | INSTALL_PATH = "/Library/Application Support/Developer/Shared/Xcode/Plug-ins"; 595 | MACOSX_DEPLOYMENT_TARGET = 10.8; 596 | PRODUCT_NAME = RRConstraintsPlugin; 597 | WRAPPER_EXTENSION = xcplugin; 598 | }; 599 | name = Debug; 600 | }; 601 | 890A4B54171F031300AFE577 /* Release */ = { 602 | isa = XCBuildConfiguration; 603 | buildSettings = { 604 | COMBINE_HIDPI_IMAGES = YES; 605 | DEPLOYMENT_LOCATION = YES; 606 | DSTROOT = "$(HOME)"; 607 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 608 | GCC_PREFIX_HEADER = RRConstraintsPlugin/Prefix.pch; 609 | INFOPLIST_FILE = RRConstraintsPlugin/Resources/Info.plist; 610 | INSTALL_PATH = "/Library/Application Support/Developer/Shared/Xcode/Plug-ins"; 611 | MACOSX_DEPLOYMENT_TARGET = 10.8; 612 | PRODUCT_NAME = RRConstraintsPlugin; 613 | WRAPPER_EXTENSION = xcplugin; 614 | }; 615 | name = Release; 616 | }; 617 | /* End XCBuildConfiguration section */ 618 | 619 | /* Begin XCConfigurationList section */ 620 | 890A4B3A171F031300AFE577 /* Build configuration list for PBXProject "RRConstraintsPlugin" */ = { 621 | isa = XCConfigurationList; 622 | buildConfigurations = ( 623 | 890A4B50171F031300AFE577 /* Debug */, 624 | 890A4B51171F031300AFE577 /* Release */, 625 | ); 626 | defaultConfigurationIsVisible = 0; 627 | defaultConfigurationName = Release; 628 | }; 629 | 890A4B52171F031300AFE577 /* Build configuration list for PBXNativeTarget "RRConstraintsPlugin" */ = { 630 | isa = XCConfigurationList; 631 | buildConfigurations = ( 632 | 890A4B53171F031300AFE577 /* Debug */, 633 | 890A4B54171F031300AFE577 /* Release */, 634 | ); 635 | defaultConfigurationIsVisible = 0; 636 | defaultConfigurationName = Release; 637 | }; 638 | /* End XCConfigurationList section */ 639 | }; 640 | rootObject = 890A4B37171F031300AFE577 /* Project object */; 641 | } 642 | -------------------------------------------------------------------------------- /RRConstraintsPlugin/Classes/Controller/RRAbstractDocumentEditor.m: -------------------------------------------------------------------------------- 1 | // 2 | // RRAbstractDocumentEditor.m 3 | // RRConstraintsPlugin 4 | // 5 | // Copyright (c) 2014 Rolandas Razma 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | #import "IBAbstractDocumentEditor.h" 26 | #import "IBCanvasViewController.h" 27 | #import "IBViewEditor.h" 28 | 29 | 30 | @interface RRAbstractDocumentEditor : NSViewController 31 | 32 | @end 33 | 34 | 35 | @implementation RRAbstractDocumentEditor 36 | 37 | 38 | #pragma mark - 39 | #pragma mark NSObject 40 | 41 | 42 | + (void)load { 43 | [NSClassFromString(@"IBAbstractDocumentEditor") importMethodsFromClass:[self class] exchangeImplementationsPrefix:"rr_"]; 44 | } 45 | 46 | 47 | #pragma mark - 48 | #pragma mark IBAbstractDocumentEditor 49 | 50 | 51 | - (BOOL)rr_validateUserInterfaceItem:(NSMenuItem *)menuItem { 52 | if( [NSStringFromSelector(menuItem.action) isEqualToString:@"toggleColoringConstraints:"] ){ 53 | [menuItem setState: (([self isColoringConstraints])?NSOnState:NSOffState)]; 54 | return YES; 55 | }else{ 56 | return [self rr_validateUserInterfaceItem:menuItem]; 57 | } 58 | } 59 | 60 | 61 | #pragma mark - 62 | #pragma mark RRAbstractDocumentEditor 63 | 64 | 65 | - (void)toggleColoringConstraints:(NSMenuItem *)menuItem { 66 | [self setColoringConstraints: !self.isColoringConstraints]; 67 | } 68 | 69 | 70 | - (BOOL)isColoringConstraints { 71 | return [[NSUserDefaults standardUserDefaults] boolForKey:@"RRConstraintsPlugin.InterfaceBuilderKit.DocumentEditorMenu.Canvas.ColoringConstraints"]; 72 | } 73 | 74 | 75 | - (void)setColoringConstraints:(BOOL)coloringConstraints { 76 | [[NSUserDefaults standardUserDefaults] setBool:coloringConstraints 77 | forKey:@"RRConstraintsPlugin.InterfaceBuilderKit.DocumentEditorMenu.Canvas.ColoringConstraints"]; 78 | 79 | [self.canvasViewController.activeEditors makeObjectsPerformSelector:@selector(updateConstraintVisibilityBasedUponSelection)]; 80 | } 81 | 82 | 83 | @end 84 | -------------------------------------------------------------------------------- /RRConstraintsPlugin/Classes/Controller/RRAutolayoutConstraintAdditionViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // RRAutolayoutConstraintAdditionViewController.m 3 | // RRConstraintsPlugin 4 | // 5 | // Copyright (c) 2014 Rolandas Razma 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | #import "IBAutolayoutConstraintAdditionViewController.h" 26 | #import "IBAutolayoutConstraintAdditionTypeConfig.h" 27 | #import "IBLayoutConstraint.h" 28 | #import "IBLayoutConstant.h" 29 | #import "IBDecimalLayoutConstraintMultiplier.h" 30 | #import 31 | 32 | 33 | @interface RRAutolayoutConstraintAdditionViewController : NSViewController 34 | 35 | @end 36 | 37 | 38 | @implementation RRAutolayoutConstraintAdditionViewController 39 | 40 | 41 | #pragma mark - 42 | #pragma mark NSObject 43 | 44 | 45 | + (void)load { 46 | [NSClassFromString(@"IBAutolayoutConstraintAdditionViewController") importMethodsFromClass:[self class] exchangeImplementationsPrefix:"rr_"]; 47 | } 48 | 49 | 50 | #pragma mark - 51 | #pragma mark RRAutolayoutConstraintAdditionViewController 52 | 53 | 54 | - (NSMutableDictionary *)typeConfigurationsByAlignmentType { 55 | Ivar typeConfigurationsByAlignmentTypeIvar = class_getInstanceVariable([self class], "_typeConfigurationsByAlignmentType"); 56 | return object_getIvar(self, typeConfigurationsByAlignmentTypeIvar); 57 | } 58 | 59 | 60 | #pragma mark - 61 | #pragma mark IBAutolayoutConstraintAdditionViewController 62 | 63 | 64 | - (void)rr__addEdgeOrCenterAlignmentTypeConfigurationsToSet:(NSMutableSet *)typeConfigurations { 65 | [self rr__addEdgeOrCenterAlignmentTypeConfigurationsToSet:typeConfigurations]; 66 | 67 | 68 | // affectedItems 69 | IBAutolayoutConstraintAdditionTypeConfig *leadingEdgesAutolayoutConstraintAdditionTypeConfig = [[self typeConfigurationsByAlignmentType] objectForKey:@1]; 70 | NSSet *leadingEdgesConstraints = leadingEdgesAutolayoutConstraintAdditionTypeConfig.constraints; 71 | 72 | NSObject *containingView; 73 | NSMutableOrderedSet *affectedItems = [NSMutableOrderedSet orderedSet]; 74 | 75 | for( IBLayoutConstraint *layoutConstraint in leadingEdgesConstraints ){ 76 | [affectedItems addObject: layoutConstraint.firstItem]; 77 | [affectedItems addObject: layoutConstraint.secondItem]; 78 | 79 | containingView = layoutConstraint.containingView; 80 | } 81 | 82 | 83 | // Can distribute only 2 or more views 84 | if( affectedItems.count < 2 ) return; 85 | 86 | 87 | // Check for same size 88 | CGSize commonSize = [affectedItems[0] frame].size; 89 | for( NSView *view in affectedItems ){ 90 | if( commonSize.width && view.frame.size.width != commonSize.width ) { 91 | commonSize.width = 0.0f; 92 | } 93 | if( commonSize.height && view.frame.size.height != commonSize.height ) { 94 | commonSize.height = 0.0f; 95 | } 96 | } 97 | 98 | 99 | // Distribute - Horizontally (if widths are same) 100 | if( commonSize.width ){ 101 | // Sort on X axis 102 | [affectedItems sortUsingComparator:^NSComparisonResult(NSView *obj1, NSView *obj2) { 103 | if ( obj1.frame.origin.x > obj2.frame.origin.x ){ 104 | return NSOrderedDescending; 105 | } 106 | if ( obj1.frame.origin.x < obj2.frame.origin.x ){ 107 | return NSOrderedAscending; 108 | } 109 | return NSOrderedSame; 110 | }]; 111 | 112 | // New constraints 113 | NSMutableSet *constraints = [NSMutableSet set]; 114 | 115 | for ( NSUInteger i = 0; i < affectedItems.count; i++ ) { 116 | NSView *view = affectedItems[i]; 117 | 118 | CGFloat multiplier = (i *2.0f +2.0f) /((float)affectedItems.count +1.0f); 119 | CGFloat constant = (multiplier -1.0f) *commonSize.width /2.0f; 120 | 121 | IBLayoutConstraint *layoutConstraint = [[NSClassFromString(@"IBLayoutConstraint") alloc] initWithFirstItem: view 122 | firstAttribute: NSLayoutAttributeCenterX 123 | relation: NSLayoutRelationEqual 124 | secondItem: containingView 125 | secondAttribute: NSLayoutAttributeCenterX 126 | multiplier: [[NSClassFromString(@"IBDecimalLayoutConstraintMultiplier") alloc] initWithValue:multiplier stringValue:[NSString stringWithFormat:@"%f", multiplier]] 127 | constant: [[NSClassFromString(@"IBLayoutConstant") alloc] initWithValue:constant] 128 | priority: NSLayoutPriorityRequired]; 129 | [layoutConstraint setContainingView:containingView]; 130 | 131 | [constraints addObject:layoutConstraint]; 132 | } 133 | 134 | IBAutolayoutConstraintAdditionTypeConfig *autolayoutConstraintAdditionTypeConfig = [self _typeConfigurationWithField:nil checkBox:nil startingConstant:nil andConstraints: constraints]; 135 | [autolayoutConstraintAdditionTypeConfig setEnabled:YES]; 136 | 137 | [[self typeConfigurationsByAlignmentType] setObject:autolayoutConstraintAdditionTypeConfig forKey:@101]; 138 | [typeConfigurations addObject:autolayoutConstraintAdditionTypeConfig]; 139 | } 140 | 141 | 142 | // Distribute - Vertically (if heights are same) 143 | if( commonSize.height ){ 144 | // Sort on Y axis 145 | [affectedItems sortUsingComparator:^NSComparisonResult(NSView *obj1, NSView *obj2) { 146 | if ( obj1.frame.origin.y > obj2.frame.origin.y ){ 147 | return NSOrderedAscending; 148 | } 149 | if ( obj1.frame.origin.y < obj2.frame.origin.y ){ 150 | return NSOrderedDescending; 151 | } 152 | return NSOrderedSame; 153 | }]; 154 | 155 | 156 | // New constraints 157 | NSMutableSet *constraints = [NSMutableSet set]; 158 | 159 | for ( NSUInteger i = 0; i < affectedItems.count; i++ ) { 160 | NSView *view = affectedItems[i]; 161 | 162 | CGFloat multiplier = (i *2.0f +2.0f) /((float)affectedItems.count +1.0f); 163 | CGFloat constant = (multiplier -1.0f) *commonSize.height /2.0f; 164 | 165 | IBLayoutConstraint *layoutConstraint = [[NSClassFromString(@"IBLayoutConstraint") alloc] initWithFirstItem: view 166 | firstAttribute: NSLayoutAttributeCenterY 167 | relation: NSLayoutRelationEqual 168 | secondItem: containingView 169 | secondAttribute: NSLayoutAttributeCenterY 170 | multiplier: [[NSClassFromString(@"IBDecimalLayoutConstraintMultiplier") alloc] initWithValue:multiplier stringValue:[NSString stringWithFormat:@"%f", multiplier]] 171 | constant: [[NSClassFromString(@"IBLayoutConstant") alloc] initWithValue:constant] 172 | priority: NSLayoutPriorityRequired]; 173 | [layoutConstraint setContainingView:containingView]; 174 | 175 | [constraints addObject:layoutConstraint]; 176 | } 177 | 178 | IBAutolayoutConstraintAdditionTypeConfig *autolayoutConstraintAdditionTypeConfig = [self _typeConfigurationWithField:nil checkBox:nil startingConstant:nil andConstraints: constraints]; 179 | [autolayoutConstraintAdditionTypeConfig setEnabled:YES]; 180 | 181 | [[self typeConfigurationsByAlignmentType] setObject:autolayoutConstraintAdditionTypeConfig forKey:@102]; 182 | [typeConfigurations addObject:autolayoutConstraintAdditionTypeConfig]; 183 | } 184 | 185 | } 186 | 187 | 188 | - (void)rr_setAlignPopUpMenu:(NSMenu *)alignPopUpMenu { 189 | 190 | // separator 191 | [alignPopUpMenu addItem: [NSMenuItem separatorItem]]; 192 | 193 | // Distribute - Horizontally 194 | NSMenuItem *horizontalMenuItem = [[NSMenuItem alloc] init]; 195 | [horizontalMenuItem setTitle:@"Distribute Horizontally"]; 196 | [horizontalMenuItem setTag: 101]; 197 | [alignPopUpMenu addItem: horizontalMenuItem]; 198 | 199 | // Distribute - Vertical 200 | NSMenuItem *verticalMenuItem = [[NSMenuItem alloc] init]; 201 | [verticalMenuItem setTitle:@"Distribute Vertically"]; 202 | [verticalMenuItem setTag: 102]; 203 | [alignPopUpMenu addItem: verticalMenuItem]; 204 | 205 | [self rr_setAlignPopUpMenu:alignPopUpMenu]; 206 | 207 | } 208 | 209 | 210 | - (BOOL)rr_validateMenuItem:(NSMenuItem *)menuItem { 211 | 212 | if( menuItem.tag >= 100 ){ 213 | IBAutolayoutConstraintAdditionTypeConfig *autolayoutConstraintAdditionTypeConfig = [self _typeConfigurationForAlignmentType:menuItem.tag]; 214 | return [autolayoutConstraintAdditionTypeConfig enabled]; 215 | }else{ 216 | return [self rr_validateMenuItem:menuItem]; 217 | } 218 | 219 | } 220 | 221 | 222 | @end 223 | -------------------------------------------------------------------------------- /RRConstraintsPlugin/Classes/Controller/RRCanvasViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // RRCanvasViewController.m 3 | // RRConstraintsPlugin 4 | // 5 | // Copyright (c) 2014 Rolandas Razma 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | #import "IBCanvasViewController.h" 26 | #import "IDEMenuKeyBindingSet.h" 27 | #import "IDEWorkspaceTabController.h" 28 | 29 | 30 | @interface RRCanvasViewController : NSViewController 31 | 32 | @end 33 | 34 | 35 | @implementation RRCanvasViewController 36 | 37 | 38 | #pragma mark - 39 | #pragma mark NSObject 40 | 41 | 42 | + (void)load { 43 | [NSClassFromString(@"IBCanvasViewController") importMethodsFromClass:[self class] exchangeImplementationsPrefix:"rr_"]; 44 | } 45 | 46 | 47 | #pragma mark - 48 | #pragma mark IBCanvasViewController 49 | 50 | 51 | - (void)rr_editorDidChangeSelection:(IBEditor *)selection { 52 | [self rr_editorDidChangeSelection:selection]; 53 | 54 | if( [self.selectedMembers count] == 1 ){ 55 | id selectedObject = [self.selectedMembers firstObject]; 56 | if( [selectedObject isKindOfClass: NSClassFromString(@"IBLayoutConstraint")] ){ 57 | IDEMenuKeyBindingSet *menuKeyBindingSet = [NSClassFromString(@"IDEMenuKeyBindingSet") defaultKeyBindingSet]; 58 | NSMenuItem *menuItem = [menuKeyBindingSet menuItemForCommandIdentifier: @"Xcode.InterfaceBuilderKit.InspectorCategory.Attributes"]; 59 | [[self activeWorkspaceTabController] showInspectorWithChoiceFromSender:menuItem]; 60 | } 61 | } 62 | } 63 | 64 | 65 | @end 66 | -------------------------------------------------------------------------------- /RRConstraintsPlugin/Classes/Controller/RRInspectorBooleanProperty.m: -------------------------------------------------------------------------------- 1 | // 2 | // RRInspectorBooleanProperty.m 3 | // RRConstraintsPlugin 4 | // 5 | // Copyright (c) 2014 Rolandas Razma 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | #import "IDEInspectorBooleanProperty.h" 26 | #import "IDEBindableDeclarativeInspectorController.h" 27 | #import "IBDocumentObjectMemberWrapper.h" 28 | 29 | 30 | @interface RRInspectorBooleanProperty : NSViewController 31 | 32 | @end 33 | 34 | 35 | @implementation RRInspectorBooleanProperty 36 | 37 | 38 | #pragma mark - 39 | #pragma mark NSObject 40 | 41 | 42 | + (void)load { 43 | [NSClassFromString(@"IDEInspectorBooleanProperty") importMethodsFromClass:[self class] exchangeImplementationsPrefix:"rr_"]; 44 | } 45 | 46 | 47 | #pragma mark - 48 | #pragma mark IDInspectorBooleanProperty 49 | 50 | 51 | - (void)rr_refresh { 52 | [self rr_refresh]; 53 | 54 | // IBLayoutConstraint 55 | NSArray *inspectedObjects = [[self inspectorController] inspectedObjects]; 56 | for( id inspectedObject in inspectedObjects ){ 57 | if( [inspectedObject isKindOfClass: NSClassFromString(@"IBDocumentObjectMemberWrapper")] ){ 58 | if( [[inspectedObject object] isKindOfClass:NSClassFromString(@"IBLayoutConstraint")] ){ 59 | [inspectedObject rebuildChildWrappers]; 60 | } 61 | } 62 | } 63 | } 64 | 65 | 66 | @end 67 | 68 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /RRConstraintsPlugin/Classes/Controller/RRInspectorReferencingConstraintViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // RRInspectorReferencingConstraintViewController.m 3 | // RRConstraintsPlugin 4 | // 5 | // Copyright (c) 2014 Rolandas Razma 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | #import "IBInspectorReferencingConstraintViewController.h" 26 | #import "IBInspectorReferencingConstraintView.h" 27 | #import "NSImage+RRFilters.h" 28 | #import "IBLayoutConstraint.h" 29 | #import "IBLayoutConstant.h" 30 | #import 31 | 32 | 33 | @interface RRInspectorReferencingConstraintViewController : NSViewController 34 | 35 | @end 36 | 37 | 38 | @implementation RRInspectorReferencingConstraintViewController 39 | 40 | 41 | #pragma mark - 42 | #pragma mark NSObject 43 | 44 | 45 | + (void)load { 46 | 47 | [NSClassFromString(@"IBInspectorReferencingConstraintViewController") importMethodsFromClass:[self class] exchangeImplementationsPrefix:"rr_"]; 48 | 49 | } 50 | 51 | 52 | #pragma mark - 53 | #pragma mark IBInspectorReferencingConstraintViewController 54 | 55 | 56 | - (void)rr_updateImageView { 57 | [self rr_updateImageView]; 58 | 59 | if( self.constraint.isPlaceholder ){ 60 | NSImageView *imageView = [[self constraintView] imageView]; 61 | [imageView setImage: [imageView.image grayscaleImage]]; 62 | } 63 | } 64 | 65 | 66 | @end 67 | -------------------------------------------------------------------------------- /RRConstraintsPlugin/Classes/Controller/RRInspectorReferencingConstraintViewDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // RRInspectorReferencingConstraintViewDelegate.h 3 | // RRConstraintsPlugin 4 | // 5 | // Copyright (c) 2014 Rolandas Razma 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | @import Foundation; 26 | #import "IBInspectorReferencingConstraintViewDelegate.h" 27 | 28 | 29 | @protocol RRInspectorReferencingConstraintViewDelegate 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /RRConstraintsPlugin/Classes/Controller/RRLayoutConstraintItemInspectorProperty.m: -------------------------------------------------------------------------------- 1 | // 2 | // RRLayoutConstraintItemInspectorProperty.m 3 | // RRConstraintsPlugin 4 | // 5 | // Copyright (c) 2014 Rolandas Razma 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | #import "IBLayoutConstraintItemInspectorProperty.h" 26 | #import "IBAbstractDocumentEditor.h" 27 | #import "IBHybridStructureViewController.h" 28 | #import "IBStoryboardStructureViewController.h" 29 | #import "IBOutlineViewController.h" 30 | #import "IBNavigationOutlineViewController.h" 31 | #import "IBStoryboardNavigationOutlineViewController.h" 32 | #import "IBDocument.h" 33 | #import "IBOutlineView.h" 34 | #import 35 | 36 | 37 | @interface RRLayoutConstraintItemInspectorProperty : NSViewController 38 | 39 | @end 40 | 41 | 42 | @implementation RRLayoutConstraintItemInspectorProperty 43 | 44 | 45 | #pragma mark - 46 | #pragma mark NSObject 47 | 48 | 49 | + (void)load { 50 | [NSClassFromString(@"IBLayoutConstraintItemInspectorProperty") importMethodsFromClass:[self class] exchangeImplementationsPrefix:"rr_"]; 51 | } 52 | 53 | 54 | #pragma mark - 55 | #pragma mark IBLayoutConstraintItemInspectorProperty 56 | 57 | 58 | - (void)rr_didStartRollingOverItemInspectorBackgroundView:(IBLayoutConstraintItemInspectorBackgroundView *)view { 59 | 60 | Ivar itemKeyPathIvar = class_getInstanceVariable([self class], "_itemKeyPath"); 61 | NSArray *objects = [self allValuesForKeyPath: object_getIvar(self, itemKeyPathIvar)]; 62 | [self outlineViewsShouldHlighteObjects:objects]; 63 | 64 | [self rr_didStartRollingOverItemInspectorBackgroundView:view]; 65 | } 66 | 67 | 68 | - (void)rr_didFinishRollingOverItemInspectorBackgroundView:(IBLayoutConstraintItemInspectorBackgroundView *)view { 69 | [self outlineViewsShouldHlighteObjects:nil]; 70 | [self rr_didFinishRollingOverItemInspectorBackgroundView:view]; 71 | } 72 | 73 | 74 | #pragma mark - 75 | #pragma mark RRLayoutConstraintItemInspectorProperty 76 | 77 | 78 | - (void)outlineViewsShouldHlighteObjects:(NSArray *)objects { 79 | IBDocument *document = [self inspectedDocument]; 80 | 81 | NSArray *visibleDocumentEditorControllers = [NSClassFromString(@"IBAbstractDocumentEditor") visibleDocumentEditorControllersFromBackToFrontInDocument:document]; 82 | 83 | IBStructureViewController *structureViewController = [[visibleDocumentEditorControllers lastObject] structureViewController]; 84 | 85 | IBNavigationOutlineViewController *navigationOutlineViewController; 86 | if( [structureViewController isKindOfClass: NSClassFromString(@"IBStoryboardStructureViewController")] ){ 87 | navigationOutlineViewController = [(IBStoryboardStructureViewController *)structureViewController documentOutlineViewController]; 88 | } else if( [structureViewController isKindOfClass: NSClassFromString(@"IBHybridStructureViewController")] ){ 89 | navigationOutlineViewController = [(IBHybridStructureViewController *)structureViewController outlineViewController]; 90 | } 91 | 92 | if( navigationOutlineViewController ){ 93 | IBOutlineViewController *outlineViewController = [navigationOutlineViewController outlineViewController]; 94 | IBOutlineView *outlineView = [outlineViewController outlineView]; 95 | 96 | // Find rows to highlite 97 | NSMutableSet *highlightedRows = [NSMutableSet set]; 98 | 99 | for( NSObject *object in objects ){ 100 | IBOutlineViewControllerItem *outlineViewControllerItem = [outlineViewController itemForMemberWrapper: [document memberWrapperForMember:object]]; 101 | 102 | NSInteger row = [outlineView rowForItem:outlineViewControllerItem]; 103 | if( row >= 0 ){ 104 | [highlightedRows addObject: @(row)]; 105 | } 106 | } 107 | 108 | [outlineView setHighlightedRows: highlightedRows]; 109 | } 110 | } 111 | 112 | 113 | @end 114 | 115 | 116 | 117 | 118 | 119 | -------------------------------------------------------------------------------- /RRConstraintsPlugin/Classes/Controller/RROutlineViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // RROutlineViewController.m 3 | // RRConstraintsPlugin 4 | // 5 | // Copyright (c) 2014 Rolandas Razma 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | #import "IBOutlineViewController.h" 26 | #import "IBOutlineViewControllerItem.h" 27 | #import "IBDocument.h" 28 | #import "IBLayoutConstraint.h" 29 | #import "NSImage+RRFilters.h" 30 | #import "IDEMenuKeyBindingSet.h" 31 | #import "IBAbstractDocumentEditor.h" 32 | #import "IBCanvasViewController.h" 33 | #import "IDEWorkspaceTabController.h" 34 | 35 | 36 | @interface RROutlineViewController : NSViewController 37 | 38 | @end 39 | 40 | 41 | @implementation RROutlineViewController 42 | 43 | 44 | #pragma mark - 45 | #pragma mark NSObject 46 | 47 | 48 | + (void)load { 49 | 50 | [NSClassFromString(@"IBOutlineViewController") importMethodsFromClass:[self class] exchangeImplementationsPrefix:"rr_"]; 51 | 52 | } 53 | 54 | 55 | #pragma mark - 56 | #pragma mark IBOutlineViewController 57 | 58 | 59 | - (IBOutlineViewControllerItem *)rr_itemTreeFromMemberWrapperTree:(IBDocumentObjectMemberWrapper *)wrapperTree explicitItemClass:(Class)itemClass { 60 | IBOutlineViewControllerItem *itemTree = [self rr_itemTreeFromMemberWrapperTree:wrapperTree explicitItemClass:itemClass]; 61 | 62 | if( itemTree.memberID ){ 63 | id documentMember = [itemTree.document memberForMemberID:itemTree.memberID]; 64 | 65 | if( [documentMember isKindOfClass: NSClassFromString(@"IBLayoutConstraint")] ){ 66 | IBLayoutConstraint *layoutConstraint = documentMember; 67 | 68 | if( layoutConstraint.isPlaceholder ){ 69 | [itemTree setImage: [itemTree.image grayscaleImage]]; 70 | } 71 | } 72 | } 73 | 74 | return itemTree; 75 | } 76 | 77 | 78 | - (void)rr_outlineViewWasDoubleClicked:(IBOutlineView *)outlineView { 79 | [self rr_outlineViewWasDoubleClicked:outlineView]; 80 | 81 | NSArray *selectedMembers = [self readSelectedMembersFromOutlineView]; 82 | if( selectedMembers.count == 1 ){ 83 | id selectedObject = [selectedMembers firstObject]; 84 | if( [selectedObject isKindOfClass: NSClassFromString(@"IBLayoutConstraint")] ){ 85 | IDEMenuKeyBindingSet *menuKeyBindingSet = [NSClassFromString(@"IDEMenuKeyBindingSet") defaultKeyBindingSet]; 86 | NSMenuItem *menuItem = [menuKeyBindingSet menuItemForCommandIdentifier: @"Xcode.InterfaceBuilderKit.InspectorCategory.Attributes"]; 87 | 88 | IBCanvasViewController *canvasViewController = [self.documentEditor canvasViewController]; 89 | [canvasViewController.activeWorkspaceTabController showInspectorWithChoiceFromSender:menuItem]; 90 | } 91 | } 92 | } 93 | 94 | 95 | @end 96 | -------------------------------------------------------------------------------- /RRConstraintsPlugin/Classes/Controller/RRWelcomeWindowController.h: -------------------------------------------------------------------------------- 1 | // 2 | // RRWelcomeWindowController.h 3 | // RRConstraintsPlugin 4 | // 5 | // Copyright (c) 2014 Rolandas Razma 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | @import Cocoa; 26 | 27 | 28 | @interface RRWelcomeWindowController : NSWindowController 29 | 30 | - (id)initWithBundle:(NSBundle *)bundle; 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /RRConstraintsPlugin/Classes/Controller/RRWelcomeWindowController.m: -------------------------------------------------------------------------------- 1 | // 2 | // RRWelcomeWindowController.m 3 | // RRConstraintsPlugin 4 | // 5 | // Copyright (c) 2014 Rolandas Razma 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | #import "RRWelcomeWindowController.h" 26 | @import WebKit; 27 | 28 | 29 | @interface RRWelcomeWindowController () 30 | 31 | @end 32 | 33 | 34 | @implementation RRWelcomeWindowController { 35 | __weak IBOutlet WebView *_webView; 36 | } 37 | 38 | 39 | #pragma mark - 40 | #pragma mark RRWelcomeWindowController 41 | 42 | 43 | - (id)initWithBundle:(NSBundle *)bundle { 44 | if (self = [super initWithWindowNibName:@"RRWelcomeWindowController"]) { 45 | 46 | // Add verion number to title 47 | NSString *bundleVersion = [[bundle infoDictionary] objectForKey:@"CFBundleShortVersionString"]; 48 | [self.window setTitle: [self.window.title stringByAppendingFormat:@" v%@", bundleVersion]]; 49 | 50 | // Load changelog 51 | [[_webView mainFrame] loadData: [NSData dataWithContentsOfURL: [bundle URLForResource:@"index" withExtension:@"html"]] 52 | MIMEType: @"text/html" 53 | textEncodingName: @"UTF-8" 54 | baseURL: [bundle resourceURL]]; 55 | } 56 | return self; 57 | } 58 | 59 | 60 | #pragma mark - 61 | #pragma mark WebPolicyDelegate 62 | 63 | 64 | - (void)webView:(WebView *)webView decidePolicyForNavigationAction:(NSDictionary *)actionInformation request:(NSURLRequest *)request frame:(WebFrame *)frame decisionListener:(id )listener { 65 | 66 | if( [request.URL.scheme isEqualToString:@"file"] ){ 67 | [listener use]; 68 | }else{ 69 | [[NSWorkspace sharedWorkspace] openURL: [request URL]]; 70 | } 71 | 72 | } 73 | 74 | 75 | @end 76 | -------------------------------------------------------------------------------- /RRConstraintsPlugin/Classes/Model/RRAutolayoutConstraintDrawable.m: -------------------------------------------------------------------------------- 1 | // 2 | // RRAutolayoutConstraintDrawable.m 3 | // RRConstraintsPlugin 4 | // 5 | // Copyright (c) 2014 Rolandas Razma 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | #import "IBAutolayoutConstraintDrawable.h" 26 | #import "IBLayoutConstraint.h" 27 | 28 | 29 | @interface RRAutolayoutConstraintDrawable : NSObject 30 | 31 | @end 32 | 33 | 34 | @implementation RRAutolayoutConstraintDrawable 35 | 36 | 37 | #pragma mark - 38 | #pragma mark NSObject 39 | 40 | 41 | + (void)load { 42 | [NSClassFromString(@"IBAutolayoutConstraintDrawable") importMethodsFromClass:[self class] exchangeImplementationsPrefix:"rr_"]; 43 | } 44 | 45 | 46 | #pragma mark - 47 | #pragma mark IBAutolayoutConstraintDrawable 48 | 49 | 50 | - (void)rr_setColor:(NSColor *)color { 51 | if( self.constraint.isPlaceholder ){ 52 | color = [NSColor grayColor]; 53 | }else if( [[NSUserDefaults standardUserDefaults] boolForKey:@"RRConstraintsPlugin.InterfaceBuilderKit.DocumentEditorMenu.Canvas.ColoringConstraints"] ){ 54 | double priorityStrength = MAX(0.2f, 1.0f *self.constraint.priority /NSLayoutPriorityRequired); 55 | 56 | color = [NSColor colorWithRed: color.redComponent 57 | green: color.greenComponent 58 | blue: color.blueComponent 59 | alpha: priorityStrength]; 60 | } 61 | 62 | [self rr_setColor:color]; 63 | } 64 | 65 | 66 | - (void)rr_setDashed:(BOOL)dashed { 67 | if( self.constraint.isPlaceholder ){ 68 | dashed = YES; 69 | } 70 | 71 | [self rr_setDashed:dashed]; 72 | } 73 | 74 | 75 | @end 76 | -------------------------------------------------------------------------------- /RRConstraintsPlugin/Classes/Model/RRLayoutConstant.m: -------------------------------------------------------------------------------- 1 | // 2 | // RRLayoutConstant.m 3 | // RRConstraintsPlugin 4 | // 5 | // Copyright (c) 2014 Rolandas Razma 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | #import "IBLayoutConstant.h" 26 | 27 | 28 | @interface RRLayoutConstant : NSObject 29 | 30 | @end 31 | 32 | 33 | @implementation RRLayoutConstant 34 | 35 | 36 | #pragma mark - 37 | #pragma mark NSObject 38 | 39 | 40 | + (void)load { 41 | 42 | [NSClassFromString(@"IBLayoutConstant") importMethodsFromClass:[self class] exchangeImplementationsPrefix:"rr_"]; 43 | 44 | } 45 | 46 | 47 | #pragma mark - 48 | #pragma mark RRLayoutConstant 49 | 50 | 51 | - (double)doubleValue { 52 | return self.value; 53 | } 54 | 55 | 56 | @end 57 | -------------------------------------------------------------------------------- /RRConstraintsPlugin/Classes/Model/RRMenuBuilder.m: -------------------------------------------------------------------------------- 1 | // 2 | // RRMenuBuilder.m 3 | // RRConstraintsPlugin 4 | // 5 | // Copyright (c) 2014 Rolandas Razma 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | #import "IDEMenuBuilder.h" 26 | 27 | 28 | @interface RRMenuBuilder : NSObject 29 | 30 | @end 31 | 32 | 33 | @implementation RRMenuBuilder 34 | 35 | 36 | #pragma mark - 37 | #pragma mark NSObject 38 | 39 | 40 | + (void)load { 41 | [NSClassFromString(@"IDEMenuBuilder") importMethodsFromClass:[self class] exchangeImplementationsPrefix:"rr_"]; 42 | } 43 | 44 | 45 | #pragma mark - 46 | #pragma mark IDEMenuBuilder 47 | 48 | 49 | + (NSMenuItem *)rr__buildSubmenuItemForMenuDefinitionIdentifier:(NSString *)definitionIdentifier forViewController:(NSViewController *)viewController fillingExtensionIdToMenuMap:(id)arg3 { 50 | NSMenuItem *menuItem = [self rr__buildSubmenuItemForMenuDefinitionIdentifier:definitionIdentifier forViewController:viewController fillingExtensionIdToMenuMap:arg3]; 51 | 52 | if( [definitionIdentifier isEqualToString:@"Xcode.InterfaceBuilderKit.DocumentEditorMenu.Canvas"] ){ 53 | NSInteger showConstraintsIndex = [menuItem.submenu indexOfItemWithTitle:@"Show Constraints"]; 54 | 55 | if( showConstraintsIndex >= 0 ){ 56 | NSMenuItem *showConstraintsMenu = [menuItem.submenu.itemArray objectAtIndex:showConstraintsIndex]; 57 | 58 | NSMenuItem *pluginManagerItem = [[NSMenuItem alloc] initWithTitle: @"Color Constraints based on Priority" 59 | action: NSSelectorFromString(@"toggleColoringConstraints:") 60 | keyEquivalent: @""]; 61 | 62 | [pluginManagerItem setTarget: showConstraintsMenu.target]; 63 | 64 | [menuItem.submenu insertItem: pluginManagerItem 65 | atIndex: showConstraintsIndex +1]; 66 | } 67 | } 68 | 69 | return menuItem; 70 | } 71 | 72 | 73 | @end 74 | -------------------------------------------------------------------------------- /RRConstraintsPlugin/Classes/Model/RRSubviewEmbeddingPolicy.m: -------------------------------------------------------------------------------- 1 | // 2 | // RRSubviewEmbeddingPolicy.m 3 | // RRConstraintsPlugin 4 | // 5 | // Copyright (c) 2014 Rolandas Razma 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | #import "IBSubviewEmbeddingPolicy.h" 26 | #import "IBUIView.h" 27 | #import "IBLayoutConstraint.h" 28 | 29 | 30 | @interface RRSubviewEmbeddingPolicy : NSObject 31 | 32 | @end 33 | 34 | 35 | @implementation RRSubviewEmbeddingPolicy 36 | 37 | 38 | #pragma mark - 39 | #pragma mark NSObject 40 | 41 | 42 | + (void)load { 43 | [NSClassFromString(@"IBSubviewEmbeddingPolicy") importMethodsFromClass:[self class] exchangeImplementationsPrefix:"rr_"]; 44 | } 45 | 46 | 47 | #pragma mark - 48 | #pragma mark IBSubviewEmbeddingPolicy 49 | 50 | 51 | - (IBNSCustomView *)rr_embedObjects:(NSArray *)objects fromDocument:(IBXIBDocument *)document context:(NSMutableDictionary *)context { 52 | 53 | // Store constraints 54 | NSMapTable *constraints = [NSMapTable mapTableWithKeyOptions:NSMapTableWeakMemory valueOptions:NSMapTableStrongMemory]; 55 | for( IBUIView *view in objects ){ 56 | [constraints setObject:view.ibInstalledReferencingConstraints forKey:view]; 57 | } 58 | 59 | IBNSCustomView *newParentView = [self rr_embedObjects:objects fromDocument:document context:context]; 60 | 61 | // Check for lost constraints 62 | for( IBUIView *view in objects ){ 63 | NSArray *oldConstraints = [constraints objectForKey:view]; 64 | NSArray *newConstraints = view.ibInstalledReferencingConstraints; 65 | 66 | for( IBLayoutConstraint *layoutConstraint in oldConstraints ){ 67 | if( [newConstraints containsObject:layoutConstraint] ) continue; 68 | 69 | BOOL wasFirstItemMoved = [layoutConstraint.firstItem isEqualTo:view]; 70 | if( wasFirstItemMoved ){ 71 | 72 | // Did both items moved? 73 | if( [layoutConstraint.secondItem.superview isEqual:layoutConstraint.firstItem.superview] ){ 74 | [layoutConstraint setContainingView:newParentView]; 75 | } 76 | // If only 1 77 | else{ 78 | if( [layoutConstraint.secondItem.superview isEqual:newParentView.superview] ){ 79 | [layoutConstraint setFirstItem: newParentView]; 80 | }else{ 81 | [layoutConstraint setSecondItem: newParentView]; 82 | } 83 | } 84 | 85 | }else{ 86 | 87 | // Did both items moved? 88 | if( [layoutConstraint.secondItem.superview isEqual:layoutConstraint.firstItem.superview] ){ 89 | [layoutConstraint setContainingView:newParentView]; 90 | } 91 | // If only 1 92 | else{ 93 | if( [layoutConstraint.firstItem.superview isEqual:newParentView.superview] ){ 94 | [layoutConstraint setSecondItem: newParentView]; 95 | }else{ 96 | [layoutConstraint setFirstItem: newParentView]; 97 | } 98 | } 99 | 100 | } 101 | 102 | [layoutConstraint.containingView ibAddCandidateConstraints:[NSMutableSet setWithObject:layoutConstraint] offInEmptyConfigurationAndOnInConfiguration:nil]; 103 | } 104 | } 105 | 106 | return newParentView; 107 | } 108 | 109 | 110 | @end 111 | -------------------------------------------------------------------------------- /RRConstraintsPlugin/Classes/RRConstraintsPlugin.h: -------------------------------------------------------------------------------- 1 | // 2 | // RRConstraintsPlugin.h 3 | // RRConstraintsPlugin 4 | // 5 | // Copyright (c) 2014 Rolandas Razma 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | 26 | @import AppKit; 27 | 28 | 29 | @interface RRConstraintsPlugin : NSObject 30 | 31 | @property (nonatomic, readonly) NSBundle *bundle; 32 | 33 | + (RRConstraintsPlugin *)sharedPlugin; 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /RRConstraintsPlugin/Classes/RRConstraintsPlugin.m: -------------------------------------------------------------------------------- 1 | // 2 | // RRConstraintsPlugin.m 3 | // RRConstraintsPlugin 4 | // 5 | // Copyright (c) 2014 Rolandas Razma 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | // 25 | // grep -Rs "" /Applications/Xcode.app/ | grep Binary 26 | // class-dump -HISs -o Headers /Applications/Xcode.app/Contents/PlugIns/IDEInterfaceBuilderKit.ideplugin/Contents/MacOS/IDEInterfaceBuilderKit 27 | // http://chen.do/blog/2013/10/22/reverse-engineering-xcode-with-dtrace/ 28 | // sudo ./trace_within_method_and_filter.sh -p 81447 > /tmp/dtrace && cat /tmp/dtrace | sort -n | cut -c 16- > dtrace 29 | // 30 | 31 | 32 | #import "RRConstraintsPlugin.h" 33 | #import "RRWelcomeWindowController.h" 34 | 35 | 36 | static RRConstraintsPlugin *sharedPlugin; 37 | 38 | 39 | @interface RRConstraintsPlugin () 40 | 41 | @property (nonatomic, strong) NSBundle *bundle; 42 | @property (nonatomic, strong) RRWelcomeWindowController *welcomeWindowController; 43 | 44 | @end 45 | 46 | 47 | @implementation RRConstraintsPlugin 48 | 49 | 50 | + (void)pluginDidLoad:(NSBundle *)plugin { 51 | static dispatch_once_t onceToken; 52 | NSString *currentApplicationName = [[NSBundle mainBundle] infoDictionary][@"CFBundleName"]; 53 | 54 | if ( [currentApplicationName isEqual:@"Xcode"] ) { 55 | dispatch_once(&onceToken, ^{ 56 | sharedPlugin = [[self alloc] initWithBundle:plugin]; 57 | }); 58 | } 59 | } 60 | 61 | 62 | + (RRConstraintsPlugin *)sharedPlugin { 63 | return sharedPlugin; 64 | } 65 | 66 | 67 | #pragma mark - 68 | #pragma mark RRConstraintsPlugin 69 | 70 | 71 | - (id)initWithBundle:(NSBundle *)plugin { 72 | if ( (self = [super init]) ) { 73 | [self setBundle: plugin]; 74 | 75 | [[NSNotificationCenter defaultCenter] addObserver: self 76 | selector: @selector(applicationDidFinishLaunchingNotification:) 77 | name: NSApplicationDidFinishLaunchingNotification 78 | object: [NSApplication sharedApplication]]; 79 | 80 | } 81 | return self; 82 | } 83 | 84 | 85 | - (void)applicationDidFinishLaunchingNotification:(NSNotification *)notification { 86 | 87 | NSString *bundleVersion = [[self.bundle infoDictionary] objectForKey:@"CFBundleShortVersionString"]; 88 | NSString *oldBundleVersion = [[NSUserDefaults standardUserDefaults] objectForKey:@"RRConstraintsPlugin.CFBundleShortVersionString"]; 89 | 90 | if( ![oldBundleVersion isEqualToString:bundleVersion] ){ 91 | if( !self.welcomeWindowController ){ 92 | self.welcomeWindowController = [[RRWelcomeWindowController alloc] initWithBundle:self.bundle]; 93 | } 94 | 95 | [[self.welcomeWindowController window] makeKeyAndOrderFront:self]; 96 | 97 | // Default User Defaults 98 | [self setStandardUserDefaults]; 99 | 100 | [[NSUserDefaults standardUserDefaults] setObject:bundleVersion forKey:@"RRConstraintsPlugin.CFBundleShortVersionString"]; 101 | 102 | [[NSUserDefaults standardUserDefaults] synchronize]; 103 | } 104 | 105 | } 106 | 107 | 108 | - (void)setStandardUserDefaults { 109 | 110 | NSDictionary *standardUserDefaults = [[NSUserDefaults standardUserDefaults] dictionaryRepresentation]; 111 | 112 | if( ![standardUserDefaults objectForKey:@"RRConstraintsPlugin.InterfaceBuilderKit.DocumentEditorMenu.Canvas.ColoringConstraints"] ){ 113 | [[NSUserDefaults standardUserDefaults] setBool: YES 114 | forKey: @"RRConstraintsPlugin.InterfaceBuilderKit.DocumentEditorMenu.Canvas.ColoringConstraints"]; 115 | } 116 | 117 | } 118 | 119 | 120 | @end 121 | -------------------------------------------------------------------------------- /RRConstraintsPlugin/Classes/Support/NSImage (Additions)/NSImage+RRFilters.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSImage+RRFilters.h 3 | // RRConstraintsPlugin 4 | // 5 | // Copyright (c) 2014 Rolandas Razma 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | @import Cocoa; 26 | 27 | 28 | @interface NSImage (RRFilters) 29 | 30 | - (NSImage *)grayscaleImage; 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /RRConstraintsPlugin/Classes/Support/NSImage (Additions)/NSImage+RRFilters.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSImage+RRFilters.m 3 | // RRConstraintsPlugin 4 | // 5 | // Copyright (c) 2014 Rolandas Razma 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | #import "NSImage+RRFilters.h" 26 | @import QuartzCore; 27 | 28 | 29 | @implementation NSImage (RRFilters) 30 | 31 | 32 | - (NSImage *)grayscaleImage { 33 | 34 | CIFilter *filter = [CIFilter filterWithName: @"CIColorMonochrome" 35 | keysAndValues: kCIInputImageKey, [CIImage imageWithData: [self TIFFRepresentation]], 36 | @"inputColor", [CIColor colorWithRed:0.7f green:0.7f blue:0.7f], 37 | @"inputIntensity", @1.0f, nil]; 38 | 39 | NSBitmapImageRep *bitmapImageRep = [[NSBitmapImageRep alloc] initWithCIImage: [filter valueForKey:@"outputImage"]]; 40 | 41 | return [[NSImage alloc]initWithData: [bitmapImageRep TIFFRepresentation]]; 42 | } 43 | 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /RRConstraintsPlugin/Classes/Support/NSObjectAdditions/NSObject+RRReplaceAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+RRReplaceAdditions.h 3 | // 4 | // Copyright (c) 2014 Rolandas Razma 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | @import Foundation; 25 | 26 | 27 | @interface NSObject (RRReplaceAdditions) 28 | 29 | + (void)importMethodsFromClass:(Class)otherClass exchangeImplementationsPrefix:(const char *)prefix; 30 | 31 | + (void)replaceClassSelector:(SEL)originalSelector withSelector:(SEL)newSelector; 32 | + (void)replaceInstanceSelector:(SEL)originalSelector withSelector:(SEL)newSelector; 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /RRConstraintsPlugin/Classes/Support/NSObjectAdditions/NSObject+RRReplaceAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+RRReplaceAdditions.m 3 | // 4 | // Copyright (c) 2014 Rolandas Razma 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #import "NSObject+RRReplaceAdditions.h" 25 | #import 26 | 27 | 28 | @implementation NSObject (RRReplaceAdditions) 29 | 30 | 31 | + (void)importMethodsFromClass:(Class)otherClass exchangeImplementationsPrefix:(const char *)prefix { 32 | 33 | Class selfClass = [self class]; 34 | 35 | u_int count; 36 | 37 | // Instance methods 38 | Method *methods = class_copyMethodList(otherClass, &count); 39 | for ( NSUInteger i = 0; i < count ; i++ ) { 40 | SEL selector = method_getName(methods[i]); 41 | 42 | Method newMethod = class_getInstanceMethod(otherClass, selector); 43 | if( class_addMethod(selfClass, selector, method_getImplementation(newMethod), method_getTypeEncoding(newMethod)) ){ 44 | 45 | const char *methodName = sel_getName(selector); 46 | if( strstr(methodName, prefix) != NULL ) { 47 | 48 | char *realName = strndup(methodName +strlen(prefix), strlen(methodName) -strlen(prefix)); 49 | SEL originalSelector = sel_registerName( realName ); 50 | free(realName); 51 | 52 | if( [self instancesRespondToSelector:originalSelector] ){ 53 | [self replaceInstanceSelector:originalSelector withSelector:selector]; 54 | } 55 | } 56 | } 57 | } 58 | free(methods); 59 | 60 | // Class methods 61 | Class selfMetaClass = objc_getMetaClass(class_getName(selfClass)); 62 | Class otherMetaClass= objc_getMetaClass(class_getName(otherClass)); 63 | 64 | methods = class_copyMethodList(object_getClass(otherClass), &count); 65 | for ( NSUInteger i = 0; i < count ; i++ ) { 66 | SEL selector = method_getName(methods[i]); 67 | 68 | // skip +[NSObject load] 69 | if( selector == @selector(load) ) continue; 70 | 71 | Method newMethod = class_getClassMethod(otherMetaClass, selector); 72 | if( class_addMethod(selfMetaClass, selector, method_getImplementation(newMethod), method_getTypeEncoding(newMethod)) ){ 73 | 74 | const char *methodName = sel_getName(selector); 75 | if( strstr(methodName, prefix) != NULL ) { 76 | 77 | char *realName = strndup(methodName +strlen(prefix), strlen(methodName) -strlen(prefix)); 78 | SEL originalSelector = sel_registerName( realName ); 79 | free(realName); 80 | 81 | if( [self respondsToSelector:originalSelector] ){ 82 | [self replaceClassSelector:originalSelector withSelector:selector]; 83 | } 84 | } 85 | } 86 | } 87 | free(methods); 88 | 89 | } 90 | 91 | 92 | + (void)replaceClassSelector:(SEL)originalSelector withSelector:(SEL)newSelector { 93 | 94 | Class class = objc_getMetaClass(class_getName([self class])); 95 | method_exchangeImplementations(class_getClassMethod(class, originalSelector), class_getClassMethod(class, newSelector)); 96 | 97 | } 98 | 99 | 100 | + (void)replaceInstanceSelector:(SEL)originalSelector withSelector:(SEL)newSelector { 101 | 102 | Class class = [self class]; 103 | method_exchangeImplementations(class_getInstanceMethod(class, originalSelector), class_getInstanceMethod(class, newSelector)); 104 | 105 | } 106 | 107 | 108 | @end 109 | -------------------------------------------------------------------------------- /RRConstraintsPlugin/Classes/Support/XcodeInternals/Controller/IBAbstractDocumentEditor.h: -------------------------------------------------------------------------------- 1 | // 2 | // IBAbstractDocumentEditor.h 3 | // RRConstraintsPlugin 4 | // 5 | // Copyright (c) 2014 Rolandas Razma 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | @import Cocoa; 26 | 27 | 28 | @class IBCanvasViewController, IBDocument, IBStructureViewController, IBCancellationToken; 29 | 30 | 31 | @protocol IBAbstractDocumentEditor 32 | @optional 33 | 34 | @property(retain, nonatomic) IBCanvasViewController *canvasViewController; 35 | @property(retain, nonatomic) IBStructureViewController *structureViewController; 36 | 37 | + (NSArray *)visibleDocumentEditorControllersFromBackToFrontInDocument:(IBDocument *)document; 38 | - (BOOL)validateUserInterfaceItem:(NSMenuItem *)menuItem; 39 | 40 | @end 41 | 42 | 43 | @interface IBAbstractDocumentEditor : NSViewController 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /RRConstraintsPlugin/Classes/Support/XcodeInternals/Controller/IBAutolayoutConstraintAdditionViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // IBAutolayoutConstraintAdditionViewController.h 3 | // RRConstraintsPlugin 4 | // 5 | // Copyright (c) 2014 Rolandas Razma 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | @import Cocoa; 26 | 27 | @class IBAutolayoutConstraintAdditionTypeConfig, IBDocument; 28 | 29 | 30 | @protocol IBAutolayoutConstraintAdditionViewController 31 | @optional 32 | 33 | - (void)_addEdgeOrCenterAlignmentTypeConfigurationsToSet:(NSMutableSet *)typeConfigurations; 34 | - (IBAutolayoutConstraintAdditionTypeConfig *)_typeConfigurationWithField:(id /* DVTButtonTextField */)textField checkBox:(id /* NSButton */)button startingConstant:(id /* _NSStateMarker */)startingConstant andConstraints:(NSSet *)constraints; 35 | - (IBAutolayoutConstraintAdditionTypeConfig *)_typeConfigurationForAlignmentType:(unsigned long long)alignmentType; 36 | - (IBDocument *)document; 37 | 38 | @end 39 | 40 | 41 | @interface IBAutolayoutConstraintAdditionViewController : NSViewController 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /RRConstraintsPlugin/Classes/Support/XcodeInternals/Controller/IBCanvasViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // IBCanvasViewController.h 3 | // RRConstraintsPlugin 4 | // 5 | // Copyright (c) 2014 Rolandas Razma 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | #import "IDEViewController.h" 26 | 27 | 28 | @class IBCanvasView, IDEWorkspaceTabController, IBEditor; 29 | 30 | 31 | @protocol IBCanvasViewController 32 | @optional 33 | 34 | - (NSArray *)selectedMembers; 35 | - (IDEWorkspaceTabController *)activeWorkspaceTabController; 36 | - (void)editorDidChangeSelection:(IBEditor *)selection; 37 | - (NSArray *)activeEditors; 38 | 39 | @end 40 | 41 | 42 | @interface IBCanvasViewController : NSViewController 43 | 44 | @end 45 | -------------------------------------------------------------------------------- /RRConstraintsPlugin/Classes/Support/XcodeInternals/Controller/IBHybridStructureViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // IBHybridStructureViewController.h 3 | // RRConstraintsPlugin 4 | // 5 | // Copyright (c) 2014 Rolandas Razma 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | @import Cocoa; 26 | 27 | #import "IBStructureViewController.h" 28 | 29 | 30 | @class IBNavigationOutlineViewController; 31 | 32 | 33 | @protocol IBHybridStructureViewController 34 | @optional 35 | 36 | @property(retain) IBNavigationOutlineViewController *outlineViewController; 37 | 38 | @end 39 | 40 | 41 | @interface IBHybridStructureViewController : NSViewController 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /RRConstraintsPlugin/Classes/Support/XcodeInternals/Controller/IBInspectorReferencingConstraintViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // IBInspectorReferencingConstraintViewController.h 3 | // RRConstraintsPlugin 4 | // 5 | // Copyright (c) 2014 Rolandas Razma 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | #import "IBInspectorReferencingConstraintViewControllerDelegate.h" 26 | 27 | 28 | @class IBLayoutConstraint, IBInspectorReferencingConstraintView; 29 | 30 | 31 | @protocol IBInspectorReferencingConstraintViewController 32 | @optional 33 | 34 | @property(readonly, nonatomic) IBLayoutConstraint *constraint; 35 | @property(retain, nonatomic) NSMenuItem *deleteMenuItem; 36 | @property(nonatomic) __weak id delegate; 37 | 38 | - (IBInspectorReferencingConstraintView *)constraintView; 39 | - (NSView *)relatedViewInConstraintRelationship; // constraint.secondItem 40 | - (void)updateImageView; 41 | - (NSFont *)leftHandLabelFont; 42 | - (NSColor *)leftHandLabelTextColor; 43 | - (NSFont *)rightHandLabelFont; 44 | - (NSColor *)rightHandLabelTextColor; 45 | - (void)updateMenuItems; 46 | 47 | @end 48 | 49 | 50 | @interface IBInspectorReferencingConstraintViewController : NSViewController 51 | 52 | @end -------------------------------------------------------------------------------- /RRConstraintsPlugin/Classes/Support/XcodeInternals/Controller/IBLayoutConstraintItemInspectorProperty.h: -------------------------------------------------------------------------------- 1 | // 2 | // IDEInspectorProperty.h 3 | // RRConstraintsPlugin 4 | // 5 | // Copyright (c) 2014 Rolandas Razma 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | #import "IDEInspectorProperty.h" 26 | 27 | @class IBDocument, IBLayoutConstraintItemInspectorBackgroundView; 28 | 29 | 30 | @protocol IBLayoutConstraintItemInspectorProperty 31 | @optional 32 | 33 | - (IBDocument *)inspectedDocument; 34 | - (void)didStartRollingOverItemInspectorBackgroundView:(IBLayoutConstraintItemInspectorBackgroundView *)view; 35 | - (void)didFinishRollingOverItemInspectorBackgroundView:(IBLayoutConstraintItemInspectorBackgroundView *)view; 36 | 37 | 38 | @end 39 | 40 | 41 | @interface IBLayoutConstraintItemInspectorProperty : IDEInspectorProperty 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /RRConstraintsPlugin/Classes/Support/XcodeInternals/Controller/IBNavigationOutlineViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // IBNavigationOutlineViewController.h 3 | // RRConstraintsPlugin 4 | // 5 | // Copyright (c) 2014 Rolandas Razma 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | #import "IDEViewController.h" 26 | 27 | @class IBOutlineViewController; 28 | 29 | 30 | @protocol IBNavigationOutlineViewController 31 | @optional 32 | 33 | @property(readonly, nonatomic) IBOutlineViewController *outlineViewController; 34 | 35 | @end 36 | 37 | 38 | @interface IBNavigationOutlineViewController : NSViewController 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /RRConstraintsPlugin/Classes/Support/XcodeInternals/Controller/IBOutlineViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // IBOutlineViewController.h 3 | // RRConstraintsPlugin 4 | // 5 | // Copyright (c) 2014 Rolandas Razma 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | 26 | @class IBOutlineViewControllerItem, IBDocumentObjectMemberWrapper, IBOutlineView, IBAbstractDocumentEditor, IBDocumentMemberWrapper; 27 | 28 | 29 | @protocol IBOutlineViewController 30 | @optional 31 | 32 | @property(nonatomic) __weak IBAbstractDocumentEditor *documentEditor; 33 | @property(retain) IBOutlineView *outlineView; 34 | 35 | - (IBOutlineViewControllerItem *)itemTreeFromMemberWrapperTree:(IBDocumentObjectMemberWrapper *)wrapperTree explicitItemClass:(Class)itemClass; 36 | - (void)outlineViewWasDoubleClicked:(IBOutlineView *)outlineView; 37 | - (NSArray *)readSelectedMembersFromOutlineView; 38 | - (IBOutlineViewControllerItem *)itemForMemberWrapper:(IBDocumentMemberWrapper *)memberWrapper; 39 | 40 | @end 41 | 42 | 43 | @interface IBOutlineViewController : NSObject 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /RRConstraintsPlugin/Classes/Support/XcodeInternals/Controller/IBStoryboardNavigationOutlineViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // IBNavigationOutlineViewController.h 3 | // RRConstraintsPlugin 4 | // 5 | // Copyright (c) 2014 Rolandas Razma 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | #import "IBNavigationOutlineViewController.h" 26 | 27 | 28 | @protocol IBStoryboardNavigationOutlineViewController 29 | @optional 30 | 31 | @end 32 | 33 | 34 | @interface IBStoryboardNavigationOutlineViewController : IBNavigationOutlineViewController 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /RRConstraintsPlugin/Classes/Support/XcodeInternals/Controller/IBStoryboardStructureViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // IBHybridStructureViewController.h 3 | // RRConstraintsPlugin 4 | // 5 | // Copyright (c) 2014 Rolandas Razma 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | @import Cocoa; 26 | 27 | #import "IBStructureViewController.h" 28 | 29 | 30 | @class IBStoryboardNavigationOutlineViewController; 31 | 32 | 33 | @protocol IBStoryboardStructureViewController 34 | @optional 35 | 36 | @property(retain) IBStoryboardNavigationOutlineViewController *documentOutlineViewController; 37 | 38 | @end 39 | 40 | 41 | @interface IBStoryboardStructureViewController : NSViewController 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /RRConstraintsPlugin/Classes/Support/XcodeInternals/Controller/IBStructureViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // IBHybridStructureViewController.h 3 | // RRConstraintsPlugin 4 | // 5 | // Copyright (c) 2014 Rolandas Razma 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | @import Cocoa; 26 | 27 | 28 | @protocol IBStructureViewController 29 | @optional 30 | 31 | @end 32 | 33 | 34 | @interface IBStructureViewController : NSViewController 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /RRConstraintsPlugin/Classes/Support/XcodeInternals/Controller/IDEInspectorBooleanProperty.h: -------------------------------------------------------------------------------- 1 | // 2 | // IDEInspectorBooleanProperty.h 3 | // RRConstraintsPlugin 4 | // 5 | // Copyright (c) 2014 Rolandas Razma 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | #import "IDEInspectorProperty.h" 26 | 27 | 28 | @protocol IDEInspectorBooleanProperty 29 | @optional 30 | 31 | - (void)refresh; 32 | 33 | @end 34 | 35 | 36 | @interface IDEInspectorBooleanProperty : NSObject 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /RRConstraintsPlugin/Classes/Support/XcodeInternals/Controller/IDEInspectorProperty.h: -------------------------------------------------------------------------------- 1 | // 2 | // IDEInspectorProperty.h 3 | // RRConstraintsPlugin 4 | // 5 | // Copyright (c) 2014 Rolandas Razma 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | 26 | @protocol IDEBindableDeclarativeInspectorController; 27 | @class IDEInspectorKeyPath; 28 | 29 | 30 | @protocol IDEInspectorProperty 31 | @optional 32 | 33 | @property(retain) NSObject *inspectorController; 34 | 35 | - (void)refresh; 36 | - (NSArray *)allValuesForKeyPath:(IDEInspectorKeyPath *)keyPath; 37 | 38 | @end 39 | 40 | 41 | @interface IDEInspectorProperty : NSObject 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /RRConstraintsPlugin/Classes/Support/XcodeInternals/Controller/IDEViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // IDEViewController.h 3 | // RRConstraintsPlugin 4 | // 5 | // Copyright (c) 2014 Rolandas Razma 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | #import "IDEViewController.h" 26 | 27 | 28 | @class IDEWorkspaceTabController; 29 | 30 | 31 | @protocol IDEViewController 32 | @optional 33 | 34 | @property(retain, nonatomic) IDEWorkspaceTabController *workspaceTabController; 35 | 36 | @end 37 | 38 | 39 | @interface IDEViewController : NSViewController 40 | 41 | @end 42 | -------------------------------------------------------------------------------- /RRConstraintsPlugin/Classes/Support/XcodeInternals/Controller/IDEWorkspaceTabController.h: -------------------------------------------------------------------------------- 1 | // 2 | // IDEWorkspaceTabController.h 3 | // RRConstraintsPlugin 4 | // 5 | // Copyright (c) 2014 Rolandas Razma 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | @import Cocoa; 26 | 27 | 28 | @protocol IDEWorkspaceTabController 29 | @optional 30 | 31 | - (void)showInspectorWithChoiceFromSender:(NSMenuItem *)sender; 32 | 33 | @end 34 | 35 | 36 | @interface IDEWorkspaceTabController : NSViewController 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /RRConstraintsPlugin/Classes/Support/XcodeInternals/Model/IBAutolayoutConstraintAdditionTypeConfig.h: -------------------------------------------------------------------------------- 1 | // 2 | // IBAutolayoutConstraintAdditionTypeConfig.h 3 | // RRConstraintsPlugin 4 | // 5 | // Copyright (c) 2014 Rolandas Razma 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | 26 | @protocol IBAutolayoutConstraintAdditionTypeConfig 27 | @optional 28 | 29 | @property (copy, nonatomic) NSSet *constraints; 30 | @property (nonatomic) BOOL enabled; 31 | 32 | @end 33 | 34 | 35 | @interface IBAutolayoutConstraintAdditionTypeConfig : NSObject 36 | 37 | @end 38 | 39 | -------------------------------------------------------------------------------- /RRConstraintsPlugin/Classes/Support/XcodeInternals/Model/IBAutolayoutConstraintDrawable.h: -------------------------------------------------------------------------------- 1 | // 2 | // IBAutolayoutConstraintDrawable.h 3 | // RRConstraintsPlugin 4 | // 5 | // Copyright (c) 2014 Rolandas Razma 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | @class IBLayoutConstraint; 26 | 27 | 28 | @protocol IBAutolayoutConstraintDrawable 29 | @optional 30 | 31 | @property(retain, nonatomic) IBLayoutConstraint *constraint; 32 | @property(nonatomic, copy) NSColor *color; 33 | @property(nonatomic, getter=isDashed) BOOL dashed; 34 | 35 | @end 36 | 37 | 38 | @interface IBAutolayoutConstraintDrawable : NSObject 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /RRConstraintsPlugin/Classes/Support/XcodeInternals/Model/IBDecimalLayoutConstraintMultiplier.h: -------------------------------------------------------------------------------- 1 | // 2 | // IBDecimalLayoutConstraintMultiplier.h 3 | // RRConstraintsPlugin 4 | // 5 | // Copyright (c) 2014 Rolandas Razma 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | #import "IBLayoutConstraintMultiplier.h" 26 | 27 | 28 | @protocol IBDecimalLayoutConstraintMultiplier 29 | @optional 30 | 31 | @end 32 | 33 | 34 | @interface IBDecimalLayoutConstraintMultiplier : IBLayoutConstraintMultiplier 35 | 36 | @end 37 | 38 | -------------------------------------------------------------------------------- /RRConstraintsPlugin/Classes/Support/XcodeInternals/Model/IBDocument.h: -------------------------------------------------------------------------------- 1 | // 2 | // IBDocument.h 3 | // RRConstraintsPlugin 4 | // 5 | // Copyright (c) 2014 Rolandas Razma 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | 26 | @class IBMemberID, IBDocumentMemberWrapper; 27 | 28 | 29 | @protocol IBDocument 30 | @optional 31 | 32 | - (id)memberForMemberID:(IBMemberID *)memberID; 33 | - (IBDocumentMemberWrapper *)memberWrapperForMember:(id)member; 34 | 35 | @end 36 | 37 | 38 | @interface IBDocument : NSObject 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /RRConstraintsPlugin/Classes/Support/XcodeInternals/Model/IBDocumentObjectMemberWrapper.h: -------------------------------------------------------------------------------- 1 | // 2 | // IBDocumentObjectMemberWrapper.h 3 | // RRConstraintsPlugin 4 | // 5 | // Copyright (c) 2014 Rolandas Razma 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | 26 | @protocol IBDocumentObjectMemberWrapper 27 | @optional 28 | 29 | @property(readonly) id object; 30 | 31 | - (void)rebuildChildWrappers; 32 | 33 | @end 34 | 35 | 36 | @interface IBDocumentObjectMemberWrapper : NSObject 37 | 38 | @end -------------------------------------------------------------------------------- /RRConstraintsPlugin/Classes/Support/XcodeInternals/Model/IBEmbeddingPolicy.h: -------------------------------------------------------------------------------- 1 | // 2 | // IBEmbeddingPolicy.h 3 | // RRConstraintsPlugin 4 | // 5 | // Copyright (c) 2014 Rolandas Razma 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | 26 | @protocol IBEmbeddingPolicy 27 | @optional 28 | 29 | @end 30 | 31 | 32 | @interface IBEmbeddingPolicy : NSObject 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /RRConstraintsPlugin/Classes/Support/XcodeInternals/Model/IBLayoutConstant.h: -------------------------------------------------------------------------------- 1 | // 2 | // IBLayoutConstant.h 3 | // RRConstraintsPlugin 4 | // 5 | // Copyright (c) 2014 Rolandas Razma 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | 26 | @protocol IBLayoutConstant 27 | @optional 28 | 29 | @property(readonly) double value; 30 | 31 | - (id)initWithValue:(double)constant; 32 | - (id)constantBySettingValueToValue:(double)newValue; 33 | 34 | @end 35 | 36 | 37 | @interface IBLayoutConstant : NSObject 38 | 39 | @end 40 | 41 | -------------------------------------------------------------------------------- /RRConstraintsPlugin/Classes/Support/XcodeInternals/Model/IBLayoutConstraint.h: -------------------------------------------------------------------------------- 1 | // 2 | // IBLayoutConstraint.h 3 | // RRConstraintsPlugin 4 | // 5 | // Copyright (c) 2014 Rolandas Razma 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | 26 | @class IBDocument, IBLayoutConstraintMultiplier, IBLayoutConstant; 27 | @protocol IBAutolayoutItem; 28 | 29 | 30 | @protocol IBLayoutConstraint 31 | @optional 32 | 33 | @property(retain, nonatomic) IBLayoutConstant *constant; 34 | @property(nonatomic, getter=isPlaceholder) BOOL placeholder; 35 | @property(nonatomic) NSObject *firstItem; 36 | @property(nonatomic) NSObject *secondItem; 37 | @property(nonatomic) NSObject *containingView; 38 | @property(nonatomic) NSLayoutAttribute firstAttribute; 39 | @property(nonatomic) NSLayoutAttribute secondAttribute; 40 | @property(nonatomic) double priority; 41 | @property(nonatomic) NSLayoutRelation relation; 42 | @property(retain, nonatomic) IBLayoutConstraintMultiplier *multiplier; 43 | 44 | - (instancetype)initWithFirstItem:(id)view1 firstAttribute:(NSLayoutAttribute)attribute1 relation:(NSLayoutRelation)relation secondItem:(id)view2 secondAttribute:(NSLayoutAttribute)secondAttribute multiplier:(IBLayoutConstraintMultiplier *)multiplier constant:(IBLayoutConstant *)constant priority:(double)priority; 45 | 46 | - (void)reverseFirstAndSecondItem; 47 | - (void)setIbInspectedConstant:(IBLayoutConstant *)layoutConstant document:(IBDocument *)document frameDecideAfterSettingConstant:(BOOL)decide; 48 | 49 | @end 50 | 51 | 52 | @interface IBLayoutConstraint : NSObject 53 | 54 | @end -------------------------------------------------------------------------------- /RRConstraintsPlugin/Classes/Support/XcodeInternals/Model/IBLayoutConstraintMultiplier.h: -------------------------------------------------------------------------------- 1 | // 2 | // IBLayoutConstraintMultiplier.h 3 | // RRConstraintsPlugin 4 | // 5 | // Copyright (c) 2014 Rolandas Razma 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | 26 | @protocol IBLayoutConstraintMultiplier 27 | @optional 28 | 29 | - (id)initWithValue:(double)value stringValue:(NSString *)stringValue; 30 | 31 | @end 32 | 33 | 34 | @interface IBLayoutConstraintMultiplier : NSObject 35 | 36 | @end 37 | 38 | -------------------------------------------------------------------------------- /RRConstraintsPlugin/Classes/Support/XcodeInternals/Model/IBOutlineViewControllerItem.h: -------------------------------------------------------------------------------- 1 | // 2 | // IBOutlineViewControllerItem.h 3 | // RRConstraintsPlugin 4 | // 5 | // Copyright (c) 2014 Rolandas Razma 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | 26 | @class IBMemberID, IBDocument; 27 | 28 | 29 | @protocol IBOutlineViewControllerItem 30 | @optional 31 | 32 | @property(copy) IBMemberID *memberID; 33 | @property(readonly) IBDocument *document; 34 | @property(retain) NSImage *image; 35 | 36 | @end 37 | 38 | 39 | @interface IBOutlineViewControllerItem : NSObject 40 | 41 | @end 42 | -------------------------------------------------------------------------------- /RRConstraintsPlugin/Classes/Support/XcodeInternals/Model/IBSubviewEmbeddingPolicy.h: -------------------------------------------------------------------------------- 1 | // 2 | // IBSubviewEmbeddingPolicy.h 3 | // RRConstraintsPlugin 4 | // 5 | // Copyright (c) 2014 Rolandas Razma 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | #import "IBEmbeddingPolicy.h" 26 | #import "IBNSCustomView.h" 27 | 28 | 29 | @class IBXIBDocument; 30 | 31 | 32 | @protocol IBSubviewEmbeddingPolicy 33 | @optional 34 | 35 | - (IBNSCustomView *)embedObjects:(NSArray *)objects fromDocument:(IBXIBDocument *)document context:(NSMutableDictionary *)context; 36 | 37 | @end 38 | 39 | 40 | @interface IBSubviewEmbeddingPolicy : IBEmbeddingPolicy 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /RRConstraintsPlugin/Classes/Support/XcodeInternals/Model/IBViewEditor.h: -------------------------------------------------------------------------------- 1 | // 2 | // IBViewEditor.h 3 | // RRConstraintsPlugin 4 | // 5 | // Copyright (c) 2014 Rolandas Razma 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | 26 | @protocol IBViewEditor 27 | @optional 28 | 29 | - (void)updateConstraintVisibilityBasedUponSelection; 30 | 31 | @end 32 | 33 | 34 | @interface IBViewEditor : NSObject 35 | 36 | @end -------------------------------------------------------------------------------- /RRConstraintsPlugin/Classes/Support/XcodeInternals/Model/IDEMenuBuilder.h: -------------------------------------------------------------------------------- 1 | // 2 | // IDEMenuBuilder.h 3 | // RRConstraintsPlugin 4 | // 5 | // Copyright (c) 2014 Rolandas Razma 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | 26 | @protocol IDEMenuBuilder 27 | @optional 28 | 29 | + (NSMenuItem *)_buildSubmenuItemForMenuDefinitionIdentifier:(NSString *)definitionIdentifier forViewController:(NSViewController *)viewController fillingExtensionIdToMenuMap:(id)arg3; 30 | 31 | @end 32 | 33 | 34 | @interface IDEMenuBuilder : NSObject 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /RRConstraintsPlugin/Classes/Support/XcodeInternals/Model/IDEMenuKeyBindingSet.h: -------------------------------------------------------------------------------- 1 | // 2 | // IDEMenuKeyBindingSet.h 3 | // RRConstraintsPlugin 4 | // 5 | // Copyright (c) 2014 Rolandas Razma 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | 26 | @class IDEMenuKeyBindingSet; 27 | 28 | 29 | @protocol IDEMenuKeyBindingSet 30 | @optional 31 | 32 | + (IDEMenuKeyBindingSet *)defaultKeyBindingSet; 33 | 34 | - (NSMenuItem *)menuItemForCommandIdentifier:(NSString *)commandIdentifier; 35 | 36 | @end 37 | 38 | 39 | @interface IDEMenuKeyBindingSet : NSObject 40 | 41 | @end 42 | -------------------------------------------------------------------------------- /RRConstraintsPlugin/Classes/Support/XcodeInternals/Protocol/IBAutolayoutItem.h: -------------------------------------------------------------------------------- 1 | // 2 | // IBAutolayoutItem.h 3 | // RRConstraintsPlugin 4 | // 5 | // Copyright (c) 2014 Rolandas Razma 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | @class IBLayoutConstraint; 26 | 27 | 28 | @protocol IBAutolayoutItem 29 | 30 | @property(readonly, nonatomic) NSArray *constraints; 31 | @property(readonly, nonatomic) NSMutableArray *ibInstalledReferencingConstraints; 32 | @property(readonly, nonatomic) NSObject *superview; 33 | 34 | - (void)ibAddCandidateConstraints:(NSMutableSet *)sonstraints offInEmptyConfigurationAndOnInConfiguration:(id)configuration; 35 | 36 | @end 37 | 38 | -------------------------------------------------------------------------------- /RRConstraintsPlugin/Classes/Support/XcodeInternals/Protocol/IBInspectorReferencingConstraintViewControllerDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // IBInspectorReferencingConstraintViewControllerDelegate.h 3 | // RRConstraintsPlugin 4 | // 5 | // Copyright (c) 2014 Rolandas Razma 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | @class IBInspectorReferencingConstraintViewController; 26 | 27 | 28 | @protocol IBInspectorReferencingConstraintViewControllerDelegate 29 | 30 | - (void)referencingConstraintViewControllerSelectConstraint:(IBInspectorReferencingConstraintViewController *)inspectorReferencingConstraintViewController; 31 | 32 | @end -------------------------------------------------------------------------------- /RRConstraintsPlugin/Classes/Support/XcodeInternals/Protocol/IBInspectorReferencingConstraintViewDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // IBInspectorReferencingConstraintViewDelegate.h 3 | // RRConstraintsPlugin 4 | // 5 | // Copyright (c) 2014 Rolandas Razma 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | 26 | @class IBInspectorReferencingConstraintView; 27 | 28 | 29 | @protocol IBInspectorReferencingConstraintViewDelegate 30 | 31 | - (void)constraintViewWillChangeHighlighted:(IBInspectorReferencingConstraintView *)view; 32 | 33 | @end -------------------------------------------------------------------------------- /RRConstraintsPlugin/Classes/Support/XcodeInternals/Protocol/IDEBindableDeclarativeInspectorController.h: -------------------------------------------------------------------------------- 1 | // 2 | // IDEBindableDeclarativeInspectorController.h 3 | // RRConstraintsPlugin 4 | // 5 | // Copyright (c) 2014 Rolandas Razma 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | 26 | @protocol IDEBindableDeclarativeInspectorController 27 | @optional 28 | 29 | @property(readonly) NSArray *inspectedObjects; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /RRConstraintsPlugin/Classes/Support/XcodeInternals/View/IBInspectorReferencingConstraintView.h: -------------------------------------------------------------------------------- 1 | // 2 | // IBInspectorReferencingConstraintView.h 3 | // RRConstraintsPlugin 4 | // 5 | // Copyright (c) 2014 Rolandas Razma 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | 26 | @protocol IBInspectorReferencingConstraintViewDelegate; 27 | 28 | 29 | @protocol IBInspectorReferencingConstraintView 30 | @optional 31 | 32 | @property(nonatomic) __weak id delegate; 33 | 34 | @property (retain, nonatomic) NSPopUpButton *popUpButton; 35 | @property (retain, nonatomic) NSImageView *imageView; 36 | @property (retain, nonatomic) NSTextField *constantValueLabel; 37 | 38 | @end 39 | 40 | 41 | @interface IBInspectorReferencingConstraintView : NSView 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /RRConstraintsPlugin/Classes/Support/XcodeInternals/View/IBNSCustomView.h: -------------------------------------------------------------------------------- 1 | // 2 | // IBUIView.h 3 | // RRConstraintsPlugin 4 | // 5 | // Copyright (c) 2014 Rolandas Razma 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | #import "IBAutolayoutItem.h" 26 | #import "IBRemoteView.h" 27 | 28 | 29 | @protocol IBNSCustomView 30 | @optional 31 | 32 | @end 33 | 34 | 35 | @interface IBNSCustomView : IBRemoteView 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /RRConstraintsPlugin/Classes/Support/XcodeInternals/View/IBOutlineView.h: -------------------------------------------------------------------------------- 1 | // 2 | // IBOutlineView.h 3 | // RRConstraintsPlugin 4 | // 5 | // Copyright (c) 2014 Rolandas Razma 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | 26 | @protocol IBOutlineView 27 | @optional 28 | 29 | @property(retain, nonatomic) NSSet *highlightedRows; 30 | 31 | @end 32 | 33 | 34 | @interface IBOutlineView : NSOutlineView 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /RRConstraintsPlugin/Classes/Support/XcodeInternals/View/IBRemoteView.h: -------------------------------------------------------------------------------- 1 | // 2 | // IBRemoteView.h 3 | // RRConstraintsPlugin 4 | // 5 | // Copyright (c) 2014 Rolandas Razma 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | 26 | @protocol IBRemoteView 27 | @optional 28 | 29 | @end 30 | 31 | 32 | @interface IBRemoteView : NSView 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /RRConstraintsPlugin/Classes/Support/XcodeInternals/View/IBUIView.h: -------------------------------------------------------------------------------- 1 | // 2 | // IBUIView.h 3 | // RRConstraintsPlugin 4 | // 5 | // Copyright (c) 2014 Rolandas Razma 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | #import "IBAutolayoutItem.h" 26 | #import "IBRemoteView.h" 27 | 28 | 29 | @protocol IBUIView 30 | @optional 31 | 32 | @end 33 | 34 | 35 | @interface IBUIView : IBRemoteView 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /RRConstraintsPlugin/Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'RRConstraintsPlugin' target in the 'RRConstraintsPlugin' project 3 | // 4 | // Copyright (c) 2014 Rolandas Razma 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #ifdef __OBJC__ 25 | @import Foundation; 26 | @import Cocoa; 27 | 28 | #import "NSObject+RRReplaceAdditions.h" 29 | #endif 30 | -------------------------------------------------------------------------------- /RRConstraintsPlugin/Resources/ChangeLog/Images/color_constraints_based_on_priority.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RolandasRazma/RRConstraintsPlugin/e36979a477f05a3eaae364b3790d3b2dea0d82e8/RRConstraintsPlugin/Resources/ChangeLog/Images/color_constraints_based_on_priority.png -------------------------------------------------------------------------------- /RRConstraintsPlugin/Resources/ChangeLog/Images/constraint_in_editor_attribute_inspector.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RolandasRazma/RRConstraintsPlugin/e36979a477f05a3eaae364b3790d3b2dea0d82e8/RRConstraintsPlugin/Resources/ChangeLog/Images/constraint_in_editor_attribute_inspector.png -------------------------------------------------------------------------------- /RRConstraintsPlugin/Resources/ChangeLog/Images/distribute_views.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RolandasRazma/RRConstraintsPlugin/e36979a477f05a3eaae364b3790d3b2dea0d82e8/RRConstraintsPlugin/Resources/ChangeLog/Images/distribute_views.png -------------------------------------------------------------------------------- /RRConstraintsPlugin/Resources/ChangeLog/Images/double_click_constraint_in_outline_attribute_inspector.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RolandasRazma/RRConstraintsPlugin/e36979a477f05a3eaae364b3790d3b2dea0d82e8/RRConstraintsPlugin/Resources/ChangeLog/Images/double_click_constraint_in_outline_attribute_inspector.png -------------------------------------------------------------------------------- /RRConstraintsPlugin/Resources/ChangeLog/Images/features.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RolandasRazma/RRConstraintsPlugin/e36979a477f05a3eaae364b3790d3b2dea0d82e8/RRConstraintsPlugin/Resources/ChangeLog/Images/features.png -------------------------------------------------------------------------------- /RRConstraintsPlugin/Resources/ChangeLog/Images/features.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RolandasRazma/RRConstraintsPlugin/e36979a477f05a3eaae364b3790d3b2dea0d82e8/RRConstraintsPlugin/Resources/ChangeLog/Images/features.psd -------------------------------------------------------------------------------- /RRConstraintsPlugin/Resources/ChangeLog/Images/highlite_in_outline_on_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RolandasRazma/RRConstraintsPlugin/e36979a477f05a3eaae364b3790d3b2dea0d82e8/RRConstraintsPlugin/Resources/ChangeLog/Images/highlite_in_outline_on_hover.png -------------------------------------------------------------------------------- /RRConstraintsPlugin/Resources/ChangeLog/Images/keep_constraints_when_embedding.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RolandasRazma/RRConstraintsPlugin/e36979a477f05a3eaae364b3790d3b2dea0d82e8/RRConstraintsPlugin/Resources/ChangeLog/Images/keep_constraints_when_embedding.png -------------------------------------------------------------------------------- /RRConstraintsPlugin/Resources/ChangeLog/Images/remove_at_build_time.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RolandasRazma/RRConstraintsPlugin/e36979a477f05a3eaae364b3790d3b2dea0d82e8/RRConstraintsPlugin/Resources/ChangeLog/Images/remove_at_build_time.png -------------------------------------------------------------------------------- /RRConstraintsPlugin/Resources/ChangeLog/Images/remove_at_build_time_gray_dash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RolandasRazma/RRConstraintsPlugin/e36979a477f05a3eaae364b3790d3b2dea0d82e8/RRConstraintsPlugin/Resources/ChangeLog/Images/remove_at_build_time_gray_dash.png -------------------------------------------------------------------------------- /RRConstraintsPlugin/Resources/ChangeLog/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 35 | 36 | 37 |
38 |
39 |

[RR] Constraints Plugin

40 |

41 | RRConstraintsPlugin is an open-source plugin for Xcode 5.1+. It improves workflow for constraints based layout by adding new features to Xcode Interface Builder. 42 |

43 | 44 |

v2.2

45 |

46 | 47 | Keep constraints when embedding to view 48 |
49 |

50 | 51 |

v2.1

52 |

53 | 54 | Color constraints based on priority (switch on/off in Editor -> Canvas) 55 |
56 |

57 | 58 |

v2.0

59 |

60 | Moved to Xcode 6.1 support only.
61 | Removed features natively implemented in Xcode 6 62 |
63 |

64 | 65 |

v1.4

66 |

67 | 68 | Grayed out and dashed lines for "Remove at build time" constraints 69 |
70 |

71 | 72 |

v1.3

73 |

74 | 75 | Distribute views horizontally/vertically (for same width/height views) 76 |
77 |

78 |

79 | 80 | Double-Click constraint to "Select and Edit..." 81 |
82 |

83 | 84 |

v1.2

85 |

86 | Fixed icons not updating when multiple constraints selected and disabled/enabled 87 |
88 |

89 |

90 | 91 | Highlight item in outline also when constraint item hovered 92 |
93 |

94 | 95 |

v1.1

96 |

97 | Added Xcode 5.1 UUID 98 |
99 |

100 | 101 |

Features

102 |

103 | 104 | Highlite item in outline also when constraint item hovered 105 |
106 |

107 |

108 | 109 | Grayed out and dashed lines for "Remove at build time" constraints 110 |
111 |

112 |

113 | 114 | Grayed out icons for "Remove at build time" constraints 115 |
116 |

117 |

118 | 119 | Differentiate when constraints firstItem is selected object 120 |
121 |

122 |

123 | 124 | Inline constant editing 125 |
126 |

127 |

128 | 129 | Reverse first and second item from menu 130 |
131 |

132 |

133 | 134 | Double-Click constraint to "Select and Edit..." 135 |
136 |

137 |

138 | 139 | Distribute views horizontally/vertically (for same width/height views) 140 |
141 |

142 |

143 | 144 | Clicking constraint in editor will show "Attribute Inspector" in utilities bar 145 |
146 |

147 |

148 | 149 | Double clicking constraint in outline will open "Attribute Inspector" in utilities bar 150 |
151 |

152 |
153 |
154 | 155 | -------------------------------------------------------------------------------- /RRConstraintsPlugin/Resources/Images/header@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RolandasRazma/RRConstraintsPlugin/e36979a477f05a3eaae364b3790d3b2dea0d82e8/RRConstraintsPlugin/Resources/Images/header@2x.png -------------------------------------------------------------------------------- /RRConstraintsPlugin/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | com.ud7.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | BNDL 19 | CFBundleShortVersionString 20 | 2.2 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 5 25 | DVTPlugInCompatibilityUUIDs 26 | 27 | C4A681B0-4A26-480E-93EC-1218098B9AA0 28 | FEC992CC-CA4A-4CFD-8881-77300FCB848A 29 | A16FF353-8441-459E-A50C-B071F53F51B7 30 | 9F75337B-21B4-4ADC-B558-F9CADF7073A7 31 | 7FDF5C7A-131F-4ABB-9EDC-8C5F8F0B8A90 32 | 33 | NSHumanReadableCopyright 34 | Copyright © 2012 Rolandas Razma. All rights reserved. 35 | NSPrincipalClass 36 | ${EXECUTABLE_NAME} 37 | XC4Compatible 38 | 39 | XC5Compatible 40 | 41 | XCPluginHasUI 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /RRConstraintsPlugin/Resources/UI/RRWelcomeWindowController.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 | --------------------------------------------------------------------------------