Warning, /frameworks/syntax-highlighting/autotests/input/highlight_objectivec.m is written in an unsupported language. File is not indexed.
0001 #import <Fondation/Fondation.h> 0002 0003 // Simple class 0004 @interface MyClass : Object { 0005 // instance variables 0006 int myVariable 0007 } 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 { 0021 return [self myVariable]; 0022 } 0023 - (NSString *)instanceMethod { 0024 NSString *string = [[NSString alloc]initWithUTF8String:"Good string ©"]; 0025 NSLog(@"String:%@",string); 0026 return string; 0027 } 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> { 0039 0040 } 0041 // Protocol methods 0042 - (void)lock; 0043 - (void)unlock; 0044 @end