Skip to content

Commit facb3ad

Browse files
committed
Added breakpoints support.
1 parent 6e39987 commit facb3ad

File tree

11 files changed

+533
-17
lines changed

11 files changed

+533
-17
lines changed

SCXcodeMinimap.xcodeproj/project.pbxproj

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
1883080A1A7411830005DF40 /* DVTKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 188308091A7411830005DF40 /* DVTKit.framework */; };
1515
1883080C1A7411930005DF40 /* IDESourceEditor.ideplugin in Resources */ = {isa = PBXBuildFile; fileRef = 1883080B1A7411930005DF40 /* IDESourceEditor.ideplugin */; };
1616
188308101A7411A70005DF40 /* IDESourceEditor in Frameworks */ = {isa = PBXBuildFile; fileRef = 1883080F1A7411A70005DF40 /* IDESourceEditor */; };
17+
18D6AD0E1A8F72010082CB3F /* IDEBreakpointManager+SCXcodeMinimap.m in Sources */ = {isa = PBXBuildFile; fileRef = 18D6AD0D1A8F72010082CB3F /* IDEBreakpointManager+SCXcodeMinimap.m */; };
18+
18D6AD111A8F727B0082CB3F /* IDEFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 18D6AD101A8F727B0082CB3F /* IDEFoundation.framework */; };
1719
18FE09B61707639E00118FEB /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 18FE09B51707639E00118FEB /* Cocoa.framework */; };
1820
18FE09C9170764E400118FEB /* SCXcodeMinimap.m in Sources */ = {isa = PBXBuildFile; fileRef = 18FE09C8170764E400118FEB /* SCXcodeMinimap.m */; };
1921
8742532317307161001C947C /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8742532217307161001C947C /* QuartzCore.framework */; };
@@ -22,6 +24,8 @@
2224
/* Begin PBXFileReference section */
2325
1812C3911A77A7CF00E2CFB3 /* IDESourceCodeDocument.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = IDESourceCodeDocument.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
2426
18269AD51A8F2F4300953B3D /* DVTFoldingManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DVTFoldingManager.h; sourceTree = "<group>"; };
27+
184407641A8F7B1900C530CF /* DVTTextDocumentLocation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DVTTextDocumentLocation.h; sourceTree = "<group>"; };
28+
184407651A8F7B3E00C530CF /* DVTDocumentLocation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DVTDocumentLocation.h; sourceTree = "<group>"; };
2529
184C11711A740F8A002A7C65 /* DVTCompletingTextView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = DVTCompletingTextView.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
2630
184C11721A740F8A002A7C65 /* DVTFontAndColorTheme.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DVTFontAndColorTheme.h; sourceTree = "<group>"; };
2731
184C11731A740F8A002A7C65 /* DVTInvalidation-Protocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "DVTInvalidation-Protocol.h"; sourceTree = "<group>"; };
@@ -45,12 +49,18 @@
4549
184C118E1A741136002A7C65 /* DVTFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = DVTFoundation.framework; path = ../../../../../Applications/Xcode.app/Contents/SharedFrameworks/DVTFoundation.framework; sourceTree = "<group>"; };
4650
1876135D1A77A69F00974BE1 /* IDEEditorDocument.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = IDEEditorDocument.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
4751
1876135E1A77A74300974BE1 /* IDEKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IDEKit.framework; path = ../../../../../Applications/Xcode.app/Contents/Frameworks/IDEKit.framework; sourceTree = "<group>"; };
52+
187EEF6A1A8F78C400E4EF39 /* IDEFileBreakpoint.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = IDEFileBreakpoint.h; sourceTree = "<group>"; };
53+
187EEF6B1A8F78EC00E4EF39 /* IDEBreakpoint.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = IDEBreakpoint.h; sourceTree = "<group>"; };
4854
188308091A7411830005DF40 /* DVTKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = DVTKit.framework; path = ../../../../../Applications/Xcode.app/Contents/SharedFrameworks/DVTKit.framework; sourceTree = "<group>"; };
4955
1883080B1A7411930005DF40 /* IDESourceEditor.ideplugin */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = IDESourceEditor.ideplugin; path = ../../../../../Applications/Xcode.app/Contents/PlugIns/IDESourceEditor.ideplugin; sourceTree = "<group>"; };
5056
1883080F1A7411A70005DF40 /* IDESourceEditor */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = IDESourceEditor; path = ../../../../../Applications/Xcode.app/Contents/PlugIns/IDESourceEditor.ideplugin/Contents/MacOS/IDESourceEditor; sourceTree = "<group>"; };
5157
18B3CEE51A8AA52A00A0873D /* DVTPreferenceSetManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DVTPreferenceSetManager.h; sourceTree = "<group>"; };
5258
18C8F0331A7ECB1300C7A76F /* DVTFoldingLayoutManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DVTFoldingLayoutManager.h; sourceTree = "<group>"; };
5359
18C8F0341A7ECB1300C7A76F /* DVTLayoutManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DVTLayoutManager.h; sourceTree = "<group>"; };
60+
18D6AD0C1A8F72010082CB3F /* IDEBreakpointManager+SCXcodeMinimap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "IDEBreakpointManager+SCXcodeMinimap.h"; sourceTree = "<group>"; };
61+
18D6AD0D1A8F72010082CB3F /* IDEBreakpointManager+SCXcodeMinimap.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "IDEBreakpointManager+SCXcodeMinimap.m"; sourceTree = "<group>"; };
62+
18D6AD0F1A8F72250082CB3F /* IDEBreakpointManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = IDEBreakpointManager.h; sourceTree = "<group>"; };
63+
18D6AD101A8F727B0082CB3F /* IDEFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IDEFoundation.framework; path = ../../../../../Applications/Xcode.app/Contents/Frameworks/IDEFoundation.framework; sourceTree = "<group>"; };
5464
18FE09B21707639E00118FEB /* SCXcodeMinimap.xcplugin */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SCXcodeMinimap.xcplugin; sourceTree = BUILT_PRODUCTS_DIR; };
5565
18FE09B51707639E00118FEB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
5666
18FE09B81707639E00118FEB /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
@@ -75,6 +85,7 @@
7585
1883080A1A7411830005DF40 /* DVTKit.framework in Frameworks */,
7686
1876135F1A77A74300974BE1 /* IDEKit.framework in Frameworks */,
7787
18FE09B61707639E00118FEB /* Cocoa.framework in Frameworks */,
88+
18D6AD111A8F727B0082CB3F /* IDEFoundation.framework in Frameworks */,
7889
);
7990
runOnlyForDeploymentPostprocessing = 0;
8091
};
@@ -85,6 +96,7 @@
8596
isa = PBXGroup;
8697
children = (
8798
184C11711A740F8A002A7C65 /* DVTCompletingTextView.h */,
99+
184407651A8F7B3E00C530CF /* DVTDocumentLocation.h */,
88100
18C8F0331A7ECB1300C7A76F /* DVTFoldingLayoutManager.h */,
89101
18269AD51A8F2F4300953B3D /* DVTFoldingManager.h */,
90102
184C11721A740F8A002A7C65 /* DVTFontAndColorTheme.h */,
@@ -98,10 +110,14 @@
98110
184C11781A740F8A002A7C65 /* DVTSourceModelItem.h */,
99111
184C11791A740F8A002A7C65 /* DVTSourceNodeTypes.h */,
100112
184C117A1A740F8A002A7C65 /* DVTSourceTextView.h */,
113+
184407641A8F7B1900C530CF /* DVTTextDocumentLocation.h */,
101114
184C117B1A740F8A002A7C65 /* DVTTextStorage.h */,
102115
184C117C1A740F8A002A7C65 /* DVTViewController.h */,
116+
187EEF6B1A8F78EC00E4EF39 /* IDEBreakpoint.h */,
117+
18D6AD0F1A8F72250082CB3F /* IDEBreakpointManager.h */,
103118
184C117D1A740F8A002A7C65 /* IDEEditor.h */,
104119
1876135D1A77A69F00974BE1 /* IDEEditorDocument.h */,
120+
187EEF6A1A8F78C400E4EF39 /* IDEFileBreakpoint.h */,
105121
18FEFA8C1A782D8600DC98C5 /* IDEFileTextSettings.h */,
106122
1812C3911A77A7CF00E2CFB3 /* IDESourceCodeDocument.h */,
107123
184C117E1A740F8A002A7C65 /* IDESourceCodeEditor.h */,
@@ -137,6 +153,7 @@
137153
184C118E1A741136002A7C65 /* DVTFoundation.framework */,
138154
188308091A7411830005DF40 /* DVTKit.framework */,
139155
18FE09BA1707639E00118FEB /* Foundation.framework */,
156+
18D6AD101A8F727B0082CB3F /* IDEFoundation.framework */,
140157
1876135E1A77A74300974BE1 /* IDEKit.framework */,
141158
1883080F1A7411A70005DF40 /* IDESourceEditor */,
142159
1883080B1A7411930005DF40 /* IDESourceEditor.ideplugin */,
@@ -154,6 +171,8 @@
154171
184C11841A740F97002A7C65 /* SCXcodeMinimapView.m */,
155172
184C11811A740F97002A7C65 /* SCXcodeMinimapSelectionView.h */,
156173
184C11821A740F97002A7C65 /* SCXcodeMinimapSelectionView.m */,
174+
18D6AD0C1A8F72010082CB3F /* IDEBreakpointManager+SCXcodeMinimap.h */,
175+
18D6AD0D1A8F72010082CB3F /* IDEBreakpointManager+SCXcodeMinimap.m */,
157176
18FE09BC1707639E00118FEB /* Supporting Files */,
158177
184C11701A740F8A002A7C65 /* Xcode Headers */,
159178
);
@@ -233,6 +252,7 @@
233252
files = (
234253
18FE09C9170764E400118FEB /* SCXcodeMinimap.m in Sources */,
235254
184C11861A740F97002A7C65 /* SCXcodeMinimapSelectionView.m in Sources */,
255+
18D6AD0E1A8F72010082CB3F /* IDEBreakpointManager+SCXcodeMinimap.m in Sources */,
236256
184C11871A740F97002A7C65 /* SCXcodeMinimapView.m in Sources */,
237257
);
238258
runOnlyForDeploymentPostprocessing = 0;
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
//
2+
// IDEBreakpointManager+SCXcodeMinimap.h
3+
// SCXcodeMinimap
4+
//
5+
// Created by Stefan Ceriu on 14/02/2015.
6+
// Copyright (c) 2015 Stefan Ceriu. All rights reserved.
7+
//
8+
9+
#import "IDEBreakpointManager.h"
10+
11+
@protocol IDEBreakpointManagerDelegate;
12+
13+
@interface IDEBreakpointManager (SCXcodeMinimap)
14+
15+
@property (nonatomic, weak) id<IDEBreakpointManagerDelegate> delegate;
16+
17+
@end
18+
19+
@protocol IDEBreakpointManagerDelegate <NSObject>
20+
21+
- (void)breakpointManagerDidAddBreakpoint:(IDEBreakpointManager *)breakpointManager;
22+
- (void)breakpointManagerDidRemoveBreakpoint:(IDEBreakpointManager *)breakpointManager;
23+
- (void)breakpointManagerDidChangeBreakpoint:(IDEBreakpointManager *)breakpointManager;
24+
25+
@end
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
//
2+
// IDEBreakpointManager+SCXcodeMinimap.m
3+
// SCXcodeMinimap
4+
//
5+
// Created by Stefan Ceriu on 14/02/2015.
6+
// Copyright (c) 2015 Stefan Ceriu. All rights reserved.
7+
//
8+
9+
#import "IDEBreakpointManager+SCXcodeMinimap.h"
10+
#import "IDEFileBreakpoint.h"
11+
#import <objc/runtime.h>
12+
13+
static void *SCXcodeMinimapBreakpointObserverContext = &SCXcodeMinimapBreakpointObserverContext;
14+
15+
@implementation IDEBreakpointManager (SCXcodeMinimap)
16+
17+
static void sc_swizzleInstanceMethod(Class class, SEL originalSelector, SEL swizzledSelector) {
18+
Method originalMethod = class_getInstanceMethod(class, originalSelector);
19+
Method swizzledMethod = class_getInstanceMethod(class, swizzledSelector);
20+
if (class_addMethod(class, originalSelector, method_getImplementation(swizzledMethod), method_getTypeEncoding(swizzledMethod))) {
21+
class_replaceMethod(class, swizzledSelector, method_getImplementation(originalMethod), method_getTypeEncoding(originalMethod));
22+
} else {
23+
method_exchangeImplementations(originalMethod, swizzledMethod);
24+
}
25+
}
26+
27+
+ (void)load
28+
{
29+
sc_swizzleInstanceMethod(self, @selector(addBreakpoint:), @selector(sc_addBreakpoint:));
30+
sc_swizzleInstanceMethod(self, @selector(removeBreakpoint:), @selector(sc_removeBreakpoint:));
31+
}
32+
33+
- (void)setDelegate:(id<IDEBreakpointManagerDelegate>)delegate
34+
{
35+
objc_setAssociatedObject(self, @selector(delegate), delegate, OBJC_ASSOCIATION_ASSIGN);
36+
}
37+
38+
- (id<IDEBreakpointManagerDelegate>)delegate
39+
{
40+
return objc_getAssociatedObject(self, @selector(delegate));
41+
}
42+
43+
- (void)sc_addBreakpoint:(IDEBreakpoint *)breakpoint
44+
{
45+
[self sc_addBreakpoint:breakpoint];
46+
47+
if([breakpoint isKindOfClass:[IDEFileBreakpoint class]]) {
48+
[breakpoint addObserver:self forKeyPath:@"location" options:NSKeyValueObservingOptionNew context:SCXcodeMinimapBreakpointObserverContext];
49+
[breakpoint addObserver:self forKeyPath:@"shouldBeEnabled" options:NSKeyValueObservingOptionNew context:SCXcodeMinimapBreakpointObserverContext];
50+
}
51+
52+
if([self.delegate respondsToSelector:@selector(breakpointManagerDidAddBreakpoint:)]) {
53+
[self.delegate breakpointManagerDidAddBreakpoint:self];
54+
}
55+
}
56+
57+
- (void)sc_removeBreakpoint:(IDEBreakpoint *)breakpoint
58+
{
59+
if([breakpoint isKindOfClass:[IDEFileBreakpoint class]]) {
60+
[breakpoint removeObserver:self forKeyPath:@"location" context:SCXcodeMinimapBreakpointObserverContext];
61+
[breakpoint removeObserver:self forKeyPath:@"shouldBeEnabled" context:SCXcodeMinimapBreakpointObserverContext];
62+
}
63+
64+
[self sc_removeBreakpoint:breakpoint];
65+
66+
if([self.delegate respondsToSelector:@selector(breakpointManagerDidRemoveBreakpoint:)]) {
67+
[self.delegate breakpointManagerDidRemoveBreakpoint:self];
68+
}
69+
}
70+
71+
- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context
72+
{
73+
if(context == SCXcodeMinimapBreakpointObserverContext) {
74+
if([self.delegate respondsToSelector:@selector(breakpointManagerDidChangeBreakpoint:)]) {
75+
[self.delegate breakpointManagerDidChangeBreakpoint:self];
76+
}
77+
}
78+
}
79+
80+
@end

