Permalink
Browse files

Syntax highlighting first iteration

  • Loading branch information...
1 parent 196c893 commit 9a1d208c50db027d7d1478223c649a6e6d07a953 @darvin darvin committed May 10, 2012
Showing with 36,918 additions and 213 deletions.
  1. +3 −0 .gitmodules
  2. +10 −0 CocoaRestClient.xcodeproj/project.pbxproj
  3. +5 −1 CocoaRestClientAppDelegate.h
  4. +37 −0 CocoaRestClientAppDelegate.m
  5. +53 −212 English.lproj/MainMenu.xib
  6. +1 −0 MGSFragaria.framework/Headers
  7. +1 −0 MGSFragaria.framework/MGSFragaria
  8. +1 −0 MGSFragaria.framework/Resources
  9. +65 −0 MGSFragaria.framework/Versions/A/Headers/MGSExtraInterfaceController.h
  10. +74 −0 MGSFragaria.framework/Versions/A/Headers/MGSFragaria.h
  11. +77 −0 MGSFragaria.framework/Versions/A/Headers/MGSFragariaPreferences.h
  12. +15 −0 MGSFragaria.framework/Versions/A/Headers/MGSPreferencesController.h
  13. +28 −0 MGSFragaria.framework/Versions/A/Headers/MGSSyntaxController.h
  14. +59 −0 MGSFragaria.framework/Versions/A/Headers/MGSTextMenuController.h
  15. +55 −0 MGSFragaria.framework/Versions/A/Headers/SMLTextView.h
  16. BIN MGSFragaria.framework/Versions/A/MGSFragaria
  17. +38 −0 MGSFragaria.framework/Versions/A/Resources/Info.plist
  18. +202 −0 MGSFragaria.framework/Versions/A/Resources/LICENSE-2.0.txt
  19. +51 −0 MGSFragaria.framework/Versions/A/Resources/LICENSE.html
  20. +15 −0 MGSFragaria.framework/Versions/A/Resources/README
  21. BIN MGSFragaria.framework/Versions/A/Resources/SMLCommandResult.nib
  22. BIN MGSFragaria.framework/Versions/A/Resources/SMLDetab.nib
  23. BIN MGSFragaria.framework/Versions/A/Resources/SMLEntab.nib
  24. BIN MGSFragaria.framework/Versions/A/Resources/SMLGoToLine.nib
  25. BIN MGSFragaria.framework/Versions/A/Resources/SMLOpenPanelAccessoryView.nib
  26. BIN MGSFragaria.framework/Versions/A/Resources/SMLRegularExpressionHelp.nib
  27. +2,095 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/actionscript.plist
  28. +1,465 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/actionscript3.plist
  29. +338 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/active4d.plist
  30. +116 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/ada.plist
  31. +68 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/ampl.plist
  32. +411 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/apache.plist
  33. +218 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/applescript.plist
  34. +139 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/asm-mips.plist
  35. +839 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/asm-x86.plist
  36. +425 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/asp-js.plist
  37. +409 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/asp-vb.plist
  38. +440 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/aspdotnet-cs.plist
  39. +480 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/aspdotnet-vb.plist
  40. +113 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/awk.plist
  41. +93 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/batch.plist
  42. +97 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/c.plist
  43. +150 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/cobol.plist
  44. +527 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/coldfusion.plist
  45. +124 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/cpp.plist
  46. +133 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/csharp.plist
  47. +791 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/csound.plist
  48. +538 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/css.plist
  49. +147 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/d.plist
  50. +108 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/dylan.plist
  51. +84 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/eiffel.plist
  52. +84 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/erl.plist
  53. +733 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/eztpl.plist
  54. +171 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/f-script.plist
  55. +213 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/fortran.plist
  56. +149 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/freefem.plist
  57. +190 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/gedcom.plist
  58. +228 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/gnuassembler.plist
  59. +207 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/graphviz.plist
  60. +472 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/haskell.plist
  61. +200 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/header.plist
  62. +284 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/html.plist
  63. +1,365 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/idl.plist
  64. +101 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/java.plist
  65. +98 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/javafx.plist
  66. +421 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/javascript.plist
  67. +366 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/jsp.plist
  68. +50 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/latex.plist
  69. +319 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/lilypond.plist
  70. +476 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/lisp.plist
  71. +190 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/logtalk.plist
  72. +417 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/lsl.plist
  73. +209 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/lua.plist
  74. +1,302 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/matlab.plist
  75. +1,133 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/mel.plist
  76. +550 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/metapost.plist
  77. +187 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/metaslang.plist
  78. +532 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/mysql.plist
  79. +127 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/nemerle.plist
  80. +48 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/none.plist
  81. +51 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/nrnhoc.plist
  82. +214 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/objectivec.plist
  83. +103 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/objectivecaml.plist
  84. +52 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/ox.plist
  85. +164 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/pascal.plist
  86. +61 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/pdf.plist
  87. +292 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/perl.plist
  88. +4,232 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/php.plist
  89. +58 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/plist.plist
  90. +441 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/postscript.plist
  91. +460 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/prolog.plist
  92. +301 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/python.plist
  93. +1 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/r.plist
  94. +1,075 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/rhtml.plist
  95. +1,075 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/ruby.plist
  96. +86 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/scala.plist
  97. +48 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/sgml.plist
  98. +64 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/shell.plist
  99. +105 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/sml.plist
  100. +843 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/sql.plist
  101. +48 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/standard.plist
  102. +2,945 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/stata.plist
  103. +71 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/supercollider.plist
  104. +473 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/tcltk.plist
  105. +69 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/torquescript.plist
  106. +509 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/udo.plist
  107. +111 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/vb.plist
  108. +143 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/verilog.plist
  109. +144 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/vhdl.plist
  110. +56 −0 MGSFragaria.framework/Versions/A/Resources/Syntax Definitions/xml.plist
  111. +662 −0 MGSFragaria.framework/Versions/A/Resources/SyntaxDefinitions.plist
  112. +1 −0 MGSFragaria.framework/Versions/Current
