Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Objectteams » OT/Equinox Adaption of OT/Equinox powered plugins and Teams?
OT/Equinox Adaption of OT/Equinox powered plugins and Teams? [message #642839] Thu, 02 December 2010 21:37 Go to next message
Jan Marc Hoffmann is currently offline Jan Marc HoffmannFriend
Messages: 32
Registered: July 2009
Check out the following source from the OT svn:

http:// pse_3.6_OTDT_0.7/plugins/org.eclipse.objectteams.otdt.jdt.ui /src/org/eclipse/objectteams/otdt/internal/ui/javaeditor/Jav OLS_OBJECTTEAMS&sortby=file

The JavaSourceViewerConfiguration role is a nice Adaption of the JavaSourceViewerConfiguration. It adds the OT keywords to the existing Java Keywords.

I would like to do about the same. Adding additional keywords to the existing Java and OT Keywords. So I thought i may reuse this Role from my own ui plugin and add my language specific keywords.

So I tried the following:

public team class GOTJavaEditorAdaptor extends JavaEditorAdaptor {
	protected team class JavaSourceViewerConfiguration {
		protected class WordMatcher {
			callin void addWord(String word, IToken token) {
				System.out.println("no more OT keywords... ;=)");



But how do I make it work with OT/Equinox? What about the superclass field in the aspectBinding dialog? Can I add a base plugin team there?

And should I activate my Team?

Is the inheritance correct?



Jan Marc

Re: OT/Equinox Adaption of OT/Equinox powered plugins and Teams? [message #642846 is a reply to message #642839] Thu, 02 December 2010 22:35 Go to previous message
Stephan Herrmann is currently offline Stephan HerrmannFriend
Messages: 1845
Registered: July 2009
Senior Member
Mh, that's cool idea but ... there's a few things to consider.
Most importantly: if your plugin installs a sub-team of
the JavaEditorAdaptor you'll end up with two team instances
at runtime, both trying to adapt the same base object.
This wouldn't be a problem if the other plugin gave you
an API for deactivating its team. But it doesn't Rolling Eyes

But I can show you the master switch: Look at ce/Eclipse_3.6_OTDT_0.7/plugins/org.eclipse.objectteams.ecli pse.monitor/src/org/eclipse/objectteams/eclipse/monitor/Moni by=file

and search method readTeams().
Do you see what I mean? Cool

A word on the superclass field: this is only a necessary
advice for OT/Equinox to ensure proper order of reading
team classes. However, team inheritance across
plugin boarders is indeed uncharted waters.
From looking at the code, chances for success might
even be better without setting the superclass field.
For that matter I'd like to ask you to just try both
versions. However, the base plugin is not correct in
your snippet, you should say "org.eclipse.jdt.ui" here.

I'll also think about an alternative solution
(involving roles-of-roles and that kind of stuff).
I'll come back to you if that works for this particular setting.

Previous Topic:E4 efforts for harmonizing jdt
Next Topic:When it gets bigger... Teamactivation or base when or nothing?
Goto Forum:

Current Time: Tue May 24 09:10:13 GMT 2022

Powered by FUDForum. Page generated in 0.02330 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top