Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 465923

Summary: Stand alone editor: consume-ability improvement.
Product: [ECD] Orion Reporter: libing wang <libingw>
Component: EditorAssignee: libing wang <libingw>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: grant_gayed, john.arthorne, mamacdon, Michael_Rennie, Silenio_Quarti, steve_northover
Version: 8.0   
Target Milestone: 9.0   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description libing wang CLA 2015-04-30 07:50:08 EDT
Stand alone editor needs improvements. We've got opinions from people who wanted to consume Orion stand alone editor. Here is a highlight of things we need to improve:

a) folding - it would fold on comments but not on any actual javascript code... not very useful... as noted the issue has now been open almost 2 years...
b) lack of syntax error highlighting (ie show a warning in the margin if a syntax error while editing)
c) lack of runtime error line numbers - if we get an error while executing we just got an error - no line number to flag back (or even better to highlight) to user.
d) no docs on how to add extra language support / themes to the embedded version. (Markdown, Yaml, etc)

Of course there are more. I am using this bug as a tracker for our discussion on how to improve the stand alone editor in general.
Comment 1 libing wang CLA 2015-04-30 08:29:14 EDT
Opinions from node red: https://github.com/node-red/node-red/pull/574
Comment 2 Mark Macdonald CLA 2015-04-30 15:11:46 EDT
Maybe this fits in under (b) or (d), but...

The most frequent request I've seen is for the stand-alone editor to support the same JS validation that the Orion IDE provides.

The stand-alone editor does have support for showing error markers in the ruler and inline annotations, but they are not terribly useful because the consumer is forced to "bring their own" validator.
Comment 3 libing wang CLA 2015-05-05 14:37:08 EDT
(In reply to Mark Macdonald from comment #2)
> Maybe this fits in under (b) or (d), but...
> 
> The most frequent request I've seen is for the stand-alone editor to support
> the same JS validation that the Orion IDE provides.
> 
> The stand-alone editor does have support for showing error markers in the
> ruler and inline annotations, but they are not terribly useful because the
> consumer is forced to "bring their own" validator.

Good point, Mark. I will take that.
Comment 4 John Arthorne CLA 2015-05-06 08:41:22 EDT
See related forum discussion:

https://www.eclipse.org/forums/index.php/m/1694578/#msg_1694578
Comment 5 libing wang CLA 2015-05-07 15:53:37 EDT
Pushed a demo page with all the files that will build the new stand alone editor.
The "demoEmbeddedEditor.html" will demo a complete set of features of the new stand alone editor.
1. JS Validation
2. Content assist
3. Hover services
4.Syntax highlighting
5. Occurences(Currently off in the demo page but will be on in the second round of the demo page)
6. quick fix(Will be in a later round of the demo page, maybe not the second round though)

The widget is not a built version yet but all the related files that are needed in the build script are in.
The javascript tooling plugin is still using Orion bootstrap. I am working on a solution to build that plugin specially. Once that part is done, I will start to work on building all things and zip them together.
Comment 6 libing wang CLA 2015-05-27 11:47:34 EDT
Current progress:
I've got a stand alone demo page consuming the new stand alone editor build.
The stand alone editor build is not in the Orion build yet but will be soon.

I've also managed to run Node Red form their code base and located where the editor code is injected.

TODO:
1. Make better stand alone editor APIs for the case of multiple editor instances
2. Need to add some new APIs in the current Orion editorView to achieve 1.
3. Inject the new editor code in my local Node Red code base.
4. Talk to Node Red for a pull request.
5. Documentations.

1, 2, 3 are doable before June 1st.
4 and 5 may take some time.
Comment 7 libing wang CLA 2015-05-30 23:52:01 EDT
(In reply to libing wang from comment #6)
> Current progress:
> I've got a stand alone demo page consuming the new stand alone editor build.
> The stand alone editor build is not in the Orion build yet but will be soon.
> 
> I've also managed to run Node Red form their code base and located where the
> editor code is injected.
> 
> TODO:
> 1. Make better stand alone editor APIs for the case of multiple editor
> instances
> 2. Need to add some new APIs in the current Orion editorView to achieve 1.
> 3. Inject the new editor code in my local Node Red code base.
> 4. Talk to Node Red for a pull request.
> 5. Documentations.
> 
> 1, 2, 3 are doable before June 1st.
> 4 and 5 may take some time.

1,2,3 are done. I have a patch for NODE RED now with an unofficial editor build.

I will need to officially push all the related builld scripts into orion releng project so that the the editor build can be done in the Orion nightly build.
Comment 8 Steve Northover CLA 2015-06-11 20:20:10 EDT
Can this issue be closed?
Comment 9 libing wang CLA 2015-06-24 14:46:06 EDT
The CodeEdit widget build goes out in 10.0 S1 build. Closing it now.