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.

The suggestions you are making with respect to grouping the source editing features with the editor, and separating it from the rest of orion client is exactly the kind of "refactoring" Boris mentioned in his first reply.

At this point, the code itself is fairly cleanly separated. We have organized the various files so that editor features such as source key bindings, syntax highlighting, and content assist can be added to the basic editor widget without having to buy into other concepts such as the Orion plug-in registry, service model, etc. What we haven't yet done is the renaming that Silenio mentioned [1] as well as organizing the files so that consuming the relevant bits isn't so confusing. I've opened a bug to represent this issue. [2]. Another important piece of this is either removing our dojo dependencies or ensuring there is a built subset of dojo that can be easily consumed [3]. For more background on the evolution of these features, see [4].

susan

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=337741
[2]https://bugs.eclipse.org/bugs/show_bug.cgi?id=347826
[3] https://bugs.eclipse.org/bugs/show_bug.cgi?id=345472
[4] https://bugs.eclipse.org/bugs/show_bug.cgi?id=340926
https://bugs.eclipse.org/bugs/show_bug.cgi?id=337647


Inactive hide details for "Mihai Sucan" ---05/27/2011 09:30:18 AM---Hello Silenio! Thank you for your quick reply, very much ap"Mihai Sucan" ---05/27/2011 09:30:18 AM---Hello Silenio! Thank you for your quick reply, very much appreciated!

From: "Mihai Sucan" <msucan@xxxxxxxxxxx>
To: "Orion developer discussions" <orion-dev@xxxxxxxxxxx>, "Silenio Quarti" <Silenio_Quarti@xxxxxxxxxx>
Date: 05/27/2011 09:30 AM
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

GIF image


Back to the top