Tracker: Patches

5 Pass file to open in explorer config - ID: 3423202
Last Update: Comment added ( rob-gordon )

I couldn't work out a way to set up a shortcut to Oddjob that would open a file in the explorer. I have an RMI server running, and want to provide a shortcut that opens specific Oddjob config file that runs the RMI client. The best I can do normally is start the explorer and hope my RMI client oddjob is in the recently used file list.

Looking into what happens when the explorer runs normally, there's the default oddjob.xml in the distribution directory, which sets up a file persister and then calls explorer.xml to actually open the file.

The attached patch adds a "file" attribute to the MultiExplorerLauncher, that it passed through to the OddjobExplorer instances it creates. This in turn is consulted when there is no oddjob already configured on the explorer and triggers the equivalent of opening the file via the menu.

So now to set up a shortcut that loads a specific oddjob.xml (mine is called monitor.xml), I copy the default oddjob.xml and explorer.xml into a directory, then add file="${this.dir}/monitor.xml" to the explorer element in explorer.xml.

I can launch it with java -jar "%ODDJOB_DIR%\run-oddjob.jar" -f "%MONITOR_DIR%\oddjob.xml"


William Rose ( williamdrose ) - 2011-10-13 14:09:39 PDT

5

Closed

Accepted

Nobody/Anonymous

None

None

Public


Comment ( 1 )

Date: 2011-10-14 09:16:15 PDT
Sender: rob-gordonProject Admin

Thanks. A useful enhancement. I've also changed the default oddjob.xml so
that any extra argument is passed to explorer as a file name - so you don't
need a special monitor.xml.


Attached File ( 1 )

Filename Description Download
explorer-file.patch Add file attribute to explorer Download

Changes ( 5 )

Field Old Value Date By
status_id Open 2011-10-14 09:16:15 PDT rob-gordon
resolution_id None 2011-10-14 09:16:15 PDT rob-gordon
allow_comments 1 2011-10-14 09:16:15 PDT rob-gordon
close_date - 2011-10-14 09:16:15 PDT rob-gordon
File Added 425997: explorer-file.patch 2011-10-13 14:09:40 PDT williamdrose