1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
|
// RUN: clang -fsyntax-only -verify %s
typedef struct objc_selector *SEL;
typedef signed char BOOL;
typedef int NSInteger;
typedef unsigned int NSUInteger;
typedef struct _NSZone NSZone;
@class NSInvocation, NSMethodSignature, NSCoder, NSString, NSEnumerator;
@protocol NSObject
- (BOOL)isEqual:(id)object;
- (BOOL)conformsToProtocol:(Protocol *)aProtocol;
@end
@protocol NSCopying
- (id)copyWithZone:(NSZone *)zone;
@end
@protocol NSMutableCopying
- (id)mutableCopyWithZone:(NSZone *)zone;
@end
@protocol NSCoding
- (void)encodeWithCoder:(NSCoder *)aCoder;
@end
@interface NSObject <NSObject> {}
- (void)dealloc;
@end
extern id NSAllocateObject(Class aClass, NSUInteger extraBytes, NSZone *zone);
typedef struct _NSSize {} NSRect;
typedef struct {} NSFastEnumerationState;
@protocol NSFastEnumeration
- (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state objects:(id *)stackbuf count:(NSUInteger)len;
@end
@class NSString;
@interface NSString : NSObject <NSCopying, NSMutableCopying, NSCoding>
- (NSUInteger)length;
- (BOOL)isEqualToString:(NSString *)aString;
@end
@interface NSSimpleCString : NSString {} @end
@interface NSConstantString : NSSimpleCString @end
extern void *_NSConstantStringClassReference;
@interface NSSet : NSObject <NSCopying, NSMutableCopying, NSCoding, NSFastEnumeration>
- (NSUInteger)count;
@end
@interface NSMutableSet : NSSet
- (void)addObject:(id)object;
@end
@class NSArray, NSDictionary, NSMapTable;
@interface NSResponder : NSObject <NSCoding> {} @end
@protocol NSAnimatablePropertyContainer
- (id)animator;
@end
extern NSString *NSAnimationTriggerOrderIn ;
@interface NSView : NSResponder <NSAnimatablePropertyContainer> {} @end
extern NSString * const NSFullScreenModeAllScreens;
typedef NSUInteger NSControlTint;
@interface NSCell : NSObject <NSCopying, NSCoding> {}
- (NSRect)imageRectForBounds:(NSRect)theRect;
@end
@protocol NSValidatedUserInterfaceItem
- (SEL)action;
@end
@protocol NSUserInterfaceValidations
- (BOOL)validateUserInterfaceItem:(id <NSValidatedUserInterfaceItem>)anItem;
@end
@class NSCell, NSFont, NSTextView, NSNotification, NSAttributedString, NSFormatter;
@interface NSControl : NSView {} @end
@class NSColor, NSClipView, NSRulerView, NSScroller;
@interface NSWindowController : NSResponder <NSCoding> {} @end
@class NSTableHeaderView;
@class NSTableColumn;
@interface NSTableView : NSControl <NSUserInterfaceValidations> {}
- (NSInteger)columnWithIdentifier:(id)identifier;
- (NSRect)frameOfCellAtColumn:(NSInteger)column row:(NSInteger)row;
@end
@class NSButtonCell;
@interface NSOutlineView : NSTableView {}
- (NSInteger)rowForItem:(id)item;
@end
@class NSArray, NSDictionary, NSMutableArray, NSNotification, NSString, NSToolbarItem, NSWindow;
@protocol XCProxyObjectProtocol
- (id) representedObject;
@end
@interface PBXObject : NSObject {} @end
typedef enum
{
PBXNoItemChanged = 0x00, PBXProjectItemChanged = 0x01, PBXReferenceChanged = 0x02, PBXGroupChanged = 0x04, PBXTargetChanged = 0x08, PBXBuildPhaseChanged = 0x10, PBXBuildFileChanged = 0x20, PBXBreakpointChanged = 0x40,
}
PBXChangedItemMask;
@protocol PBXChangeNotification
- (void)willChange;
@end
@class PBXContainer, PBXProject;
@interface PBXContainerItem : PBXObject <PBXChangeNotification> {} @end
@interface PBXProjectItem : PBXContainerItem {} @end
@class XCObjectGraphPath;
@protocol XCCompatibilityChecking
- (void)findFeaturesInUseAndAddToSet:(NSMutableSet *)featureSet usingPathPrefix:(XCObjectGraphPath *)pathPrefix;
- (NSString *)identifier;
@end
@protocol XCConfigurationInspectables <NSObject>
- (NSString *)name;
@end
@class PBXProject, PBXFileReference, PBXBuildPhase, PBXBuildSettingsDictionary, PBXExecutable, PBXBuildFile, PBXTargetDependency, PBXBuildLog, PBXBuildRule, XCCommandLineToolSpecification, XCProductTypeSpecification, PBXPackageTypeSpecification, PBXTargetBuildContext, XCBuildConfiguration, XCConfigurationList, XCHeadersBuildPhaseDGSnapshot, XCResourcesBuildPhaseDGSnapshot, XCSourcesBuildPhaseDGSnapshot, XCFrameworksBuildPhaseDGSnapshot, XCRezBuildPhaseDGSnapshot, XCJavaArchiveBuildPhaseDGSnapshot, XCBuildFileRefDGSnapshot, XCWorkQueue, XCBuildOperation, XCStringList, XCPropertyExpansionContext, XCWorkQueueOperation, XCTargetDGSnapshot, XCTargetHeadermapCreationInfo, XCPropertyInfoContext, XCConfigurationInspectionContext, PBXReference;
@interface PBXTarget : PBXProjectItem <XCCompatibilityChecking, XCConfigurationInspectables> {} @end
extern NSString * const XCTargetDGSnapshotContextKey_BuildAction;
@interface PBXBookmarkItem : PBXProjectItem {} @end
@interface PBXReference : PBXContainerItem {} @end
extern BOOL PBX_getUsesTabsPreference();
@interface PBXGroup : PBXReference <XCCompatibilityChecking> {} @end
@class PBXFileReference, PBXTarget, PBXProject;
@interface PBXExecutable : PBXProjectItem {} @end
@class XCSCMRevisionInfo;
@interface PBXBookmark : PBXBookmarkItem {} @end
@class XCSCMInfo;
@interface PBXFileReference : PBXReference {} @end
@interface PBXLegacyTarget : PBXTarget {} @end
@interface PBXVariantGroup : PBXGroup {} @end
typedef enum
{
PBXBuildMessageType_None, PBXBuildMessageType_Notice, PBXBuildMessageType_Warning, PBXBuildMessageType_Error,
}
PBXBuildMessageType;
@interface PBXBuildMessage : NSObject {} @end
@class PBXBreakpoint, PBXFileReference, PBXProject, PBXTextBookmark;
@protocol PBXMarkerDelegateProtocol <NSObject>
- (void) setLineNumber:(NSUInteger)newLineNumber;
@end
typedef enum
{
PBXBreakpointIgnoreCountType = 0, PBXBreakpointMultipleCountType
}
PBXBreakpointCountType;
@interface PBXBreakpoint : PBXProjectItem {} @end
@interface PBXFileBreakpoint : PBXBreakpoint <NSCopying, PBXMarkerDelegateProtocol> {} @end
extern NSString *XCBreakpointActionsWereUpdated;
@protocol PBXNodeEditingProtocol
- (BOOL) canRename;
@end
@protocol XCFosterParentHostProtocol
- (void) reloadDataForProxies;
@end
@interface PBXBuildLogItem : NSObject {} @end
@interface PBXBuildLogMessageItem : PBXBuildLogItem {} @end
extern NSString *PBXWindowDidChangeFirstResponderNotification;
@interface PBXModule : NSWindowController {} @end
typedef enum
{
PBXPanelCanChooseFiles, PBXPanelCanChooseFolders, PBXPanelCanChooseBoth, PBXPanelCanChooseOnlyExistingFolders
}
PBXPanelSelection;
@interface XCSelection : NSResponder {} @end
@protocol XCSelectionSource
- (XCSelection *) xcSelection;
@end
typedef enum
{
PBXFindMatchContains, PBXFindMatchStartsWith, PBXFindMatchWholeWords, PBXFindMatchEndsWith
}
PBXFindMatchStyle;
@protocol PBXSelectableText
- (NSString *)selectedString;
@end
@protocol PBXFindableText <PBXSelectableText>
- (BOOL)findText:(NSString *)string ignoreCase:(BOOL)ignoreCase matchStyle:(PBXFindMatchStyle)matchStyle backwards:(BOOL)backwards wrap:(BOOL)wrap;
@end
@class PBXProjectDocument, PBXProject, PBXAttributedStatusView;
@interface PBXProjectModule : PBXModule <PBXFindableText> {} @end
@class PBXExtendedOutlineView, PBXFileReference, PBXGroup, PBXProject, PBXProjectDocument, PBXReference, PBXOutlineDataSourceSplitter, XCSCMInfo;
extern NSString * const PBXGroupTreeMainColumnIdentifier;
@interface PBXGroupTreeModule : PBXProjectModule {} @end
@protocol PBXTableColumnProvider
- (NSArray *) optionalColumnIdentifiers:(NSTableView *)tableView;
@end
extern NSString *PBXSmartGroupTreeModuleColumnsKey;
@interface PBXSmartGroupTreeModule : PBXGroupTreeModule <PBXTableColumnProvider, XCSelectionSource, XCFosterParentHostProtocol> {} @end
@class PBXBookmark, PBXProjectModule, PBXProjectDocument, PBXSmartGroupTreeModule, PBXBreakpoint, XCBreakpointsBucket, PBXFileNavigator;
@interface PBXFosterParent : PBXGroup <XCProxyObjectProtocol, PBXNodeEditingProtocol> {} @end
@class NSString, NSAttributedString, PBXBookmark, PBXFileDocument, PBXSymbol, PBXDocBookmark;
@interface PBXFindResult : NSObject {} @end
@protocol PBXBookmarkSupport
- (PBXBookmark *) bookmark;
@end
@interface PBXReference (BookmarkSupportAPI) <PBXBookmarkSupport> @end
@interface PBXBookmark (BookmarkSupportAPI) <PBXBookmarkSupport> @end
@interface PBXFileReference (BookmarkSupportAPI) <PBXBookmarkSupport> @end
@interface PBXTarget (BookmarkSupportAPI) <PBXBookmarkSupport> @end
@interface PBXLegacyTarget (BookmarkSupportAPI) <PBXBookmarkSupport> @end
@interface PBXExecutable (BookmarkSupportAPI) <PBXBookmarkSupport> @end
@interface PBXFosterParent (BookmarkSupportAPI) <PBXBookmarkSupport> @end
@interface PBXVariantGroup (BookmarkSupportAPI) <PBXBookmarkSupport> @end
@interface PBXFindResult (BookmarkSupportAPI) <PBXBookmarkSupport> @end
@interface PBXBuildMessage (BookmarkSupportAPI) <PBXBookmarkSupport> @end
@interface PBXBuildLogMessageItem (BookmarkSupportAPI) <PBXBookmarkSupport> @end
@interface PBXFileBreakpoint (BookmarkSupportAPI) <PBXBookmarkSupport> @end
extern BOOL PBXShouldIncludeReference(id ref);
@class PBXSmartGroupDataSource, PBXModule, PBXSmartGroupBinding, PBXProjectModule, PBXFosterParent, PBXExtendedOutlineView, PBXOutlineViewCell, PBXProjectWorkspaceModule;
@protocol XCOutlineViewCheckBoxProtocol
- (void) toggleEnabledState;
- (void) storeCheckBoxBounds:(NSRect)bounds;
@end
extern NSControlTint _NSDefaultControlTint(void);
@implementation PBXSmartGroupTreeModule
- (void) dealloc
{
[super dealloc];
}
- (void)outlineView:(NSOutlineView *)outlineView willDisplayCell:(PBXOutlineViewCell *)cell forTableColumn:(NSTableColumn *)tableColumn item:(id)item
{
if ([[tableColumn identifier] isEqualToString: PBXGroupTreeMainColumnIdentifier])
{
if ([item conformsToProtocol:@protocol(XCOutlineViewCheckBoxProtocol)])
{
NSInteger columnIndex = [outlineView columnWithIdentifier:[tableColumn identifier]];
NSInteger row = [outlineView rowForItem:item];
<XCOutlineViewCheckBoxProtocol> xxx;
if (row > -1 && columnIndex > -1)
{
// FIXME: need to associate the correct type with this.
[(<XCOutlineViewCheckBoxProtocol>)item storeCheckBoxBounds:[cell imageRectForBounds:[outlineView frameOfCellAtColumn:columnIndex row:row]]]; // expected-error{{bad receiver type 'int'}}
}
}
}
}
|