|
Re: Running code from embedded orion editor [message #1687390 is a reply to message #1684524] |
Thu, 19 March 2015 16:33   |
Eclipse User |
|
|
|
There's no examples dealing specifically with running code. What kind of code did you have in mind, and where do you want to run it?
If you are trying to create an Orion editor to allow the user to edit code: first call the edit constructor provided by the built-editor module. It returns an editor object.
Use editor.getText() to get the contents of the text editor. The text can then be sent to a remote service for execution, or if it is JavaScript code, you could run it directly in the browser using eval().
|
|
|
Re: Running code from embedded orion editor [message #1708717 is a reply to message #1687390] |
Sat, 19 September 2015 09:36  |
Eclipse User |
|
|
|
I have the same issue.
If I using the example (https://wiki.eclipse.org/Orion/Documentation/Developer_Guide/Long_running_operations_in_services_and_plugins) I can get it to work. But I cannot give a status using the service "orion.page.message".
So I am able to execute a command from a servlet running under Orion using a specific file a s input. But I am not able to set a progress bar (or similar). Nor can I update the folder view with the generated files.
What I would really like to is:
Start a command on a file, and show progress somewhere based on the Orion API (not my own display box).
The command use the input file as input and generate some files as output.
If successful completion of the job update folder view with the generated files (Now I have to do "a manuel refresh").
If errors start a new editor below the main editor and show the log file in here.
Any ideas how to achieve that?
|
|
|
Powered by
FUDForum. Page generated in 0.04902 seconds