Permalink
Browse files

Added support to show source code files with highlighting, using the …

…Fragaria framework
  • Loading branch information...
1 parent ce0ab38 commit b475778035a9615ef432ab78a46bb32100b32250 Adrian Kosmaczewski committed Jul 28, 2010
Showing with 165 additions and 234 deletions.
  1. +20 −227 GUI/English.lproj/MyDocument.xib
  2. +5 −2 GUI/MyDocument.h
  3. +27 −2 GUI/MyDocument.m
  4. +1 −3 GUI/nib2objc-Info.plist
  5. +112 −0 GUI/nib2objc.xcodeproj/project.pbxproj
@@ -12,7 +12,7 @@
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
- <integer value="5"/>
+ <integer value="6"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -50,147 +50,12 @@
<int key="NSvFlags">256</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSScrollView" id="568100064">
+ <object class="NSCustomView" id="707614822">
<reference key="NSNextResponder" ref="568628114"/>
<int key="NSvFlags">274</int>
- <object class="NSMutableArray" key="NSSubviews">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSClipView" id="74159790">
- <reference key="NSNextResponder" ref="568100064"/>
- <int key="NSvFlags">2304</int>
- <object class="NSMutableArray" key="NSSubviews">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSTextView" id="652344306">
- <reference key="NSNextResponder" ref="74159790"/>
- <int key="NSvFlags">2322</int>
- <string key="NSFrameSize">{817, 14}</string>
- <reference key="NSSuperview" ref="74159790"/>
- <object class="NSTextContainer" key="NSTextContainer" id="17739915">
- <object class="NSLayoutManager" key="NSLayoutManager">
- <object class="NSTextStorage" key="NSTextStorage">
- <object class="NSMutableString" key="NSString">
- <characters key="NS.bytes"/>
- </object>
- <nil key="NSDelegate"/>
- </object>
- <object class="NSMutableArray" key="NSTextContainers">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="17739915"/>
- </object>
- <int key="NSLMFlags">134</int>
- <nil key="NSDelegate"/>
- </object>
- <reference key="NSTextView" ref="652344306"/>
- <double key="NSWidth">817</double>
- <int key="NSTCFlags">1</int>
- </object>
- <object class="NSTextViewSharedData" key="NSSharedData">
- <int key="NSFlags">12257</int>
- <int key="NSTextCheckingTypes">0</int>
- <nil key="NSMarkedAttributes"/>
- <object class="NSColor" key="NSBackgroundColor" id="152309162">
- <int key="NSColorSpace">3</int>
- <bytes key="NSWhite">MQA</bytes>
- </object>
- <object class="NSDictionary" key="NSSelectedAttributes">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>NSBackgroundColor</string>
- <string>NSColor</string>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSColor">
- <int key="NSColorSpace">6</int>
- <string key="NSCatalogName">System</string>
- <string key="NSColorName">selectedTextBackgroundColor</string>
- <object class="NSColor" key="NSColor">
- <int key="NSColorSpace">3</int>
- <bytes key="NSWhite">MC42NjY2NjY2NjY3AA</bytes>
- </object>
- </object>
- <object class="NSColor">
- <int key="NSColorSpace">6</int>
- <string key="NSCatalogName">System</string>
- <string key="NSColorName">selectedTextColor</string>
- <object class="NSColor" key="NSColor" id="536668007">
- <int key="NSColorSpace">3</int>
- <bytes key="NSWhite">MAA</bytes>
- </object>
- </object>
- </object>
- </object>
- <reference key="NSInsertionColor" ref="536668007"/>
- <object class="NSDictionary" key="NSLinkAttributes">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>NSColor</string>
- <string>NSCursor</string>
- <string>NSUnderline</string>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSColor">
- <int key="NSColorSpace">1</int>
- <bytes key="NSRGB">MCAwIDEAA</bytes>
- </object>
- <object class="NSCursor">
- <string key="NSHotSpot">{8, -8}</string>
- <int key="NSCursorType">13</int>
- </object>
- <integer value="1"/>
- </object>
- </object>
- <nil key="NSDefaultParagraphStyle"/>
- </object>
- <int key="NSTVFlags">6</int>
- <string key="NSMaxSize">{817, 1e+07}</string>
- <string key="NSMinize">{223, 0}</string>
- <nil key="NSDelegate"/>
- </object>
- </object>
- <string key="NSFrame">{{1, 1}, {817, 580}}</string>
- <reference key="NSSuperview" ref="568100064"/>
- <reference key="NSNextKeyView" ref="652344306"/>
- <reference key="NSDocView" ref="652344306"/>
- <reference key="NSBGColor" ref="152309162"/>
- <object class="NSCursor" key="NSCursor">
- <string key="NSHotSpot">{4, -5}</string>
- <int key="NSCursorType">1</int>
- </object>
- <int key="NScvFlags">4</int>
- </object>
- <object class="NSScroller" id="628707485">
- <reference key="NSNextResponder" ref="568100064"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{818, 1}, {15, 580}}</string>
- <reference key="NSSuperview" ref="568100064"/>
- <reference key="NSTarget" ref="568100064"/>
- <string key="NSAction">_doScroller:</string>
- <double key="NSCurValue">1</double>
- <double key="NSPercent">0.85256409645080566</double>
- </object>
- <object class="NSScroller" id="188844411">
- <reference key="NSNextResponder" ref="568100064"/>
- <int key="NSvFlags">-2147483392</int>
- <string key="NSFrame">{{-100, -100}, {87, 18}}</string>
- <reference key="NSSuperview" ref="568100064"/>
- <int key="NSsFlags">1</int>
- <reference key="NSTarget" ref="568100064"/>
- <string key="NSAction">_doScroller:</string>
- <double key="NSCurValue">1</double>
- <double key="NSPercent">0.94565218687057495</double>
- </object>
- </object>
<string key="NSFrame">{{20, 20}, {834, 582}}</string>
<reference key="NSSuperview" ref="568628114"/>
- <reference key="NSNextKeyView" ref="74159790"/>
- <int key="NSsFlags">18</int>
- <reference key="NSVScroller" ref="628707485"/>
- <reference key="NSHScroller" ref="188844411"/>
- <reference key="NSContentView" ref="74159790"/>
+ <string key="NSClassName">NSView</string>
</object>
</object>
<string key="NSFrameSize">{874, 622}</string>
@@ -225,11 +90,11 @@
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
- <string key="label">editor</string>
+ <string key="label">editorView</string>
<reference key="source" ref="512844837"/>
- <reference key="destination" ref="652344306"/>
+ <reference key="destination" ref="707614822"/>
</object>
- <int key="connectionID">100025</int>
+ <int key="connectionID">100031</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
@@ -268,7 +133,7 @@
<reference key="object" ref="568628114"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="568100064"/>
+ <reference ref="707614822"/>
</object>
<reference key="parent" ref="275939982"/>
</object>
@@ -279,42 +144,18 @@
<string key="objectName">Application</string>
</object>
<object class="IBObjectRecord">
- <int key="objectID">100021</int>
- <reference key="object" ref="568100064"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="652344306"/>
- <reference ref="188844411"/>
- <reference ref="628707485"/>
- </object>
+ <int key="objectID">100030</int>
+ <reference key="object" ref="707614822"/>
<reference key="parent" ref="568628114"/>
</object>
- <object class="IBObjectRecord">
- <int key="objectID">100024</int>
- <reference key="object" ref="652344306"/>
- <reference key="parent" ref="568100064"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">100023</int>
- <reference key="object" ref="188844411"/>
- <reference key="parent" ref="568100064"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">100022</int>
- <reference key="object" ref="628707485"/>
- <reference key="parent" ref="568100064"/>
- </object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>-3.IBPluginDependency</string>
- <string>100021.IBPluginDependency</string>
- <string>100022.IBPluginDependency</string>
- <string>100023.IBPluginDependency</string>
- <string>100024.IBPluginDependency</string>
+ <string>100030.IBPluginDependency</string>
<string>5.IBEditorWindowLastContentRect</string>
<string>5.IBPluginDependency</string>
<string>5.IBWindowTemplateEditedContentRect</string>
@@ -329,9 +170,6 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{83, 512}, {874, 622}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{83, 512}, {874, 622}}</string>
@@ -359,7 +197,7 @@
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">100028</int>
+ <int key="maxID">100031</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -368,14 +206,14 @@
<string key="className">MyDocument</string>
<string key="superclassName">NSDocument</string>
<object class="NSMutableDictionary" key="outlets">
- <string key="NS.key.0">editor</string>
- <string key="NS.object.0">NSTextView</string>
+ <string key="NS.key.0">editorView</string>
+ <string key="NS.object.0">NSView</string>
</object>
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
- <string key="NS.key.0">editor</string>
+ <string key="NS.key.0">editorView</string>
<object class="IBToOneOutletInfo" key="NS.object.0">
- <string key="name">editor</string>
- <string key="candidateClassName">NSTextView</string>
+ <string key="name">editorView</string>
+ <string key="candidateClassName">NSView</string>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
@@ -430,14 +268,6 @@
</object>
</object>
<object class="IBPartialClassDescription">
- <string key="className">NSControl</string>
- <string key="superclassName">NSView</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier" id="944496606">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">AppKit.framework/Headers/NSControl.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
<string key="className">NSDocument</string>
<string key="superclassName">NSObject</string>
<object class="NSMutableDictionary" key="actions">
@@ -513,14 +343,6 @@
</object>
</object>
<object class="IBPartialClassDescription">
- <string key="className">NSFormatter</string>
- <string key="superclassName">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">Foundation.framework/Headers/NSFormatter.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
<string key="className">NSMenu</string>
<string key="superclassName">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier" id="290563676">
@@ -549,7 +371,10 @@
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
- <reference key="sourceIdentifier" ref="944496606"/>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">AppKit.framework/Headers/NSControl.h</string>
+ </object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
@@ -788,38 +613,6 @@
</object>
</object>
<object class="IBPartialClassDescription">
- <string key="className">NSScrollView</string>
- <string key="superclassName">NSView</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">AppKit.framework/Headers/NSScrollView.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSScroller</string>
- <string key="superclassName">NSControl</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">AppKit.framework/Headers/NSScroller.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSText</string>
- <string key="superclassName">NSView</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">AppKit.framework/Headers/NSText.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSTextView</string>
- <string key="superclassName">NSText</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">AppKit.framework/Headers/NSTextView.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
<string key="className">NSView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
View
@@ -9,14 +9,17 @@
#import <Cocoa/Cocoa.h>
+@class MGSFragaria;
+
@interface MyDocument : NSDocument
{
@private
- NSTextView *_editor;
+ NSView *_editorView;
NSString *_nibCode;
NSString *_fileName;
+ MGSFragaria *_fragariaEditor;
}
-@property (nonatomic, retain) IBOutlet NSTextView *editor;
+@property (nonatomic, retain) IBOutlet NSView *editorView;
@end
Oops, something went wrong.

0 comments on commit b475778

Please sign in to comment.