Bug in codecompletion? [message #51740] |
Tue, 16 June 2009 02:14 |
Eclipse User |
|
|
|
I've a question concerning the codecompletion feature respectively
deriving from TerminalsProposalProvider.
My model looks like
Application Library {
Module media {
Entity Library {
String name
}
abstract Entity Media {
String title
}
Entity Book extends Media {
String isbn
}
ValueObject Engagement {
String role
}
}
}
I defined a dsl like this
...
Model :
app=Application;
Application :
"Application" name=ID "{"
"basePackage" "=" basePackage=JavaIdentifier
(modules+=Module)*
"}";
Module :
"Module" name=ID "{"
(services+=Service)*
(domainObjects+=DomainObject)*
"}";
Attribute :
type=Type name=ID;
DomainObject :
Entity | ValueObject;
Service :
"Service" name=ID "{"
"}";
Entity :
(abstract?="abstract")? "Entity" name=ID ("extends" extends=[Entity])?
"{"
(attributes+=Attribute)+
"}"
;
ValueObject :
(abstract?="abstract")? "ValueObject" name=ID ("extends"
extends=[ValueObject])? "{"
(attributes+=Attribute)+
"}"
;
...
Now I'd like to add codecompletion for the service name:
public void completeService_Name(Service service, Assignment assignment,
ContentAssistContext context, ICompletionProposalAcceptor
acceptor) {
super.completeService_Name(service, assignment, context, acceptor);
...
ICompletionProposal completionProposal =
createServiceNameDefaultProposal(service, context);
acceptor.accept(completionProposal);
}
I noticed two things:
1. Codecompletion is only available if Service is followed by a
ValueObject.
2. Without only user input the service name is type of the following
object(ValueObject, Entity).
Are these bugs or are there any mistakes implementing the codecompletion?
|
|
|
Powered by
FUDForum. Page generated in 0.07689 seconds