Bryan Campbell Software Engineer, Lombardi Software March 14, 2008
description
Transcript of Bryan Campbell Software Engineer, Lombardi Software March 14, 2008
![Page 1: Bryan Campbell Software Engineer, Lombardi Software March 14, 2008](https://reader035.fdocuments.net/reader035/viewer/2022081604/568149e9550346895db715f8/html5/thumbnails/1.jpg)
© 2008 by Bryan Campbell; made available under the EPL v1.0
Bryan CampbellSoftware Engineer, Lombardi Software
March 14, 2008
Deep integration of GWT/JavaScript and Eclipse 3.3 using XULRunner and JavaXPCOM
![Page 2: Bryan Campbell Software Engineer, Lombardi Software March 14, 2008](https://reader035.fdocuments.net/reader035/viewer/2022081604/568149e9550346895db715f8/html5/thumbnails/2.jpg)
Deep Integration of GWT and Eclipse 3.3 with JavaXPCom | © 2008 by Bryan Campbell; made available under the EPL v1.0
![Page 3: Bryan Campbell Software Engineer, Lombardi Software March 14, 2008](https://reader035.fdocuments.net/reader035/viewer/2022081604/568149e9550346895db715f8/html5/thumbnails/3.jpg)
Deep Integration of GWT and Eclipse 3.3 with JavaXPCom | © 2008 by Bryan Campbell; made available under the EPL v1.0
Demo ….
![Page 4: Bryan Campbell Software Engineer, Lombardi Software March 14, 2008](https://reader035.fdocuments.net/reader035/viewer/2022081604/568149e9550346895db715f8/html5/thumbnails/4.jpg)
Deep Integration of GWT and Eclipse 3.3 with JavaXPCom | © 2008 by Bryan Campbell; made available under the EPL v1.0
![Page 5: Bryan Campbell Software Engineer, Lombardi Software March 14, 2008](https://reader035.fdocuments.net/reader035/viewer/2022081604/568149e9550346895db715f8/html5/thumbnails/5.jpg)
Deep Integration of GWT and Eclipse 3.3 with JavaXPCom | © 2008 by Bryan Campbell; made available under the EPL v1.0
MessagingComponent() { void addToList(String msg) { messageList.add(msg); updateView(); }}
XULRunner
XPCOM
JavaXPCOM
IMessagingComponent { addToList(String msg);}
![Page 6: Bryan Campbell Software Engineer, Lombardi Software March 14, 2008](https://reader035.fdocuments.net/reader035/viewer/2022081604/568149e9550346895db715f8/html5/thumbnails/6.jpg)
Deep Integration of GWT and Eclipse 3.3 with JavaXPCom | © 2008 by Bryan Campbell; made available under the EPL v1.0
MessagingComponent() { void addToList(String msg) { messageList.add(msg); updateView(); }}
IMessagingComponent { addToList(String msg);}
XULRunner
XPCOM
• By wrapping the eclipse browser widget with XULRunner, we gain access to its component object model – XPCOM.
![Page 7: Bryan Campbell Software Engineer, Lombardi Software March 14, 2008](https://reader035.fdocuments.net/reader035/viewer/2022081604/568149e9550346895db715f8/html5/thumbnails/7.jpg)
Deep Integration of GWT and Eclipse 3.3 with JavaXPCom | © 2008 by Bryan Campbell; made available under the EPL v1.0
MessagingComponent() { void addToList(String msg) { messageList.add(msg); updateView(); }}
IMessagingComponent { addToList(String msg);}
XULRunner
XPCOM
• JavaScript can make calls to XPCOM through the XPConnect layer.
![Page 8: Bryan Campbell Software Engineer, Lombardi Software March 14, 2008](https://reader035.fdocuments.net/reader035/viewer/2022081604/568149e9550346895db715f8/html5/thumbnails/8.jpg)
Deep Integration of GWT and Eclipse 3.3 with JavaXPCom | © 2008 by Bryan Campbell; made available under the EPL v1.0
MessagingComponent() { void addToList(String msg) { messageList.add(msg); updateView(); }}
XULRunner
XPCOMIMessagingComponent { addToList(String msg);}
• Once the component is in place, the interface will be reflected to JavaScript through XPConnect
• A call to this component might look similar to:IMessagingComponent messenger = xpcom.create(IMessagingComponent);messenger.addToList(“EclipseCon 08”);
![Page 9: Bryan Campbell Software Engineer, Lombardi Software March 14, 2008](https://reader035.fdocuments.net/reader035/viewer/2022081604/568149e9550346895db715f8/html5/thumbnails/9.jpg)
Deep Integration of GWT and Eclipse 3.3 with JavaXPCom | © 2008 by Bryan Campbell; made available under the EPL v1.0
XULRunner• The Java Implementation will be the actual code that is run when a call to addToList(String) is made from the web app
IMessagingComponent { addToList(String msg);}
XPCOM MessagingComponent() { void addToList(String msg) { messageList.add(msg); updateView(); }}
![Page 10: Bryan Campbell Software Engineer, Lombardi Software March 14, 2008](https://reader035.fdocuments.net/reader035/viewer/2022081604/568149e9550346895db715f8/html5/thumbnails/10.jpg)
Deep Integration of GWT and Eclipse 3.3 with JavaXPCom | © 2008 by Bryan Campbell; made available under the EPL v1.0
XULRunner
IMessagingComponent { addToList(String msg);}
• Similar to XPConnect, JavaXPCOM is the layer between Java and XPCOM allowing calls to be made, and XPCOM components to be used and manipulated.
XPCOM MessagingComponent() { void addToList(String msg) { messageList.add(msg); updateView(); }}
JavaXPCOM
![Page 11: Bryan Campbell Software Engineer, Lombardi Software March 14, 2008](https://reader035.fdocuments.net/reader035/viewer/2022081604/568149e9550346895db715f8/html5/thumbnails/11.jpg)
Deep Integration of GWT and Eclipse 3.3 with JavaXPCom | © 2008 by Bryan Campbell; made available under the EPL v1.0
More Info• Check out http://development.lombardi.com for more coding
examples and resources.
• Source also available at http://code.google.com/p/javaxpcom/