Removed the ability to specify wether documents should open in current window or a new window — all documents opened via this API will go through the same algorithm to find where the documents should end up (more choice is just adding confusion and complexity).
It didn’t really make sense as an instance method since it iterate all instances, and we also want to execute code incase of no instances (save that fact as session data).
Since everything about session is now contained in the DocumentController class there is no need for invoking this from elsewhere and thus no need for the previous indirection.
Previously we would let NSURL parse the parameter and ask for the path component. This however does not support tilde as shorthand for the user’s home directory, and certainly not with TextMate 1.x’s questionable syntax (using ‘file://~/«file»’ instead of ‘file://localhost/~/«file»’ or possibly ‘file:///~/«file»’ although this one seems a little wrong).
As for percent escapes, the issue here is that if the URL parameter escapes slashes or colons, not decoding the URL parameter before creating an NSURL instance will fail (as the URL is malformed). If however we do decode percent escapes and the URL parameter contains spaces, then NSURL will also fail, as a URL with spaces is malformed.
So I ended up bypassing NSURL and check for a few variants of a ‘file://’ prefix (which is also what TextMate 1.x did).
This closes issue #602.
This is only if the project directory is actually set at the time the default properties are expanded, so presently this has no effect (but will when TextMate sets a default value for the projectDirectory variable).
This can be used to link to the “current document” even if that document has no path. Previously this was done by leaving out the ‘url’ parameter, which made it target the frontmost document — using ‘uuid’ is a more robust way to achieve the same.
A command can read the TM_DOCUMENT_UUID environment variable for the current document’s identifier.
We regularly iterate through all open windows and test if these are document controller windows. It will be easier to let the document controller class (or application delegate) manage a list of open document windows, as we anyway need some sort of owner with ARC (currently the instances own themselves and give up ownership in windowWillClose: which cause them to be released).
We now remember values like file browser history even if the file browser is not shown while saving session state (but has previously been, or state was provided during setup). We also use the file browser and HTML output sizes stored in the session info (previously we only used values from NSUserDefaults).
The menu item within is not hooked up to anything (as mentioned in issue #650) and as my idea for finishing the indent settings UI does not involve this menu item, I am removing it to avoid further confusion.
This key was previously assigned to File → Page Setup but as we currently don’t support that, and it is likely not going to see that big a use (when implemented) I think we can live without a key equivalent for that menu action.
Closes issue #525.
If user opens the dialog on one space, moves to another space (with a TextMate window) and then re-activate the (already open) dialog, it would previously switch back to the space containing the dialog, whereas with the changed setting, it now moves the dialog to the active space.
This should address issue #599.
If the plug-in doesn’t set TMPlugInAPIVersion to 2 (in its Info.plist) a dialog will show, telling the user that the plug-in is not compatible with the current version of TextMate (which is most likely correct).
You can hold down option (⌥) to open the plug-in as a regular folder.
Addresses issue #392.
We no longer require that the bundle identifier starts with ‘com.macromates’ instead the plug-in MUST set the TMPlugInAPIVersion key (in its Info.plist) to ‘2’ (the current API version).
We now explicitly disable it for targets that hasn’t yet been upgraded to ARC. This way, it’s easier to get an overview of which targets hasn’t yet been upgraded and ensures new targets has ARC enabled.
The help indexer requires the pages to be valid XML and (silently) fails to generate the proper index (with anchors) when they are not.
This fixes issue #548.
There is currently no way to add a TextMate (1.x) license to the key chain, but those who used TextMate r9147 or earlier should have one stored already.
We have to go via OakSubmenuController because the menu item may not exist. The reason for this is related to not having old menu items exist after a delegate has disappeared, though it might be possible to improve.