SCXcodeMinimap/SCXcodeMinimap.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ const CGFloat kDefaultZoomLevel;
1313
extern NSString *const SCXcodeMinimapShouldDisplayChangeNotification;
1414
extern NSString *const SCXcodeMinimapShouldDisplay;
1515

16-
extern NSString *const SCXcodeMinimapThemeChangeNotification;
17-
extern NSString *const SCXcodeMinimapTheme;
16+
extern NSString *const SCXcodeMinimapHighlightBreakpointsChangeNotification;
17+
extern NSString *const SCXcodeMinimapShouldHighlightBreakpoints;
1818

1919
extern NSString *const SCXcodeMinimapHighlightCommentsChangeNotification;
2020
extern NSString *const SCXcodeMinimapShouldHighlightComments;
@@ -25,6 +25,9 @@ extern NSString *const SCXcodeMinimapShouldHighlightPreprocessor;
2525
extern NSString *const SCXcodeMinimapHideEditorScrollerChangeNotification;
2626
extern NSString *const SCXcodeMinimapShouldHideEditorScroller;
2727

28+
extern NSString *const SCXcodeMinimapThemeChangeNotification;
29+
extern NSString *const SCXcodeMinimapTheme;
30+
2831
@interface SCXcodeMinimap : NSObject
2932

