Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [orion-dev] Orion editor with server-side parser ?

Hi Mark,

Thanks for the prompt response.

Indeed, we also have problems with our current approach, especially for "large" (actually pretty small) files. Writing a robust editor with good UX ain't easy, I reckon. That's why we're investigating for a better foundation to build upon.

Good news for content assist / problem markers. If it's designed async, then, we should be able to plug into this.

Unfortunately, we cannot use a client-side tooling for syntax highlighting. Our stuff is actually more complex than a regular LALR grammar, we use a dedicated parser especially because of this. We may be able to extract parts of our "grammar" as keywords or stuff like this, but we definitely need our full-blown parser if we want to be feature-equivalent in terms of highlight.

Did your async experiments behave badly also for relatively small files ? We usually do not need to edit very large files with our language(s).

Cheers

Rémi


From: Mark Macdonald <mamacdon@xxxxxxxxx>
To: Orion developer discussions <orion-dev@xxxxxxxxxxx>
Date: 19/01/2015 17:58
Subject: Re: [orion-dev] Orion editor with server-side parser ?
Sent by: orion-dev-bounces@xxxxxxxxxxx





Hi Rémi,

Error markers and completion proposals are provided by implementing an Orion service. Services are inherently asynchronous, so yes -- you can keep the "real" work on your remote server, and just call it from the client.

Syntax highlighting is another matter. We experimented with asynchronous highlighting in the past: a service could asynchronously feed highlighting info into the editor, based on text changes. This allowed you to use arbitrary parsing logic, but the user experience was poor.

Instead, I would recommend trying the current
declarative grammar-based approach. It allows the editor to update the syntax highlighting in realtime with no delay. While the grammar is more restrictive than a full-blown parser, we've found that a reasonable subset of most languages can be parsed using regexps and simple begin..end nesting blocks.

Regards,
Mark



On Mon, Jan 19, 2015 at 8:45 AM, Remi Vankeisbelck <VANKEISB@xxxxxxxxxx> wrote:
Hi,

We'd like to use Orion in order to support a custom language of ours. We already have a parser, completion engine etc. for this language. In fact, we even already have a JS editor, but it's based on content-editable div and has limitations. Therefore, we are looking at alternative "web-based text editors" that we could plug our services into, and let it handle all the dirty GUI business... Orion looks quite nice, and we're IBM as well, so we'd like to try it first.


Our "problem" is that our parser etc is written in Java, and runs in a server back-end. We have a protocol that allows our client-side editor to interact with the server : basically parse the text and send back highlighting infos, error markers, or completion proposals.


Does Orion support this kind of async, server-managed custom languages ?


I've googled a bit and seen in the doc that a grammar can be passed, or that the proposals could be customized. Can all this be done asynchronously, by communicating with a server ?


Thanks for any info.


Cheers


Rémi
Sauf indication contraire ci-dessus:/ Unless stated otherwise above:
Compagnie IBM France
Siège Social : 17 avenue de l'Europe, 92275 Bois-Colombes Cedex
RCS Nanterre 552 118 465
Forme Sociale : S.A.S.
Capital Social : 657.364.587 €
SIREN/SIRET : 552 118 465 03644 - Code NAF 6202A

_______________________________________________
orion-dev mailing list

orion-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit

https://dev.eclipse.org/mailman/listinfo/orion-dev
_______________________________________________
orion-dev mailing list
orion-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/orion-dev


Sauf indication contraire ci-dessus:/ Unless stated otherwise above:
Compagnie IBM France
Siège Social : 17 avenue de l'Europe, 92275 Bois-Colombes Cedex
RCS Nanterre 552 118 465
Forme Sociale : S.A.S.
Capital Social : 657.364.587 €
SIREN/SIRET : 552 118 465 03644 - Code NAF 6202A

Back to the top