Archive for the ‘autocompletion’ tag
How to fix Eclipse colors for autocompletion and tooltips
Sadly Eclipse ships with a broken color theme when it comes to autocompletion and tooltips. I cannot tell if the problem is limited to Ubuntu Precise, however, it is worth getting fixed immediately. The following screenshots illustrate the broken color settings in both situations. The tooltip window shows up with a black background color and blue links.
When autocompletion popup appears the first suggestions is not readable at all.
So, here is what you need to do to fix the colors. Read the rest of this entry »
Custom NSLog for Xcode 4
This post describes how you can to setup a custom NSLog snippet in Xcode 4. By default, this custom NSLog prints the class and method name of the position it is inserted.
Please follow these steps to add the code snippet to the scripts in Xcode 4.
- Copy and paste the following code into your editor. Anywhere.
NSLog(@"%@ %@", self.className, NSStringFromSelector(_cmd)); /* DEBUG LOG */
- Open up the code snippets library which sits in the utility pane on the right side. Look for the curly braces {}.
- Highlight the above mentioned code – click and hold the mouse over the text (for a short while) – drag them into the code snippet library.
- Afterwards you can edit the snippet and add a title, summary and a completion shortcut. I used the following settings:
Title: Custom NSLog (Class & method name) Summary: NSLog prints the class and method name Platform: All Language: Objective-C Completion Shortcut: NSLog Completion Scopes: All
You are welcome to comment and post your custom code snippets!
This article is inspired by the post “Easy Doxygen code snippets for Xcode 4” by Chris Powell.