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,


To run the tests

- Download JsTestDriver.jar from http://code.google.com/p/js-test-driver/

- Run the Orion server on the localhost port 8080
(You can skip this step by changing the jsTestDriver.conf file, replacing "http://localhost:8080/editor/" by, for example, "http://orionhub.org/editor/")

-From the command line execute:
java -jar JsTestDriver-1.3.2.jar --port 42442 --reset --browser "/path/to/bin/firefox" --config "/path/to/your/repo/org.eclipse.orion.client/bundles/org.eclipse.orion.client.editor/jsTestDriver.conf" --tests all

Let me know if you that works for you.

I agree with your ideas for renaming and moving files around. I will talk to the owners of the other components and see what they think.
See https://bugs.eclipse.org/bugs/show_bug.cgi?id=347826 and https://bugs.eclipse.org/bugs/show_bug.cgi?id=337741
Here are some of the changes I was thinking:
eclipse.Editor -> orion.TextView  
eclipse.Model  -> orion.TextModel
eclipse.LineNumberRuler -> orion.LineNumberRuler
orion.EditorContainer -> orion.Editor
and so on
(we have not decided yet, but maybe we will use orion.editor.name instead of just orion.name to avoid conflict in the URI namespace).

Note that we are also moving to requireJS so the namespace and the URI namespace will change to match, for example /editor/samples/undoStack.js will change to /orion/UndoStack.js.
(For the editor component, we will code it so that it works with and without requireJS)

Regards,
Felipe




From: "Mihai Sucan" <msucan@xxxxxxxxxxx>
To: "Orion developer discussions" <orion-dev@xxxxxxxxxxx>, Silenio Quarti/Ottawa/IBM@IBMCA
Date: 05/27/2011 12:30 PM
Subject: Re: [orion-dev] Orion editor development and integration
Sent by: orion-dev-bounces@xxxxxxxxxxx





Hello Silenio!

Thank you for your quick reply, very much appreciated!


Le Fri, 27 May 2011 18:36:53 +0300, Silenio Quarti  
<Silenio_Quarti@xxxxxxxxxx> a écrit:

>> 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.

No problem. I asked about tests because we need to make sure we do not  
break things when we provide you with patches, pull requests.

Given there are no such tests yet, that's not a problem.


> 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.

Sure, please do. I have a machine running Ubuntu 10.04. I would appreciate  
a Bash/Perl/whatever script that runs on Linux.


>> 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

Great to see that. We should definitely have a clear situation on the  
syntax highlighter stuff.


>> - 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.

That would be really appreciated.

>> - 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

Great!


>> - 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).

There's a good point about the confusion. :)

Thanks for your explanation. That makes things clearer.

Why not move code from orion.client.core into orion.client.editor? All the  
features that belong to the editor component should be in  
orion.client.editor such that developers who want to take the editor from  
Orion, go directly to orion.client.editor and find all the syntax  
highlighters, rulers, undoStack, and features.

It would make sense for the Orion IDE client (orion.client.core) to  
include only scripts that augment/extend the orion.client.editor features  
in such a manner that they properly integrate into the Orion IDE - things  
like default key bindings, new commands (diff, git), toolbars, and so on.  
The basic stuff, the syntax highlighters, key binding API, some commands,  
undoStack, rulers ... pretty much all "belong" to the base editor.

The orion.client.editor folder could have, say editorWidget.js (which is  
currently editor.js), and the editorContainer.js (and the other scripts)  
from the core. Having only the editor widget alone does not make sense as  
the only reusable component. The widget *and* the editor features are what  
developers want to reuse.

(I am only expressing my ideas here, they do not necessarily fit into the  
whole project perspective. I am opening this discussion so I better  
understand where things are going.)

Why I suggested this is because currently we are going to cherry-pick  
editor files from multiple codebase locations. Some of these scripts (in  
orion.client.core) will become dependent on the Orion IDE stuff, and they  
may no longer work independently in the future (please correct me if I am  
wrong). Having these features better grouped would help in deciding what  
to pick.

Thanks a lot for your answers!


Best regards,
Mihai



--
Mihai Sucan
http://www.robodesign.ro
_______________________________________________
orion-dev mailing list
orion-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/orion-dev



Back to the top