Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Visual Editor (VE) » getClass().getName() returns org.eclipse.swt.widgets.Composite
getClass().getName() returns org.eclipse.swt.widgets.Composite [message #129375] Mon, 31 July 2006 18:24 Go to next message
hung is currently offline hungFriend
Messages: 117
Registered: July 2009
Senior Member
Hi,

If I generate the following code when dropping from Palette :

composite = new MyComposite(this,SWT.NONE);
composite.setText(getClass().getName());

the getClass().getName() returns org.eclipse.swt.widgets.Composite
instead of the current editing class. If I save the file, and reopen,
it returns the correct fully qualified classname.

It is because the current editing class never gets compiled? Thanks.
Is there anyway I can get the name of the current classname
programatically? Thanks.
Re: getClass().getName() returns org.eclipse.swt.widgets.Composite [message #129629 is a reply to message #129375] Mon, 07 August 2006 14:34 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

Yup, since it wasn't compiled yet, it used the super class instance
instead, which was compiled. It was compiled the next time so that it
could use it. There is no way to force this.


--
Thanks,
Rich Kulp
Re: getClass().getName() returns org.eclipse.swt.widgets.Composite [message #613719 is a reply to message #129375] Mon, 07 August 2006 14:34 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

Yup, since it wasn't compiled yet, it used the super class instance
instead, which was compiled. It was compiled the next time so that it
could use it. There is no way to force this.


--
Thanks,
Rich Kulp
Previous Topic:Create SWT Widget in Containment Handler of parent Composite
Next Topic:With or without the use VE?
Goto Forum:
  


Current Time: Wed Apr 24 15:11:39 GMT 2024

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

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

Back to the top