org.eclipse.xtext.documentation.IJavaDocTypeReferenceProvider Java Examples
The following examples show how to use
org.eclipse.xtext.documentation.IJavaDocTypeReferenceProvider.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: XtendJavaDocCompletionProposalComputer.java From xtext-xtend with Eclipse Public License 2.0 | 6 votes |
protected boolean isValidPositionForTypeProposal(ContentAssistContext contentAssistContext){ INode currentNode = contentAssistContext.getCurrentNode(); String content = currentNode.getText(); int offsetInNode = contentAssistContext.getOffset() - currentNode.getOffset() - contentAssistContext.getPrefix().length(); String textInFront = content.substring(0, offsetInNode); int lastIndexOfLink = textInFront.lastIndexOf(IJavaDocTypeReferenceProvider.LINK_TAG_WITH_SUFFIX); if(lastIndexOfLink != -1){ if(textInFront.substring(lastIndexOfLink, offsetInNode).trim().equals(IJavaDocTypeReferenceProvider.LINK_TAG)) return true; } int lastIndexOfSee = textInFront.lastIndexOf(IJavaDocTypeReferenceProvider.SEE_TAG_WITH_SUFFIX); if(lastIndexOfSee != -1){ if(textInFront.substring(lastIndexOfSee, offsetInNode).trim().equals(IJavaDocTypeReferenceProvider.SEE_TAG)) return true; } return false; }
Example #2
Source File: DefaultXbaseRuntimeModule.java From xtext-extras with Eclipse Public License 2.0 | 4 votes |
/** * @since 2.16 */ public Class<? extends IJavaDocTypeReferenceProvider> bindIJavaDocReferenceProvider() { return XbaseJavaDocTypeReferenceProvider.class; }