Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] elastic tabstops implemented for SWT

Nick,

The summary in your paper states:

"Each cell ends with a tab character. A column block is a run of
uninterrupted vertically adjacent cells. A column block is as wide as
the widest piece of text in the cells it contains or a minimum width
(plus padding). Text outside column blocks is ignored."

The issue here is the algorithm that determines when one column block
ends and the next one begins.  To me (and I think this is what Bogdan
was getting at) it seems like this algorithm would have to be language
dependent.

What might belong in SWT (maybe StyledText) is a layout engine that
when given a column block strategy will perform the elastic tab
functionality.  In this scenario JDT, CDT, etc would add a strategy
that defines their block boundaries.

Phil

On Wed, Jan 6, 2010 at 12:18 PM, Nick Gravgaard <me@xxxxxxxxxxxxxxxxx> wrote:
> Hi Grant + Bogdan,
>
> I'm not sure what you mean. I think elastic tabstops are a generic
> editor feature in the same way that conventional fixed tabstops are.
> They are useful in Java, C, Python and apparently Go (and probably other
> languages) as well as in good old text files and are handy when editing
> and viewing tab separated database dumps or just lining up tabular data.
> With this in mind I thought the text editing widget would be the place
> (rather than anything Java specific), hence my posting to this list.
>
> Does that make sense?
> Nick
>
>
> On Wed, 06 Jan 2010 13:52 -0500, "Bogdan Gheorghe" <gheorghe@xxxxxxxxxx>
> wrote:
>> Hi Nick -
>>
>> Your demo looks interesting and it could a valuable option for Eclipse
>> users. Just to confirm: the tabbing behavior is controlled by the
>> context,
>> right? If so, this would make its implementation language dependent - to
>> get it working with the Java editor, you would need JDT support. Perhaps
>> the JDT mailing list (jdt-dev@xxxxxxxxxxx ) would be more appropriate for
>> this question.
>>
>> Thanks,
>> Grant + Bogdan
>>
>>
>>
>>
>>
>> From:
>> "Nick Gravgaard" <me@xxxxxxxxxxxxxxxxx>
>> To:
>> "Eclipse Platform SWT component developers list."
>> <platform-swt-dev@xxxxxxxxxxx>
>> Date:
>> 01/05/2010 12:42 PM
>> Subject:
>> [platform-swt-dev] elastic tabstops implemented for SWT
>> Sent by:
>> platform-swt-dev-bounces@xxxxxxxxxxx
>>
>>
>>
>> Hi everyone,
>>
>> I'm the inventor of something called "elastic tabstops" (
>> http://nickgravgaard.com/elastictabstops/ includes a Java Swing applet
>> demo). It has generally been favourably received and was recently adopted
>> by Google in their new Go programming language for formatting code (
>> http://golang.org/pkg/tabwriter/). I would like the functionality you can
>> see in my Java Swing applet demo (tabstops move as user modifies text) to
>> be available to Eclipse users (either as a plugin or built in).
>>
>> I'm hoping that I can get a discussion started here on what the best way
>> to implement this would be (performance is one of my main concerns), and
>> maybe generate enough interest that some of you might be interested in
>> helping me implement it. There was a missing feature (
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=279356) which was blocking
>> me, but that's been resolved now.
>>
>> Nick
>> _______________________________________________
>> platform-swt-dev mailing list
>> platform-swt-dev@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/platform-swt-dev
>>
>>
> _______________________________________________
> platform-swt-dev mailing list
> platform-swt-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/platform-swt-dev
>


Back to the top