Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 311206 - Adding InnerTeam for aspectBinding with the PDE Extension Editor results in wrong code
Summary: Adding InnerTeam for aspectBinding with the PDE Extension Editor results in w...
Status: VERIFIED FIXED
Alias: None
Product: Objectteams
Classification: Tools
Component: OTEquinox (show other bugs)
Version: 1.4   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 0.7 M2   Edit
Assignee: Stephan Herrmann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-30 12:10 EDT by Jan Marc Hoffmann CLA
Modified: 2013-07-27 08:42 EDT (History)
1 user (show)

See Also:


Attachments
patch (3.28 KB, patch)
2010-05-01 16:31 EDT, Stephan Herrmann CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Marc Hoffmann CLA 2010-04-30 12:10:58 EDT
When adding an aspectBinding using the PDT Editor, the class property for inner Teams will get the wrong value.:

Added:
package.OuterTeam$InnerTeam

Should be:
package.OuterTeam$__OT__InnerTeam

Reproduction:
Open PDT Editor
Add aspectBinding
Browse InnerTeam
Comment 1 Stephan Herrmann CLA 2010-04-30 17:19:04 EDT
I just (bug 311109) added capability to OT/Equinox to correctly handle
the case where a team is specified as package.OuterTeam.InnerTeam.

I'm leaving this bug open for now to remind me that we need to settle
the issue of '.' vs. '$'. I wonder whether (where?) it is specified
how extension points should handle nested classes - by their source
name (using '.') or binary name (using '$').
Assuming that the name will be used for a call to loadClass() the
binary name is probably correct and OT/Equinox would still need
to learn translating Outer$Inner into Outer$__OT__Inner.
Comment 2 Stephan Herrmann CLA 2010-05-01 16:31:37 EDT
Created attachment 166721 [details]
patch

This patch adds heuristics that can find the correct binary name
from either a source name (using '$') or a binary name referring to
the interface part with a '$' separator. Either separators are replaced 
by "$__OT__" (recursively) to check whether a class of that name exists.
Names with more "$__OT__" are tried before others.

For source names only those names are considered as classes that start
with an upper case letter (according to code conventions), to avoid
gazillions of failing class lookups.
Comment 3 Stephan Herrmann CLA 2010-05-01 16:39:21 EDT
Patch (along with slight update to the extension point docu) is committed as r276.
Comment 4 Stephan Herrmann CLA 2010-05-07 05:14:44 EDT
Verified for M2 using I201005052210
Comment 5 Stephan Herrmann CLA 2013-07-27 08:42:27 EDT
For reference: in Luna the '.' notation for inner teams can no longer be supported,
a '$' will be mandatory, because we need to generate a dynamic import from the
team name, which is impossible, if it contains path segments that could either be
a package or an outer class.

See also bug 406518.