Code Generation Problems (ResourceManager)

SWT Designer allows you to create the views, editors, perspectives, pref pages, composites, etc. that comprise Eclipse SWT & RCP applications and plug-ins.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

Code Generation Problems (ResourceManager)

Postby StueyNZ » Tue Aug 19, 2003 10:47 pm

Steps to re-create problem:

1. Create a new SWT Application
2. Add FillLayout
3. Add Text Control
4. Set background for TextControl to a pretty color;

Switch back to Source view, we now have unresolved import:
Code: Select all
import com.swtdesigner.ResourceManager;


and of course usage of ResourceManager can't be resolved either.

Code: Select all
final Display display = new Display();
final Shell shell = new Shell();
shell.setLayout(new FillLayout());
shell.setText("My SWT Application");
{
   final Text text = new Text(shell, SWT.BORDER);
   text.setBackground(ResourceManager.getColor(255, 128, 128));
   text.setText("text");
}
// DESIGNER: Add controls before this line.


I looked in %eclipse%\plugins\com.swtdesigner.free\designer.jar
but couldn't find com.swtdesigner.ResourceManager class.

Where is the missing class located?
StueyNZ
 
Posts: 2
Joined: Tue Aug 19, 2003 10:23 pm
Location: Martinborough, New Zealand

Re: Code Generation Problems (ResourceManager)

Postby admin » Tue Aug 19, 2003 11:51 pm

StueyNZ wrote:
I looked in %eclipse%\plugins\com.swtdesigner.free\designer.jar
but couldn't find com.swtdesigner.ResourceManager class.

Where is the missing class located?

Look in folder "src" inside of Designer plugin folder.
We don't want to force people to use our classes without sources, so we provide source code of ResourceManager.
admin
Moderator
 
Posts: 166
Joined: Thu Jul 24, 2003 12:25 am


Return to SWT Designer

Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 1 guest