Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Visual Editor (VE) » How can I tell whether it's design time or runtime?
How can I tell whether it's design time or runtime? [message #143321] Thu, 13 December 2007 05:58 Go to next message
Eclipse UserFriend
Originally posted by: eli_lato.hotmail.com

If the designer left out a required property of my component, I want to
throw an IllegalStateException at runtime, but of course not at design
time.

My ugly solution was to add a component listener, look at my component's
parents, and see whether any of them is a ve class. If none of my parents
is a VE class, it's runtime, and I check for missing required properties.

This works fine, but it's obviously a hack. Is there a better way?

Thanks,
Eli
Re: How can I tell whether it's design time or runtime? [message #143330 is a reply to message #143321] Thu, 13 December 2007 13:51 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: no.ddress.now

In article <320d30be9625ef3e95fd7251f4a62b05$1@www.eclipse.org>,
eli_lato@hotmail.com says...
> If the designer left out a required property of my component, I want to
> throw an IllegalStateException at runtime, but of course not at design
> time.
>
> My ugly solution was to add a component listener, look at my component's
> parents, and see whether any of them is a ve class. If none of my parents
> is a VE class, it's runtime, and I check for missing required properties.
>
> This works fine, but it's obviously a hack. Is there a better way?
>
> Thanks,
> Eli
>
>
java.beans.Beans.isDesignTime()
--
Gerald Rosenberg
Certiv
Re: How can I tell whether it's design time or runtime? [message #143339 is a reply to message #143330] Thu, 13 December 2007 20:32 Go to previous message
Eclipse UserFriend
Originally posted by: eli_lato.hotmail.com

Thanks!
Eli
Re: How can I tell whether it's design time or runtime? [message #616907 is a reply to message #143321] Thu, 13 December 2007 13:51 Go to previous message
Eclipse UserFriend
Originally posted by: no.ddress.now

In article <320d30be9625ef3e95fd7251f4a62b05$1@www.eclipse.org>,
eli_lato@hotmail.com says...
> If the designer left out a required property of my component, I want to
> throw an IllegalStateException at runtime, but of course not at design
> time.
>
> My ugly solution was to add a component listener, look at my component's
> parents, and see whether any of them is a ve class. If none of my parents
> is a VE class, it's runtime, and I check for missing required properties.
>
> This works fine, but it's obviously a hack. Is there a better way?
>
> Thanks,
> Eli
>
>
java.beans.Beans.isDesignTime()
--
Gerald Rosenberg
Certiv
Re: How can I tell whether it's design time or runtime? [message #616908 is a reply to message #143330] Thu, 13 December 2007 20:32 Go to previous message
Eli Lato is currently offline Eli LatoFriend
Messages: 35
Registered: July 2009
Member
Thanks!
Eli
Previous Topic:How can I tell whether it's design time or runtime?
Next Topic:VE not able to display Swing-embedded SWT component correctly
Goto Forum:
  


Current Time: Fri Apr 26 14:24:27 GMT 2024

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

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

Back to the top