Plugin Development Question

15 views
Skip to first unread message

Eric Anderson

unread,
Jan 30, 2012, 10:25:56 PM1/30/12
to Redcar
So I'm making a plugin that will adjust the visual UI based on certain
events (Specifically I am trying to interact with
Redcar::ApplicationSWT::Notebook). But the events I get from redcar
are for the models and there seems to be no decent way to get the
views using a model from the model.

I tried brute force (iterating through ObjectSpace) but since this is
jRuby, evidently that doesn't work without getting a big performance
hit. Am I going about this wrong? Should I just monkey-patch the view
object I am trying to interact with?

Roger Pack

unread,
Jan 31, 2012, 11:43:49 AM1/31/12
to redcar...@googlegroups.com
> So I'm making a plugin that will adjust the visual UI based on certain
> events (Specifically I am trying to interact with
> Redcar::ApplicationSWT::Notebook). But the events I get from redcar
> are for the models and there seems to be no decent way to get the
> views using a model from the model.

Maybe send another message "view--change your appearance!"

Eric Anderson

unread,
Jan 31, 2012, 6:59:48 PM1/31/12
to Redcar
On Jan 31, 11:43 am, Roger Pack <rogerdp...@gmail.com> wrote:
> Maybe send another message "view--change your appearance!"

The problem is that the view won't know how to change it's appearance.
The appearance change is what the plugin is implementing. I can do
that externally (if it can get a reference to the view) or internally
(via a monkey-patch). Right now I am leaning towards the latter since
there doesn't appear to be any way to get a reference to the view
object. But I was hoping there was a more official way to do it that I
am just not seeing.
Reply all
Reply to author
Forward
0 new messages