Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Why JFace Text uses partitions?
Why JFace Text uses partitions? [message #778199] Wed, 11 January 2012 16:06 Go to next message
Aivar Annamaa is currently offline Aivar AnnamaaFriend
Messages: 33
Registered: July 2009
Member
It seems that Eclipse source code editors use something like two-level lexing -- they first divide text into partitions and then divide partitions into actual grammar tokens (in some articles the objects corresponding to partitions are also called tokens).

Why was this extra notion of partitions introduced?

[Updated on: Wed, 11 January 2012 16:06]

Report message to a moderator

Re: Why JFace Text uses partitions? [message #778416 is a reply to message #778199] Thu, 12 January 2012 07:41 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
On 11.01.2012 17:06, Aivar Annamaa wrote:
> It seems that Eclipse source code editors use something like two-level
> lexing -- they first divide text into partitions and then divide
> partitions into actual grammar tokens (in some places the objects
> corresponding to partitions are also called tokens).
>
> Why was this extra notion of partitions introduced?
The partition information is not just used for the scanner. It also
allows to contribute/enable different implementations of a feature (e.g.
hovers) directly to a partition (e.g. the JavadocHover to the Javadoc
partition). Of course this might not make sense in all cases. You are
free to only use the default partition.

Dani
Re: Why JFace Text uses partitions? [message #778600 is a reply to message #778416] Fri, 13 January 2012 13:32 Go to previous message
Aivar Annamaa is currently offline Aivar AnnamaaFriend
Messages: 33
Registered: July 2009
Member
Thanks! I suspected that the partitions might be non-essential and your message gave me confirmation.
Previous Topic:How to customise the console/problem views?
Next Topic:Eclipse 3.6: org.eclipse.ui.commands.IElementUpdater - How to update before beeing executed?
Goto Forum:
  


Current Time: Tue Apr 23 11:17:10 GMT 2024

Powered by FUDForum. Page generated in 0.02973 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top