Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Visual Editor (VE) » SWT controls in palette not visible, only SWING and AWT?!?
SWT controls in palette not visible, only SWING and AWT?!? [message #87733] Wed, 20 April 2005 11:15 Go to next message
mr. burns is currently offline mr. burnsFriend
Messages: 402
Registered: July 2009
Senior Member
Hello,

I want to use the Visual Editor (http://www.eclipse.org/vep/) for SWT
controls. I already can use SWT controls by creating the code for each
control manually. But now I want to use the VE to built the layout for my
application.
Under http://www.eclipse.org/vep -> Extending the Visual Editor Tutorial:
Enabling support for a custom widget

I can see the 'SWT controls' and 'SWT containers' under the Palette, in my
VE only the controls for Swing and AWT are available!?!

So what I have to do to make also SWT controls accessible under Visual
Editor?

Thanks for any help,

best regards,

Mr. Burns
Re: SWT controls in palette not visible, only SWING and AWT?!? [message #87806 is a reply to message #87733] Wed, 20 April 2005 13:49 Go to previous messageGo to next message
Joe Winchester is currently offline Joe WinchesterFriend
Messages: 496
Registered: July 2009
Senior Member
Hi,

> I want to use the Visual Editor (http://www.eclipse.org/vep/) for SWT
> controls. I already can use SWT controls by creating the code for each
> control manually. But now I want to use the VE to built the layout for my
> application.
> Under http://www.eclipse.org/vep -> Extending the Visual Editor Tutorial:
> Enabling support for a custom widget
> I can see the 'SWT controls' and 'SWT containers' under the Palette, in my
> VE only the controls for Swing and AWT are available!?!
> So what I have to do to make also SWT controls accessible under Visual
> Editor?

What is the Java build path for your project ? How are the SWT classes
visible ?

The easiest way to get the project configured correctly is to use the
New Visual Class Wizard and extend SWT Composite or create an SWT Shell
from the list of available templates.

If not then the project should either have the SWTContainer in its build
path, or else be a PDE project with org.eclipse.swt as a dependent
project. If you have neither yet can still manually add SWT controls
then the swt.jar is visible, so you have either manually added it as a
jar or else created a Java (non Plug-in) project and added
org.eclipse.swt as a dependent project.

Best regards,

Joe Winchester
Re: SWT controls in palette not visible, only SWING and AWT?!? [message #87988 is a reply to message #87806] Thu, 21 April 2005 07:00 Go to previous messageGo to next message
mr. burns is currently offline mr. burnsFriend
Messages: 402
Registered: July 2009
Senior Member
it works now,

I had already added manually the swt.jar under the libraries of the java
Built Path.
If I create a new Java project without adding the swt.jar under the
libraries then it works!

Thanks!
Re: SWT controls in palette not visible, only SWING and AWT?!? [message #88045 is a reply to message #87988] Thu, 21 April 2005 13:53 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

We don't recognize just the jar. We use the SWT library (from Java Build
Path -> Libraries -> Add Library -> SWT). This is because with only an
swt.jar we don't enough information to know what swt it is, where the
dll is, etc. The SWT library entry tells us all of this.


--
Thanks,
Rich Kulp
Re: SWT controls in palette not visible, only SWING and AWT?!? [message #607189 is a reply to message #87733] Wed, 20 April 2005 13:49 Go to previous message
Joe Winchester is currently offline Joe WinchesterFriend
Messages: 496
Registered: July 2009
Senior Member
Hi,

> I want to use the Visual Editor (http://www.eclipse.org/vep/) for SWT
> controls. I already can use SWT controls by creating the code for each
> control manually. But now I want to use the VE to built the layout for my
> application.
> Under http://www.eclipse.org/vep -> Extending the Visual Editor Tutorial:
> Enabling support for a custom widget
> I can see the 'SWT controls' and 'SWT containers' under the Palette, in my
> VE only the controls for Swing and AWT are available!?!
> So what I have to do to make also SWT controls accessible under Visual
> Editor?

What is the Java build path for your project ? How are the SWT classes
visible ?

The easiest way to get the project configured correctly is to use the
New Visual Class Wizard and extend SWT Composite or create an SWT Shell
from the list of available templates.

If not then the project should either have the SWTContainer in its build
path, or else be a PDE project with org.eclipse.swt as a dependent
project. If you have neither yet can still manually add SWT controls
then the swt.jar is visible, so you have either manually added it as a
jar or else created a Java (non Plug-in) project and added
org.eclipse.swt as a dependent project.

Best regards,

Joe Winchester
Re: SWT controls in palette not visible, only SWING and AWT?!? [message #607202 is a reply to message #87806] Thu, 21 April 2005 07:00 Go to previous message
mr. burns is currently offline mr. burnsFriend
Messages: 402
Registered: July 2009
Senior Member
it works now,

I had already added manually the swt.jar under the libraries of the java
Built Path.
If I create a new Java project without adding the swt.jar under the
libraries then it works!

Thanks!
Re: SWT controls in palette not visible, only SWING and AWT?!? [message #607206 is a reply to message #87988] Thu, 21 April 2005 13:53 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

We don't recognize just the jar. We use the SWT library (from Java Build
Path -> Libraries -> Add Library -> SWT). This is because with only an
swt.jar we don't enough information to know what swt it is, where the
dll is, etc. The SWT library entry tells us all of this.


--
Thanks,
Rich Kulp
Previous Topic:Icons on the custom widgets in VE are not visible
Next Topic:Status of VE and 3.1M6
Goto Forum:
  


Current Time: Thu Apr 25 16:21:44 GMT 2024

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

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

Back to the top