Skip to main content



      Home
Home » Archived » Visual Editor (VE) » Simple issue: my java bean is on a composite, but I can't select it in VE
Simple issue: my java bean is on a composite, but I can't select it in VE [message #79560] Tue, 08 February 2005 21:30 Go to next message
Eclipse UserFriend
Hello,

I have a simple java bean derived from Composite, that I've created in
VE. I have another Composite onto which I've dropped my bean. It shows
up on the composite in the Visual Editor, but I can't select it, and
thus I can't edit it's properties in the property editor.

It seems like this was working yesterday. Maybe it was my imagination.
Could someone offer me a pointer?

Thanks, Paul
Re: Simple issue: my java bean is on a composite, but I can't select it in VE [message #79590 is a reply to message #79560] Tue, 08 February 2005 23:37 Go to previous messageGo to next message
Eclipse UserFriend
pmurphy wrote:
> Hello,
>
> I have a simple java bean derived from Composite, that I've created in
> VE. I have another Composite onto which I've dropped my bean. It shows
> up on the composite in the Visual Editor, but I can't select it, and
> thus I can't edit it's properties in the property editor.
>
> It seems like this was working yesterday. Maybe it was my imagination.
> Could someone offer me a pointer?
>
> Thanks, Paul

I'm sorry. I had code that could only be executed at runtime in my
initialize() method.

Could someone tell me if there is some sort of "post initialize" event
that I could respond to at runtime, to get some initialization work
done? Otherwise, I'll have to do lazy initialization for the bean for
every control which responds to a widgetSelected event.
Re: Simple issue: my java bean is on a composite, but I can't select it in VE [message #79722 is a reply to message #79590] Wed, 09 February 2005 10:41 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

Why couldn't you put your code in the initialize method? That should of
been fine. Did you throw some exceptions?


--
Thanks,
Rich Kulp
Re: Simple issue: my java bean is on a composite, but I can't select it in VE [message #79764 is a reply to message #79722] Wed, 09 February 2005 11:32 Go to previous messageGo to next message
Eclipse UserFriend
Rich Kulp wrote:
> Why couldn't you put your code in the initialize method? That should of
> been fine. Did you throw some exceptions?
>
>

Yes, that's right. I've got a call to MyPlugin.getDefault(). To
paraphrase:

IMyAbstractAppLogic app = MyPlugin.getDefault()
.getMyApplicationLogic();

Naturally, this will throw an NPE.

I suppose I could send messages to my appLogic by using events instead
of via method calls, but that codebase is not currently eclipse-aware.
It also exists in a command line environment. Does anyone know of any
effective patterns I could use in this situation?
Re: Simple issue: my java bean is on a composite, but I can't select it in VE [message #79795 is a reply to message #79764] Wed, 09 February 2005 13:43 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

You can use:

if (!java.beans.Beans.isDesignTime()) {
// do your special stuff in here
}

If you do this, your special stuff won't run when being executed by the VE.

--
Thanks,
Rich Kulp
Re: Simple issue: my java bean is on a composite, but I can't select it in VE [message #79945 is a reply to message #79764] Fri, 11 February 2005 12:09 Go to previous message
Eclipse UserFriend
Originally posted by: Lamont_Gilbert.rigidsoftware.com

pmurphy wrote:
> Rich Kulp wrote:
>
>> Why couldn't you put your code in the initialize method? That should
>> of been fine. Did you throw some exceptions?
>>
>>
>
> Yes, that's right. I've got a call to MyPlugin.getDefault(). To
> paraphrase:
>
> IMyAbstractAppLogic app = MyPlugin.getDefault()
> .getMyApplicationLogic();
>
> Naturally, this will throw an NPE.
>
> I suppose I could send messages to my appLogic by using events instead
> of via method calls, but that codebase is not currently eclipse-aware.
> It also exists in a command line environment. Does anyone know of any
> effective patterns I could use in this situation?

I believe you can do this in the constructor as opposed to the
initialize method?

CL
Re: Simple issue: my java bean is on a composite, but I can't select it in VE [message #605119 is a reply to message #79560] Tue, 08 February 2005 23:37 Go to previous message
Eclipse UserFriend
pmurphy wrote:
> Hello,
>
> I have a simple java bean derived from Composite, that I've created in
> VE. I have another Composite onto which I've dropped my bean. It shows
> up on the composite in the Visual Editor, but I can't select it, and
> thus I can't edit it's properties in the property editor.
>
> It seems like this was working yesterday. Maybe it was my imagination.
> Could someone offer me a pointer?
>
> Thanks, Paul

I'm sorry. I had code that could only be executed at runtime in my
initialize() method.

Could someone tell me if there is some sort of "post initialize" event
that I could respond to at runtime, to get some initialization work
done? Otherwise, I'll have to do lazy initialization for the bean for
every control which responds to a widgetSelected event.
Re: Simple issue: my java bean is on a composite, but I can't select it in VE [message #605161 is a reply to message #79590] Wed, 09 February 2005 10:41 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

Why couldn't you put your code in the initialize method? That should of
been fine. Did you throw some exceptions?


--
Thanks,
Rich Kulp
Re: Simple issue: my java bean is on a composite, but I can't select it in VE [message #605169 is a reply to message #79722] Wed, 09 February 2005 11:32 Go to previous message
Eclipse UserFriend
Rich Kulp wrote:
> Why couldn't you put your code in the initialize method? That should of
> been fine. Did you throw some exceptions?
>
>

Yes, that's right. I've got a call to MyPlugin.getDefault(). To
paraphrase:

IMyAbstractAppLogic app = MyPlugin.getDefault()
.getMyApplicationLogic();

Naturally, this will throw an NPE.

I suppose I could send messages to my appLogic by using events instead
of via method calls, but that codebase is not currently eclipse-aware.
It also exists in a command line environment. Does anyone know of any
effective patterns I could use in this situation?
Re: Simple issue: my java bean is on a composite, but I can't select it in VE [message #605175 is a reply to message #79764] Wed, 09 February 2005 13:43 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

You can use:

if (!java.beans.Beans.isDesignTime()) {
// do your special stuff in here
}

If you do this, your special stuff won't run when being executed by the VE.

--
Thanks,
Rich Kulp
Re: Simple issue: my java bean is on a composite, but I can't select it in VE [message #605204 is a reply to message #79764] Fri, 11 February 2005 12:09 Go to previous message
Eclipse UserFriend
Originally posted by: Lamont_Gilbert.rigidsoftware.com

pmurphy wrote:
> Rich Kulp wrote:
>
>> Why couldn't you put your code in the initialize method? That should
>> of been fine. Did you throw some exceptions?
>>
>>
>
> Yes, that's right. I've got a call to MyPlugin.getDefault(). To
> paraphrase:
>
> IMyAbstractAppLogic app = MyPlugin.getDefault()
> .getMyApplicationLogic();
>
> Naturally, this will throw an NPE.
>
> I suppose I could send messages to my appLogic by using events instead
> of via method calls, but that codebase is not currently eclipse-aware.
> It also exists in a command line environment. Does anyone know of any
> effective patterns I could use in this situation?

I believe you can do this in the constructor as opposed to the
initialize method?

CL
Previous Topic:Support for JBuilder XY Layout
Next Topic:VE 1.1 Nightly build N20050211 works with Eclipse 3.1
Goto Forum:
  


Current Time: Tue Jul 22 21:30:14 EDT 2025

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

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

Back to the top