3033
@end

SCXcodeMinimap/SCXcodeMinimap.m

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
NSString *const SCXcodeMinimapShouldDisplayChangeNotification = @"SCXcodeMinimapShouldDisplayChangeNotification";
2424
NSString *const SCXcodeMinimapShouldDisplay = @"SCXcodeMinimapShouldDisplay";
2525

26-
NSString *const SCXcodeMinimapThemeChangeNotification = @"SCXcodeMinimapThemeChangeNotification";
27-
NSString *const SCXcodeMinimapTheme = @"SCXcodeMinimapTheme";
26+
NSString *const SCXcodeMinimapHighlightBreakpointsChangeNotification = @"SCXcodeMinimapHighlightBreakpointsChangeNotification";
27+
NSString *const SCXcodeMinimapShouldHighlightBreakpoints = @"SCXcodeMinimapShouldHighlightBreakpoints";
2828

2929
NSString *const SCXcodeMinimapHighlightCommentsChangeNotification = @"SCXcodeMinimapHighlightCommentsChangeNotification";
3030
NSString *const SCXcodeMinimapShouldHighlightComments = @"SCXcodeMinimapShouldHighlightComments";
@@ -35,12 +35,16 @@
3535
NSString *const SCXcodeMinimapHideEditorScrollerChangeNotification = @"SCXcodeMinimapHideEditorScrollerChangeNotification";
3636
NSString *const SCXcodeMinimapShouldHideEditorScroller = @"SCXcodeMinimapShouldHideEditorScroller";
3737