View
@@ -0,0 +1,3 @@
+[submodule "Fragaria"]
+ path = Fragaria
+ url = git@github.com:darvin/Fragaria.git
@@ -8,6 +8,9 @@
/* Begin PBXBuildFile section */
1DDD58160DA1D0A300B32029 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1DDD58140DA1D0A300B32029 /* MainMenu.xib */; };
+ 5704EE6A155B533200C55656 /* libicucore.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 5704EE69155B533200C55656 /* libicucore.dylib */; };
+ 5704EE6C155B540900C55656 /* MGSFragaria.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5704EE6B155B540900C55656 /* MGSFragaria.framework */; };
+ 5704EE6D155B563E00C55656 /* MGSFragaria.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 5704EE6B155B540900C55656 /* MGSFragaria.framework */; };
8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; };
8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; };
8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
@@ -47,6 +50,7 @@
dstSubfolderSpec = 10;
files = (
AFCE79551419B49F00E22468 /* Sparkle.framework in CopyFiles */,
+ 5704EE6D155B563E00C55656 /* MGSFragaria.framework in CopyFiles */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -63,6 +67,8 @@
29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
+ 5704EE69155B533200C55656 /* libicucore.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libicucore.dylib; path = usr/lib/libicucore.dylib; sourceTree = SDKROOT; };
+ 5704EE6B155B540900C55656 /* MGSFragaria.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = MGSFragaria.framework; sourceTree = "<group>"; };
8D1107310486CEB800E47090 /* CocoaRestClient-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "CocoaRestClient-Info.plist"; sourceTree = "<group>"; };
8D1107320486CEB800E47090 /* CocoaRestClient.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CocoaRestClient.app; sourceTree = BUILT_PRODUCTS_DIR; };
AF074F4B10F595AF00EE44D8 /* JSON.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSON.h; path = JSON/JSON.h; sourceTree = "<group>"; };
@@ -115,8 +121,10 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+ 5704EE6A155B533200C55656 /* libicucore.dylib in Frameworks */,
8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */,
AFCE79531419B47900E22468 /* Sparkle.framework in Frameworks */,
+ 5704EE6C155B540900C55656 /* MGSFragaria.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -170,6 +178,7 @@
29B97314FDCFA39411CA2CEA /* CocoaRestClient */ = {
isa = PBXGroup;
children = (
+ 5704EE69155B533200C55656 /* libicucore.dylib */,
AF2D9EFF145F908100B8220F /* Security.framework */,
080E96DDFE201D6D7F000001 /* Classes */,
29B97315FDCFA39411CA2CEA /* Other Sources */,
@@ -208,6 +217,7 @@
29B97323FDCFA39411CA2CEA /* Frameworks */ = {
isa = PBXGroup;
children = (
+ 5704EE6B155B540900C55656 /* MGSFragaria.framework */,
AFCE79521419B47900E22468 /* Sparkle.framework */,
1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */,
1058C7A2FEA54F0111CA2CBB /* Other Frameworks */,
@@ -11,7 +11,7 @@
#import "CRCDrawerView.h"
#import "TabbingTableView.h"
#import "PreferencesController.h"
-
+#import <MGSFragaria/MGSFragaria.h>
extern NSString* const FOLLOW_REDIRECTS;
extern NSString* const RESPONSE_TIMEOUT;
@@ -75,6 +75,8 @@ extern NSString* const RESPONSE_TIMEOUT;
@private
NSSet *requestMethodsWithBody;
+ @private
+ MGSFragaria * fragaria;
}
@@ -87,6 +89,8 @@ extern NSString* const RESPONSE_TIMEOUT;
@property (assign) IBOutlet NSComboBox *urlBox;
@property (assign) IBOutlet NSButton *submitButton;
@property (assign) IBOutlet NSTextView *responseText;
+
+@property (assign) IBOutlet NSView *responseView;
@property (assign) IBOutlet NSTextView *responseTextHeaders;
@property (assign) IBOutlet NSPopUpButton *methodButton;
@property (assign) IBOutlet NSTextView *requestText;
@@ -14,6 +14,8 @@
#import <Foundation/Foundation.h>
#import "JSON.h"
#import <Sparkle/SUUpdater.h>
+#import <MGSFragaria/MGSFragaria.h>
+
#define MAIN_WINDOW_MENU_TAG 150
@@ -47,6 +49,7 @@ @implementation CocoaRestClientAppDelegate
@synthesize responseText;
@synthesize responseTextHeaders;
@synthesize requestText;
+@synthesize responseView;
@synthesize methodButton;
@synthesize headersTable, filesTable, paramsTable;
@synthesize headersTableView, filesTableView, paramsTableView;
@@ -147,6 +150,40 @@ - (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
[headersTableView setDoubleAction:@selector(doubleClickedHeaderRow:)];
[paramsTableView setDoubleAction:@selector(doubleClickedParamsRow:)];
[filesTableView setDoubleAction:@selector(doubleClickedFileRow:)];
+
+ [self initFragaria];
+}
+
+- (void) initFragaria {
+
+ // create an instance
+ fragaria = [[MGSFragaria alloc] init];
+
+ //
+ // assign user defaults.
+ // a number of properties are derived from the user defaults system rather than the doc spec.
+ //
+ // see MGSFragariaPreferences.h for details
+ //
+ [[NSUserDefaults standardUserDefaults] setObject:[NSNumber numberWithBool:YES] forKey:MGSPrefsAutocompleteSuggestAutomatically];
+ [[NSUserDefaults standardUserDefaults] setObject:[NSNumber numberWithBool:NO] forKey:MGSPrefsLineWrapNewDocuments];
+
+ // define initial object configuration
+ //
+ // see MGSFragaria.h for details
+ //
+ [fragaria setObject:[NSNumber numberWithBool:YES] forKey:MGSFOIsSyntaxColoured];
+ [fragaria setObject:[NSNumber numberWithBool:YES] forKey:MGSFOShowLineNumberGutter];
+ [fragaria setObject:self forKey:MGSFODelegate];
+ [fragaria setObject:@"JavaScript" forKey:MGSFOSyntaxDefinitionName];
+ // embed editor in editView
+ [fragaria embedInView:self.responseView];
+
+
+
+ // access the NSTextView
+ responseText = [fragaria objectForKey:ro_MGSFOTextView];
+
}
- (void) determineRequestContentType{
Oops, something went wrong.

0 comments on commit 9a1d208

Please sign in to comment.