Is there a plugin or some other way for XCode 5 to make the symbol navigator more useful, by only showing the current class and making the #pragma marks appear as if we click on the jump bar?
The point of all this would be that we do not have to click the jump bar, the navigator is always displayed as a tab on the right panel.
The default symbol navigator on the left panel is weak in my opinion.
See attached image.
EDIT: I ended up creating the plugin myself. You can download it at: https://github.com/zolomatok/ZMDocItemInspector
If you are interested in writing your own plugins, here's a detailed tutorial helping you out: https://github.com/zolomatok/Creating-an-Xcode-plugin
Not that I know of, but a few techniques that might make your life easier:
Press control+6 to bring up that document items pop up (that list of method names and pragma marks) quickly.
By the way, when that's up, many people don't know that you can just start typing and it will also do a search in that pop up, pruning out items that don't match what you typed.
You might want to consider using the symbol navigator, which you can pull up by pressing command+2 or by tapping the second tab in the navigation panel:
Another great tool is Quick Open (shift+command+O (that's the letter "oh")).
Code folding is also a way to quickly collapse your code so you can quickly navigate to a particular routine. You can press shift+option+command+left arrow to quickly fold all of your code, scroll to what you need, and then unfold (either all or just that routine).
A little more complicated, but you can employ a documentation system. I use appledoc. You can put comments in your code that conform to HeaderDoc or Doxygen formats. So consider the following method declaration:
/** Initialize `Download` operation, downloading from `url`, saving the file to `path`.
*
* The operation starts when this operation is added to an operation queue.
*
* #param url The remote URL of the file being downloaded.
*
* #param path The local filename of the file being downloaded. This should be the full path of the file (both the path and filename) and should be in a directory that the user has permission.
*
* If this `nil`, the filename will be taken from the `lastPathComponent` of the URL, and will be stored in the `Documents` folder.
*
* #return Download operation
*
* #see initWithURL:
*/
- (id)initWithURL:(NSURL *)url path:(NSString *)path;
The structure of this comment is (a) start with /**, not just /*; and (b) specify #param and #return descriptions. When you do this, you can feed your code into one of these documentation engines, and you'll get a nice set of documentation. This includes a class hierarchy, too.
But, while we all know we should document our code, but in Xcode 5, we have a more compelling reason to do so, as our comments are automatically integrated into Xcode's native help system, realtime. By inserting these comments in your code, Xcode 5 now automatically shows you the documentation for your methods in the Quick Help window, just like it does for the Cocoa classes.
In answer to your question of being able to see the whole class hierarchy, using appledoc you can build and install a "docset" that you can show in Xcode's documentation browser (in the Organizer in Xcode 4.x, in the separate Documentation window in Xcode 5) by navigating to your project's folder running the following command in the Terminal command line:
appledoc --project-name MyApp --install-docset --output ../MyAppDocumentation .
In addition to building a docset that you can view in Xcode, these documentation systems let you build documentation that you might share with third parties (if you ever need to do that). Appledoc in particular generates a very Apple-like HTML documentation site. For example, here's the documentation for the above method declaration.
This separate "build a docset from command line" isn't as slick as an "add in" that you're envisaging, but I find that with Xcode 5's built-in parsing of documentation, I've personally integrated the documenting of my code in my development process. (I'm embarrassed to say that it used to be one of those things that I deferred to the end of the development process.)
For more techniques to streamline your interaction with Xcode, see WWDC 2012 video Working Efficiently with Xcode or WWDC 2013 video Xcode Core Concepts.
Related
Background
I am working with VB6 legacy code and I am using an external editor because of the features that it has. Unfortunately, those changes aren't refreshed in the IDE because VB6 doesn't monitor loaded code for changes.
I have done some extensive searching on the subject including looking for alternative editors, a fairly exhaustive internet search including following all of the links on this StackExchange link and haven't found a way to refresh the code window to reflect the external file changes.
My company doesn't have access to the latest edition of Visual Studio and will not be purchasing it anytime in the near future. Until then, there is code to fix.
Question
Aside from restarting the program are there any methods that can be used to refresh the code displayed in the VB6 editing window?
Check out vbAdvance add on. It will prompt you to reload source file in case of external modification.
I think a found one possible solution.
The MZ-Tools set has an function called Reload file from Disk. It also allowed me to create a shortcut for this function through the MZ-Tools options menu, so I assigned it to the shortcut keys of my choosing.
It's a solution, but I'm still looking for anything that might be better.
I am currently watching the video tutorials series by TheNewBoston concerning iPhone development. Unfortunately, he uses Xcode 3 in his tuts so when showing the viewers what exactly should be done to complete certain steps, it is quite difficult to follow along. Here's what I've found that isn't parallel, some of which I am figuring out as I go along, but some is still ambiguous and would be great to be clarified on the site:
Resources is supposed to be the same as 4's 'Supporting Files' folder, however doesn't contain the ViewController files I'm looking for that he demonstrates on. (How do I get to the View display?)
There's no 'tools' top menu bar option
Under this I should be able to find the option item 'Library' which contains 'Attributes' (Where are all of these components located?) - (Actually as I'm going along I'm finding some of these, but for the sake of the site's Q&A style I'll pose the question regardless.)
"Build and Run" button on home toolbar is the same as the "Run" button in 4?
I clicked the Run button and it built, but I have a big white box rectangle after I was told to put the "Bacon" label on the View Controller (which I ended up finding) - what's up with that?
When trying to add an icon to the plist file, the option to do so on the chart is not featured - where is it?
Bucky chooses a View Based Application setting when creating a new project. This is not an option in Xcode 4. What is its closest relative?
What Bucky shows is actually not under the Supporting Files folder, just under the project folder. It will not have the ".xib" ending, but rather a ".storyboard" ending.
True. Sorry.
The Library you are looking for is in the bottom right hand corner of the window. It is one of the tabs that is currently displaying the "File Template Library". Two tabs down is the object library you're looking for.
Yes.
Likely, you were creating display components under the iPhone storyboard, and the option bar just a couple buttons right of the Run button will give you the option to display the iPhone simulator. It is possibly set to the iPad display at the moment.
You must create the property. Click on one of the properties and a (+) sign will display when the item is highlighted. Click it and a new property value will come up to be defined and type in "Icon File." Ergo, you are ready to follow further into the video tut.
Although I am not certain I believe it is known as the "Single View Application" option. It seems to me that they have the same properties.
Something that I have always wanted in TextMate was a different way to open files.
For instance, when I open a file in TextMate, I would love the active tab to default in position 1. Then when I open another tab, that tab should take over position 1, and the rest will shuffle down the list.
Are there any plugins for TextMate that provide this type of functionality?
I don't believe such a plugin exists.
There are two plugins providing supercharged alternatives to the project drawer:
MissingDrawer
ProjectPlus
They don't provide the feature you want but you could try to get in touch with their authors to see if they can add it or point you in the right direction.
The ProjectPlus project has been pretty much dead for years (there are unanswered pull requests from january/february 2011) but there seems to be some action on MissingDrawer.
If you know Objective C you may be able to hack something from their sources.
Whatever the outcome it may work for the "click on a file in the drawer" way of opening a file but not for other ways.
Did you look at TextMate's .plist? I've heard there are some hidden gems there.
I've worked on a few projects now, and I've had to change the framework search paths, set the bundle loader, etc.
But I've never felt totally comfortable with that Project (or Target) "Get Info" window. I still don't know what half the stuff in there is, and whenever I change anything, there's always a bit of finger-crossing when I click Build. Building and linking all feels a little "magical" to me right now.
I assume this feeling isn't normal. Does anyone know of any good tutorials for these non-code-related parts of building an app?
When you select a build setting, Xcode 4 will show a short description in its Quick Help, which is in one of the Inspectors you can show on the right side of the window.
In Xcode 3, the description will appear at the bottom of the Info window that tells you what the setting does. In even older versions, click on the stack of books with the pair of spectacles on top.
If you're still stumped and the setting in question corresponds to a GCC option, you can look it up in the GCC manual. If it doesn't correspond to a GCC option, Google it.
All (as far as I can tell) of the build settings are documented in the Xcode Build Setting Reference, although some of these are more useful as output (e.g., environment to a shell script phase) than as input (actual settings). Indeed, a few of them, such as ACTION, only appear as output; you can't set them in the Info window, and wouldn't want to.
Xcode 3.2 has implemented cursor-level history for the "Go Forward", "Go Backward" commands. Previously these worked at the file level, so you could navigate back and forth through recent files you've been editing. Now they navigate at a more fine-grained level, through the places within files where you have been editing.
The downside to this is if you navigate backwards through the files and make a minor edit, all of your forward history is wiped out, whereas in the past it used to be easy to return to the file you were working on. It also means issuing a lot more commands if you just want to move through files, since you have to skip through all the edit points within each file.
I can't find anything in the release notes or documentation about this new behavior, so does anyone know if it's possible to get the old 'go back/forward by file' commands in 3.2? If not, does anyone have any tips on other ways of easily navigating recent files in Xcode?
Hold down the option key while you click the forward/backward arrows at the top of the code view, this will use the Xcode 3.0 behavior and go back a file at a time.
I had the same question as well and and Rob's answer on holding Option while clicking the forward/backward arrows works well.
I needed a keyboard shortcut though and I've found that Shift-Option-Cmd-left/right works.
From the comments on this blog entry:
Hold down the Option key to get the old file-based Go Forward/Go Back behavior. We rarely change established behavior like this when adding new options, but in this case, the majority of users considered file-level navigation Broken and location-based navigation Correct, based on their experience in browsers and other IDEs. We chose to give what more people considered the “obvious” behavior the pride of place on the keyboard shortcut, but the old way is still there.
-- Chris Espinosa
But like you guys have said, after every keyboard edit, the forward file history is lost. This is incredibly frustrating to me, as this is a feature I have heavily relied on for years, which is now broken. Is there still no fix?
There are Next File and Previous File commands, however their history is also wiped out after an edit. That seems like a bug to me.
This is plain stupid! What's the reason for suddenly change this ? Shift-Option-Cmd-left/right... great, more stupid shortcuts from Apple. I guess I soon have to use Shift-Option-Cmd-Left-Alt-Enter-N for something I use all the time. Can't they just implement a recent file list on ctrl-tab or something, like the Cmd-tab and the app switcher. Why would I want to grab for the mouse when I'm coding ? Still I have to use it lots in Xcode.
Sorry for my rant :)