Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 339520 - [assist] creating a role constructor via quickfix creates ';' instead of body
Summary: [assist] creating a role constructor via quickfix creates ';' instead of body
Status: VERIFIED FIXED
Alias: None
Product: Objectteams
Classification: Tools
Component: OTDT (show other bugs)
Version: 0.8   Edit
Hardware: Other Linux
: P3 normal (vote)
Target Milestone: 0.8 M6   Edit
Assignee: Stephan Herrmann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-10 09:03 EST by Stephan Herrmann CLA
Modified: 2011-06-07 09:46 EDT (History)
0 users

See Also:


Attachments
proposed fix & test (13.17 KB, patch)
2011-03-10 15:00 EST, 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 Stephan Herrmann CLA 2011-03-10 09:03:19 EST
public team class MyTeam {
    protected class R {
    }
    void test() {
        new R(3); // quickfix here
    }
}

creates (inside R):
        public R(int i);
instead of:
        public R(int i) {
		// TODO Auto-generated constructor stub
	}
Comment 1 Stephan Herrmann CLA 2011-03-10 15:00:16 EST
Created attachment 190912 [details]
proposed fix & test

The problem occurred because the quickfix was working with the interface part
binding of the role. Fixed by switching to the class part which also resolved
another issue: existing constructors where not found by the quickfix.

The change nicely fits into an existing callin (changed after to replace).
Comment 2 Stephan Herrmann CLA 2011-03-10 15:02:33 EST
Committed for 0.8 M6 as r1394 - 1396.
Comment 3 Stephan Herrmann CLA 2011-06-07 09:46:30 EDT
Verified using build 201106070730.