Browse Prior Art Database

Running Eclipse plugins inside a J2EE web application

IP.com Disclosure Number: IPCOM000051267D
Original Publication Date: 2005-Feb-10
Included in the Prior Art Database: 2005-Feb-10
Document File: 1 page(s) / 17K

Publishing Venue

IBM

Abstract

This disclosure describes how to reuse an existing eclipse plug-in inside another non-eclipse based application, for instance a web application.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 51% of the total text.

Page 1 of 1

Running Eclipse plugins inside a J2EE web application

This disclosure describes how to reuse an existing Eclipse plug-in inside another non-Eclipse based application, for instance a web application.

When reusing existing java code inside an application based on Eclipse, all that is required is to create a plug-in to wrap the existing code. In general this would work, because all java APIs are available inside Eclipse.

However if there is an existing Eclipse plug-in then it is a lot harder to reuse it inside a non-Eclipse based application. This is because a plug-in typically uses several Eclipse functions like extension points, resource loading etc. These APIs are not available in non-Eclipse based applications.

The developer ends up duplicating most of the code so it can run in both the Eclipse plug-in and in the non-Eclipse application. This would mean that they'd end up having to support two code bases that would be about 95% the same. The biggest problem would be that it is pretty easy for these two code bases to become out of sync resulting in lower quality code.

The solution here is to implement an Eclipse compatibility layer. By re-implementing the core Eclipse APIs we can run the Eclipse plug-in inside our host application. The plug-in would run as-if it was running inside Eclipse, while the host application could interact with it using the same APIs other plug-ins would use inside Eclipse.

When the host application is initialized it makes a call to the compatibility runtime to initialize itself. The host passes in the file path for the plug-in directory. The runtime in turn searches the specif...