The plug-in to look at for determining
the feasibility of this is org.eclipse.mylar.core. If you inspect org.ecipse.mylar.core.tests.ContextTest
you will notice that it runs as a regular JUnit test, and uses on the MylarContext
and related classes which are not coupled to Eclipse at all. However, the
bloated MylarContextManager encapsulates the additional semantics of working with
interest, and it does have some coupling to eclipse.ui, as do the structure
bridges. The monitoring stuff (e.g. AbstractInteractionMonitor) is coupled
to eclipse.ui, but it’s straightforward enough that you can probably just
ignore it and replicate some of that functionality. Likewise I think that
you will need to ignore everything outside of mylar.core because it is tightly
coupled to Eclipse classes.
What I suggest doing is coming up with a
proposal and bug report for how you would like MylarContextManager to be
decoupled from eclipse.ui, and if/how you would like to use structure
bridges. If there is a clear split that’s straightforward to make
in a behavior-preserving way then it should be fairly straightforward for you to
contribute an Ant build script which packages up the relevant mylar.core classes
as a JAR that can be used by your Prefuse tool.
Another thing to think about is whether
it would make sense for you to reuse the MylarPlugin infrastructure by doing
this integration via a custom OSGi framework. Way back I had a somewhat similar
task of making the JDT-based AspectJ compiler run on the command line (it’s
coupled to jdt.core and eclipse.resources), and did this by introducing a façade
that simulated a workspace by bridging directly to the filesystem, but ensuring
that the plug-in architecture was not used. You might be able to try
something similar while using only the parts of the plug-in architecture that
you need. But this approach would definitely be overkill for a
proof-of-concept.
Mik
From:
mylar-dev-bounces@xxxxxxxxxxx [mailto:mylar-dev-bounces@xxxxxxxxxxx] On Behalf Of Chris Callendar
Sent: November 29, 2005 10:20 AM
To: 'Mylar developer discussions'
Subject: [mylar-dev] Integrating
Mylar with Protege
Hi Mik,
I am looking into integrating Mylar with
Protege (http://protege.stanford.edu -
a free open source ontology editor).
Protege has a somewhat similar layout to
Eclipse - tree controls for navigating classes, instances, slots, etc. My
first objective is to be able to monitor Protege users navigating these
trees and lists to build up a context model and to allow them to filter the
ontologies.
One problem is that Protege is written in
Swing. It would be ideal if I could somehow use just the Mylar core
functionality with out the dependency on SWT and other Eclipse
jars. And since the Mylar Monitor is heavily tied to SWT
I expect to have to write some new monitors for Swing.
Also, since there are about 16 Mylar
subprojects, could you very briefly describe the important ones (what their
purpose is)? Or the ones that you think might be useful for my task
of integrating Mylar with Protege.
Thanks very much.
Chris Callendar