Changes for gorm file and debugger class.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27382 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2008-12-22 00:09:23 +00:00
parent 32be29331b
commit c35bd787df
8 changed files with 59 additions and 13 deletions

View file

@ -3,10 +3,13 @@
#include <AppKit/AppKit.h>
#include <Foundation/Foundation.h>
@interface PCDebugger : NSObject
#include <Protocols/CodeDebugger.h>
@interface PCDebugger : NSObject <CodeDebugger>
{
id consoleView;
id consoleWindow;
id debuggerView;
id debuggerWindow;
NSString *path;
NSTask *debuggerTask;
id standardInput;
id standardOutput;

View file

@ -4,26 +4,70 @@
#include "PCDebugger.h"
@implementation PCDebugger
- (id) init
- (id) initWithPath: (NSString *)filePath
{
if((self == [super init]) != nil)
if((self = [super init]) != nil)
{
// initialization here...
if([NSBundle loadNibNamed: @"PCDebugger" owner: self] == NO)
{
return nil;
}
}
return self;
}
+(id) debugExecutableAtPath: (NSString *)filePath
{
return [[self alloc] initWithPath: filePath];
}
- (void) show
{
[debuggerWindow makeKeyAndOrderFront: self];
[self startDebugger];
}
- (void) startDebugger
{
debuggerTask = [NSTask launchedTaskWithLaunchPath: @"/usr/bin/gdb"
arguments: @""];
arguments: NULL];
standardInput = [debuggerTask standardInput];
standardOutput = [debuggerTask standardOutput];
}
- (void) awakeFromNib
{
[consoleView setFont: [NSFont userFixedPitchFontOfSize: 0]];
[self startDebugger];
[debuggerView setFont: [NSFont userFixedPitchFontOfSize: 0]];
}
- (NSWindow *)debuggerWindow
{
return debuggerWindow;
}
- (void)setDebuggerWindow: (NSWindow *)window
{
ASSIGN(debuggerWindow,window);
}
- (NSView *)debuggerView
{
return debuggerView;
}
- (void)setDebuggerView: (id)view
{
ASSIGN(debuggerView,view);
}
- (NSString *)path
{
return path;
}
- (void)setPath:(NSString *)p
{
ASSIGN(path,p);
}
@end

View file

@ -4,5 +4,4 @@
#include "PCDebuggerView.h"
@implementation PCDebuggerView
@end

View file

@ -4,7 +4,8 @@
Actions = (
);
Outlets = (
consoleView
debuggerView,
debuggerWindow
);
Super = NSObject;
};

View file

@ -25,8 +25,6 @@
#import "PCEditor.h"
#import "PCEditorView.h"
//#import "CommandQueryPanel.h"
//#import "LineQueryPanel.h"
@implementation PCEditor (UInterface)

View file

@ -32,7 +32,8 @@ SUBPROJECTS = \
Projects/ResourceSet \
Projects/Tool \
Editors/ProjectCenter \
Parsers/ProjectCenter
Parsers/ProjectCenter \
Debuggers/ProjectCenter
include $(GNUSTEP_MAKEFILES)/aggregate.make