Code examples that do not parse

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 examples that do not parse

Postby Joel.Rosi-Schwartz » Mon Jan 25, 2010 9:19 am

Hi,

I have been working on learning how to use SWT Designer's EMF databinding which implies that I also have to get up to speed on EMF Databinding itself. Towards that end I have been reading Tom Schindl's four part "Galileo: EMF-Databinding" blog. Unfortunately the UI code for this example cannot be read in by SWT Designer. It would make a great study for how to use WB to do databinding as all of the code for writing it by hand is in place. My goal would be to study his blog then use SWT Designer to redo all of the databinding. If there is any chance you can get these to parse, it would be real useful and appreciated.

The blog is at http://tomsondev.bestsolution.at/2009/06/06/galileo-emf-databinding-part-1/ and as Tom states:
All the sources are available from the EMF-CVS:

server: dev.eclipse.org
path: /cvsroot/modeling
modules: org.eclipse.emf/org.eclipse.emf/examples/org.eclipse.emf.examples.databinding.project.*


Many thanks,
Joel
Joel.Rosi-Schwartz
 
Posts: 7
Joined: Sat Jan 23, 2010 6:07 am

Re: Code examples that do not parse

Postby Eric Clayberg » Mon Jan 25, 2010 9:23 am

Joel.Rosi-Schwartz wrote:Unfortunately the UI code for this example cannot be read in by SWT Designer

What do you mean by that? What specifically can't parse? What do you see when you edit that code? Do you get an exception of some sort?
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Re: Code examples that do not parse

Postby Joel.Rosi-Schwartz » Mon Jan 25, 2010 9:55 am

Eric Clayberg wrote:
Joel.Rosi-Schwartz wrote:Unfortunately the UI code for this example cannot be read in by SWT Designer

What do you mean by that? What specifically can't parse? What do you see when you edit that code? Do you get an exception of some sort?


Sorry, I did not think going into all of the details was really relevant as it is a case of every UI view class not being show-able. When I open a class the Design view simply shows a "WindowBuilder internal error" message. These are classes that have a problem, which is all UI classes but for three simple dialogs.

PersonFilterDialog.java
ProjectAdminViewPart.java
ProjectCommittersPart.java
ProjectExplorerPart.java
ProjectFormAreaPart.java

An example exception follows, but it appears that each View has its own problem. I can email you the log if you like, but it may be easier if you simply checked out the projects and reproduce it.
Code: Select all
com.instantiations.designer.core.utils.exception.DesignerException: 0 (Wrapper).
   at com.instantiations.designer.core.parser.JavaInfoParser.parseRootMethods(JavaInfoParser.java:303)
   at com.instantiations.designer.core.parser.JavaInfoParser.parse(JavaInfoParser.java:245)
   at com.instantiations.designer.core.parser.JavaInfoParser.access$9(JavaInfoParser.java:216)
   at com.instantiations.designer.core.parser.JavaInfoParser$1.runObject(JavaInfoParser.java:140)
   at com.instantiations.designer.core.parser.JavaInfoParser$1.runObject(JavaInfoParser.java:1)
   at com.instantiations.designer.core.utils.execution.ExecutionUtils.runDesignTime(ExecutionUtils.java:99)
   at com.instantiations.designer.core.parser.JavaInfoParser.parse(JavaInfoParser.java:138)
   at com.instantiations.designer.core.editor.DesignPage.internal_refreshGEF(DesignPage.java:426)
   at com.instantiations.designer.core.editor.DesignPage.access$9(DesignPage.java:418)
   at com.instantiations.designer.core.editor.DesignPage$7$1.run(DesignPage.java:349)
Joel.Rosi-Schwartz
 
Posts: 7
Joined: Sat Jan 23, 2010 6:07 am

Re: Code examples that do not parse

Postby Joel.Rosi-Schwartz » Mon Jan 25, 2010 11:27 am

Reading over Tom's blog I have learned that in EMF 2.5 (Galileo) the databinding API was significantly enhanced. Looking at the EMF data bind support in SWT Designer it appears that the EMF 3.4 databinding API is still being used. Is the correct? If so are you planning on moving to the new API? If you are, any projections on when we will see it?

Thanks,
Joel
Joel.Rosi-Schwartz
 
Posts: 7
Joined: Sat Jan 23, 2010 6:07 am

Re: Code examples that do not parse

Postby Eric Clayberg » Tue Jan 26, 2010 7:25 am

Joel.Rosi-Schwartz wrote:PersonFilterDialog.java

This class will open and edit using the latest SWT Designer v7.2 build.

Joel.Rosi-Schwartz wrote:ProjectAdminViewPart.java

This class will not edit due to the following bug in the UndoAction (and RedoAction) class...

java.lang.NullPointerException
at org.eclipse.emf.example.databinding.project.ui.rcp.views.UndoAction.<init>(UndoAction.java:44)

Joel.Rosi-Schwartz wrote:ProjectCommittersPart.java
ProjectExplorerPart.java
ProjectFormAreaPart.java

None of these classes are known SWT/JFace/RCP UI types and do not follow any common SWT/JFace/RCP pattern. They appear to be custom UI helper classes that are tightly coupled to his other classes. SWT Designer can be taught to understand any type of class that contains UI elements, but there seems to be little purpose in doing so in the case of these classes. Those classes should be recoded as standard Composite subclasses.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Re: Code examples that do not parse

Postby Joel.Rosi-Schwartz » Tue Jan 26, 2010 8:30 am

Eric,

Thanks for looking into these and the explanation. This is part of my learning process of what can and cannot be used with SWT Designer I gather.

Cheers,
Joel

Eric Clayberg wrote:
Joel.Rosi-Schwartz wrote:PersonFilterDialog.java

This class will open and edit using the latest SWT Designer v7.2 build.

Joel.Rosi-Schwartz wrote:ProjectAdminViewPart.java

This class will not edit due to the following bug in the UndoAction (and RedoAction) class...

java.lang.NullPointerException
at org.eclipse.emf.example.databinding.project.ui.rcp.views.UndoAction.<init>(UndoAction.java:44)

Joel.Rosi-Schwartz wrote:ProjectCommittersPart.java
ProjectExplorerPart.java
ProjectFormAreaPart.java

None of these classes are known SWT/JFace/RCP UI types and do not follow any common SWT/JFace/RCP pattern. They appear to be custom UI helper classes that are tightly coupled to his other classes. SWT Designer can be taught to understand any type of class that contains UI elements, but there seems to be little purpose in doing so in the case of these classes. Those classes should be recoded as standard Composite subclasses.
Joel.Rosi-Schwartz
 
Posts: 7
Joined: Sat Jan 23, 2010 6:07 am

Re: Code examples that do not parse

Postby Eric Clayberg » Tue Jan 26, 2010 8:38 am

Joel.Rosi-Schwartz wrote:are you planning on moving to the new API? If you are, any projections on when we will see it?

Yes. Probably in a few months.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA


Return to SWT Designer

Who is online

Users browsing this forum: Google [Bot] and 2 guests