1E67E6FD0F3C052000E68F1B /* PreferencesPathsArrayController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1E67E6FC0F3C052000E68F1B /* PreferencesPathsArrayController.m */; };
1E6B5947116106FE001189D2 /* LoggingController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1E6B5946116106FE001189D2 /* LoggingController.m */; };
1E6B594C11610993001189D2 /* Log.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1E6B594A11610993001189D2 /* Log.xib */; };
- 1E7188680D839F6300969277 /* BSLineNumberView.m in Sources */ = {isa = PBXBuildFile; fileRef = 1E7188630D839F6300969277 /* BSLineNumberView.m */; };
- 1E7188690D839F6300969277 /* BSSourceView.m in Sources */ = {isa = PBXBuildFile; fileRef = 1E7188650D839F6300969277 /* BSSourceView.m */; };
- 1E71886A0D839F6300969277 /* BSSourceViewTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = 1E7188670D839F6300969277 /* BSSourceViewTextView.m */; };
+ 1E7188680D839F6300969277 /* BSLineNumberView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1E7188630D839F6300969277 /* BSLineNumberView.mm */; };
+ 1E7188690D839F6300969277 /* BSSourceView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1E7188650D839F6300969277 /* BSSourceView.mm */; };
1E822CDD0DA28AC30027A23F /* Breakpoint.m in Sources */ = {isa = PBXBuildFile; fileRef = 1E822CDC0DA28AC30027A23F /* Breakpoint.m */; };
1E9582620E252474001A3D89 /* Preferences.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1E9582600E252474001A3D89 /* Preferences.xib */; };
1E9582670E2524AD001A3D89 /* PreferencesController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1E9582660E2524AD001A3D89 /* PreferencesController.m */; };
1EC6965812BBC6A700A8D984 /* modp_b64.cc in Sources */ = {isa = PBXBuildFile; fileRef = 1EC6965212BBC6A700A8D984 /* modp_b64.cc */; };
1EC6965912BBC6A700A8D984 /* README.bluestatic in Resources */ = {isa = PBXBuildFile; fileRef = 1EC6965512BBC6A700A8D984 /* README.bluestatic */; };
1EC6965A12BBC6A700A8D984 /* README.chromium in Resources */ = {isa = PBXBuildFile; fileRef = 1EC6965612BBC6A700A8D984 /* README.chromium */; };
+ 1EDA9CF812DD13B300596211 /* BSLineNumberRulerView.m in Sources */ = {isa = PBXBuildFile; fileRef = 1EDA9CF712DD13B300596211 /* BSLineNumberRulerView.m */; };
1EEBFBE50D34C793008F835B /* Debugger.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1EEBFBE30D34C793008F835B /* Debugger.xib */; };
1EEBFC2B0D358EBD008F835B /* StepIn.png in Resources */ = {isa = PBXBuildFile; fileRef = 1EEBFC2A0D358EBD008F835B /* StepIn.png */; };
1EEBFC370D358F1B008F835B /* StepOut.png in Resources */ = {isa = PBXBuildFile; fileRef = 1EEBFC360D358F1B008F835B /* StepOut.png */; };
1E6B5946116106FE001189D2 /* LoggingController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = LoggingController.m; path = Source/LoggingController.m; sourceTree = "<group>"; };
1E6B594B11610993001189D2 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/Log.xib; sourceTree = "<group>"; };
1E7188620D839F6300969277 /* BSLineNumberView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BSLineNumberView.h; path = Source/BSLineNumberView.h; sourceTree = "<group>"; };
- 1E7188630D839F6300969277 /* BSLineNumberView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = BSLineNumberView.m; path = Source/BSLineNumberView.m; sourceTree = "<group>"; };
- 1E7188640D839F6300969277 /* BSSourceView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BSSourceView.h; path = Source/BSSourceView.h; sourceTree = "<group>"; };
- 1E7188650D839F6300969277 /* BSSourceView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = BSSourceView.m; path = Source/BSSourceView.m; sourceTree = "<group>"; };
- 1E7188660D839F6300969277 /* BSSourceViewTextView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BSSourceViewTextView.h; path = Source/BSSourceViewTextView.h; sourceTree = "<group>"; };
- 1E7188670D839F6300969277 /* BSSourceViewTextView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = BSSourceViewTextView.m; path = Source/BSSourceViewTextView.m; sourceTree = "<group>"; };
+ 1E7188630D839F6300969277 /* BSLineNumberView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = BSLineNumberView.mm; path = Source/BSLineNumberView.mm; sourceTree = "<group>"; };
+ 1E7188640D839F6300969277 /* BSSourceView.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 4; name = BSSourceView.h; path = Source/BSSourceView.h; sourceTree = "<group>"; };
+ 1E7188650D839F6300969277 /* BSSourceView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = BSSourceView.mm; path = Source/BSSourceView.mm; sourceTree = "<group>"; };
1E822CDB0DA28AC30027A23F /* Breakpoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Breakpoint.h; path = Source/Breakpoint.h; sourceTree = "<group>"; };
1E822CDC0DA28AC30027A23F /* Breakpoint.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Breakpoint.m; path = Source/Breakpoint.m; sourceTree = "<group>"; };
1E9582610E252474001A3D89 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/Preferences.xib; sourceTree = "<group>"; };
1EC6965412BBC6A700A8D984 /* modp_b64_data.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = modp_b64_data.h; sourceTree = "<group>"; };
1EC6965512BBC6A700A8D984 /* README.bluestatic */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.bluestatic; sourceTree = "<group>"; };
1EC6965612BBC6A700A8D984 /* README.chromium */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.chromium; sourceTree = "<group>"; };
+ 1EDA9CF612DD13B300596211 /* BSLineNumberRulerView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BSLineNumberRulerView.h; path = Source/BSLineNumberRulerView.h; sourceTree = "<group>"; };
+ 1EDA9CF712DD13B300596211 /* BSLineNumberRulerView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = BSLineNumberRulerView.m; path = Source/BSLineNumberRulerView.m; sourceTree = "<group>"; };
1EEBFBE40D34C793008F835B /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/Debugger.xib; sourceTree = "<group>"; };
1EEBFC2A0D358EBD008F835B /* StepIn.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = StepIn.png; path = Icons/StepIn.png; sourceTree = "<group>"; };
1EEBFC360D358F1B008F835B /* StepOut.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = StepOut.png; path = Icons/StepOut.png; sourceTree = "<group>"; };
1EEBFD080D3599E8008F835B /* BSSplitView.h */,
1EEBFD070D3599E8008F835B /* BSSplitView.m */,
1E7188620D839F6300969277 /* BSLineNumberView.h */,
- 1E7188630D839F6300969277 /* BSLineNumberView.m */,
+ 1E7188630D839F6300969277 /* BSLineNumberView.mm */,
1E7188640D839F6300969277 /* BSSourceView.h */,
- 1E7188650D839F6300969277 /* BSSourceView.m */,
- 1E7188660D839F6300969277 /* BSSourceViewTextView.h */,
- 1E7188670D839F6300969277 /* BSSourceViewTextView.m */,
+ 1E7188650D839F6300969277 /* BSSourceView.mm */,
+ 1EDA9CF612DD13B300596211 /* BSLineNumberRulerView.h */,
+ 1EDA9CF712DD13B300596211 /* BSLineNumberRulerView.m */,
);
name = "Source View";
sourceTree = "<group>";
1E02C5F60C610724006F1752 /* DebuggerController.m in Sources */,
1E35FC760C6579CA0030F527 /* NSXMLElementAdditions.m in Sources */,
1EEBFD090D3599E8008F835B /* BSSplitView.m in Sources */,
- 1E7188680D839F6300969277 /* BSLineNumberView.m in Sources */,
- 1E7188690D839F6300969277 /* BSSourceView.m in Sources */,
- 1E71886A0D839F6300969277 /* BSSourceViewTextView.m in Sources */,
+ 1E7188680D839F6300969277 /* BSLineNumberView.mm in Sources */,
+ 1E7188690D839F6300969277 /* BSSourceView.mm in Sources */,
1E822CDD0DA28AC30027A23F /* Breakpoint.m in Sources */,
1E4C7AF90DA401C7000A9DC7 /* BreakpointManager.m in Sources */,
1EFF70C30DFDC018006B9D33 /* BreakpointController.m in Sources */,
1EC6965812BBC6A700A8D984 /* modp_b64.cc in Sources */,
1EFBE63012C515C200F96D6E /* NetworkConnection.mm in Sources */,
1EFBE66B12C51E3900F96D6E /* NetworkCallbackController.mm in Sources */,
+ 1EDA9CF812DD13B300596211 /* BSLineNumberRulerView.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
#import <Cocoa/Cocoa.h>
-@class BSSourceView;
-
-@interface BSSourceViewTextView : NSTextView
+// The NSRulerView that draws line numbers on the BSSourceView.
+@interface BSLineNumberRulerView : NSRulerView
{
- BSSourceView* sourceView;
+
}
-@property(readwrite, assign) BSSourceView* sourceView;
+// Designated initializer.
+- (id)initWithScrollView:(NSScrollView*)scrollView;
@end
--- /dev/null
+/*
+ * MacGDBp
+ * Copyright (c) 2007 - 2011, Blue Static <http://www.bluestatic.org>
+ *
+ * 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 the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
+ * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with this program; if not,
+ * write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#import "BSLineNumberRulerView.h"
+
+
+@implementation BSLineNumberRulerView
+
+- (id)initWithScrollView:(NSScrollView*)scrollView
+{
+ if (self = [super initWithScrollView:scrollView orientation:NSVerticalRuler]) {
+ [self setClientView:[scrollView documentView]];
+ }
+ return self;
+}
+
+- (void)awakeFromNib
+{
+ [self setClientView:[[self scrollView] documentView]];
+}
+
+@end
*/
#import <Cocoa/Cocoa.h>
+#include <vector>
+
#import "BSLineNumberView.h"
-#import "BSSourceViewTextView.h"
@protocol BSSourceViewDelegate;
@interface BSSourceView : NSView
{
- BSLineNumberView* numberView;
- BSSourceViewTextView* textView;
- NSScrollView* scrollView;
-
+ @private
+ NSTextView* textView_;
+ NSScrollView* scrollView_;
+
+ std::vector<NSUInteger> lineIndex_;
+
+ NSSet* markers_;
+
NSString* file;
int markedLine;
-
+
id<BSSourceViewDelegate> delegate;
}
-@property(readwrite, assign) BSLineNumberView* numberView;
-@property(readwrite, assign) BSSourceViewTextView* textView;
-@property(readwrite, assign) NSScrollView* scrollView;
-@property(readwrite, nonatomic, assign) NSString* file;
-@property(readwrite, assign) int markedLine;
-@property(readwrite, assign) id delegate;
+@property (assign) NSTextView* textView;
+@property (assign) NSScrollView* scrollView;
+@property (retain) NSSet* markers;
+@property (nonatomic, assign) NSString* file;
+@property (assign) int markedLine;
+@property (assign) id delegate;
- (void)setFile:(NSString*)f;
- (void)setString:(NSString*)source asFile:(NSString*)path;
#import "BSSourceView.h"
+#include "BSLineNumberRulerView.h"
+
@interface BSSourceView (Private)
- (void)setupViews;
- (void)errorHighlightingFile:(NSNotification*)notif;
@implementation BSSourceView
-@synthesize numberView, textView, scrollView, markedLine, delegate, file;
+@synthesize textView = textView_;
+@synthesize scrollView = scrollView_;
+@synthesize markers = markers_;
+@synthesize markedLine;
+@synthesize delegate;
+@synthesize file;
/**
* Initializes the source view with the path of a file
{
[file release];
- [numberView removeFromSuperview];
- [scrollView removeFromSuperview];
- [textView removeFromSuperview];
+ [scrollView_ removeFromSuperview];
+ [textView_ removeFromSuperview];
[super dealloc];
}
if (![[NSFileManager defaultManager] fileExistsAtPath:f])
{
- [textView setString:@""];
+ [textView_ setString:@""];
return;
}
NSData* data = [[outPipe fileHandleForReading] readDataToEndOfFile];
NSAttributedString* source = [[NSAttributedString alloc] initWithHTML:data documentAttributes:NULL];
- [[textView textStorage] setAttributedString:source];
+ [[textView_ textStorage] setAttributedString:source];
[source release];
}
@catch (NSException* exception)
[source writeToFile:tmpPath atomically:NO encoding:NSUTF8StringEncoding error:&error];
if (error)
{
- [textView setString:source];
+ [textView_ setString:source];
return;
}
*/
- (void)scrollToLine:(int)line
{
- if ([[textView textStorage] length] == 0)
+ if ([[textView_ textStorage] length] == 0)
return;
// go through the document until we find the NSRange for the line we want
int rangeIndex = 0;
for (int i = 0; i < line; i++)
{
- rangeIndex = NSMaxRange([[textView string] lineRangeForRange:NSMakeRange(rangeIndex, 0)]);
+ rangeIndex = NSMaxRange([[textView_ string] lineRangeForRange:NSMakeRange(rangeIndex, 0)]);
}
// now get the true start/end markers for it
unsigned lineStart, lineEnd;
- [[textView string] getLineStart:&lineStart end:NULL contentsEnd:&lineEnd forRange:NSMakeRange(rangeIndex - 1, 0)];
- [textView scrollRangeToVisible:[[textView string] lineRangeForRange:NSMakeRange(lineStart, lineEnd - lineStart)]];
+ [[textView_ string] getLineStart:&lineStart end:NULL contentsEnd:&lineEnd forRange:NSMakeRange(rangeIndex - 1, 0)];
+ [textView_ scrollRangeToVisible:[[textView_ string] lineRangeForRange:NSMakeRange(lineStart, lineEnd - lineStart)]];
}
/**
{
int gutterWidth = 30;
- // setup the line number view
- NSRect numberFrame = [self bounds];
- numberFrame.origin = NSMakePoint(0.0, 0.0);
- numberFrame.size.width = gutterWidth;
- numberView = [[BSLineNumberView alloc] initWithFrame:numberFrame];
- [numberView setAutoresizingMask:NSViewHeightSizable];
- [numberView setSourceView:self];
- [self addSubview:numberView];
-
- // create the scroll view
+ // Create the scroll view.
NSRect scrollFrame = [self bounds];
scrollFrame.origin.x = gutterWidth;
scrollFrame.size.width = scrollFrame.size.width - gutterWidth;
- scrollView = [[NSScrollView alloc] initWithFrame:scrollFrame];
- [scrollView setHasHorizontalScroller:YES];
- [scrollView setHasVerticalScroller:YES];
- [scrollView setAutohidesScrollers:YES];
- [scrollView setBorderType:NSBezelBorder];
- [scrollView setAutoresizingMask:(NSViewWidthSizable | NSViewHeightSizable)];
- [[scrollView contentView] setAutoresizesSubviews:YES];
- [self addSubview:scrollView];
-
+ scrollView_ = [[[NSScrollView alloc] initWithFrame:scrollFrame] autorelease];
+ [scrollView_ setHasHorizontalScroller:YES];
+ [scrollView_ setHasVerticalScroller:YES];
+ [scrollView_ setAutohidesScrollers:YES];
+ [scrollView_ setBorderType:NSBezelBorder];
+ [scrollView_ setAutoresizingMask:(NSViewWidthSizable | NSViewHeightSizable)];
+ [[scrollView_ contentView] setAutoresizesSubviews:YES];
+ [self addSubview:scrollView_];
+
+ // Set up the ruler.
+ BSLineNumberRulerView* lineNumberView =
+ [[[BSLineNumberRulerView alloc] initWithScrollView:scrollView_] autorelease];
+ [scrollView_ setVerticalRulerView:lineNumberView];
+ [scrollView_ setHasHorizontalRuler:NO];
+ [scrollView_ setHasVerticalRuler:YES];
+ [scrollView_ setRulersVisible:YES];
+
// add the text view to the scroll view
NSRect textFrame;
textFrame.origin = NSMakePoint(0.0, 0.0);
- textFrame.size = [scrollView contentSize];
- textView = [[BSSourceViewTextView alloc] initWithFrame:textFrame];
- [textView setSourceView:self];
- [textView setEditable:NO];
- [textView setFont:[NSFont fontWithName:@"Monaco" size:10.0]];
- [textView setHorizontallyResizable:YES];
- [textView setVerticallyResizable:YES];
- [textView setMinSize:textFrame.size];
- [textView setMaxSize:NSMakeSize(FLT_MAX, FLT_MAX)];
- [[textView textContainer] setContainerSize:NSMakeSize(FLT_MAX, FLT_MAX)];
- [[textView textContainer] setWidthTracksTextView:NO];
- [[textView textContainer] setHeightTracksTextView:NO];
- [textView setAutoresizingMask:NSViewNotSizable];
- [scrollView setDocumentView:textView];
+ textFrame.size = [scrollView_ contentSize];
+ textView_ = [[[NSTextView alloc] initWithFrame:textFrame] autorelease];
+ [textView_ setEditable:NO];
+ [textView_ setFont:[NSFont fontWithName:@"Monaco" size:10.0]];
+ [textView_ setHorizontallyResizable:YES];
+ [textView_ setVerticallyResizable:YES];
+ [textView_ setMinSize:textFrame.size];
+ [textView_ setMaxSize:NSMakeSize(FLT_MAX, FLT_MAX)];
+ [[textView_ textContainer] setContainerSize:NSMakeSize(FLT_MAX, FLT_MAX)];
+ [[textView_ textContainer] setWidthTracksTextView:NO];
+ [[textView_ textContainer] setHeightTracksTextView:NO];
+ [textView_ setAutoresizingMask:NSViewNotSizable];
+ [scrollView_ setDocumentView:textView_];
NSArray* types = [NSArray arrayWithObject:NSFilenamesPboardType];
[self registerForDraggedTypes:types];
NSLog(@"Error reading file at %@: %@", filePath, error);
return;
}
- [textView setString:contents];
+ [textView_ setString:contents];
}
/**
+++ /dev/null
-/*
- * MacGDBp
- * Copyright (c) 2007 - 2011, Blue Static <http://www.bluestatic.org>
- *
- * 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 the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
- * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along with this program; if not,
- * write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
- */
-
-#import "BSSourceViewTextView.h"
-#import "BSSourceView.h"
-
-@implementation BSSourceViewTextView
-
-@synthesize sourceView;
-
-/**
- * Override -[drawRect:] so we can tell the line numbers to draw
- */
-- (void)drawRect:(NSRect)rect
-{
- [super drawRect:rect];
-
- unsigned i = 0, line = 1;
- while (i < [[self layoutManager] numberOfGlyphs])
- {
- NSRange fragRange;
- NSRect fragRect = [self convertRect:[[self layoutManager] lineFragmentRectForGlyphAtIndex:i effectiveRange:&fragRange] fromView:self];
- fragRect.origin.x = rect.origin.x; // horizontal scrolling matters not
-
- if ([sourceView markedLine] == line)
- {
- [[[NSColor redColor] colorWithAlphaComponent:0.25] set];
- [NSBezierPath fillRect:fragRect];
- break;
- }
-
- i += fragRange.length;
- line++;
- }
-
- [[sourceView numberView] setNeedsDisplay:YES];
-}
-
-@end
#import <Cocoa/Cocoa.h>
#import "BreakpointManager.h"
-#import "BSSourceView.h"
+
+@class BSSourceView;
+@protocol BSSourceViewDelegate;
@interface BreakpointController : NSWindowController<BSSourceViewDelegate>
{
*/
#import "BreakpointController.h"
-#import "AppDelegate.h"
+#import "AppDelegate.h"
+#import "BSSourceView.h"
@implementation BreakpointController
Breakpoint* bp = [selection objectAtIndex:0];
[sourceView setFile:[bp file]];
[sourceView scrollToLine:[bp line]];
- [[sourceView numberView] setMarkers:[NSSet setWithArray:[manager breakpointsForFile:[bp file]]]];
+ [sourceView setMarkers:[NSSet setWithArray:[manager breakpointsForFile:[bp file]]]];
}
#pragma mark BSSourceView Delegate
[bp release];
}
- [[sourceView numberView] setMarkers:[NSSet setWithArray:[manager breakpointsForFile:file]]];
- [[sourceView numberView] setNeedsDisplay:YES];
+ [sourceView setMarkers:[NSSet setWithArray:[manager breakpointsForFile:file]]];
+ [sourceView setNeedsDisplay:YES];
}
/**
AppDelegate* appDel = [NSApp delegate];
[[[appDel breakpoint] arrayController] rearrangeObjects];
[[[appDel breakpoint] sourceView] setNeedsDisplay:YES];
- [[[[appDel breakpoint] sourceView] numberView] setMarkers:[NSSet setWithArray:[self breakpointsForFile:file]]];
+ [[[appDel breakpoint] sourceView] setMarkers:[NSSet setWithArray:[self breakpointsForFile:file]]];
[[[appDel debugger] sourceViewer] setNeedsDisplay:YES];
- [[[[appDel debugger] sourceViewer] numberView] setMarkers:[NSSet setWithArray:[self breakpointsForFile:file]]];
+ [[[appDel debugger] sourceViewer] setMarkers:[NSSet setWithArray:[self breakpointsForFile:file]]];
}
@end
*/
#import <Cocoa/Cocoa.h>
-#import "BSSourceView.h"
#import "DebuggerBackEnd.h"
#import "StackController.h"
#include "VariableNode.h"
+@class BSSourceView;
+
@interface DebuggerController : NSWindowController <DebuggerBackEndDelegate>
{
DebuggerBackEnd* connection;
*/
#import "DebuggerController.h"
-#import "NSXMLElementAdditions.h"
+
#import "AppDelegate.h"
+#import "BSSourceView.h"
#import "BreakpointManager.h"
+#import "NSXMLElementAdditions.h"
@interface DebuggerController (Private)
- (void)updateSourceViewer;
[sourceViewer setString:frame.source asFile:filename];
NSSet* breakpoints = [NSSet setWithArray:[[BreakpointManager sharedManager] breakpointsForFile:filename]];
- [[sourceViewer numberView] setMarkers:breakpoints];
+ [sourceViewer setMarkers:breakpoints];
}
[sourceViewer setMarkedLine:frame.lineNumber];
[bp release];
}
- [[sourceViewer numberView] setMarkers:[NSSet setWithArray:[mngr breakpointsForFile:file]]];
- [[sourceViewer numberView] setNeedsDisplay:YES];
+ [sourceViewer setMarkers:[NSSet setWithArray:[mngr breakpointsForFile:file]]];
+ [sourceViewer setNeedsDisplay:YES];
}
#pragma mark GDBpConnectionDelegate