mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-04-22 22:20:44 +00:00
Only get custom classes for --classes parameter add customClassInformation method to class manager
This commit is contained in:
parent
b35ce5e205
commit
b0e2483aae
3 changed files with 17 additions and 1 deletions
|
@ -121,6 +121,7 @@
|
|||
- (NSString *) classNameForObject: (id)object;
|
||||
- (NSString *) findClassByName: (NSString *)name;
|
||||
- (NSDictionary *) classInformation;
|
||||
- (NSDictionary *) customClassInformation;
|
||||
|
||||
/* Parsing and creating classes */
|
||||
- (BOOL) makeSourceAndHeaderFilesForClass: (NSString *)className
|
||||
|
|
|
@ -2265,6 +2265,21 @@
|
|||
return classInformation;
|
||||
}
|
||||
|
||||
- (NSDictionary *) customClassInformation
|
||||
{
|
||||
NSEnumerator *en = [customClasses objectEnumerator];
|
||||
NSMutableDictionary *result = [NSMutableDictionary dictionary];
|
||||
NSString *name = nil;
|
||||
|
||||
while ((name = [en nextObject]) != nil)
|
||||
{
|
||||
NSDictionary *o = [classInformation objectForKey: name];
|
||||
[result setObject: o forKey: name];
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
- (NSString *) description
|
||||
{
|
||||
return [NSString stringWithFormat: @"<%s: %lx> = %@",
|
||||
|
|
|
@ -254,7 +254,7 @@
|
|||
opt = [args objectForKey: @"--classes"];
|
||||
if (opt != nil)
|
||||
{
|
||||
NSDictionary *classes = [[doc classManager] classInformation];
|
||||
NSDictionary *classes = [[doc classManager] customClassInformation];
|
||||
NSLog(@"classes = %@", classes);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue