Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [orion-dev] Orion editor development and integration


Hi Mihai,


>
> Hello Boris!
>
> Thank you for your quick reply!
>
>
> >> - Still, that seems to entail making changes that fit our needs without
> >> any regression testing. The orion.editor folder includes the js-tests
> >> folder which holds two _javascript_-based tests. Where is the  
> >> documentation
> >> on running these tests?
> >
> > I don't know off the top of my head (and am travelling this week). I hope
> > that someone else from the Orion team can answer this.
>
> After further investigation it looks like the js-tests folder holds one  
> performance test and a test model. We can run the perf test from the  
> sample page. Does this mean that the editor does not have unit tests yet,  
> for testing regressions? Is the performance test only for sample purposes?  
> Does the Orion client project have unit tests that exercise the editor API?



Sorry, we still do not have unit tests to exercise the editor API. The performance
and model API tests are not samples. They run as part of the orion build.  The performance
tests also run from the sample page to make it easier for anyone to try them out.

All tests are run in the orion build using JSTestDriver. We can send you a batch file to run
them locally if you would like.


>
> Additional concerns from looking into the sample source code:
>
> - There is a script samples/styler.js that holds rules for highlighting  
> Java, _javascript_ and CSS. These do not seem to be part of the Orion editor  
> component - the code is just a sample?
>
> - What are the plans for syntax highlighters?



styler.js is a sample implementation of a syntax highlighter. It is used by the Orion client
currently but the plan is to replace it with a more extensible/flexible implementation.

See https://bugs.eclipse.org/bugs/show_bug.cgi?id=341938


>
> - Similarly, I would like to know the plans about samples/rulers.js and  
> undoStack.js.


These two started as sample implementations as well, but we realize they are
useful as is. They could become API.


 
> I am interested to know about these scripts because I am looking into  
> picking which scripts I need for our devtools. These seem to be basic  
> features that we would like to be part of the editor component (either in  
> editor.js or in separate files that we can bundle). Given they are inside  
> the samples folder, does it mean we cannot rely on them?
>
> Having also looked into orion.client.core I have questions about:
>
> - What are the orion.client.core/static/examples/ pages? Are these just  
> different samples on how to use the editor?



Yes. They show how to use the orion code editor without the Orion Client.


>
> - What is the relation between orion.client.core/static/js/styler/ scripts  
> (textMateStyler.js and htmlSyntaxHighlight.js) and  
> orion.client.editor/web/samples/styler.js? We will need _javascript_, CSS,  
> HTML and perhaps more highlighters.



See https://bugs.eclipse.org/bugs/show_bug.cgi?id=341938


>
> - I see in orion.client.core/static/js a few scripts that seem to be part  
> of (or additions to) the editor component: editorCommands.js,  
> editorFeatures.js, editorContainer.js, search*.js, selection.js,  
> syntaxchecker.js and jslint*.js. Are these script that might be of  
> potential interest for us? Or they are script that are only useful in the  
> context of the Orion client IDE?
>
> If some of the scripts in orion.client.core are relevant to the editor  
> component, as a standalone component, we would like them to be bundled as  
> such - we would like the core editor to be available for packaging and  
> re-use with all of the highlighters and features (line numbers, undo  
> stack, and so on). For our purposes we would select the relevant  
> highlighters and features, but having them in a single place makes things  
> much more straightforward.
>
>


The files in org.eclipse.orion.client.editor are the implementation of a rich text widget along with samples and tests.
These can be used independently from the Orion client (see http://orionhub.eclipse.org/editor/samples/demo.html).

The files in org.eclipse.orion.client.core use the rich text widget to implement the code editor for the Orion client (editorContainer.js) adding functions like common key bindings for coding, syntax highlighting, etc in a pluggable way.

Note that we are planning to rename some of these files to make this distinction clear (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=337741).

Silenio/Felipe

Back to the top