Xcode 5 Custom Assistant Editor - xcode

I am trying to figure out how to create a custom assistant editor plugin for Xcode.
My eventual goal is to be able to display Lua (well, a variant of Lua really) byte code line-by-line with the original source code.
Of course where the byte code has more lines to display I would like the main editor window to space out the source code while the assistant is open to keep the lines matched up (like how the diff viewer works).
I have found a bunch of plugins for Xcode 4, and some updated for 5, but none of them do anything with the assistant editors.
Does anyone know of any resources I could use towards the end of creating this type of plugin? Thanks!

Related

How to show the cursor's current line & column position in Xcode?

How do you view the cursor's current line and column position in Xcode? This is irrespective of showing the Line Numbers on the active sheet's left side, how can you show 'Line, Column', or look it up.
Here is an example from Eclipse -
Too my knowledge, showing column number has been removed from new versions of Xcode. You can see line number and set column guide in text editor setting though.
If you are coding in c/c++ I strongly suggest switching to QtCreator or Clion. I personally prefer QtCreator since 1) it has a fakeVim key binding and 2) it is better at loading symbols and giving autocomplete suggestion.
Try this Xcode plugin: Backlight for Xcode
You can use Alcatraz to easily install this plugin, another way of installing it is to:
Download source
Build code
Restart Xcode
(Check Github page on how to further configure the plugin)

The Scite open filter is not working properly, how do I get the open dialog drop down menu showing filters?

In Scite text editor there is a global properties file shipped with the editor. I downloaded Scite latest version from the website but when I open the open dialog in scite, not all the filters show up in the drop down menu. For example, verilog, TeX, and many more filters do not show up, even though they are enabled in the sciteglobal.properties file under open.filter
Is this a bug in scite or am I missing something?
For example some filters that do work are perl, lua, ada - but tex, verilog, pascal, and more do not show up in the drop down. They are not commented out in the global properties file.
A temporary work around is to move them around to different spots in the global properties file. for example if I move them to non alphabetical order and put them at the very top, they seem to be enabled.
I know the ALL SOURCE files filter is limited to 256 characters or something similar, but the individual filters should not be limited in the drop down menu and they should not be missing.. right?
I compiled scite from the source code myself, and it has the same problem. Or is there something as designed that I am missing and this is not a bug?
Found a solution to my own question...
The default sciteglobal.properties file that ships with scite is incorrect. It is parsed wrong due to the commenting out of items such as modula open filter. Remove all pound signs in the open filters so nothing is commented out in the open filter list, and this fixes the problem.
Instead of commenting out the items in open.filter list, use imports.exclude to remove an item from being seen.

Detect file changes outside the Visual Basic 6 IDE?

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.

XCode: Better symbol navigator for current class

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.

How to triple-slash selected text in Visual Studio 2010

In Visual Studio 2010 we can Comment selected text via Ctrl+E,C - This prefixes selected lines with the double-slash.
Is there a way to select text and have VS2010 prefix the selected lines with a triple-slash?
For the curious; I am adding XML comments to my c# code. Specifically, I am adding example code within the <example><code></code></example> section of my comments. I'm am building the sample code in a throw-away console app (just to make sure I'm creating code that works). When satisfied with the sample code, I copy/paste it into my app that I'm adding XML Comments to. When I paste the sample code, I have to manually add all the triple-slashes. I'm getting kinda bored doing this, so I'm hoping there is a way I can have VS2010 do this for me.
There is no built-in command to do that, AFAIK.
However, you can do it using VS's built-in advanced text-editing features.
Hold down Alt, select a zero-width column of text at the beginning of the lines, then type ///. This will type into all of the lines simultaneously.
You can select that with the keyboard by pressing Home (as applicable), then repeatedly pressing Alt+Shift+↓.

Resources