Warning, /frameworks/syntax-highlighting/autotests/folding/highlight_objectivec.m.fold is written in an unsupported language. File is not indexed.

0001 #import <Fondation/Fondation.h>
0002 
0003 // Simple class
0004 @interface MyClass : Object <beginfold id='1'>{</beginfold id='1'>
0005     // instance variables
0006     int myVariable
0007 <endfold id='1'>}</endfold id='1'>
0008 // Class methods
0009 + myClassMethod;
0010 + (int)myClassMethod2;
0011 + (int)myClassMethod3:(NSString *)parameter;
0012 
0013 // Instance methods
0014 - (int)myInstanceMethod:(NSString *)text;
0015 - (NSString *)myInstanceMethod2:(int)parameter
0016                               withText:(NSString *)text;
0017 @end
0018 
0019 @implementation MyClass
0020 + (int)classMethod <beginfold id='1'>{</beginfold id='1'>
0021   return [self myVariable];
0022 <endfold id='1'>}</endfold id='1'>
0023 - (NSString *)instanceMethod <beginfold id='1'>{</beginfold id='1'>
0024     NSString *string = [[NSString alloc]initWithUTF8String:"Good string ©"];
0025     NSLog(@"String:%@",string);
0026     return string;
0027 <endfold id='1'>}</endfold id='1'>
0028 @end
0029 
0030 
0031 // Protocol
0032 @protocol MyKeyProtocol
0033 - (void)lock;
0034 - (void)unlock;
0035 @end
0036 
0037 // Class that implements a protocol
0038 @interface MyClass2 : Object <MyKeyProtocol> <beginfold id='1'>{</beginfold id='1'>
0039 
0040 <endfold id='1'>}</endfold id='1'>
0041 // Protocol methods
0042 - (void)lock;
0043 - (void)unlock;
0044 @end