Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Orion » How to write a command that provisions a file into the user's directory?
How to write a command that provisions a file into the user's directory? [message #968813] Fri, 02 November 2012 19:29 Go to next message
Rafael Chaves is currently offline Rafael Chaves
Messages: 161
Registered: July 2009
Senior Member
I would like my plugin to contribute a navigator command that will add a file to the selected directory. Is that currently possible (from a plugin)?

Concrete case: in Cloudfier, a project has a related database. I want to allow the user to capture the current database's state as a JSON file in their project directory.

My workaround for now requires the user to create an empty file, open it in the text editor, and trigger a editor command that will insert the database contents into the text editor buffer, which the user can then save.
Re: How to write a command that provisions a file into the user's directory? [message #968854 is a reply to message #968813] Fri, 02 November 2012 20:17 Go to previous messageGo to next message
Rafael Chaves is currently offline Rafael Chaves
Messages: 161
Registered: July 2009
Senior Member
The orion.navigate.content service feels a bit like what I need:

http://wiki.eclipse.org/Orion/Documentation/Developer_Guide/Plugging_into_the_navigator#orion.navigate.content

However, it is meant to "create new top level folders with autogenerated content" (like the "Clone git Repository" and "SFTP Import" commands), and all I want is to create a new file (on the selected directory), and need a way of streaming the contents of the file so Orion can actually create the file (or a handle to the flie client API).

[Updated on: Fri, 02 November 2012 20:19]

Report message to a moderator

Re: How to write a command that provisions a file into the user's directory? [message #978048 is a reply to message #968813] Fri, 09 November 2012 20:13 Go to previous message
John Arthorne is currently offline John Arthorne
Messages: 174
Registered: July 2009
Senior Member
For reference, this conversation moved into a bug report:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=393986
Previous Topic:Async highlighter
Next Topic:Security Handshake
Goto Forum:
  


Current Time: Sun Sep 21 16:07:27 GMT 2014

Powered by FUDForum. Page generated in 0.01668 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software