Bug 474841

Summary: Fragment editor suggests incorrect name for inner class
Product: [Eclipse Project] Platform Reporter: Alex Blewitt <alex.blewitt>
Component: UIAssignee: Jonas Helming <jhelming>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jhelming, Lars.Vogel, psuzzi
Version: 4.5.1Keywords: bugday, helpwanted
Target Milestone: 4.6 M3   
Hardware: All   
OS: All   
See Also: https://git.eclipse.org/r/56322
https://git.eclipse.org/c/platform/eclipse.platform.ui.tools.git/commit/?id=020ff70cbb3243558e52b9e99da266b07398fbd8
Whiteboard:
Attachments:
Description Flags
Inner class now looks picked up correctly none

Description Alex Blewitt CLA 2015-08-12 16:18:59 EDT
In the fragment.e4xmi editor, when adding an existing handler (with an associated Class URI hyperlink) with the Find button, inner classes are named incorrectly.

For example:

package foo;

public class Outer {
  public static class Inner {
    @Execute
    public void doIt() {
    }
  }
}

Clicking on 'Find' results in a URL like:

bundleclass://thebundle/foo.Inner

Clearly this is going to fail at runtime. It should instead create:

bundleclass://thebundle/foo.Outer$Inner

It looks like it's using a combination of Package.getName() and Class.getName() which ignores any external classes.
Comment 1 Lars Vogel CLA 2015-08-13 03:54:19 EDT
Gerrit reviews are welcome
Comment 2 Eclipse Genie CLA 2015-09-20 21:35:20 EDT
New Gerrit change created: https://git.eclipse.org/r/56322
Comment 3 Patrik Suzzi CLA 2015-09-20 21:37:37 EDT
Created attachment 256705 [details]
Inner class now looks picked up correctly


Outer class is now picked up together with inner class.
Comment 5 Jonas Helming CLA 2015-09-21 15:44:49 EDT
patch accepted