X-Git-Url: http://git.ithinksw.org/ITKit.git/blobdiff_plain/02d5f734e9907ae0f4b0fa44935097e7747e0eb5..5815231d5a35ca9ff5fbdb33b1ec2819850afde2:/ITApplicationController.m diff --git a/ITApplicationController.m b/ITApplicationController.m index f2ba7d5..b52b7ef 100644 --- a/ITApplicationController.m +++ b/ITApplicationController.m @@ -1,17 +1,6 @@ #import "ITApplicationController.h" #import "ITCategory-NSApplication.h" -@protocol _ITKitITApplicationControllerFSInterpreterResultCompatibility -- (NSRange)errorRange; -- (NSString *)errorMessage; -- (BOOL)isOK; -@end - -@protocol _ITKitITApplicationControllerFSInterpreterCompatibility -- (void)setObject:(id)object forIdentifier:(NSString *)identifier; -- (id <_ITKitITApplicationControllerFSInterpreterResultCompatibility>)execute:(NSString *)command; -@end - @implementation ITApplicationController - (id)init { @@ -59,30 +48,6 @@ } } } - - Class fsinterpreterClass; - if (fsinterpreterClass = NSClassFromString(@"FSInterpreter")) { - NSArray *fscriptPaths = [NSBundle pathsForResourcesOfType:@"fscriptplugin" inDirectory:[[NSBundle mainBundle] builtInPlugInsPath]]; - NSEnumerator *fscriptPathEnumerator = [fscriptPaths objectEnumerator]; - id fscriptPath; - - while (fscriptPath = [fscriptPathEnumerator nextObject]) { - NSString *fscriptSource = [NSString stringWithContentsOfFile:fscriptPath]; - if (fscriptSource) { - id fscriptInterpreter = [(id <_ITKitITApplicationControllerFSInterpreterCompatibility>)[fsinterpreterClass alloc] init]; - id result; - [fscriptInterpreter setObject:self forIdentifier:@"applicationController"]; - [fscriptInterpreter setObject:fscriptInterpreter forIdentifier:@"hostInterpreter"]; - result = [fscriptInterpreter execute:fscriptSource]; - if (![result isOK]) { - NSRunAlertPanel(@"F-Script Plugin Error",[NSString stringWithFormat:@"Plugin: %@\nRange: %@\nMessage:%@", fscriptPath, NSStringFromRange([result errorRange]), [result errorMessage]],@"Dismiss",nil,nil); - [fscriptInterpreter release]; - } else { - [_plugins addObject:[fscriptInterpreter autorelease]]; - } - } - } - } } - (NSArray *)plugins {