Skip to content

Commit 9d8106b

Browse files
committed
Fixes breakpoint highlighting - switched from IDEBreakpointManager to DBGBreakpointAnnotationProvider.
1 parent a5b21db commit 9d8106b

15 files changed

+499
-226
lines changed

SCXcodeMinimap.xcodeproj/project.pbxproj

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,27 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10+
18143CC41A98A83700BD8DD8 /* DVTTextDocumentLocation+SCXcodeMinimap.m in Sources */ = {isa = PBXBuildFile; fileRef = 18143CC31A98A83700BD8DD8 /* DVTTextDocumentLocation+SCXcodeMinimap.m */; };
1011
184C11861A740F97002A7C65 /* SCXcodeMinimapSelectionView.m in Sources */ = {isa = PBXBuildFile; fileRef = 184C11821A740F97002A7C65 /* SCXcodeMinimapSelectionView.m */; };
1112
184C11871A740F97002A7C65 /* SCXcodeMinimapView.m in Sources */ = {isa = PBXBuildFile; fileRef = 184C11841A740F97002A7C65 /* SCXcodeMinimapView.m */; };
1213
184C118F1A741136002A7C65 /* DVTFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 184C118E1A741136002A7C65 /* DVTFoundation.framework */; };
1314
1876135F1A77A74300974BE1 /* IDEKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1876135E1A77A74300974BE1 /* IDEKit.framework */; };
1415
1883080A1A7411830005DF40 /* DVTKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 188308091A7411830005DF40 /* DVTKit.framework */; };
1516
1883080C1A7411930005DF40 /* IDESourceEditor.ideplugin in Resources */ = {isa = PBXBuildFile; fileRef = 1883080B1A7411930005DF40 /* IDESourceEditor.ideplugin */; };
1617
188308101A7411A70005DF40 /* IDESourceEditor in Frameworks */ = {isa = PBXBuildFile; fileRef = 1883080F1A7411A70005DF40 /* IDESourceEditor */; };
17-
18D6AD0E1A8F72010082CB3F /* IDEBreakpointManager+SCXcodeMinimap.m in Sources */ = {isa = PBXBuildFile; fileRef = 18D6AD0D1A8F72010082CB3F /* IDEBreakpointManager+SCXcodeMinimap.m */; };
18+
188FCC8A1A98B57A0026F529 /* DBGBreakpointAnnotationProvider+SCXcodeMinimap.m in Sources */ = {isa = PBXBuildFile; fileRef = 188FCC891A98B57A0026F529 /* DBGBreakpointAnnotationProvider+SCXcodeMinimap.m */; };
19+
18C999FF1A98B04C0008AF54 /* DebuggerUI in Frameworks */ = {isa = PBXBuildFile; fileRef = 18C999FE1A98B04C0008AF54 /* DebuggerUI */; };
1820
18D6AD111A8F727B0082CB3F /* IDEFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 18D6AD101A8F727B0082CB3F /* IDEFoundation.framework */; };
1921
18FE09B61707639E00118FEB /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 18FE09B51707639E00118FEB /* Cocoa.framework */; };
2022
18FE09C9170764E400118FEB /* SCXcodeMinimap.m in Sources */ = {isa = PBXBuildFile; fileRef = 18FE09C8170764E400118FEB /* SCXcodeMinimap.m */; };
2123
8742532317307161001C947C /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8742532217307161001C947C /* QuartzCore.framework */; };
2224
/* End PBXBuildFile section */
2325

