Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-swt-dev] SWTToolkit as AWT Peers

As some of you may know, I've been working on a set of AWT peers that use
SWT as the "native widgets". This has been going well so far, but I've hit a
point that I think needs to be discussed.

How exactly can we use this for plugins in Eclipse?

To use alternate AWT toolkits, you specify the awt.toolkit system property
when a VM starts or using System.setProperty().
It appears (from some testing) that once AWT has loaded its toolkit, you
can't change it by setting the awt.toolkit property again in a program.
I think this would mean that the first plugin that uses AWT, we're stuck
with what it used for the AWT toolkit (whether it's the default toolkit or
one it specified).

So, for plugins to work properly and consistently, we'd have to set the AWT
toolkit to use at eclipse startup.

The question is, are we willing to "dictate" an AWT peer implementation for
plugins?

It seems like the "right" thing to do, treating "Eclipse" as the platform.

Applications are run in their own VM, right? Assuming so (which I'm nearly
100% sure of), this choice would not affect them. Apps could use the default
toolkit or whatever they want...
-- Scott

==============================================================
Scott Stanchfield    scott@xxxxxxxxxxxx    http://javadude.com

Lead author of "Effective VisualAge for Java, Version 3"
                                      http://javadude.com/evaj

VisualAge for Java Tips and Tricks     http://javadude.com/vaj

AWT & Swing FAQ Manager, jGuru.com
Visit for Java Enlightenment!             http://www.jguru.com
==============================================================



Back to the top