Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Filtering lines in StyledText
Filtering lines in StyledText [message #519199] Mon, 08 March 2010 00:05 Go to next message
Marian Schedenig is currently offline Marian SchedenigFriend
Messages: 25
Registered: July 2009
Junior Member
Hi!

I want to filter lines in an existing StyledText instance, deciding for each
line separately whether it should show up or not. I'm not creating the
StyledText, and its StyledTextContent may already have listeners by the time
my code gets called.

I've been toying around with a custom adapter based on StyledTextContent
which I set on the StyledText instance which in its simplest version is just
a proxy for the original content. That works fine, but when I start playing
around with modifying the text, I quickly get all kinds of exception when
the content changes. I'm not sure how the various change methods and events
in StyledText and StyledText content interact, but my fear is that the
StyledText may still be reacting to events of the original StyledTextContent
which provide different data than would be correct for my modified text.

So I guess my question is: Is this possible at all when I can't control how
the original StyledText and -Content are set up? Since I can't get a list of
the original Content's listeners, moving those listeners to my own instance
seems to be out of the question.

I've been really wrecking my brain trying to solve this, and whatever
solution I come up with turns out to be a dead end.

Thx,
Marian.
Re: Filtering lines in StyledText [message #519366 is a reply to message #519199] Mon, 08 March 2010 16:05 Go to previous messageGo to next message
Felipe Heidrich is currently offline Felipe HeidrichFriend
Messages: 29
Registered: July 2009
Junior Member
It will be some work but it should be possible to do.
I hope this articles helps you implementing your own StyledTextContent.

http://www.eclipse.org/articles/StyledText%202/article2.html

Re: Filtering lines in StyledText [message #519486 is a reply to message #519366] Tue, 09 March 2010 00:32 Go to previous message
Marian Schedenig is currently offline Marian SchedenigFriend
Messages: 25
Registered: July 2009
Junior Member
Felipe Heidrich wrote:

> It will be some work but it should be possible to do.
> I hope this articles helps you implementing your own StyledTextContent.
>
> http://www.eclipse.org/articles/StyledText%202/article2.html

This does look helpful. I'll play around, and if I manage to solve my
problem, I'll try to write up some sort of guide.

Cheers,
Marian.
Previous Topic:Click on empty row in a table
Next Topic:browser.setUrl freeze
Goto Forum:
  


Current Time: Thu Mar 28 09:50:42 GMT 2024

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

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

Back to the top