Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Lots of small changes to how the various managers work, usually incor…

…porating with PluginManager's pluginFilesForSubmanager: method.
  • Loading branch information...
commit a5bd80571aa78ff324c5a358c0fe3a0848fcbfd6 1 parent 3d73036
@Grayson authored
View
4 ExampleApplication/Example.fscript
@@ -0,0 +1,4 @@
+actionProperty := [ 'label-click' ].
+actionEnable := [:forValue :withValue| YES].
+actionTitle := [:forValue :withValue| 'F-Script test'].
+actionPerform := [:forValue :withValue| sys log:forValue].
View
15 ExampleApplication/Example.js
@@ -0,0 +1,15 @@
+function actionProperty() {
+ return "label-click";
+}
+
+function actionEnable(forValue, withValue) {
+ return true;
+}
+
+function actionTitle(forValue, withValue) {
+ return "javascript test";
+}
+
+function actionPerform(forValue, withValue) {
+ log("Javascript");
+}
View
15 ExampleApplication/Example.lua
@@ -0,0 +1,15 @@
+function actionProperty()
+ return "label-click"
+end
+
+function actionEnable( withValue, forValue )
+ return true
+end
+
+function actionTitle( withValue, forValue )
+ return "Lua test"
+end
+
+function actionPerform( withValue, forValue )
+ print(withValue:description())
+end
View
4 ExampleApplication/Example.nu
@@ -0,0 +1,4 @@
+(function actionProperty () "label-click")
+(function actionEnable (forValue withValue) YES)
+(function actionTitle (forValue withValue) "Nu test")
+(function actionPerform (forValue withValue) (puts (forValue description)))
View
6 ExampleApplication/Example.py
@@ -1,11 +1,11 @@
def actionProperty():
return "label-click"
-def actionEnable():
+def actionEnable( withValue, forValue ):
return True
-def actionTitle():
+def actionTitle( withValue, forValue ):
return "Python example"
-def actionPerform():
+def actionPerform( withValue, forValue ):
print "Hello from Python"
View
14 ExampleApplication/Example.rb
@@ -1,15 +1,17 @@
-def applicationProperty
+require 'osx/cocoa'
+
+def actionProperty()
return "label-click"
end
-def applicationEnable withValue, forValue
+def actionEnable(withValue, forValue)
return true
end
-def applicationTitle withValue, forValue
+def actionTitle(withValue, forValue)
return "Ruby example"
end
-def applicationPerform withValue, forValue
- puts "In Ruby example"
-end
+def actionEnable(withValue, forValue)
+ puts withValue
+end
View
102 ExampleApplication/ExampleApplication.xcodeproj/ghansard.mode1v3
@@ -250,8 +250,6 @@
<key>Layout</key>
<array>
<dict>
- <key>BecomeActive</key>
- <true/>
<key>ContentConfiguration</key>
<dict>
<key>PBXBottomSmartGroupGIDs</key>
@@ -290,8 +288,6 @@
<string>29B97314FDCFA39411CA2CEA</string>
<string>1DC323CE0F3B77B40011E197</string>
<string>1DC3242A0F3B86790011E197</string>
- <string>29B97323FDCFA39411CA2CEA</string>
- <string>19C28FACFE9D520D11CA2CBB</string>
<string>1C37FBAC04509CD000000102</string>
<string>1DD73A340F3C9F0400552B38</string>
<string>1DD73B300F3CA0EC00552B38</string>
@@ -300,14 +296,14 @@
<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>
<array>
<array>
- <integer>34</integer>
- <integer>33</integer>
- <integer>28</integer>
- <integer>27</integer>
+ <integer>24</integer>
+ <integer>23</integer>
+ <integer>18</integer>
+ <integer>17</integer>
</array>
</array>
<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>
- <string>{{0, 308}, {186, 338}}</string>
+ <string>{{0, 0}, {186, 338}}</string>
</dict>
<key>PBXTopSmartGroupGIDs</key>
<array/>
@@ -326,7 +322,7 @@
<real>186</real>
</array>
<key>RubberWindowFrame</key>
- <string>352 481 690 397 0 0 1440 878 </string>
+ <string>559 481 690 397 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXSmartGroupTreeModule</string>
@@ -363,7 +359,7 @@
<key>Frame</key>
<string>{{0, 0}, {482, 0}}</string>
<key>RubberWindowFrame</key>
- <string>352 481 690 397 0 0 1440 878 </string>
+ <string>559 481 690 397 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXNavigatorGroup</string>
@@ -383,7 +379,7 @@
<key>Frame</key>
<string>{{0, 5}, {482, 351}}</string>
<key>RubberWindowFrame</key>
- <string>352 481 690 397 0 0 1440 878 </string>
+ <string>559 481 690 397 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>XCDetailModule</string>
@@ -528,7 +524,7 @@
<key>StatusbarIsVisible</key>
<true/>
<key>TimeStamp</key>
- <real>255631596.62058601</real>
+ <real>255654198.51406601</real>
<key>ToolbarDisplayMode</key>
<integer>1</integer>
<key>ToolbarIsVisible</key>
@@ -543,13 +539,17 @@
<integer>5</integer>
<key>WindowOrderList</key>
<array>
+ <string>1C530D57069F1CE1000CFCEE</string>
+ <string>1DD73B9B0F3CCA0A00552B38</string>
+ <string>1DD73B9C0F3CCA0A00552B38</string>
+ <string>1DD73B890F3CC98100552B38</string>
<string>1DC323630F3B75AF0011E197</string>
<string>1CD10A99069EF8BA00B06720</string>
<string>1C78EAAD065D492600B07095</string>
<string>/Users/ghansard/Projects/github/PluginManager/ExampleApplication/ExampleApplication.xcodeproj</string>
</array>
<key>WindowString</key>
- <string>352 481 690 397 0 0 1440 878 </string>
+ <string>559 481 690 397 0 0 1440 878 </string>
<key>WindowToolsV3</key>
<array>
<dict>
@@ -570,7 +570,7 @@
<key>PBXProjectModuleGUID</key>
<string>1CD0528F0623707200166675</string>
<key>PBXProjectModuleLabel</key>
- <string></string>
+ <string>&lt;No Editor&gt;</string>
<key>StatusBarVisibility</key>
<true/>
</dict>
@@ -766,8 +766,12 @@
<false/>
</dict>
<dict>
+ <key>FirstTimeWindowDisplayed</key>
+ <false/>
<key>Identifier</key>
<string>windowTool.find</string>
+ <key>IsVertical</key>
+ <true/>
<key>Layout</key>
<array>
<dict>
@@ -783,25 +787,15 @@
<string>1CDD528C0622207200134675</string>
<key>PBXProjectModuleLabel</key>
<string>&lt;No Editor&gt;</string>
- <key>PBXSplitModuleInNavigatorKey</key>
- <dict>
- <key>Split0</key>
- <dict>
- <key>PBXProjectModuleGUID</key>
- <string>1CD0528D0623707200166675</string>
- </dict>
- <key>SplitCount</key>
- <string>1</string>
- </dict>
<key>StatusBarVisibility</key>
- <integer>1</integer>
+ <true/>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
- <string>{{0, 0}, {781, 167}}</string>
+ <string>{{0, 0}, {781, 212}}</string>
<key>RubberWindowFrame</key>
- <string>62 385 781 470 0 0 1440 878 </string>
+ <string>580 385 781 470 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXNavigatorGroup</string>
@@ -810,11 +804,11 @@
</dict>
</array>
<key>Proportion</key>
- <string>50%</string>
+ <string>212pt</string>
</dict>
<dict>
<key>BecomeActive</key>
- <integer>1</integer>
+ <true/>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
@@ -825,18 +819,18 @@
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
- <string>{{8, 0}, {773, 254}}</string>
+ <string>{{0, 217}, {781, 212}}</string>
<key>RubberWindowFrame</key>
- <string>62 385 781 470 0 0 1440 878 </string>
+ <string>580 385 781 470 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXProjectFindModule</string>
<key>Proportion</key>
- <string>50%</string>
+ <string>212pt</string>
</dict>
</array>
<key>Proportion</key>
- <string>428pt</string>
+ <string>429pt</string>
</dict>
</array>
<key>Name</key>
@@ -846,23 +840,21 @@
<string>PBXProjectFindModule</string>
</array>
<key>StatusbarIsVisible</key>
- <integer>1</integer>
+ <true/>
<key>TableOfContents</key>
<array>
<string>1C530D57069F1CE1000CFCEE</string>
- <string>1C530D58069F1CE1000CFCEE</string>
- <string>1C530D59069F1CE1000CFCEE</string>
+ <string>1DD73C3C0F3CDA1800552B38</string>
+ <string>1DD73C3D0F3CDA1800552B38</string>
<string>1CDD528C0622207200134675</string>
- <string>1C530D5A069F1CE1000CFCEE</string>
- <string>1CE0B1FE06471DED0097A5F4</string>
<string>1CD0528E0623707200166675</string>
</array>
<key>WindowString</key>
- <string>62 385 781 470 0 0 1440 878 </string>
+ <string>580 385 781 470 0 0 1440 878 </string>
<key>WindowToolGUID</key>
<string>1C530D57069F1CE1000CFCEE</string>
<key>WindowToolIsVisible</key>
- <integer>0</integer>
+ <false/>
</dict>
<dict>
<key>Identifier</key>
@@ -895,7 +887,7 @@
<key>Frame</key>
<string>{{0, 0}, {650, 209}}</string>
<key>RubberWindowFrame</key>
- <string>414 429 650 250 0 0 1440 878 </string>
+ <string>454 334 650 250 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXDebugCLIModule</string>
@@ -924,7 +916,7 @@
<key>ToolbarConfiguration</key>
<string>xcode.toolbar.config.consoleV3</string>
<key>WindowString</key>
- <string>414 429 650 250 0 0 1440 878 </string>
+ <string>454 334 650 250 0 0 1440 878 </string>
<key>WindowToolGUID</key>
<string>1C78EAAD065D492600B07095</string>
<key>WindowToolIsVisible</key>
@@ -1065,18 +1057,18 @@
<string>743 379 452 308 0 0 1280 1002 </string>
</dict>
<dict>
+ <key>FirstTimeWindowDisplayed</key>
+ <false/>
<key>Identifier</key>
<string>windowTool.breakpoints</string>
<key>IsVertical</key>
- <integer>0</integer>
+ <false/>
<key>Layout</key>
<array>
<dict>
<key>Dock</key>
<array>
<dict>
- <key>BecomeActive</key>
- <integer>1</integer>
<key>ContentConfiguration</key>
<dict>
<key>PBXBottomSmartGroupGIDs</key>
@@ -1118,7 +1110,7 @@
<key>PBXTopSmartGroupGIDs</key>
<array/>
<key>XCIncludePerspectivesSwitch</key>
- <integer>0</integer>
+ <false/>
</dict>
<key>GeometryConfiguration</key>
<dict>
@@ -1130,7 +1122,7 @@
<real>168</real>
</array>
<key>RubberWindowFrame</key>
- <string>315 424 744 409 0 0 1440 878 </string>
+ <string>394 423 744 409 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXSmartGroupTreeModule</string>
@@ -1150,7 +1142,7 @@
<key>Frame</key>
<string>{{190, 0}, {554, 368}}</string>
<key>RubberWindowFrame</key>
- <string>315 424 744 409 0 0 1440 878 </string>
+ <string>394 423 744 409 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>XCDetailModule</string>
@@ -1174,22 +1166,22 @@
<string>XCDetailModule</string>
</array>
<key>StatusbarIsVisible</key>
- <integer>1</integer>
+ <true/>
<key>TableOfContents</key>
<array>
- <string>1CDDB66807F98D9800BB5817</string>
- <string>1CDDB66907F98D9800BB5817</string>
+ <string>1DD73B890F3CC98100552B38</string>
+ <string>1DD73B8A0F3CC98100552B38</string>
<string>1CE0B1FE06471DED0097A5F4</string>
<string>1CA1AED706398EBD00589147</string>
</array>
<key>ToolbarConfiguration</key>
<string>xcode.toolbar.config.breakpointsV3</string>
<key>WindowString</key>
- <string>315 424 744 409 0 0 1440 878 </string>
+ <string>394 423 744 409 0 0 1440 878 </string>
<key>WindowToolGUID</key>
- <string>1CDDB66807F98D9800BB5817</string>
+ <string>1DD73B890F3CC98100552B38</string>
<key>WindowToolIsVisible</key>
- <integer>1</integer>
+ <false/>
</dict>
<dict>
<key>Identifier</key>
View
268 ExampleApplication/ExampleApplication.xcodeproj/ghansard.pbxuser
@@ -21,8 +21,12 @@
executableUserSymbolLevel = 0;
libgmallocEnabled = 0;
name = ExampleApplication;
+ savedGlobals = {
+ };
sourceDirectories = (
);
+ variableFormatDictionary = {
+ };
};
1DC322F40F3B747D0011E197 /* Source Control */ = {
isa = PBXSourceControlManager;
@@ -35,27 +39,259 @@
isa = PBXCodeSenseManager;
indexTemplatePath = "";
};
+ 1DC322FA0F3B74FA0011E197 /* FScriptPlugInManager.m */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {439, 1554}}";
+ sepNavSelRange = "{3097, 0}";
+ sepNavVisRange = "{866, 568}";
+ };
+ };
+ 1DC322FC0F3B74FA0011E197 /* JavascriptPluginManager.m */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {439, 1596}}";
+ sepNavSelRange = "{1497, 2}";
+ sepNavVisRange = "{1266, 465}";
+ };
+ };
+ 1DC322FE0F3B74FA0011E197 /* LuaPluginManager.m */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {439, 2100}}";
+ sepNavSelRange = "{3913, 0}";
+ sepNavVisRange = "{753, 497}";
+ };
+ };
+ 1DC323000F3B74FA0011E197 /* NuPluginManager.m */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {439, 1540}}";
+ sepNavSelRange = "{2743, 0}";
+ sepNavVisRange = "{704, 479}";
+ };
+ };
+ 1DC323080F3B74FA0011E197 /* PythonPluginManager.m */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {720, 3752}}";
+ sepNavSelRange = "{4197, 5}";
+ sepNavVisRange = "{3891, 606}";
+ };
+ };
+ 1DC323600F3B75910011E197 /* NSApplescript+FCSAdditions.m */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {720, 2058}}";
+ sepNavSelRange = "{2754, 5}";
+ sepNavVisRange = "{2479, 623}";
+ };
+ };
1DC323C70F3B77990011E197 /* ExampleObjCPlugin */ = {
activeExec = 0;
};
+ 1DC323D10F3B77D80011E197 /* ExamplePlugin.m */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {720, 364}}";
+ sepNavSelRange = "{538, 5}";
+ sepNavVisRange = "{220, 393}";
+ };
+ };
1DC324310F3B89D30011E197 /* ExampleApplication.sdef */ = {
uiCtxt = {
sepNavWindowFrame = "{{15, 9}, {795, 864}}";
};
};
+ 1DD73B870F3CC97C00552B38 /* malloc_error_break */ = {
+ isa = PBXSymbolicBreakpoint;
+ actions = (
+ 1DD73B9D0F3CCA0A00552B38 /* XCBreakpointLogAction */,
+ );
+ breakpointStyle = 1;
+ continueAfterActions = 0;
+ countType = 0;
+ delayBeforeContinue = 0;
+ hitCount = 1;
+ ignoreCount = 0;
+ location = libSystem.B.dylib;
+ modificationTime = 255642084.819161;
+ state = 1;
+ symbolName = malloc_error_break;
+ };
+ 1DD73B9D0F3CCA0A00552B38 /* XCBreakpointLogAction */ = {
+ isa = XCBreakpointLogAction;
+ fallbackIsa = XCBreakpointAction;
+ logMessage = 1;
+ message = asf;
+ speakMessage = 0;
+ useDebuggerSideImplementation = 0;
+ };
+ 1DD73C230F3CD94B00552B38 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 1DC322FC0F3B74FA0011E197 /* JavascriptPluginManager.m */;
+ name = "JavascriptPluginManager.m: 55";
+ rLen = 2;
+ rLoc = 1497;
+ rType = 0;
+ vrLen = 369;
+ vrLoc = 1315;
+ };
+ 1DD73C240F3CD94B00552B38 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 1DC322FE0F3B74FA0011E197 /* LuaPluginManager.m */;
+ name = "LuaPluginManager.m: 144";
+ rLen = 0;
+ rLoc = 3913;
+ rType = 0;
+ vrLen = 497;
+ vrLoc = 753;
+ };
+ 1DD73C250F3CD94B00552B38 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ comments = "error: syntax error before ')' token";
+ fRef = 1DC323000F3B74FA0011E197 /* NuPluginManager.m */;
+ rLen = 1;
+ rLoc = 34;
+ rType = 1;
+ };
+ 1DD73C260F3CD94B00552B38 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 1DC322FC0F3B74FA0011E197 /* JavascriptPluginManager.m */;
+ name = "JavascriptPluginManager.m: 55";
+ rLen = 2;
+ rLoc = 1497;
+ rType = 0;
+ vrLen = 369;
+ vrLoc = 1315;
+ };
+ 1DD73C270F3CD94B00552B38 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 1DC322FE0F3B74FA0011E197 /* LuaPluginManager.m */;
+ name = "LuaPluginManager.m: 144";
+ rLen = 0;
+ rLoc = 3913;
+ rType = 0;
+ vrLen = 497;
+ vrLoc = 753;
+ };
+ 1DD73C280F3CD94B00552B38 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 1DC323000F3B74FA0011E197 /* NuPluginManager.m */;
+ name = "NuPluginManager.m: 100";
+ rLen = 0;
+ rLoc = 2743;
+ rType = 0;
+ vrLen = 479;
+ vrLoc = 704;
+ };
+ 1DD73C320F3CD9D100552B38 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ comments = "error: syntax error before ')' token";
+ fRef = 1DC322FA0F3B74FA0011E197 /* FScriptPlugInManager.m */;
+ rLen = 1;
+ rLoc = 36;
+ rType = 1;
+ };
+ 1DD73C330F3CD9D100552B38 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 1DC322FA0F3B74FA0011E197 /* FScriptPlugInManager.m */;
+ name = "FScriptPlugInManager.m: 105";
+ rLen = 0;
+ rLoc = 3097;
+ rType = 0;
+ vrLen = 568;
+ vrLoc = 866;
+ };
+ 1DD73C360F3CDA1800552B38 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 1DC323D10F3B77D80011E197 /* ExamplePlugin.m */;
+ name = "ExamplePlugin.m: 18";
+ rLen = 5;
+ rLoc = 538;
+ rType = 0;
+ vrLen = 393;
+ vrLoc = 220;
+ };
+ 1DD73C370F3CDA1800552B38 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 1DC323080F3B74FA0011E197 /* PythonPluginManager.m */;
+ name = "PythonPluginManager.m: 112";
+ rLen = 5;
+ rLoc = 4197;
+ rType = 0;
+ vrLen = 606;
+ vrLoc = 3891;
+ };
+ 1DD73C380F3CDA1800552B38 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 1DC323600F3B75910011E197 /* NSApplescript+FCSAdditions.m */;
+ rLen = 5;
+ rLoc = 2754;
+ rType = 0;
+ };
+ 1DD73C390F3CDA1800552B38 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 1DC323D10F3B77D80011E197 /* ExamplePlugin.m */;
+ name = "ExamplePlugin.m: 18";
+ rLen = 5;
+ rLoc = 538;
+ rType = 0;
+ vrLen = 393;
+ vrLoc = 220;
+ };
+ 1DD73C3A0F3CDA1800552B38 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 1DC323080F3B74FA0011E197 /* PythonPluginManager.m */;
+ name = "PythonPluginManager.m: 112";
+ rLen = 5;
+ rLoc = 4197;
+ rType = 0;
+ vrLen = 606;
+ vrLoc = 3891;
+ };
+ 1DD73C3B0F3CDA1800552B38 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 1DC323600F3B75910011E197 /* NSApplescript+FCSAdditions.m */;
+ name = "NSApplescript+FCSAdditions.m: 69";
+ rLen = 5;
+ rLoc = 2754;
+ rType = 0;
+ vrLen = 623;
+ vrLoc = 2479;
+ };
29B97313FDCFA39411CA2CEA /* Project object */ = {
activeArchitecture = i386;
activeBuildConfigurationName = Debug;
activeExecutable = 1DC322E60F3B74730011E197 /* ExampleApplication */;
activeTarget = 8D1107260486CEB800E47090 /* ExampleApplication */;
addToTargets = (
- 8D1107260486CEB800E47090 /* ExampleApplication */,
+ );
+ breakpoints = (
+ 1DD73B870F3CC97C00552B38 /* malloc_error_break */,
);
codeSenseManager = 1DC322F50F3B747D0011E197 /* Code sense */;
executables = (
1DC322E60F3B74730011E197 /* ExampleApplication */,
);
perUserDictionary = {
+ "PBXConfiguration.PBXBreakpointsDataSource.v1:1CA1AED706398EBD00589147" = {
+ PBXFileTableDataSourceColumnSortingDirectionKey = 1;
+ PBXFileTableDataSourceColumnSortingKey = PBXBreakpointsDataSource_BreakpointID;
+ PBXFileTableDataSourceColumnWidthsKey = (
+ 20,
+ 20,
+ 198,
+ 20,
+ 99,
+ 99,
+ 29,
+ 20,
+ );
+ PBXFileTableDataSourceColumnsKey = (
+ PBXBreakpointsDataSource_ActionID,
+ PBXBreakpointsDataSource_TypeID,
+ PBXBreakpointsDataSource_BreakpointID,
+ PBXBreakpointsDataSource_UseID,
+ PBXBreakpointsDataSource_LocationID,
+ PBXBreakpointsDataSource_ConditionID,
+ PBXBreakpointsDataSource_IgnoreCountID,
+ PBXBreakpointsDataSource_ContinueID,
+ );
+ };
PBXConfiguration.PBXFileTableDataSource3.PBXErrorsWarningsDataSource = {
PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
PBXFileTableDataSourceColumnSortingKey = PBXErrorsWarningsDataSource_LocationID;
@@ -70,6 +306,20 @@
PBXErrorsWarningsDataSource_LocationID,
);
};
+ PBXConfiguration.PBXFileTableDataSource3.PBXExecutablesDataSource = {
+ PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
+ PBXFileTableDataSourceColumnSortingKey = PBXExecutablesDataSource_NameID;
+ PBXFileTableDataSourceColumnWidthsKey = (
+ 22,
+ 300,
+ 131,
+ );
+ PBXFileTableDataSourceColumnsKey = (
+ PBXExecutablesDataSource_ActiveFlagID,
+ PBXExecutablesDataSource_NameID,
+ PBXExecutablesDataSource_CommentsID,
+ );
+ };
PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = {
PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
@@ -117,6 +367,22 @@
PBXPerProjectTemplateStateSaveDate = 255631107;
PBXWorkspaceStateSaveDate = 255631107;
};
+ perUserProjectItems = {
+ 1DD73C230F3CD94B00552B38 /* PBXTextBookmark */ = 1DD73C230F3CD94B00552B38 /* PBXTextBookmark */;
+ 1DD73C240F3CD94B00552B38 /* PBXTextBookmark */ = 1DD73C240F3CD94B00552B38 /* PBXTextBookmark */;
+ 1DD73C250F3CD94B00552B38 /* PBXTextBookmark */ = 1DD73C250F3CD94B00552B38 /* PBXTextBookmark */;
+ 1DD73C260F3CD94B00552B38 /* PBXTextBookmark */ = 1DD73C260F3CD94B00552B38 /* PBXTextBookmark */;
+ 1DD73C270F3CD94B00552B38 /* PBXTextBookmark */ = 1DD73C270F3CD94B00552B38 /* PBXTextBookmark */;
+ 1DD73C280F3CD94B00552B38 /* PBXTextBookmark */ = 1DD73C280F3CD94B00552B38 /* PBXTextBookmark */;
+ 1DD73C320F3CD9D100552B38 /* PBXTextBookmark */ = 1DD73C320F3CD9D100552B38 /* PBXTextBookmark */;
+ 1DD73C330F3CD9D100552B38 /* PBXTextBookmark */ = 1DD73C330F3CD9D100552B38 /* PBXTextBookmark */;
+ 1DD73C360F3CDA1800552B38 /* PBXTextBookmark */ = 1DD73C360F3CDA1800552B38 /* PBXTextBookmark */;
+ 1DD73C370F3CDA1800552B38 /* PBXTextBookmark */ = 1DD73C370F3CDA1800552B38 /* PBXTextBookmark */;
+ 1DD73C380F3CDA1800552B38 /* PBXTextBookmark */ = 1DD73C380F3CDA1800552B38 /* PBXTextBookmark */;
+ 1DD73C390F3CDA1800552B38 /* PBXTextBookmark */ = 1DD73C390F3CDA1800552B38 /* PBXTextBookmark */;
+ 1DD73C3A0F3CDA1800552B38 /* PBXTextBookmark */ = 1DD73C3A0F3CDA1800552B38 /* PBXTextBookmark */;
+ 1DD73C3B0F3CDA1800552B38 /* PBXTextBookmark */ = 1DD73C3B0F3CDA1800552B38 /* PBXTextBookmark */;
+ };
sourceControlManager = 1DC322F40F3B747D0011E197 /* Source Control */;
userBuildSettings = {
};
View
84 ExampleApplication/ExampleApplication.xcodeproj/project.pbxproj
@@ -8,25 +8,9 @@
/* Begin PBXBuildFile section */
1D973ECE0F3BE83900437B6D /* AddressBook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D973ECD0F3BE83900437B6D /* AddressBook.framework */; };
- 1D973F320F3BF36000437B6D /* Example.py in Resources */ = {isa = PBXBuildFile; fileRef = 1D973F310F3BF36000437B6D /* Example.py */; };
- 1DC3230B0F3B74FA0011E197 /* ApplescriptPluginManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 1DC322F80F3B74FA0011E197 /* ApplescriptPluginManager.m */; };
- 1DC3230C0F3B74FA0011E197 /* FScriptPlugInManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 1DC322FA0F3B74FA0011E197 /* FScriptPlugInManager.m */; };
- 1DC3230D0F3B74FA0011E197 /* JavascriptPluginManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 1DC322FC0F3B74FA0011E197 /* JavascriptPluginManager.m */; };
- 1DC3230E0F3B74FA0011E197 /* LuaPluginManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 1DC322FE0F3B74FA0011E197 /* LuaPluginManager.m */; };
- 1DC3230F0F3B74FA0011E197 /* NuPluginManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 1DC323000F3B74FA0011E197 /* NuPluginManager.m */; };
- 1DC323100F3B74FA0011E197 /* ObjCPluginManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 1DC323020F3B74FA0011E197 /* ObjCPluginManager.m */; };
1DC323110F3B74FA0011E197 /* PluginManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 1DC323040F3B74FA0011E197 /* PluginManager.m */; };
- 1DC323120F3B74FA0011E197 /* PythonPluginManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 1DC323080F3B74FA0011E197 /* PythonPluginManager.m */; };
- 1DC323130F3B74FA0011E197 /* RubyPluginManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 1DC3230A0F3B74FA0011E197 /* RubyPluginManager.m */; };
- 1DC323170F3B751A0011E197 /* Nu.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DC323140F3B751A0011E197 /* Nu.framework */; };
- 1DC323180F3B751A0011E197 /* FScript.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DC323150F3B751A0011E197 /* FScript.framework */; };
- 1DC323190F3B751A0011E197 /* JSCocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DC323160F3B751A0011E197 /* JSCocoa.framework */; };
- 1DC323510F3B752B0011E197 /* Python.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DC3234F0F3B752B0011E197 /* Python.framework */; };
1DC323520F3B752B0011E197 /* RubyCocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DC323500F3B752B0011E197 /* RubyCocoa.framework */; };
1DC3235D0F3B75370011E197 /* libruby.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DC3235C0F3B75370011E197 /* libruby.dylib */; };
- 1DC323610F3B75910011E197 /* NSApplescript+FCSAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 1DC323600F3B75910011E197 /* NSApplescript+FCSAdditions.m */; };
- 1DC323660F3B75C70011E197 /* LuaCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DC323650F3B75C70011E197 /* LuaCore.framework */; };
- 1DC323BE0F3B76C40011E197 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DC323BD0F3B76C40011E197 /* Carbon.framework */; };
1DC323D20F3B77D80011E197 /* ExamplePlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 1DC323D10F3B77D80011E197 /* ExamplePlugin.m */; };
1DC323D30F3B77DB0011E197 /* ExamplePlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 1DC323D10F3B77D80011E197 /* ExamplePlugin.m */; };
1DC323D50F3B77E90011E197 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
@@ -34,9 +18,26 @@
1DC323EC0F3B795E0011E197 /* ExampleController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1DC323EB0F3B795E0011E197 /* ExampleController.m */; };
1DC3242E0F3B87190011E197 /* Example.scpt in Copy plugins */ = {isa = PBXBuildFile; fileRef = 1DC3242B0F3B870C0011E197 /* Example.scpt */; };
1DC324320F3B89D30011E197 /* ExampleApplication.sdef in Resources */ = {isa = PBXBuildFile; fileRef = 1DC324310F3B89D30011E197 /* ExampleApplication.sdef */; };
- 1DD73AC20F3C9F9B00552B38 /* ScriptingBridge.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DD73AC10F3C9F9B00552B38 /* ScriptingBridge.framework */; };
- 1DD73B280F3CA06500552B38 /* Example.rb in Resources */ = {isa = PBXBuildFile; fileRef = 1DD73B270F3CA06500552B38 /* Example.rb */; };
1DD73B2E0F3CA0DE00552B38 /* Example.rb in Copy plugins */ = {isa = PBXBuildFile; fileRef = 1DD73B270F3CA06500552B38 /* Example.rb */; };
+ 1DD73BBF0F3CD14200552B38 /* PythonPluginManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 1DC323080F3B74FA0011E197 /* PythonPluginManager.m */; };
+ 1DD73BC20F3CD19700552B38 /* Python.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DC3234F0F3B752B0011E197 /* Python.framework */; };
+ 1DD73BF90F3CD78100552B38 /* FScript.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DC323150F3B751A0011E197 /* FScript.framework */; };
+ 1DD73BFA0F3CD78300552B38 /* JSCocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DC323160F3B751A0011E197 /* JSCocoa.framework */; };
+ 1DD73BFB0F3CD78300552B38 /* LuaCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DC323650F3B75C70011E197 /* LuaCore.framework */; };
+ 1DD73BFC0F3CD78400552B38 /* Nu.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DC323140F3B751A0011E197 /* Nu.framework */; };
+ 1DD73C010F3CD7E200552B38 /* LuaPluginManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 1DC322FE0F3B74FA0011E197 /* LuaPluginManager.m */; };
+ 1DD73C020F3CD7E400552B38 /* JavascriptPluginManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 1DC322FC0F3B74FA0011E197 /* JavascriptPluginManager.m */; };
+ 1DD73C030F3CD7E600552B38 /* NuPluginManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 1DC323000F3B74FA0011E197 /* NuPluginManager.m */; };
+ 1DD73C040F3CD7E700552B38 /* ObjCPluginManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 1DC323020F3B74FA0011E197 /* ObjCPluginManager.m */; };
+ 1DD73C060F3CD7F200552B38 /* Example.js in Sources */ = {isa = PBXBuildFile; fileRef = 1DD73C050F3CD7F200552B38 /* Example.js */; };
+ 1DD73C0F0F3CD85600552B38 /* Example.lua in Copy plugins */ = {isa = PBXBuildFile; fileRef = 1DD73BFF0F3CD7D000552B38 /* Example.lua */; };
+ 1DD73C100F3CD85600552B38 /* Example.js in Copy plugins */ = {isa = PBXBuildFile; fileRef = 1DD73C050F3CD7F200552B38 /* Example.js */; };
+ 1DD73C110F3CD85600552B38 /* Example.fscript in Copy plugins */ = {isa = PBXBuildFile; fileRef = 1DD73C090F3CD82400552B38 /* Example.fscript */; };
+ 1DD73C120F3CD85600552B38 /* Example.nu in Copy plugins */ = {isa = PBXBuildFile; fileRef = 1DD73C0B0F3CD83E00552B38 /* Example.nu */; };
+ 1DD73C2B0F3CD9A300552B38 /* FScriptPlugInManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 1DC322FA0F3B74FA0011E197 /* FScriptPlugInManager.m */; };
+ 1DD73C2C0F3CD9A700552B38 /* NSApplescript+FCSAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 1DC323600F3B75910011E197 /* NSApplescript+FCSAdditions.m */; };
+ 1DD73C300F3CD9C800552B38 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DC323BD0F3B76C40011E197 /* Carbon.framework */; };
+ 1DD73C5A0F3CF93500552B38 /* Example.py in Copy plugins */ = {isa = PBXBuildFile; fileRef = 1D973F310F3BF36000437B6D /* Example.py */; };
8D11072A0486CEB800E47090 /* MainMenu.nib in Resources */ = {isa = PBXBuildFile; fileRef = 29B97318FDCFA39411CA2CEA /* MainMenu.nib */; };
8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; };
8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; };
@@ -60,7 +61,12 @@
dstPath = "";
dstSubfolderSpec = 13;
files = (
+ 1DD73C5A0F3CF93500552B38 /* Example.py in Copy plugins */,
1DD73B2E0F3CA0DE00552B38 /* Example.rb in Copy plugins */,
+ 1DD73C0F0F3CD85600552B38 /* Example.lua in Copy plugins */,
+ 1DD73C100F3CD85600552B38 /* Example.js in Copy plugins */,
+ 1DD73C110F3CD85600552B38 /* Example.fscript in Copy plugins */,
+ 1DD73C120F3CD85600552B38 /* Example.nu in Copy plugins */,
1DC3242E0F3B87190011E197 /* Example.scpt in Copy plugins */,
1DC323DC0F3B78C90011E197 /* ExampleObjCPlugin.bundle in Copy plugins */,
);
@@ -113,8 +119,11 @@
1DC323EB0F3B795E0011E197 /* ExampleController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ExampleController.m; sourceTree = "<group>"; };
1DC3242B0F3B870C0011E197 /* Example.scpt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.scpt; path = Example.scpt; sourceTree = "<group>"; };
1DC324310F3B89D30011E197 /* ExampleApplication.sdef */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.sdef; path = ExampleApplication.sdef; sourceTree = "<group>"; };
- 1DD73AC10F3C9F9B00552B38 /* ScriptingBridge.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ScriptingBridge.framework; path = /System/Library/Frameworks/ScriptingBridge.framework; sourceTree = "<absolute>"; };
1DD73B270F3CA06500552B38 /* Example.rb */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.ruby; path = Example.rb; sourceTree = "<group>"; };
+ 1DD73BFF0F3CD7D000552B38 /* Example.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Example.lua; sourceTree = "<group>"; };
+ 1DD73C050F3CD7F200552B38 /* Example.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = Example.js; sourceTree = "<group>"; };
+ 1DD73C090F3CD82400552B38 /* Example.fscript */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Example.fscript; sourceTree = "<group>"; };
+ 1DD73C0B0F3CD83E00552B38 /* Example.nu */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Example.nu; sourceTree = "<group>"; };
29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
29B97319FDCFA39411CA2CEA /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/MainMenu.nib; sourceTree = "<group>"; };
29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
@@ -138,16 +147,15 @@
buildActionMask = 2147483647;
files = (
8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */,
- 1DC323170F3B751A0011E197 /* Nu.framework in Frameworks */,
- 1DC323180F3B751A0011E197 /* FScript.framework in Frameworks */,
- 1DC323190F3B751A0011E197 /* JSCocoa.framework in Frameworks */,
- 1DC323510F3B752B0011E197 /* Python.framework in Frameworks */,
1DC323520F3B752B0011E197 /* RubyCocoa.framework in Frameworks */,
1DC3235D0F3B75370011E197 /* libruby.dylib in Frameworks */,
- 1DC323660F3B75C70011E197 /* LuaCore.framework in Frameworks */,
- 1DC323BE0F3B76C40011E197 /* Carbon.framework in Frameworks */,
1D973ECE0F3BE83900437B6D /* AddressBook.framework in Frameworks */,
- 1DD73AC20F3C9F9B00552B38 /* ScriptingBridge.framework in Frameworks */,
+ 1DD73BC20F3CD19700552B38 /* Python.framework in Frameworks */,
+ 1DD73BF90F3CD78100552B38 /* FScript.framework in Frameworks */,
+ 1DD73BFA0F3CD78300552B38 /* JSCocoa.framework in Frameworks */,
+ 1DD73BFB0F3CD78300552B38 /* LuaCore.framework in Frameworks */,
+ 1DD73BFC0F3CD78400552B38 /* Nu.framework in Frameworks */,
+ 1DD73C300F3CD9C800552B38 /* Carbon.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -248,6 +256,10 @@
1DC3242B0F3B870C0011E197 /* Example.scpt */,
1D973F310F3BF36000437B6D /* Example.py */,
1DD73B270F3CA06500552B38 /* Example.rb */,
+ 1DD73BFF0F3CD7D000552B38 /* Example.lua */,
+ 1DD73C050F3CD7F200552B38 /* Example.js */,
+ 1DD73C090F3CD82400552B38 /* Example.fscript */,
+ 1DD73C0B0F3CD83E00552B38 /* Example.nu */,
);
name = PlugIns;
sourceTree = "<group>";
@@ -286,7 +298,6 @@
29B97323FDCFA39411CA2CEA /* Frameworks */ = {
isa = PBXGroup;
children = (
- 1DD73AC10F3C9F9B00552B38 /* ScriptingBridge.framework */,
1D973ECD0F3BE83900437B6D /* AddressBook.framework */,
1DC323BD0F3B76C40011E197 /* Carbon.framework */,
1DC3235C0F3B75370011E197 /* libruby.dylib */,
@@ -375,8 +386,6 @@
8D11072A0486CEB800E47090 /* MainMenu.nib in Resources */,
8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */,
1DC324320F3B89D30011E197 /* ExampleApplication.sdef in Resources */,
- 1D973F320F3BF36000437B6D /* Example.py in Resources */,
- 1DD73B280F3CA06500552B38 /* Example.rb in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -396,18 +405,17 @@
buildActionMask = 2147483647;
files = (
8D11072D0486CEB800E47090 /* main.m in Sources */,
- 1DC3230B0F3B74FA0011E197 /* ApplescriptPluginManager.m in Sources */,
- 1DC3230C0F3B74FA0011E197 /* FScriptPlugInManager.m in Sources */,
- 1DC3230D0F3B74FA0011E197 /* JavascriptPluginManager.m in Sources */,
- 1DC3230E0F3B74FA0011E197 /* LuaPluginManager.m in Sources */,
- 1DC3230F0F3B74FA0011E197 /* NuPluginManager.m in Sources */,
- 1DC323100F3B74FA0011E197 /* ObjCPluginManager.m in Sources */,
1DC323110F3B74FA0011E197 /* PluginManager.m in Sources */,
- 1DC323120F3B74FA0011E197 /* PythonPluginManager.m in Sources */,
- 1DC323130F3B74FA0011E197 /* RubyPluginManager.m in Sources */,
- 1DC323610F3B75910011E197 /* NSApplescript+FCSAdditions.m in Sources */,
1DC323D30F3B77DB0011E197 /* ExamplePlugin.m in Sources */,
1DC323EC0F3B795E0011E197 /* ExampleController.m in Sources */,
+ 1DD73BBF0F3CD14200552B38 /* PythonPluginManager.m in Sources */,
+ 1DD73C010F3CD7E200552B38 /* LuaPluginManager.m in Sources */,
+ 1DD73C020F3CD7E400552B38 /* JavascriptPluginManager.m in Sources */,
+ 1DD73C030F3CD7E600552B38 /* NuPluginManager.m in Sources */,
+ 1DD73C040F3CD7E700552B38 /* ObjCPluginManager.m in Sources */,
+ 1DD73C060F3CD7F200552B38 /* Example.js in Sources */,
+ 1DD73C2B0F3CD9A300552B38 /* FScriptPlugInManager.m in Sources */,
+ 1DD73C2C0F3CD9A700552B38 /* NSApplescript+FCSAdditions.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
View
2  ExampleApplication/ExampleController.m
@@ -20,7 +20,7 @@ - (void)awakeFromNib
NSDictionary *meDict = [NSDictionary dictionaryWithObjectsAndKeys:
[NSString stringWithFormat:@"%@ %@", [me valueForProperty:kABFirstNameProperty], [me valueForProperty:kABLastNameProperty], nil], @"name",
[me valueForProperty:kABPhoneProperty], @"phone", nil];
- self.me = meDict;
+ self.me = meDict;
}
- (IBAction)showPluginMenu:(id)sender {
View
18 src/FScriptPlugInManager.m
@@ -34,24 +34,10 @@ - (void)build
{
if (_plugins) [_plugins release];
_plugins = [NSMutableDictionary new];
- NSString *pluginsPath = [PluginManager pathToPluginsFolder];
- NSFileManager *fm = [NSFileManager defaultManager];
- BOOL isFolder;
- if (![fm fileExistsAtPath:pluginsPath isDirectory:&isFolder] || !isFolder) return;
-
- NSArray *plugins = [fm directoryContentsAtPath:pluginsPath];
- plugins = [plugins arrayByAddingObjectsFromArray:[fm directoryContentsAtPath:[[NSBundle mainBundle] pathForResource:@"Plugins" ofType:nil]]];
- NSEnumerator *pluginEnumerator = [plugins objectEnumerator];
- NSString *path;
- NSArray *extensions = [self extensions];
-
- while (path = [pluginEnumerator nextObject])
+ for (NSString *path in [PluginManager pluginFilesForSubmanager:self])
{
FSInterpreter *interpreter = [FSInterpreter interpreter];
- if (![extensions containsObject:[path pathExtension]]) continue;
-
- NSString *fullPath = [pluginsPath stringByAppendingPathComponent:path];
- NSString *fscriptCode = [NSString stringWithContentsOfFile:fullPath];
+ NSString *fscriptCode = [NSString stringWithContentsOfFile:path];
// Set up an FSInterpreter that will represent the plugin in memory. Load the code using `execute:`
// and then get references to its functions using `objectForIdentifier:found:`.
View
23 src/JavascriptPluginManager.m
@@ -32,38 +32,25 @@ - (void)build
{
if (_plugins) [_plugins release];
_plugins = [NSMutableDictionary new];
- NSString *pluginsPath = [PluginManager pathToPluginsFolder];
- NSFileManager *fm = [NSFileManager defaultManager];
- BOOL isFolder;
- if (![fm fileExistsAtPath:pluginsPath isDirectory:&isFolder] || !isFolder) return;
- NSArray *plugins = [fm directoryContentsAtPath:pluginsPath];
- plugins = [plugins arrayByAddingObjectsFromArray:[fm directoryContentsAtPath:[[NSBundle mainBundle] pathForResource:@"Plugins" ofType:nil]]];
- NSEnumerator *pluginEnumerator = [plugins objectEnumerator];
- NSString *path;
- NSArray *extensions = [self extensions];
- while (path = [pluginEnumerator nextObject])
+ for (NSString *path in [PluginManager pluginFilesForSubmanager:self])
{
- if (![extensions containsObject:[path pathExtension]]) goto next;
-
JSCocoaController *controller = [[JSCocoaController new] autorelease];
- [controller evalJSFile:[pluginsPath stringByAppendingPathComponent:path]];
+ [controller evalJSFile:path];
if (![controller hasJSFunctionNamed:@"actionProperty"] ||
![controller hasJSFunctionNamed:@"actionEnable"] ||
![controller hasJSFunctionNamed:@"actionTitle"] ||
- ![controller hasJSFunctionNamed:@"actionPerform"]) goto next;
+ ![controller hasJSFunctionNamed:@"actionPerform"]) continue;
JSValueRef value = [controller callJSFunctionNamed:@"actionProperty" withArguments:nil];
NSString *property;
- if (![JSCocoaFFIArgument unboxJSValueRef:value toObject:&property inContext:[controller ctx]]) goto next;
+ if (![JSCocoaFFIArgument unboxJSValueRef:value toObject:&property inContext:[controller ctx]]) continue;
NSMutableArray *arr = [_plugins objectForKey:property];
if (!arr) arr = [NSMutableArray array];
[arr addObject:controller];
- [_plugins setObject:arr forKey:property];
-
- next:;
+ [_plugins setObject:arr forKey:property];
}
}
View
20 src/LuaPluginManager.m
@@ -32,31 +32,17 @@ - (void)build
{
if (_plugins) [_plugins release];
_plugins = [NSMutableDictionary new];
- NSString *pluginsPath = [PluginManager pathToPluginsFolder];
- NSFileManager *fm = [NSFileManager defaultManager];
- BOOL isFolder;
- if (![fm fileExistsAtPath:pluginsPath isDirectory:&isFolder] || !isFolder) return;
-
- NSArray *plugins = [fm directoryContentsAtPath:pluginsPath];
- plugins = [plugins arrayByAddingObjectsFromArray:[fm directoryContentsAtPath:[[NSBundle mainBundle] pathForResource:@"Plugins" ofType:nil]]];
- NSEnumerator *pluginEnumerator = [plugins objectEnumerator];
- NSString *path;
- NSArray *extensions = [self extensions];
- while (path = [pluginEnumerator nextObject])
+ for (NSString *path in [PluginManager pluginFilesForSubmanager:self])
{
- if (![extensions containsObject:[path pathExtension]]) goto next;
-
LCLua *lua = [LCLua readyLua];
- NSString *luaCode = [NSString stringWithContentsOfFile:[pluginsPath stringByAppendingPathComponent:path]];
- [lua runFileAtPath:[pluginsPath stringByAppendingPathComponent:path]];
+ NSString *luaCode = [NSString stringWithContentsOfFile:path];
+ [lua runFileAtPath:path];
NSString *property = [lua callEmptyFunctionNamed:@"actionProperty" expectReturnValue:YES];
NSMutableArray *arr = [_plugins objectForKey:property];
if (!arr) arr = [NSMutableArray array];
[arr addObject:luaCode];
[_plugins setObject:arr forKey:property];
-
- next:;
}
}
View
18 src/NuPluginManager.m
@@ -32,22 +32,10 @@ - (void)build
{
if (_plugins) [_plugins release];
_plugins = [NSMutableDictionary new];
- NSString *pluginsPath = [PluginManager pathToPluginsFolder];
- NSFileManager *fm = [NSFileManager defaultManager];
- BOOL isFolder;
- if (![fm fileExistsAtPath:pluginsPath isDirectory:&isFolder] || !isFolder) return;
-
- NSArray *plugins = [fm directoryContentsAtPath:pluginsPath];
- plugins = [plugins arrayByAddingObjectsFromArray:[fm directoryContentsAtPath:[[NSBundle mainBundle] pathForResource:@"Plugins" ofType:nil]]];
- NSEnumerator *pluginEnumerator = [plugins objectEnumerator];
- NSString *path;
- NSArray *extensions = [self extensions];
- while (path = [pluginEnumerator nextObject])
+ for (NSString *path in [PluginManager pluginFilesForSubmanager:self])
{
- if (![extensions containsObject:[path pathExtension]]) goto next;
-
id parser = [Nu parser];
- NSString *nuCode = [NSString stringWithContentsOfFile:[pluginsPath stringByAppendingPathComponent:path]];
+ NSString *nuCode = [NSString stringWithContentsOfFile:path];
[parser parseEval:nuCode];
NSString *property = [parser parseEval:@"(actionProperty)"];
@@ -56,8 +44,6 @@ - (void)build
[arr addObject:nuCode];
[_plugins setObject:arr forKey:property];
[parser close];
-
- next:;
}
}
View
22 src/PythonPluginManager.m
@@ -11,12 +11,6 @@
// depythonify attempts to turn a PyObject value into its id/Cocoa counterpart.
id depythonify(PyObject *value) {
if (value == nil) return nil;
- NSString *type = [NSString stringWithUTF8String:value->ob_type->tp_name];
- Class c = NSClassFromString(type);
- if (c) {
- PyObjCObject *tmp = (PyObjCObject *)value;
- return tmp->objc_object;
- }
if (PyInt_Check(value) || PyLong_Check(value) || PyBool_Check(value))
return [NSNumber numberWithLong:PyInt_AsLong(value)];
else if (PyFloat_Check(value)) return [NSNumber numberWithDouble:PyFloat_AsDouble(value)];
@@ -57,8 +51,17 @@ id depythonify(PyObject *value) {
return dict;
}
else if (value == Py_None) return [NSNull null];
+ else {
+ NSString *type = [NSString stringWithUTF8String:value->ob_type->tp_name];
+ if ([type isEqualToString:@"True"]) return [NSNumber numberWithBool:YES];
+ else if ([type isEqualToString:@"False"]) return [NSNumber numberWithBool:NO];
+ Class c = NSClassFromString(type);
+ if (c) {
+ PyObjCObject *tmp = (PyObjCObject *)value;
+ return tmp->objc_object;
+ }
+ }
- // NSLog(@"[depythonify error] Unknown type: %@", type);
Class OC_PythonObj = NSClassFromString(@"OC_PythonObject");
if (OC_PythonObj)
return [[OC_PythonObj performSelector:@selector(newWithObject:) withObject:(id)value] autorelease];
@@ -246,8 +249,9 @@ - (id)callFunction:(NSString *)functionName ofModule:(PyObject *)module argument
// will crash with some GIL state error. Simply using PyGILState_Ensure() and releasing the GIL state after
// seems to resolve this issue.
PyGILState_STATE state = PyGILState_Ensure();
- PyObject *pValue = PyObject_CallObject(pFunc, args ? guaranteedTuple(pythonify(args)) : nil);
- ret = depythonify(pValue);
+ PyObject *pValue = PyObject_CallObject(pFunc, args ? guaranteedTuple(pythonify([NSArray arrayWithObjects:@"", @"", nil])) : nil);
+ if (pValue == nil) PyErr_Print();
+ else ret = depythonify(pValue);
Py_XDECREF(pFunc);
PyGILState_Release(state);
}
View
50 src/RubyPluginManager.m
@@ -40,32 +40,22 @@ -(void)build
if (_plugins) [_plugins release];
_plugins = [NSMutableDictionary new];
- NSString *pluginsPath = [PluginManager pathToPluginsFolder];
- NSFileManager *fm = [NSFileManager defaultManager];
- BOOL isFolder;
- if (![fm fileExistsAtPath:pluginsPath isDirectory:&isFolder] || !isFolder) return;
-
- NSEnumerator *e = [[fm directoryContentsAtPath:pluginsPath] objectEnumerator];
- NSString *path = nil;
- while (path = [e nextObject])
+ for (NSString *scriptPath in [PluginManager pluginFilesForSubmanager:self])
{
- if ([[path pathExtension] isEqualToString:@"rb"])
- {
- // Could it be any easier to load a Ruby script with RubyCocoa? Simply get a script as an NSString
- // and load it using RBObjectWithRubyScriptString:.
- NSString *scriptPath = [pluginsPath stringByAppendingPathComponent:path];
- id rb = [RBObject RBObjectWithRubyScriptString:[NSString stringWithContentsOfFile:scriptPath]];
- if (!rb) continue;
-
- // RBObjects are really NSProxies. RubyCocoa makes it easy to call functions in a Ruby script
- // simply by calling the function name as a proxy method. Here, it'll be calling `actionProperty()`
- // from the loaded script.
- NSString *property = [rb actionProperty];
- NSMutableArray *arr = [_plugins objectForKey:property];
- if (!arr) arr = [NSMutableArray array];
- [arr addObject:rb];
- [_plugins setObject:arr forKey:property];
- }
+ // Could it be any easier to load a Ruby script with RubyCocoa? Simply get a script as an NSString
+ // and load it using RBObjectWithRubyScriptString:.
+
+ id rb = [RBObject RBObjectWithRubyScriptString:[NSString stringWithContentsOfFile:scriptPath]];
+ if (!rb) continue;
+
+ // RBObjects are really NSProxies. RubyCocoa makes it easy to call functions in a Ruby script
+ // simply by calling the function name as a proxy method. Here, it'll be calling `actionProperty()`
+ // from the loaded script.
+ NSString *property = [rb actionProperty];
+ NSMutableArray *arr = [_plugins objectForKey:property];
+ if (!arr) arr = [NSMutableArray array];
+ [arr addObject:rb];
+ [_plugins setObject:arr forKey:property];
}
}
@@ -78,14 +68,14 @@ -(NSArray *)pluginsForProperty:(NSString *)property forValue:(id)forValue withVa
if (!arr || ![arr count]) return nil;
NSEnumerator *pluginEnumerator = [arr objectEnumerator];
- id plugin;
+ id rb;
NSMutableArray *ret = [NSMutableArray array];
- while (plugin = [pluginEnumerator nextObject])
+ while (rb = [pluginEnumerator nextObject])
{
- if ([plugin actionEnable:forValue :withValue])
+ if ([rb actionEnable:nil :nil])
[ret addObject:[NSDictionary dictionaryWithObjectsAndKeys:
- [plugin actionTitle:forValue :withValue], @"title",
- plugin, @"plugin",
+ [rb actionTitle:nil :nil], @"title",
+ rb, @"plugin",
forValue, @"forValue",
withValue, @"value",
nil]];
Please sign in to comment.
Something went wrong with that request. Please try again.