110 likes | 216 Views
Bryan Campbell Software Engineer, Lombardi Software March 14, 2008. Deep integration of GWT/JavaScript and Eclipse 3.3 using XULRunner and JavaXPCOM. Demo …. XULRunner. XPCOM. MessagingComponent() { void addToList (String msg) { messageList.add(msg); updateView(); } }.
E N D
Bryan CampbellSoftware Engineer, Lombardi SoftwareMarch 14, 2008 Deep integration of GWT/JavaScript and Eclipse 3.3 using XULRunner and JavaXPCOM
XULRunner XPCOM MessagingComponent() { void addToList(String msg) { messageList.add(msg); updateView(); } } IMessagingComponent { addToList(String msg); } JavaXPCOM XPConnect
By wrapping the eclipse browser widget with XULRunner, we gain access to its component object model – XPCOM. XULRunner XPCOM MessagingComponent() { void addToList(String msg) { messageList.add(msg); updateView(); } } IMessagingComponent { addToList(String msg); }
JavaScript can make calls to XPCOM through the XPConnect layer. XULRunner XPCOM MessagingComponent() { void addToList(String msg) { messageList.add(msg); updateView(); } } IMessagingComponent { addToList(String msg); } XPConnect
Once the component is in place, the interface will be reflected to JavaScript through XPConnect • A call to this component might look similar to: XULRunner IMessagingComponent messenger = xpcom.create(IMessagingComponent); messenger.addToList(“EclipseCon 08”); XPCOM MessagingComponent() { void addToList(String msg) { messageList.add(msg); updateView(); } } IMessagingComponent { addToList(String msg); } XPConnect
The Java Implementation will be the actual code that is run when a call to addToList(String) is made from the web app XULRunner XPCOM MessagingComponent() { void addToList(String msg) { messageList.add(msg); updateView(); } } IMessagingComponent { addToList(String msg); } XPConnect
Similar to XPConnect, JavaXPCOM is the layer between Java and XPCOM allowing calls to be made, and XPCOM components to be used and manipulated. XULRunner XPCOM MessagingComponent() { void addToList(String msg) { messageList.add(msg); updateView(); } } IMessagingComponent { addToList(String msg); } JavaXPCOM XPConnect
More Info • Check out http://development.lombardi.com for more coding examples and resources. • Source also available at http://code.google.com/p/javaxpcom/