Browse files

some clean-up for quick help (ALT+click) bubble fix in methods and se…


If @property is used with setter= xxx and the setter's method is explicitly presented in @implementation section, quick help will link back to @property correctly.
But If @property is used with getter= xxx and the getter's method is explicitely presented in @implementation, the quick help on getter will not show @proprety's comments. A substantial modification of code is required to accommodate this functionality for custom getters. May fix it a bit later...
  • Loading branch information...
andreiaf committed Feb 14, 2013
1 parent 0483106 commit fe932439436c4d89afdda77673ff0aa57ef9dad2
Showing with 7 additions and 4 deletions.
  1. +7 −4 Generating/GBDocSetOutputGenerator.m
@@ -36,6 +36,8 @@ - (NSString *)tokenIdentifierForObject:(GBModelBase *)object;
@property (retain) NSArray *protocols;
@property (readonly) NSMutableSet *temporaryFiles;
+@property (retain) id sectionID; //tmp for class's refid
#pragma mark -
@@ -230,15 +232,16 @@ - (BOOL)processTokensXmlForObjects:(NSArray *)objects type:(NSString *)type temp
// Prepare template variables for object. Note that we reuse the ID assigned while creating the data for Nodes.xml.
NSMutableDictionary *objectData = [NSMutableDictionary dictionaryWithCapacity:2];
[objectData setObject:[simplifiedObjectData objectForKey:@"id"] forKey:@"refid"];
+ // save refid
+ _sectionID = [objectData objectForKey:@"refid"];
[self addTokensXmlModelObjectDataForObject:topLevelObject toData:objectData];
// Prepare the list of all members.
NSMutableArray *membersData = [NSMutableArray arrayWithCapacity:[methodsProvider.methods count]];
for (GBMethodData *method in methodsProvider.methods) {
NSMutableDictionary *data = [NSMutableDictionary dictionaryWithCapacity:4];
[data setObject:[self.settings htmlReferenceNameForObject:method] forKey:@"anchor"];
- [data setObject:[simplifiedObjectData objectForKey:@"id"] forKey:@"refid"];
- [self addTokensXmlModelObjectDataForObject:method toData:data];
+ [self addTokensXmlModelObjectDataForObject:method toData:data];
[self addTokensXmlModelObjectDataForPropertySetterAndGetter:method withData:data toArray:membersData];
[membersData addObject:data];
@@ -290,6 +293,7 @@ - (void)addTokensXmlModelObjectDataForObject:(GBModelBase *)object toData:(NSMut
if ([object isKindOfClass:[GBMethodData class]]) {
GBMethodData *method = (GBMethodData *)object;
[data setObject:method.formattedComponents forKey:@"formattedComponents"];
+ [data setObject:_sectionID forKey:@"refid"];
if (method.comment) {
if (method.comment.hasMethodParameters) {
NSMutableArray *arguments = [NSMutableArray arrayWithCapacity:[method.comment.methodParameters count]];
@@ -339,8 +343,7 @@ - (void)addTokensXmlModelObjectDataForPropertySetterAndGetter:(GBModelBase *)met
[setterData setObject:[self.settings htmlReferenceNameForObject:property] forKey:@"anchor"];
[self addTokensXmlModelObjectDataForObject:setterMethod toData:setterData];
[setterData setObject:[data objectForKey:@"formattedComponents"] forKey:@"formattedComponents"];
- [setterData setObject:[data objectForKey:@"refid"] forKey:@"refid"];
- [members addObject:setterData];
+ [members addObject:setterData];
- (NSString *)tokenIdentifierForObject:(GBModelBase *)object {

0 comments on commit fe93243

Please sign in to comment.