mirror of
https://github.com/gnustep/apps-projectcenter.git
synced 2025-02-21 10:51:05 +00:00
Updates in Project Builder make errors parsing
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@24338 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
8e2277ff6a
commit
4bc380355d
1 changed files with 37 additions and 17 deletions
|
@ -87,7 +87,7 @@
|
||||||
[errorOutputTable setAllowsColumnResizing:NO];
|
[errorOutputTable setAllowsColumnResizing:NO];
|
||||||
[errorOutputTable setAllowsEmptySelection:YES];
|
[errorOutputTable setAllowsEmptySelection:YES];
|
||||||
[errorOutputTable setAllowsColumnSelection:NO];
|
[errorOutputTable setAllowsColumnSelection:NO];
|
||||||
[errorOutputTable setRowHeight:18.0];
|
[errorOutputTable setRowHeight:19.0];
|
||||||
[errorOutputTable setCornerView:nil];
|
[errorOutputTable setCornerView:nil];
|
||||||
[errorOutputTable setHeaderView:nil];
|
[errorOutputTable setHeaderView:nil];
|
||||||
[errorOutputTable addTableColumn:errorImageColumn];
|
[errorOutputTable addTableColumn:errorImageColumn];
|
||||||
|
@ -97,6 +97,7 @@
|
||||||
green:0.76
|
green:0.76
|
||||||
blue:0.60
|
blue:0.60
|
||||||
alpha:1.0]];
|
alpha:1.0]];
|
||||||
|
[errorOutputTable setDrawsGrid:NO];
|
||||||
|
|
||||||
errorScroll = [[NSScrollView alloc] initWithFrame:NSMakeRect(0,0,464,120)];
|
errorScroll = [[NSScrollView alloc] initWithFrame:NSMakeRect(0,0,464,120)];
|
||||||
[errorScroll setHasHorizontalScroller:NO];
|
[errorScroll setHasHorizontalScroller:NO];
|
||||||
|
@ -844,6 +845,14 @@
|
||||||
NSString *lastFile = @"";
|
NSString *lastFile = @"";
|
||||||
NSString *lastIncludedFile = @"";
|
NSString *lastIncludedFile = @"";
|
||||||
|
|
||||||
|
lastEL = currentEL;
|
||||||
|
|
||||||
|
if (lastEL == ELFile) NSLog(@"+++ELFile");
|
||||||
|
if (lastEL == ELFunction) NSLog(@"+++ELFunction");
|
||||||
|
if (lastEL == ELIncluded) NSLog(@"+++ELIncluded");
|
||||||
|
if (lastEL == ELError) NSLog(@"+++ELError");
|
||||||
|
if (lastEL == ELNone) NSLog(@"+++ELNone");
|
||||||
|
|
||||||
if ([errorArray count] > 0)
|
if ([errorArray count] > 0)
|
||||||
{
|
{
|
||||||
lastFile = [[errorArray lastObject] objectForKey:@"File"];
|
lastFile = [[errorArray lastObject] objectForKey:@"File"];
|
||||||
|
@ -855,24 +864,25 @@
|
||||||
if ([string rangeOfString:@"In file included from "].location != NSNotFound)
|
if ([string rangeOfString:@"In file included from "].location != NSNotFound)
|
||||||
{
|
{
|
||||||
NSLog(@"In file included from ");
|
NSLog(@"In file included from ");
|
||||||
|
currentEL = ELIncluded;
|
||||||
file = [self lineTail:[components objectAtIndex:0]
|
file = [self lineTail:[components objectAtIndex:0]
|
||||||
afterString:@"In file included from "];
|
afterString:@"In file included from "];
|
||||||
|
if ([file isEqualToString:lastFile])
|
||||||
|
{
|
||||||
|
return nil;
|
||||||
|
}
|
||||||
position = [NSString stringWithFormat:@"{x=0; y=%f}",
|
position = [NSString stringWithFormat:@"{x=0; y=%f}",
|
||||||
[components objectAtIndex:1]];
|
[components objectAtIndex:1]];
|
||||||
message = file;
|
message = [components objectAtIndex:0];
|
||||||
lastEL = currentEL;
|
|
||||||
currentEL = ELIncluded;
|
|
||||||
}
|
}
|
||||||
else if ([string rangeOfString:@"In function '"].location != NSNotFound)
|
else if ([string rangeOfString:@"In function '"].location != NSNotFound)
|
||||||
{
|
{
|
||||||
file = [components objectAtIndex:0];
|
file = [components objectAtIndex:0];
|
||||||
message = [self lineTail:string afterString:@"In function "];
|
message = [self lineTail:string afterString:@"In function "];
|
||||||
lastEL = currentEL;
|
|
||||||
currentEL = ELFunction;
|
currentEL = ELFunction;
|
||||||
}
|
}
|
||||||
else if ([string rangeOfString:@" At top level:"].location != NSNotFound)
|
else if ([string rangeOfString:@" At top level:"].location != NSNotFound)
|
||||||
{
|
{
|
||||||
lastEL = currentEL;
|
|
||||||
currentEL = ELFile;
|
currentEL = ELFile;
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
|
@ -888,6 +898,11 @@
|
||||||
NSLog(@"Inlcuded File: %@", file);
|
NSLog(@"Inlcuded File: %@", file);
|
||||||
includedFile = file;
|
includedFile = file;
|
||||||
file = lastFile;
|
file = lastFile;
|
||||||
|
currentEL = ELIncludedError;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
currentEL = ELError;
|
||||||
}
|
}
|
||||||
|
|
||||||
// type
|
// type
|
||||||
|
@ -913,8 +928,6 @@
|
||||||
// message
|
// message
|
||||||
substr = [NSString stringWithFormat:@"%@:", type];
|
substr = [NSString stringWithFormat:@"%@:", type];
|
||||||
message = [self lineTail:string afterString:substr];
|
message = [self lineTail:string afterString:substr];
|
||||||
lastEL = currentEL;
|
|
||||||
currentEL = ELError;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -933,14 +946,15 @@
|
||||||
indentString = [NSString stringWithString:lastIndentString];
|
indentString = [NSString stringWithString:lastIndentString];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (currentEL == ELFunction)
|
else if (currentEL == ELIncluded)
|
||||||
{
|
|
||||||
indentString = @"\t";
|
|
||||||
}
|
|
||||||
else if (lastEL == ELNone || currentEL == ELFile)
|
|
||||||
{
|
{
|
||||||
indentString = @"";
|
indentString = @"";
|
||||||
}
|
}
|
||||||
|
else if (currentEL == ELIncludedError)
|
||||||
|
{
|
||||||
|
indentString = @"\t\t";
|
||||||
|
}
|
||||||
|
|
||||||
message = [NSString stringWithFormat:@"%@%@", indentString, message];
|
message = [NSString stringWithFormat:@"%@%@", indentString, message];
|
||||||
lastIndentString = [indentString copy];
|
lastIndentString = [indentString copy];
|
||||||
|
|
||||||
|
@ -953,8 +967,8 @@
|
||||||
|
|
||||||
NSLog(@"lastEL == ELIncluded");
|
NSLog(@"lastEL == ELIncluded");
|
||||||
|
|
||||||
// includedMessage = [NSString stringWithFormat:@"%@(%@)",
|
/* includedMessage = [NSString stringWithFormat:@"\t%@(%@)",
|
||||||
// [includedFile copy], [file copy]];
|
includedFile, file];*/
|
||||||
|
|
||||||
NSLog(@"Included: %@ != %@", includedFile, lastIncludedFile);
|
NSLog(@"Included: %@ != %@", includedFile, lastIncludedFile);
|
||||||
errorItem = [NSMutableDictionary dictionaryWithCapacity:1];
|
errorItem = [NSMutableDictionary dictionaryWithCapacity:1];
|
||||||
|
@ -967,8 +981,11 @@
|
||||||
|
|
||||||
[items addObject:errorItem];
|
[items addObject:errorItem];
|
||||||
}
|
}
|
||||||
else if ((lastEL == ELNone || ![file isEqualToString:lastFile])
|
else if ((lastEL == ELNone
|
||||||
&& currentEL != ELIncluded)
|
|| ![file isEqualToString:lastFile]
|
||||||
|
|| lastEL == ELIncludedError)
|
||||||
|
&& currentEL != ELIncluded
|
||||||
|
&& currentEL != ELIncludedError)
|
||||||
{
|
{
|
||||||
NSLog(@"lastEL == ELNone (%@)", includedFile);
|
NSLog(@"lastEL == ELNone (%@)", includedFile);
|
||||||
NSLog(@"File: %@ != %@", file, lastFile);
|
NSLog(@"File: %@ != %@", file, lastFile);
|
||||||
|
@ -1016,6 +1033,9 @@
|
||||||
|
|
||||||
if (errorArray != nil && aTableView == errorOutputTable)
|
if (errorArray != nil && aTableView == errorOutputTable)
|
||||||
{
|
{
|
||||||
|
id dataCell = [aTableColumn dataCellForRow:rowIndex];
|
||||||
|
|
||||||
|
[dataCell setBackgroundColor:[NSColor whiteColor]];
|
||||||
errorItem = [errorArray objectAtIndex:rowIndex];
|
errorItem = [errorArray objectAtIndex:rowIndex];
|
||||||
|
|
||||||
return [errorItem objectForKey:[aTableColumn identifier]];
|
return [errorItem objectForKey:[aTableColumn identifier]];
|
||||||
|
|
Loading…
Reference in a new issue