mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-04-23 06:20:47 +00:00
Add errors, warnings, and notices options
This commit is contained in:
parent
83d2840dc5
commit
4e33d19cdf
3 changed files with 72 additions and 0 deletions
|
@ -119,4 +119,15 @@
|
|||
* The current Gorm version.
|
||||
*/
|
||||
+ (int) currentVersion;
|
||||
|
||||
/**
|
||||
* Current profile for the current model file.
|
||||
*/
|
||||
- (NSDictionary *) currentProfile;
|
||||
|
||||
/**
|
||||
* Version information for the model file.
|
||||
*/
|
||||
- (NSDictionary *) versionProfiles;
|
||||
|
||||
@end
|
||||
|
|
|
@ -226,6 +226,22 @@ NSString *formatVersion(NSInteger version)
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* Current profile for the current model file.
|
||||
*/
|
||||
- (NSDictionary *) currentProfile;
|
||||
{
|
||||
return currentProfile;
|
||||
}
|
||||
|
||||
/**
|
||||
* Version information for the model file.
|
||||
*/
|
||||
- (NSDictionary *) versionProfiles;
|
||||
{
|
||||
return versionProfiles;
|
||||
}
|
||||
|
||||
- (BOOL) loadFromFile: (NSString *)path
|
||||
{
|
||||
return [self loadFromData: [NSData dataWithContentsOfFile: path]];
|
||||
|
|
|
@ -141,6 +141,24 @@
|
|||
parse_val = NO;
|
||||
}
|
||||
|
||||
if ([obj isEqualToString: @"--errors"])
|
||||
{
|
||||
[pair setArgument: obj];
|
||||
parse_val = NO;
|
||||
}
|
||||
|
||||
if ([obj isEqualToString: @"--warnings"])
|
||||
{
|
||||
[pair setArgument: obj];
|
||||
parse_val = NO;
|
||||
}
|
||||
|
||||
if ([obj isEqualToString: @"--notices"])
|
||||
{
|
||||
[pair setArgument: obj];
|
||||
parse_val = NO;
|
||||
}
|
||||
|
||||
// If there is no parameter for the argument, set it anyway...
|
||||
if (parse_val == NO)
|
||||
{
|
||||
|
@ -271,6 +289,33 @@
|
|||
NSLog(@"objects = %@", objects);
|
||||
}
|
||||
|
||||
opt = [args objectForKey: @"--errors"];
|
||||
if (opt != nil)
|
||||
{
|
||||
GormFilePrefsManager *mgr = [doc filePrefsManager];
|
||||
NSDictionary *p = [NSDictionary dictionaryWithDictionary: [mgr currentProfile]];
|
||||
|
||||
NSLog(@"errors = %@", p);
|
||||
}
|
||||
|
||||
opt = [args objectForKey: @"--warnings"];
|
||||
if (opt != nil)
|
||||
{
|
||||
GormFilePrefsManager *mgr = [doc filePrefsManager];
|
||||
NSDictionary *p = [NSDictionary dictionaryWithDictionary: [mgr currentProfile]];
|
||||
|
||||
NSLog(@"warnings = %@", p);
|
||||
}
|
||||
|
||||
opt = [args objectForKey: @"--notices"];
|
||||
if (opt != nil)
|
||||
{
|
||||
GormFilePrefsManager *mgr = [doc filePrefsManager];
|
||||
NSDictionary *p = [NSDictionary dictionaryWithDictionary: [mgr currentProfile]];
|
||||
|
||||
NSLog(@"notices = %@", p);
|
||||
}
|
||||
|
||||
// These options sound always be processed last...
|
||||
opt = [args objectForKey: @"--write"];
|
||||
if (opt != nil)
|
||||
|
|
Loading…
Reference in a new issue