Commits

Ivan Vučica committed 2ad7be6

Coloring objc class references into red.

Comments (0)

Files changed (1)

Editor Teksta/IVSourceCodeDocument.m

     NSString * string = [[[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding] autorelease];
     NSFont * font = [NSFont fontWithName:@"Menlo" size:12.0];
     NSDictionary * attributes = [[[NSDictionary alloc] initWithObjectsAndKeys:font, NSFontAttributeName, nil] autorelease];
+    
     self.content = [[[NSMutableAttributedString alloc] initWithString:string
                                                            attributes:attributes] autorelease];
     
         case CXCursor_UnexposedExpr:
             result = CXChildVisit_Continue;
             break;
+        case CXCursor_ObjCClassRef:
+            c = [NSColor redColor];
+            break;
         default:
             NSLog(@"!!!!!! %d", cursorKind);
             
     }
+
     
     //NSDictionary * colorAttribute = [NSDictionary dictionaryWithObjectsAndKeys:c, NSForegroundColorAttributeName, nil];
     
         }
     }
     
-    return CXChildVisit_Recurse;
+    return CXChildVisit_Recurse; // TODO: return result
 }
 -(IBAction)recolorize:(id)sender
 {