38+
NSString *const SCXcodeMinimapThemeChangeNotification = @"SCXcodeMinimapThemeChangeNotification";
39+
NSString *const SCXcodeMinimapTheme = @"SCXcodeMinimapTheme";
40+
3841
NSString *const kViewMenuItemTitle = @"View";
3942

4043
NSString *const kMinimapMenuItemTitle = @"Minimap";
4144
NSString *const kShowMinimapMenuItemTitle = @"Show Minimap";
4245
NSString *const kHideMinimapMenuItemTitle = @"Hide Minimap";
4346

47+
NSString *const kHighlightBreakpointsMenuItemTitle = @"Highlight breakpoints";
4448
NSString *const kHighlightCommentsMenuItemTitle = @"Highlight comments";
4549
NSString *const kHighlightPreprocessorMenuItemTitle = @"Highlight preprocessor";
4650
NSString *const kHideEditorScrollerMenuItemTitle = @"Hide editor scroller";
@@ -73,9 +77,10 @@ - (id)init
7377

7478
- (void)registerUserDefaults
7579
{
76-
NSDictionary *userDefaults = @{SCXcodeMinimapShouldDisplay : @(YES),
77-
SCXcodeMinimapShouldHighlightComments : @(YES),
78-
SCXcodeMinimapShouldHighlightPreprocessor :@(YES)};
80+
NSDictionary *userDefaults = @{SCXcodeMinimapShouldDisplay : @(YES),
81+
SCXcodeMinimapShouldHighlightBreakpoints : @(YES),
82+
SCXcodeMinimapShouldHighlightComments : @(YES),
83+
SCXcodeMinimapShouldHighlightPreprocessor : @(YES)};
7984

8085
[[NSUserDefaults standardUserDefaults] registerDefaults:userDefaults];
8186
}
@@ -109,6 +114,15 @@ - (void)createMenuItem
109114
}
110115

