Update to handle writing class out to file

This commit is contained in:
Gregory John Casamento 2023-07-02 23:40:59 -04:00
parent abb6dc553c
commit b5175a24e3
2 changed files with 25 additions and 1 deletions

View file

@ -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);
}
}
}
}
}

View file

@ -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 \