I am experiencing some problems with Window Builder example: https://developers.google.com/web-toolkit/tools/gwtdesigner/features/custom_composites
When I copy the codes to my Eclipse, I have an error in the code:
customComposite.setFirstFieldBackground(SWTResourceManager
.getColor(SWT.COLOR_YELLOW));
Eclipse tells me that there's no SWTResourceManager.
When I try to exhibit the form in design mode, another error occours in the code:
final Label thirdFieldLabel = new Label(customComposite.getComposite(),
SWT.NONE);
thirdFieldLabel.setText("Third Field");
Error: org.eclipse.wb.internal.core.utils.exception.DesignerException: 2005 (Null as parent argument.).
Considering that this example is very common in Web, even in the Help Files of the own WindowBuilder, I supose that I hanven't the correct settings/files to my application.
What would I do differently? Thanks!
What is happening is that SWTResourceManager is a class that is created in the plugin when you use the design view to set things like color, it is specific to your plugin. So when you copy code into another plugin that references that class you will get a class not found exception. Easiest thing to do,is copy the code. Delete the set color, set the color in the editor in your new plugin and a SWTResourceManager wil be auto created for that plugin. The second NPE not sure sounds environment specific but as a rule of thumb swt resource manager is bundle specific.