2426
/* Begin PBXFileReference section */
27+
180F0C651A98AE1500E97254 /* DVTAnnotationManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DVTAnnotationManager.h; sourceTree = "<group>"; };
2528
1812C3911A77A7CF00E2CFB3 /* IDESourceCodeDocument.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = IDESourceCodeDocument.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
29+
18143CC21A98A83700BD8DD8 /* DVTTextDocumentLocation+SCXcodeMinimap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "DVTTextDocumentLocation+SCXcodeMinimap.h"; sourceTree = "<group>"; };
30+
18143CC31A98A83700BD8DD8 /* DVTTextDocumentLocation+SCXcodeMinimap.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "DVTTextDocumentLocation+SCXcodeMinimap.m"; sourceTree = "<group>"; };
2631
18269AD51A8F2F4300953B3D /* DVTFoldingManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DVTFoldingManager.h; sourceTree = "<group>"; };
2732
184407641A8F7B1900C530CF /* DVTTextDocumentLocation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DVTTextDocumentLocation.h; sourceTree = "<group>"; };
2833
184407651A8F7B3E00C530CF /* DVTDocumentLocation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DVTDocumentLocation.h; sourceTree = "<group>"; };
@@ -50,16 +55,20 @@
5055
1876135D1A77A69F00974BE1 /* IDEEditorDocument.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = IDEEditorDocument.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
5156
1876135E1A77A74300974BE1 /* IDEKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IDEKit.framework; path = ../../../../../Applications/Xcode.app/Contents/Frameworks/IDEKit.framework; sourceTree = "<group>"; };
5257
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>"; };
5458
188308091A7411830005DF40 /* DVTKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = DVTKit.framework; path = ../../../../../Applications/Xcode.app/Contents/SharedFrameworks/DVTKit.framework; sourceTree = "<group>"; };
5559
1883080B1A7411930005DF40 /* IDESourceEditor.ideplugin */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = IDESourceEditor.ideplugin; path = ../../../../../Applications/Xcode.app/Contents/PlugIns/IDESourceEditor.ideplugin; sourceTree = "<group>"; };
5660
1883080F1A7411A70005DF40 /* IDESourceEditor */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = IDESourceEditor; path = ../../../../../Applications/Xcode.app/Contents/PlugIns/IDESourceEditor.ideplugin/Contents/MacOS/IDESourceEditor; sourceTree = "<group>"; };
61+
188D38761A98B26E005C7F85 /* DBGBreakpointAnnotation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DBGBreakpointAnnotation.h; sourceTree = "<group>"; };
62+
188D38771A98B3AC005C7F85 /* DVTTextAnnotation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DVTTextAnnotation.h; sourceTree = "<group>"; };
63+
188D38781A98B3D8005C7F85 /* DVTAnnotation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DVTAnnotation.h; sourceTree = "<group>"; };
64+
188FCC881A98B57A0026F529 /* DBGBreakpointAnnotationProvider+SCXcodeMinimap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "DBGBreakpointAnnotationProvider+SCXcodeMinimap.h"; sourceTree = "<group>"; };
65+
188FCC891A98B57A0026F529 /* DBGBreakpointAnnotationProvider+SCXcodeMinimap.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "DBGBreakpointAnnotationProvider+SCXcodeMinimap.m"; sourceTree = "<group>"; };
5766
18B3CEE51A8AA52A00A0873D /* DVTPreferenceSetManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DVTPreferenceSetManager.h; sourceTree = "<group>"; };
5867
18C8F0331A7ECB1300C7A76F /* DVTFoldingLayoutManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DVTFoldingLayoutManager.h; sourceTree = "<group>"; };
5968
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>"; };
69+
18C999FC1A98AF370008AF54 /* DBGBreakpointAnnotationProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DBGBreakpointAnnotationProvider.h; sourceTree = "<group>"; };
70+
18C999FD1A98AF580008AF54 /* DVTAnnotationProvider.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DVTAnnotationProvider.h; sourceTree = "<group>"; };
71+
18C999FE1A98B04C0008AF54 /* DebuggerUI */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = DebuggerUI; path = ../../../../../Applications/Xcode.app/Contents/PlugIns/DebuggerUI.ideplugin/Contents/MacOS/DebuggerUI; sourceTree = "<group>"; };
6372
18D6AD101A8F727B0082CB3F /* IDEFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IDEFoundation.framework; path = ../../../../../Applications/Xcode.app/Contents/Frameworks/IDEFoundation.framework; sourceTree = "<group>"; };
6473
18FE09B21707639E00118FEB /* SCXcodeMinimap.xcplugin */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SCXcodeMinimap.xcplugin; sourceTree = BUILT_PRODUCTS_DIR; };
6574
18FE09B51707639E00118FEB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
@@ -84,6 +93,7 @@
8493
8742532317307161001C947C /* QuartzCore.framework in Frameworks */,
8594
1883080A1A7411830005DF40 /* DVTKit.framework in Frameworks */,
8695
1876135F1A77A74300974BE1 /* IDEKit.framework in Frameworks */,
96+
18C999FF1A98B04C0008AF54 /* DebuggerUI in Frameworks */,
8797
18FE09B61707639E00118FEB /* Cocoa.framework in Frameworks */,
8898
18D6AD111A8F727B0082CB3F /* IDEFoundation.framework in Frameworks */,
8999
);
@@ -95,6 +105,11 @@
95105
184C11701A740F8A002A7C65 /* Xcode Headers */ = {
96106
isa = PBXGroup;
97107
children = (
108+
188D38761A98B26E005C7F85 /* DBGBreakpointAnnotation.h */,
109+
18C999FC1A98AF370008AF54 /* DBGBreakpointAnnotationProvider.h */,
110+
188D38781A98B3D8005C7F85 /* DVTAnnotation.h */,
111+
180F0C651A98AE1500E97254 /* DVTAnnotationManager.h */,
112+
18C999FD1A98AF580008AF54 /* DVTAnnotationProvider.h */,
98113
184C11711A740F8A002A7C65 /* DVTCompletingTextView.h */,
99114
184407651A8F7B3E00C530CF /* DVTDocumentLocation.h */,
100115
18C8F0331A7ECB1300C7A76F /* DVTFoldingLayoutManager.h */,
@@ -110,11 +125,10 @@
110125
184C11781A740F8A002A7C65 /* DVTSourceModelItem.h */,
111126
184C11791A740F8A002A7C65 /* DVTSourceNodeTypes.h */,
112127
184C117A1A740F8A002A7C65 /* DVTSourceTextView.h */,
128+
188D38771A98B3AC005C7F85 /* DVTTextAnnotation.h */,
113129
184407641A8F7B1900C530CF /* DVTTextDocumentLocation.h */,
114130
184C117B1A740F8A002A7C65 /* DVTTextStorage.h */,
115131
184C117C1A740F8A002A7C65 /* DVTViewController.h */,
116-
187EEF6B1A8F78EC00E4EF39 /* IDEBreakpoint.h */,
117-
18D6AD0F1A8F72250082CB3F /* IDEBreakpointManager.h */,
118132
184C117D1A740F8A002A7C65 /* IDEEditor.h */,
119133
1876135D1A77A69F00974BE1 /* IDEEditorDocument.h */,
120134
187EEF6A1A8F78C400E4EF39 /* IDEFileBreakpoint.h */,
@@ -150,6 +164,7 @@
150164
18FE09B81707639E00118FEB /* AppKit.framework */,
151165
18FE09B51707639E00118FEB /* Cocoa.framework */,
152166
18FE09B91707639E00118FEB /* CoreData.framework */,
167+
18C999FE1A98B04C0008AF54 /* DebuggerUI */,
153168
184C118E1A741136002A7C65 /* DVTFoundation.framework */,
154169
188308091A7411830005DF40 /* DVTKit.framework */,
155170
18FE09BA1707639E00118FEB /* Foundation.framework */,
@@ -171,8 +186,10 @@
171186
184C11841A740F97002A7C65 /* SCXcodeMinimapView.m */,
172187
184C11811A740F97002A7C65 /* SCXcodeMinimapSelectionView.h */,
173188
184C11821A740F97002A7C65 /* SCXcodeMinimapSelectionView.m */,
174-
18D6AD0C1A8F72010082CB3F /* IDEBreakpointManager+SCXcodeMinimap.h */,
175-
18D6AD0D1A8F72010082CB3F /* IDEBreakpointManager+SCXcodeMinimap.m */,
189+
18143CC21A98A83700BD8DD8 /* DVTTextDocumentLocation+SCXcodeMinimap.h */,
190+
18143CC31A98A83700BD8DD8 /* DVTTextDocumentLocation+SCXcodeMinimap.m */,
191+
188FCC881A98B57A0026F529 /* DBGBreakpointAnnotationProvider+SCXcodeMinimap.h */,
192+
188FCC891A98B57A0026F529 /* DBGBreakpointAnnotationProvider+SCXcodeMinimap.m */,
176193
18FE09BC1707639E00118FEB /* Supporting Files */,
177194
184C11701A740F8A002A7C65 /* Xcode Headers */,
178195
);
@@ -250,9 +267,10 @@
250267
isa = PBXSourcesBuildPhase;
251268
buildActionMask = 2147483647;
252269
files = (
270+
188FCC8A1A98B57A0026F529 /* DBGBreakpointAnnotationProvider+SCXcodeMinimap.m in Sources */,
271+
18143CC41A98A83700BD8DD8 /* DVTTextDocumentLocation+SCXcodeMinimap.m in Sources */,
253272
18FE09C9170764E400118FEB /* SCXcodeMinimap.m in Sources */,
254273
184C11861A740F97002A7C65 /* SCXcodeMinimapSelectionView.m in Sources */,
255-
18D6AD0E1A8F72010082CB3F /* IDEBreakpointManager+SCXcodeMinimap.m in Sources */,
256274
184C11871A740F97002A7C65 /* SCXcodeMinimapView.m in Sources */,
257275
);
258276
runOnlyForDeploymentPostprocessing = 0;
@@ -337,6 +355,7 @@
337355
LIBRARY_SEARCH_PATHS = (
338356
"$(inherited)",
339357
"$(SYSTEM_APPS_DIR)/Xcode.app/Contents/PlugIns/IDESourceEditor.ideplugin/Contents/MacOS",
358+
"$(SYSTEM_APPS_DIR)/Xcode.app/Contents/PlugIns/DebuggerUI.ideplugin/Contents/MacOS",
340359
);
341360
PRODUCT_NAME = "$(TARGET_NAME)";
342361
WRAPPER_EXTENSION = xcplugin;
@@ -365,6 +384,7 @@
365384
LIBRARY_SEARCH_PATHS = (
366385
"$(inherited)",
367386
"$(SYSTEM_APPS_DIR)/Xcode.app/Contents/PlugIns/IDESourceEditor.ideplugin/Contents/MacOS",
387+
"$(SYSTEM_APPS_DIR)/Xcode.app/Contents/PlugIns/DebuggerUI.ideplugin/Contents/MacOS",
368388
);
369389
PRODUCT_NAME = "$(TARGET_NAME)";
370390
WRAPPER_EXTENSION = xcplugin;
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
//
2+
// DBGBreakpointAnnotationProvider+SCXcodeMinimap.h
3+
// SCXcodeMinimap
4+
//
5+
// Created by Stefan Ceriu on 21/02/2015.
6+
// Copyright (c) 2015 Stefan Ceriu. All rights reserved.
7+
//
8+
9+
#import "DBGBreakpointAnnotationProvider.h"
10+
11+
@protocol DBGBreakpointAnnotationProviderDelegate;
12+
13+
@interface DBGBreakpointAnnotationProvider (SCXcodeMinimap)
14+
15+
@property (nonatomic, weak) id<DBGBreakpointAnnotationProviderDelegate> delegate;
16+
17+
@end
18+
19+
@protocol DBGBreakpointAnnotationProviderDelegate <NSObject>
20+
21+
- (void)breakpointAnnotationProviderDidChangeBreakpoints:(DBGBreakpointAnnotationProvider *)annotationProvider;
22+
23+
@end
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
//
2+
// DBGBreakpointAnnotationProvider+SCXcodeMinimap.m
3+
// SCXcodeMinimap
4+
//
5+
// Created by Stefan Ceriu on 21/02/2015.
6+
// Copyright (c) 2015 Stefan Ceriu. All rights reserved.
7+
//
8+
9+
#import "DBGBreakpointAnnotationProvider+SCXcodeMinimap.h"
10+
#import <objc/runtime.h>
11+
#import "DBGBreakpointAnnotation.h"
12+
13+
@implementation DBGBreakpointAnnotationProvider (SCXcodeMinimap)
14+
15+
static void sc_swizzleInstanceMethod(Class class, SEL originalSelector, SEL swizzledSelector) {
16+
Method originalMethod = class_getInstanceMethod(class, originalSelector);
17+
Method swizzledMethod = class_getInstanceMethod(class, swizzledSelector);
18+
if (class_addMethod(class, originalSelector, method_getImplementation(swizzledMethod), method_getTypeEncoding(swizzledMethod))) {
19+
class_replaceMethod(class, swizzledSelector, method_getImplementation(originalMethod), method_getTypeEncoding(originalMethod));
20+
} else {
21+
method_exchangeImplementations(originalMethod, swizzledMethod);
22+
}
23+
}
24+
25+
+ (void)load
26+
{
27+
sc_swizzleInstanceMethod(self, @selector(_addAnnotationForFileBreakpoint:), @selector(sc_addAnnotationForFileBreakpoint:));
28+
sc_swizzleInstanceMethod(self, @selector(_removeAnnotation:), @selector(sc_removeAnnotation:));
29+
sc_swizzleInstanceMethod(self, @selector(didMoveAnnotation:), @selector(sc_didMoveAnnotation:));
30+
}
31+
32+
- (void)setDelegate:(id<DBGBreakpointAnnotationProviderDelegate>)delegate
33+
{
34+
objc_setAssociatedObject(self, @selector(delegate), delegate, OBJC_ASSOCIATION_ASSIGN);
35+
}
36+
37+
- (id<DBGBreakpointAnnotationProviderDelegate>)delegate
38+
{
39+
return objc_getAssociatedObject(self, @selector(delegate));
40+
}
41+
42+
- (void)sc_addAnnotationForFileBreakpoint:(id)arg1
43+
{
44+
[self sc_addAnnotationForFileBreakpoint:arg1];
45+
46+
[self.delegate breakpointAnnotationProviderDidChangeBreakpoints:self];
47+
}
48+
49+
- (void)sc_removeAnnotation:(id)arg1
50+
{
51+
[self sc_removeAnnotation:arg1];
52+
53+
[self.delegate breakpointAnnotationProviderDidChangeBreakpoints:self];
54+
}
55+
56+
- (void)sc_didMoveAnnotation:(id)arg1
57+
{
58+
[self.delegate breakpointAnnotationProviderDidChangeBreakpoints:self];
59+
}
60+
61+
@end
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
//
2+
// DVTTextDocumentLocation+SCXcodeMinimap.h
3+
// SCXcodeMinimap
4+
//
5+
// Created by Stefan Ceriu on 21/02/2015.
6+
// Copyright (c) 2015 Stefan Ceriu. All rights reserved.
7+
//
8+
9+
#import "DVTTextDocumentLocation.h"
10+
11+
@interface DVTTextDocumentLocation (SCXcodeMinimap)
12+
13+
@end
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
//
2+
// DVTTextDocumentLocation+SCXcodeMinimap.m
3+
// SCXcodeMinimap
4+
//
5+
// Created by Stefan Ceriu on 21/02/2015.
6+
// Copyright (c) 2015 Stefan Ceriu. All rights reserved.
7+
//
8+
9+
#import "DVTTextDocumentLocation+SCXcodeMinimap.h"
10+
#import <objc/runtime.h>
11+
12+
@implementation DVTTextDocumentLocation (SCXcodeMinimap)
13+
14+
static void sc_swizzleInstanceMethod(Class class, SEL originalSelector, SEL swizzledSelector) {
15+
Method originalMethod = class_getInstanceMethod(class, originalSelector);
16+
Method swizzledMethod = class_getInstanceMethod(class, swizzledSelector);
17+
if (class_addMethod(class, originalSelector, method_getImplementation(swizzledMethod), method_getTypeEncoding(swizzledMethod))) {
18+
class_replaceMethod(class, swizzledSelector, method_getImplementation(originalMethod), method_getTypeEncoding(originalMethod));
19+
} else {
20+
method_exchangeImplementations(originalMethod, swizzledMethod);
21+
}
22+
}
23+
24+
+ (void)load
25+
{
26+
// sc_swizzleInstanceMethod(self, @selector(initWithDocumentURL:timestamp:startingColumnNumber:endingColumnNumber:startingLineNumber:endingLineNumber:characterRange:), @selector(sc_initWithDocumentURL:timestamp:startingColumnNumber:endingColumnNumber:startingLineNumber:endingLineNumber:characterRange:));
27+
//
28+
// sc_swizzleInstanceMethod(self, @selector(initWithDocumentURL:timestamp:), @selector(sc_initWithDocumentURL:timestamp:));
29+
// sc_swizzleInstanceMethod(self, @selector(initWithDocumentURL:timestamp:characterRange:), @selector(sc_initWithDocumentURL:timestamp:characterRange:));
30+
// sc_swizzleInstanceMethod(self, @selector(initWithDocumentURL:timestamp:lineRange:), @selector(sc_initWithDocumentURL:timestamp:lineRange:));
31+
}
32+
33+
- (id)sc_initWithDocumentURL:(id)arg1 timestamp:(id)arg2 startingColumnNumber:(long long)arg3 endingColumnNumber:(long long)arg4 startingLineNumber:(long long)arg5 endingLineNumber:(long long)arg6 characterRange:(struct _NSRange)arg7
34+
{
35+
NSLog(@"%@", [NSThread callStackSymbols]);
36+
37+
return [self sc_initWithDocumentURL:arg1 timestamp:arg2 startingColumnNumber:arg3 endingColumnNumber:arg4 startingLineNumber:arg5 endingLineNumber:arg6 characterRange:arg7];
38+
}
39+
40+
- (id)sc_initWithDocumentURL:(id)arg1 timestamp:(id)arg2
41+
{
42+
NSLog(@"%@", [NSThread callStackSymbols]);
43+
44+
return [self sc_initWithDocumentURL:arg1 timestamp:arg2];
45+
}
46+
47+
- (id)sc_initWithDocumentURL:(id)arg1 timestamp:(id)arg2 characterRange:(struct _NSRange)arg3
48+
{
49+
NSLog(@"%@", [NSThread callStackSymbols]);
50+
51+
return [self sc_initWithDocumentURL:arg1 timestamp:arg2 characterRange:arg3];
52+
}
53+
54+
- (id)sc_initWithDocumentURL:(id)arg1 timestamp:(id)arg2 lineRange:(struct _NSRange)arg3
55+
{
56+
NSLog(@"%@", [NSThread callStackSymbols]);
57+
58+
return [self sc_initWithDocumentURL:arg1 timestamp:arg2 lineRange:arg3];
59+
}
60+
61+
@end

SCXcodeMinimap/IDEBreakpointManager+SCXcodeMinimap.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ - (SCKVOController *)kvoController
5656
if([breakpoint isKindOfClass:[IDEFileBreakpoint class]]) {
5757
[self _observeBreakpoint:breakpoint];
5858
}
59+
5960
}
6061
}
6162

0 commit comments

Comments
 (0)