Author: rmottola
Date: Wed Mar 23 00:30:14 2016
New Revision: 39588
URL: http://svn.gna.org/viewcvs/gnustep?rev=39588&view=rev
Log:
Merge in from pipes branch: stdio/stdout over pipes handled in a separate
delegate class
Added:
apps/projectcenter/trunk/Modules/Debuggers/ProjectCenter/PCDebuggerViewDelegateProtocol.h
- copied unchanged from r39585,
apps/projectcenter/branches/ptyview_with_pipes/Modules/Debuggers/ProjectCenter/PCDebuggerViewDelegateProtocol.h
apps/projectcenter/trunk/Modules/Debuggers/ProjectCenter/PipeDelegate.h
- copied unchanged from r39585,
apps/projectcenter/branches/ptyview_with_pipes/Modules/Debuggers/ProjectCenter/PipeView.h
apps/projectcenter/trunk/Modules/Debuggers/ProjectCenter/PipeDelegate.m
- copied, changed from r39585,
apps/projectcenter/branches/ptyview_with_pipes/Modules/Debuggers/ProjectCenter/PipeView.m
Modified:
apps/projectcenter/trunk/ (props changed)
apps/projectcenter/trunk/ChangeLog
apps/projectcenter/trunk/Modules/Debuggers/ProjectCenter/GNUmakefile
apps/projectcenter/trunk/Modules/Debuggers/ProjectCenter/PCDebugger.m
apps/projectcenter/trunk/Modules/Debuggers/ProjectCenter/PCDebuggerView.h
apps/projectcenter/trunk/Modules/Debuggers/ProjectCenter/PCDebuggerView.m
apps/projectcenter/trunk/Modules/GNUmakefile
Propchange: apps/projectcenter/trunk/
------------------------------------------------------------------------------
svn:mergeinfo = /apps/projectcenter/branches/ptyview_with_pipes:39550-39585
Modified: apps/projectcenter/trunk/ChangeLog
URL:
http://svn.gna.org/viewcvs/gnustep/apps/projectcenter/trunk/ChangeLog?rev=39588&r1=39587&r2=39588&view=diff
==============================================================================
--- apps/projectcenter/trunk/ChangeLog (original)
+++ apps/projectcenter/trunk/ChangeLog Wed Mar 23 00:30:14 2016
@@ -1,3 +1,13 @@
+2016-03-23 Riccardo Mottola <[email protected]>
+
+ * Modules/Debuggers/ProjectCenter/PCDebugger.m
+ * Modules/Debuggers/ProjectCenter/PCDebuggerView.h
+ * Modules/Debuggers/ProjectCenter/PCDebuggerView.m
+ * Modules/Debuggers/ProjectCenter/PipeDelegate.h
+ * Modules/Debuggers/ProjectCenter/PipeDelegate.m
+ * Modules/Debuggers/ProjectCenter/PCDebuggerViewDelegateProtocol.h
+ Merge in from pipes branch: stdio/stdout over pipes handled in a
separate delegate class.
+
2016-03-23 Riccardo Mottola <[email protected]>
* Framework/PCBundleManager.m
Modified: apps/projectcenter/trunk/Modules/Debuggers/ProjectCenter/GNUmakefile
URL:
http://svn.gna.org/viewcvs/gnustep/apps/projectcenter/trunk/Modules/Debuggers/ProjectCenter/GNUmakefile?rev=39588&r1=39587&r2=39588&view=diff
==============================================================================
--- apps/projectcenter/trunk/Modules/Debuggers/ProjectCenter/GNUmakefile
(original)
+++ apps/projectcenter/trunk/Modules/Debuggers/ProjectCenter/GNUmakefile
Wed Mar 23 00:30:14 2016
@@ -38,7 +38,9 @@
ProjectCenter_HEADERS= \
PCDebugger.h \
PCDebugggerView.h \
- PTYView.h
+ PCDebuggerViewDelegateProtocol.h \
+ PTYView.h \
+ PipeDelegate.h
#
# Class files
@@ -46,10 +48,11 @@
ProjectCenter_OBJC_FILES= \
PCDebugger.m \
PCDebuggerView.m \
- PTYView.m
+ PTYView.m \
+ PipeDelegate.m
-ADDITIONAL_NATIVE_LIBS += util
+#ADDITIONAL_NATIVE_LIBS += util
include ../../GNUmakefile.bundles
include $(GNUSTEP_MAKEFILES)/bundle.make
Modified: apps/projectcenter/trunk/Modules/Debuggers/ProjectCenter/PCDebugger.m
URL:
http://svn.gna.org/viewcvs/gnustep/apps/projectcenter/trunk/Modules/Debuggers/ProjectCenter/PCDebugger.m?rev=39588&r1=39587&r2=39588&view=diff
==============================================================================
--- apps/projectcenter/trunk/Modules/Debuggers/ProjectCenter/PCDebugger.m
(original)
+++ apps/projectcenter/trunk/Modules/Debuggers/ProjectCenter/PCDebugger.m
Wed Mar 23 00:30:14 2016
@@ -1,9 +1,10 @@
/*
** PCDebugger
**
-** Copyright (c) 2008-2015
+** Copyright (c) 2008-2016
**
-** Author: Gregory Casamento <[email protected]>
+** Author: Gregory Casamento <[email protected]>
+** Riccardo Mottola <[email protected]>>
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
@@ -25,6 +26,8 @@
#import "PCDebuggerView.h"
#import "Modules/Preferences/EditorFSC/PCEditorFSCPrefs.h"
+#import "PCDebuggerViewDelegateProtocol.h"
+#import "PipeDelegate.h"
#ifndef NOTIFICATION_CENTER
#define NOTIFICATION_CENTER [NSNotificationCenter defaultCenter]
@@ -122,6 +125,7 @@
{
if((self = [super init]) != nil)
{
+ id <PCDebuggerViewDelegateProtocol> viewDelegate;
// initialization here...
if([NSBundle loadNibNamed: @"PCDebugger" owner: self] == NO)
{
@@ -129,6 +133,10 @@
}
[(PCDebuggerView *)debuggerView setDebugger:self];
+ viewDelegate = [[PipeDelegate alloc] init];
+ [debuggerView setDelegate:viewDelegate];
+ [viewDelegate setTextView:debuggerView];
+ [viewDelegate release];
}
return self;
}
@@ -152,7 +160,7 @@
{
[debuggerView runProgram: debuggerPath
inCurrentDirectory: [path stringByDeletingLastPathComponent]
- withArguments: [[NSArray alloc] initWithObjects: @"-f", path,
nil]
+ withArguments: [[NSArray alloc] initWithObjects: @"-f", path,
nil]
logStandardError: YES];
}
Modified:
apps/projectcenter/trunk/Modules/Debuggers/ProjectCenter/PCDebuggerView.h
URL:
http://svn.gna.org/viewcvs/gnustep/apps/projectcenter/trunk/Modules/Debuggers/ProjectCenter/PCDebuggerView.h?rev=39588&r1=39587&r2=39588&view=diff
==============================================================================
--- apps/projectcenter/trunk/Modules/Debuggers/ProjectCenter/PCDebuggerView.h
(original)
+++ apps/projectcenter/trunk/Modules/Debuggers/ProjectCenter/PCDebuggerView.h
Wed Mar 23 00:30:14 2016
@@ -1,9 +1,10 @@
/*
** PCDebuggerView
**
-** Copyright (c) 2008
+** Copyright (c) 2008-2016
**
-** Author: Gregory Casamento <[email protected]>
+** Author: Gregory Casamento <[email protected]>
+** Riccardo Mottola <[email protected]>
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
@@ -20,20 +21,32 @@
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#import "PTYView.h"
+#import <Foundation/NSString.h>
+#import <AppKit/NSTextView.h>
+
+#import "PCDebuggerViewDelegateProtocol.h"
@class PCDebugger;
-@class NSString;
-@interface PCDebuggerView : PTYView
+@interface PCDebuggerView : NSTextView
{
PCDebugger *debugger;
+ id <PCDebuggerViewDelegateProtocol> viewDelegate;
NSString *currentFile;
int subProcessId;
}
- (void) setDebugger:(PCDebugger *)theDebugger;
+- (void) setDelegate:(id <PCDebuggerViewDelegateProtocol>) vd;
- (void) setCurrentFile: (NSString *)fileName;
- (NSString *) currentFile;
- (int) subProcessId;
+
+- (void) runProgram: (NSString *)path
+ inCurrentDirectory: (NSString *)directory
+ withArguments: (NSArray *)array
+ logStandardError: (BOOL)logError;
+
+- (void) putString: (NSString *)string;
+
@end
Modified:
apps/projectcenter/trunk/Modules/Debuggers/ProjectCenter/PCDebuggerView.m
URL:
http://svn.gna.org/viewcvs/gnustep/apps/projectcenter/trunk/Modules/Debuggers/ProjectCenter/PCDebuggerView.m?rev=39588&r1=39587&r2=39588&view=diff
==============================================================================
--- apps/projectcenter/trunk/Modules/Debuggers/ProjectCenter/PCDebuggerView.m
(original)
+++ apps/projectcenter/trunk/Modules/Debuggers/ProjectCenter/PCDebuggerView.m
Wed Mar 23 00:30:14 2016
@@ -1,9 +1,10 @@
/*
** PCDebuggerView
**
-** Copyright (c) 2008
-**
-** Author: Gregory Casamento <[email protected]>
+** Copyright (c) 2008-2016
+**
+** Author: Gregory Casamento <[email protected]>
+** Riccardo Mottola <[email protected]>
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
@@ -39,6 +40,17 @@
{
debugger = theDebugger;
}
+
+- (void) setDelegate:(id <PCDebuggerViewDelegateProtocol>) vd
+{
+ if (viewDelegate != vd)
+ {
+ [viewDelegate release];
+ viewDelegate = vd;
+ [viewDelegate retain];
+ }
+}
+
/**
* Log string to the view.
@@ -144,7 +156,7 @@
// if the line is not filtered, print it...
if(printLine)
{
- [super logString: str newLine: newLine];
+ [viewDelegate logString: str newLine: newLine withColor:[viewDelegate
debuggerColor]];
}
}
@@ -157,38 +169,6 @@
{
return currentFile;
}
-
-/**
- * lookup the process id.
- */
-/*
-- (int) subProcessId
-{
- int task_pid = [task processIdentifier];
- int child_pid = 0;
- NSArray *entries = [[NSFileManager defaultManager] directoryContentsAtPath:
@"/proc"];
- NSEnumerator *en = [entries objectEnumerator];
- NSString *entry = nil;
-
- // FIXME: I'm looking for a generic way to do this, what we have here is
very /proc specific.
- // which I don't like since it ties this functionality to systems which have
/proc.
- while((entry = [en nextObject]) != nil)
- {
- int pid = [entry intValue];
- if (pid != 0)
- {
- int ppid = getppid(pid);
- if (ppid == task_pid)
- {
- child_pid = pid;
- break;
- }
- }
- }
-
- return child_pid;
-}
-*/
- (int) subProcessId
{
@@ -204,15 +184,41 @@
kill(pid,SIGINT);
#endif
}
+ [super putString:@"-exec-interrupt"];
}
- (void) terminate
{
- [super terminate];
+ [viewDelegate terminate];
}
- (void) mouseDown: (NSEvent *)event
{
// do nothing...
}
+
+/**
+ * Start the program.
+ */
+- (void) runProgram: (NSString *)path
+ inCurrentDirectory: (NSString *)directory
+ withArguments: (NSArray *)array
+ logStandardError: (BOOL)logError
+{
+ [viewDelegate runProgram: path
+ inCurrentDirectory: directory
+ withArguments: array
+ logStandardError: logError];
+}
+
+- (void) putString: (NSString *)string
+{
+ [viewDelegate putString:string];
+}
+
+- (void) keyDown: (NSEvent*)theEvent
+{
+ [viewDelegate keyDown:theEvent];
+}
+
@end
Copied: apps/projectcenter/trunk/Modules/Debuggers/ProjectCenter/PipeDelegate.m
(from r39585,
apps/projectcenter/branches/ptyview_with_pipes/Modules/Debuggers/ProjectCenter/PipeView.m)
URL:
http://svn.gna.org/viewcvs/gnustep/apps/projectcenter/trunk/Modules/Debuggers/ProjectCenter/PipeDelegate.m?p2=apps/projectcenter/trunk/Modules/Debuggers/ProjectCenter/PipeDelegate.m&p1=apps/projectcenter/branches/ptyview_with_pipes/Modules/Debuggers/ProjectCenter/PipeView.m&r1=39585&r2=39588&rev=39588&view=diff
==============================================================================
---
apps/projectcenter/branches/ptyview_with_pipes/Modules/Debuggers/ProjectCenter/PipeView.m
(original)
+++ apps/projectcenter/trunk/Modules/Debuggers/ProjectCenter/PipeDelegate.m
Wed Mar 23 00:30:14 2016
@@ -35,7 +35,7 @@
#include <stdlib.h>
#include <string.h>
-#import "PipeView.h"
+#import "PipeDelegate.h"
#ifndef NOTIFICATION_CENTER
#define NOTIFICATION_CENTER [NSNotificationCenter defaultCenter]
Modified: apps/projectcenter/trunk/Modules/GNUmakefile
URL:
http://svn.gna.org/viewcvs/gnustep/apps/projectcenter/trunk/Modules/GNUmakefile?rev=39588&r1=39587&r2=39588&view=diff
==============================================================================
--- apps/projectcenter/trunk/Modules/GNUmakefile (original)
+++ apps/projectcenter/trunk/Modules/GNUmakefile Wed Mar 23 00:30:14 2016
@@ -41,11 +41,7 @@
Preferences/Misc \
Preferences/EditorFSC
-# Do not compile the Debuggers/ProjectCenter module on MinGW since I'm
-# told at the moment it doesn't even compile there.
-ifneq ($(GNUSTEP_TARGET_OS), mingw32)
- SUBPROJECTS += Debuggers/ProjectCenter
-endif
+SUBPROJECTS += Debuggers/ProjectCenter
include $(GNUSTEP_MAKEFILES)/aggregate.make
_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs