From e568aa4b2e2d9863f141b1384848466aa515d2de Mon Sep 17 00:00:00 2001 From: Robert Slover Date: Mon, 28 Aug 2000 19:04:15 +0000 Subject: [PATCH] The class and header files are now being displayed git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@7275 72102866-910b-0410-8b05-ffd578937521 --- PCLib/PCBrowserController.m | 23 ++++++++++++++++++++--- PCLib/PCFileManager.h | 3 +++ 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/PCLib/PCBrowserController.m b/PCLib/PCBrowserController.m index 6bbc578..dfc85c2 100644 --- a/PCLib/PCBrowserController.m +++ b/PCLib/PCBrowserController.m @@ -41,15 +41,32 @@ NSTextView *pTextView; if ([[sender selectedCell] isLeaf]) { + NSString *ltitle = [[sender selectedCell] stringValue]; NSString *ctitle = [[sender selectedCellInColumn:0] stringValue]; - NSString *text = [NSString stringWithFormat:@"Display File %@",[[sender selectedCell] stringValue] -]; + NSString *ctitlef = [[project projectPath] stringByAppendingPathComponent:ltitle]; + pTextView = [project textView]; + NSLog(@"****** %@",ctitlef); + if ([ctitle isEqualToString:@"Classes"]) { - [pTextView setString:text]; + NSString *f = [NSString stringWithContentsOfFile:ctitlef]; + + [pTextView setString:f]; + } + else if ([ctitle isEqualToString:@"Headers"]) { + NSString *f = [NSString stringWithContentsOfFile:ctitlef]; + + [pTextView setString:f]; + } + else if ([ctitle isEqualToString:@"Other Sources"]) { + NSString *f = [NSString stringWithContentsOfFile:ctitlef]; + + [pTextView setString:f]; } + // This should not be needed! + [pTextView display]; } } diff --git a/PCLib/PCFileManager.h b/PCLib/PCFileManager.h index 08f61b0..feb164c 100644 --- a/PCLib/PCFileManager.h +++ b/PCLib/PCFileManager.h @@ -88,3 +88,6 @@ - (void)fileManager:(id)sender didAddFile:(NSString *)file forKey:(NSString *)key; @end + + +