You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.
I have experienced the following Code Mining problem.
Steps to reproduce (based on the Domainmodel example shipped with the Xtext framework):
Replace the the DomainmodelCodeMiningProvider.java file with the following content:
publicclassDomainmodelCodeMiningProviderextendsAbstractXtextCodeMiningProvider {
@OverrideprotectedvoidcreateCodeMinings(IDocumentdocument, XtextResourceresource, CancelIndicatorindicator,
IAcceptor<? superICodeMining> acceptor) throwsBadLocationException {
if (resource.getContents().isEmpty()) {
return;
}
// get all entities in the open documentList<Entity> allEntities = EcoreUtil2.eAllOfType(resource.getContents().get(0), Entity.class);
for (Entitye : allEntities) {
// create code mining right after the entity nameList<INode> nodes = NodeModelUtils.findNodesForFeature(e, DomainmodelPackage.Literals.ABSTRACT_ELEMENT__NAME);
if (nodes == null || nodes.isEmpty()) {
continue;
}
INodelastNode = nodes.get(nodes.size() - 1);
intannotationOffset = lastNode.getEndOffset() + 1;
acceptor.accept(createNewLineContentCodeMining(annotationOffset, "CodeMiningText"));
}
}
}
I would like to write the CodeMiningText right after the entity name. It works if the curly brace is in the same line as the entity name, but there is some problem if the curly brace is in the next line:
The text was updated successfully, but these errors were encountered:
I have experienced the following Code Mining problem.
Steps to reproduce (based on the Domainmodel example shipped with the Xtext framework):
DomainmodelCodeMiningProvider.java
file with the following content:The text was updated successfully, but these errors were encountered: