Primitive void cannot be a dependency. [message #1720324] |
Sun, 17 January 2016 07:31 |
Jia Poh Kow Messages: 25 Registered: November 2015 |
Junior Member |
|
|
Hi all,
I read the documentation and was currently working according to the sample found in the topic 7.2 - content assist.
Sample is provided in the documentation. However when i copy paste the sample to the src-folder of the ui project called ProposalProvider.xtend , it gave me an error
Primitive void cannot be a dependency
at the void word.
Below is my code:
public class FypProposalProvider extends AbstractFypProposalProvider {
public void completeModel_StringDescription (
Model model,
Assignment assignment,
ContentAssistContext context,
ICompletionProposalAcceptor acceptor) {
// call implementation in superclass
super.completeModel_StringDescription(
model,
assignment,
context,
acceptor);
// compute the plain proposal
String proposal = "Description for model #" + model.getIntAttribute();
// convert it to a valid STRING-terminal
proposal = getValueConverter().toString(proposal, "STRING");
// create the completion proposal
// the result may be null as the createCompletionProposal(..) methods
// check for valid prefixes
// and terminal token conflicts
ICompletionProposal completionProposal =
createCompletionProposal(proposal, context);
// register the proposal, the acceptor handles null-values gracefully
acceptor.accept(completionProposal);
}
}
I am not sure whether it is an error or I did miss out anything.
Appreciate your help.
Thank you.
|
|
|
Re: Primitive void cannot be a dependency. [message #1720328 is a reply to message #1720324] |
Sun, 17 January 2016 10:56 |
|
Hi,
the code you paste ist java code not xtend code. how does your xtend version of the code look like? something like
override void completeModel_StringDescription (
Model model,
Assignment assignment,
ContentAssistContext context,
ICompletionProposalAcceptor acceptor) {
// call implementation in superclass
super.completeModel_StringDescription(
model,
assignment,
context,
acceptor);
// compute the plain proposal
var String proposal = "Description for model #" + model.getIntAttribute();
// convert it to a valid STRING-terminal
proposal = getValueConverter().toString(proposal, "STRING");
// create the completion proposal
// the result may be null as the createCompletionProposal(..) methods
// check for valid prefixes
// and terminal token conflicts
val ICompletionProposal completionProposal =
createCompletionProposal(proposal, context);
// register the proposal, the acceptor handles null-values gracefully
acceptor.accept(completionProposal);
}
????
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
|
|
|
|
|
|
|
Re: Primitive void cannot be a dependency. [message #1720747 is a reply to message #1720336] |
Wed, 20 January 2016 15:54 |
Jia Poh Kow Messages: 25 Registered: November 2015 |
Junior Member |
|
|
Hi Christian,
thank you for your resources...
I understand that there should be a default hover according to the blog.
However, I cannot get my default hover...
So, is there anything else needed in order to get the default hover??
or default hover should exist once project is created...**I tried to create a totally new project...but there are no default hover seen**
Any idea on what is happening??
Thanks =)
[Updated on: Wed, 20 January 2016 15:55] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.02975 seconds