Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Orion (Archived) » Running code from embedded orion editor(Running code from embedded orion editor)
Running code from embedded orion editor [message #1684524] Wed, 18 March 2015 13:11 Go to next message
ils weeFriend
Messages: 1
Registered: March 2015
Junior Member
Hi,

Are there ready templates/examples or instructions how to embed orion editor and have some button that allows running code?

Thanks
Re: Running code from embedded orion editor [message #1687390 is a reply to message #1684524] Thu, 19 March 2015 16:33 Go to previous messageGo to next message
Mark Macdonald is currently offline Mark MacdonaldFriend
Messages: 35
Registered: July 2009
Member
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 Go to previous message
Torben Froberg is currently offline Torben FrobergFriend
Messages: 1
Registered: September 2015
Junior Member
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?

Previous Topic:Tenant propagation in Orion
Next Topic:How to host orion instance in a web container
Goto Forum:
  


Current Time: Thu Apr 18 10:11:13 GMT 2024

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

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

Back to the top