Output objects using gormtool, add method to get toplevelObjects from the GormDocument objects minor formatting change for GormClassManager

This commit is contained in:
Gregory John Casamento 2023-07-08 14:14:46 -04:00
parent 37817886b7
commit 83d2840dc5
4 changed files with 22 additions and 0 deletions

View file

@ -139,6 +139,7 @@
- (BOOL) loadCustomClassesWithDict: (NSDictionary *)dict;
- (BOOL) loadNibFormatCustomClassesWithData: (NSData *)data;
- (BOOL) loadNibFormatCustomClassesWithDict: (NSDictionary *)dict;
@end
#endif

View file

@ -2293,4 +2293,5 @@
{
return [_classInformation description];
}
@end

View file

@ -522,6 +522,12 @@
* Add aConnector to the set of connectors in this document.
*/
- (void) addConnector: (id<IBConnectors>)aConnector;
/**
* Returns a set containing the top level objects for this document.
*/
- (NSMutableSet *) topLevelObjects;
@end
@interface GormDocument (MenuValidation)
@ -544,6 +550,7 @@
* Returns YES if the document is editing classes.
*/
- (BOOL) isEditingClasses;
@end
#endif

View file

@ -135,6 +135,12 @@
parse_val = NO;
}
if ([obj isEqualToString: @"--objects"])
{
[pair setArgument: obj];
parse_val = NO;
}
// If there is no parameter for the argument, set it anyway...
if (parse_val == NO)
{
@ -258,6 +264,13 @@
NSLog(@"classes = %@", classes);
}
opt = [args objectForKey: @"--objects"];
if (opt != nil)
{
NSSet *objects = [doc topLevelObjects];
NSLog(@"objects = %@", objects);
}
// These options sound always be processed last...
opt = [args objectForKey: @"--write"];
if (opt != nil)