Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

…tters.

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...
commit fe932439436c4d89afdda77673ff0aa57ef9dad2 1 parent 0483106
Andrei Afitsinski andreiaf authored
Showing with 7 additions and 4 deletions.
  1. +7 −4 Generating/GBDocSetOutputGenerator.m
11 Generating/GBDocSetOutputGenerator.m
View
@@ -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
+
@end
#pragma mark -
@@ -230,6 +232,8 @@ - (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.
@@ -237,8 +241,7 @@ - (BOOL)processTokensXmlForObjects:(NSArray *)objects type:(NSString *)type temp
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 {
Please sign in to comment.
Something went wrong with that request. Please try again.