Date post: | 17-Dec-2015 |
Category: |
Documents |
Upload: | magdalen-hood |
View: | 214 times |
Download: | 0 times |
© 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
Deep Integration of GWT and Eclipse 3.3 with JavaXPCom | © 2008 by Bryan Campbell; made available under the EPL v1.0
Deep Integration of GWT and Eclipse 3.3 with JavaXPCom | © 2008 by Bryan Campbell; made available under the EPL v1.0
Demo ….
Deep Integration of GWT and Eclipse 3.3 with JavaXPCom | © 2008 by Bryan Campbell; made available under the EPL v1.0
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);}
IMessagingComponent { addToList(String msg);}
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);}
IMessagingComponent { addToList(String msg);}
XULRunner
XPCOM
• By wrapping the eclipse browser widget with XULRunner, we gain access to its component object model – XPCOM.
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);}
IMessagingComponent { addToList(String msg);}
XULRunner
XPCOM
• JavaScript can make calls to XPCOM through the XPConnect layer.
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
IMessagingComponent { addToList(String msg);}
IMessagingComponent { 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”);
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);}
IMessagingComponent { addToList(String msg);}
XPCOMMessagingComponent() { void addToList(String msg) { messageList.add(msg); updateView(); }}
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);}
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.
XPCOMMessagingComponent() { void addToList(String msg) { messageList.add(msg); updateView(); }}
JavaXPCOM