Bug 474841 - Fragment editor suggests incorrect name for inner class
Summary: Fragment editor suggests incorrect name for inner class
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.5.1   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 4.6 M3   Edit
Assignee: Jonas Helming CLA
QA Contact:
URL:
Whiteboard:
Keywords: bugday, helpwanted
Depends on:
Blocks:
 
Reported: 2015-08-12 16:18 EDT by Alex Blewitt CLA
Modified: 2015-09-21 15:44 EDT (History)
3 users (show)

See Also:


Attachments
Inner class now looks picked up correctly (89.39 KB, image/png)
2015-09-20 21:37 EDT, Patrik Suzzi CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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