# OT/J Aspect Bindings

###### Identifier:

org.eclipse.objectteams.otequinox.aspectBindings

###### Since:

OTDT 0.9.1 based on Eclipse 3.2.

###### Description:

This extension point allows to define a new relationship between plug-ins called "aspectBinding". By an aspectBinding an aspect plug-in declares which base plug-ins it wishes to adapt and which team classes are used for that purpose. Only teams in this list are allowed to adapt classes from another plug-in, and such adaptation is restricted to classes residing in the specified base plug-in. Each team class mentioned in an aspectBinding is automatically instantiated before the corresponding base plug-in is fully activated. In addition extensions may specify that a given team is also activated after instantiation.

###### Configuration Markup:

<!ELEMENT extension (aspectBinding+)>

<!ATTLIST extension

id CDATA #IMPLIED

point CDATA #REQUIRED

name CDATA #IMPLIED>

<!ELEMENT aspectBinding (basePlugin , team+)>

<!ATTLIST aspectBinding

icon CDATA "platform:/plugin/org.eclipse.objectteams.otdt.ui/icons/ot/calloutbinding_obj.gif">

Specifies an individual aspect binding by which a given team class adapts classes from a given base plugin.

- icon - Default value to provide an icon for this element kind. No need to edit

<!ELEMENT basePlugin (forcedExports? , requiredFragment*)>

<!ATTLIST basePlugin

id CDATA #REQUIRED

icon CDATA "platform:/plugin/org.eclipse.pde.ui/icons/obj16/plugin_obj.png">

The base plug-in whose classes may be adapted by the given team(s). The base bundle must be a regular bundle, not a fragment. If a bundle fragment should be adapted the aspect binding must refer to the fragment's host bundle and additionally a `requiredFragment` should be added.

By specifying `SELF` as the basePlugin, a team may adapt classes from its own bundle.

- id - Qualified identifier of the base plug-in.
- icon - Default value to provide an icon for this element kind. No need to edit

<!ELEMENT team (superBase*)>

<!ATTLIST team

class CDATA #REQUIRED

superclass CDATA #IMPLIED

activation (NONE|THREAD|ALL_THREADS)

icon CDATA "platform:/plugin/org.eclipse.objectteams.otdt.ui/icons/ot/team_obj.gif">

The team class of this plug-in which is allowed to adapt classes of the given base plug-in.
If a nested team shall be used it must be specified using either its binary name (using a '$' separator).

- class - Fully qualified name of a team class.
- superclass - Fully qualified name of the team's super-class if that is not org.objectteams.Team but another team of the same plugin.
- activation - Request activation of this team class: NONE: don't automatically activate (default) THREAD: activate for one thread (discouraged) ALL_THREADS: activate for all threads
- icon - Default value to provide an icon for this element kind. No need to edit

<!ELEMENT forcedExports (#PCDATA)>

Declare any requests to access packages from the base plugin which are not exported. Provide comma separated list of package names (as in the OSGi Export-Package: header).

<!ELEMENT requiredFragment EMPTY>

<!ATTLIST requiredFragment

id CDATA #REQUIRED>

Name of a fragment of the base bundle that is required by the aspect.

- id - Symbolic name of the fragment.

<!ELEMENT superBase EMPTY>

<!ATTLIST superBase

plugin CDATA #IMPLIED

class CDATA #REQUIRED>

Relevant super classes of bound base classes. A super base class is relevant, if it defines a method, whose override in the exact base is bound by callin or decapsulating callout.

- plugin - the plugin holding the super base class (can be omitted if same as the basePlugin of the enclosing aspectBinding).
- class - Fully qualified dot/dollar-separated base class that is a super class of a bound base class.

###### Examples:

See example plugin org.eclipse.objectteams.otequinox.branding.

###### API Information:

The `class` named in the class property must be a team class thus implementing the `org.objectteams.ITeam` interface.

###### Supplied Implementation:

None.

This file is part of "Object Teams Development Tooling"-Software

Copyright 2006, 2010 Technical University Berlin, Germany. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html

Please visit www.objectteams.org for updates and contact.

Contributors:
Technical University Berlin - Initial API and implementation