mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-04-22 22:20:44 +00:00
Update to handle writing class out to file
This commit is contained in:
parent
abb6dc553c
commit
b5175a24e3
2 changed files with 25 additions and 1 deletions
|
@ -141,6 +141,11 @@
|
|||
[pair setArgument: obj];
|
||||
parse_val = YES;
|
||||
}
|
||||
else if ([obj isEqualToString: @"--export-class"])
|
||||
{
|
||||
[pair setArgument: obj];
|
||||
parse_val = YES;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -212,6 +217,25 @@
|
|||
NSLog(@"Error = %@", error);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
opt = [args objectForKey: @"--export-class"];
|
||||
if (opt != nil)
|
||||
{
|
||||
NSString *className = [opt value];
|
||||
BOOL saved = NO;
|
||||
GormClassManager *cm = [doc classManager];
|
||||
|
||||
saved = [cm makeSourceAndHeaderFilesForClass: className
|
||||
withName: [className stringByAppendingPathExtension: @"m"]
|
||||
and: [className stringByAppendingPathExtension: @"h"]];
|
||||
|
||||
if (saved == NO)
|
||||
{
|
||||
NSLog(@"Class named %@ not saved", className);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ include $(GNUSTEP_MAKEFILES)/common.make
|
|||
PACKAGE_NAME = gormtool
|
||||
TOOL_NAME = gormtool
|
||||
|
||||
gormtool_HEADER_FILES = AppDelegate.h
|
||||
gormtool_HEADER_FILES = AppDelegate.h \
|
||||
GormToolPrivate.h \
|
||||
|
||||
gormtool_OBJC_FILES = main.m \
|
||||
|
|
Loading…
Reference in a new issue