Community
Participate
Working Groups
When a before or after callin is created using completion, the role side will have the same return type as the base side. However, any role return will simply be ignored. Thus, it would be nicer to actually use "void" as the return type so that users will not be tempted to return something meaningful and later wonder, why that value is not used at runtime. There is a technical challenge in this, because the callin modifier is selected after the role signature has already been generated.
Created attachment 178667 [details] Implementation This implementation - adds a "void" option to the role method return type (for explicit selection, if the user wishes) - adds mechanism for changing the return type to "void" when a before or after binding operator has been selected The technical issue is overcome by creating a custom Proposal, where computeEdits() merges regular edits with the change to the return type. Note, that the overall linked proposal holds nested proposals for each option within a link group. That's the trick for intercepting one of those options (modeled after how TemplateProposals work with MultiVariables etc). Interestingly this makes CreateMethodMappingCompletionProposal a class with all these properties - role - role file - team (needed to host gateway role MyJavaLinkedCompletionProposal) - a team extending a non-team class This is the stress test that triggered several recent bugs, but by now it works OK.
Patch has been committed as r777.
Verified using I201009211735