111116
{
117+
NSMenuItem *highlightBreakpointsMenuItem = [[NSMenuItem alloc] initWithTitle:kHighlightBreakpointsMenuItemTitle
118+
action:@selector(toggleBreakpointHighlighting:) keyEquivalent:@""];
119+
[highlightBreakpointsMenuItem setTarget:self];
120+
[minimapMenu addItem:highlightBreakpointsMenuItem];
121+
122+
BOOL breakpointHighlightingEnabled = [[[NSUserDefaults standardUserDefaults] objectForKey:SCXcodeMinimapShouldHighlightBreakpoints] boolValue];
123+
[highlightBreakpointsMenuItem setState:(breakpointHighlightingEnabled ? NSOnState : NSOffState)];
124+
125+
112126
NSMenuItem *highlightCommentsMenuItem = [[NSMenuItem alloc] initWithTitle:kHighlightCommentsMenuItemTitle
113127
action:@selector(toggleCommentsHighlighting:) keyEquivalent:@""];
114128
[highlightCommentsMenuItem setTarget:self];
@@ -198,6 +212,15 @@ - (void)toggleMinimap:(NSMenuItem *)sender
198212
[[NSNotificationCenter defaultCenter] postNotificationName:SCXcodeMinimapShouldDisplayChangeNotification object:nil];
199213
}
200214

215+
- (void)toggleBreakpointHighlighting:(NSMenuItem *)sender
216+
{
217+
BOOL breakpointHighlightingEnabled = [[[NSUserDefaults standardUserDefaults] objectForKey:SCXcodeMinimapShouldHighlightBreakpoints] boolValue];
218+
219+
[sender setState:(breakpointHighlightingEnabled ? NSOffState : NSOnState)];
220+
[[NSUserDefaults standardUserDefaults] setObject:@(!breakpointHighlightingEnabled) forKey:SCXcodeMinimapShouldHighlightBreakpoints];
221+
[[NSNotificationCenter defaultCenter] postNotificationName:SCXcodeMinimapHighlightBreakpointsChangeNotification object:nil];
222+
}
223+
201224
- (void)toggleCommentsHighlighting:(NSMenuItem *)sender
202225
{
203226
BOOL commentsHighlightingEnabled = [[[NSUserDefaults standardUserDefaults] objectForKey:SCXcodeMinimapShouldHighlightComments] boolValue];

0 commit comments

Comments
 (0)