org.eclipse.xtext.ui.editor.contentassist.ReplacementTextApplier Java Examples
The following examples show how to use
org.eclipse.xtext.ui.editor.contentassist.ReplacementTextApplier.
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: ContentAssistProcessorTestBuilder.java From xtext-eclipse with Eclipse Public License 2.0 | 5 votes |
protected String getProposedText(ICompletionProposal completionProposal) { String proposedText = completionProposal.getDisplayString(); if (completionProposal instanceof ConfigurableCompletionProposal) { ConfigurableCompletionProposal configurableProposal = (ConfigurableCompletionProposal) completionProposal; proposedText = configurableProposal.getReplacementString(); if (configurableProposal.getTextApplier() instanceof ReplacementTextApplier) { proposedText = ((ReplacementTextApplier) configurableProposal.getTextApplier()).getActualReplacementString(configurableProposal); } } return proposedText; }
Example #2
Source File: ContentAssistProcessorTestBuilder.java From xtext-eclipse with Eclipse Public License 2.0 | 5 votes |
protected String getProposedText(ICompletionProposal completionProposal) { String proposedText = completionProposal.getDisplayString(); if (completionProposal instanceof ConfigurableCompletionProposal) { ConfigurableCompletionProposal configurableProposal = (ConfigurableCompletionProposal) completionProposal; proposedText = configurableProposal.getReplacementString(); if (configurableProposal.getTextApplier() instanceof ReplacementTextApplier) { proposedText = ((ReplacementTextApplier) configurableProposal.getTextApplier()).getActualReplacementString(configurableProposal); } } return proposedText; }
Example #3
Source File: EclipseBug28DirtyStateModifierContentAssistTest.java From xtext-xtend with Eclipse Public License 2.0 | 5 votes |
private static String getProposedText(ICompletionProposal completionProposal) { String proposedText = completionProposal.getDisplayString(); if (completionProposal instanceof ConfigurableCompletionProposal) { ConfigurableCompletionProposal configurableProposal = (ConfigurableCompletionProposal) completionProposal; proposedText = configurableProposal.getReplacementString(); if (configurableProposal.getTextApplier() instanceof ReplacementTextApplier) { proposedText = ((ReplacementTextApplier) configurableProposal.getTextApplier()) .getActualReplacementString(configurableProposal); } } return proposedText; }
Example #4
Source File: Bug427440Test.java From xtext-xtend with Eclipse Public License 2.0 | 5 votes |
public String getProposedText(final ICompletionProposal completionProposal) { String proposedText = completionProposal.getDisplayString(); if ((completionProposal instanceof ConfigurableCompletionProposal)) { proposedText = ((ConfigurableCompletionProposal)completionProposal).getReplacementString(); ConfigurableCompletionProposal.IReplacementTextApplier _textApplier = ((ConfigurableCompletionProposal)completionProposal).getTextApplier(); if ((_textApplier instanceof ReplacementTextApplier)) { ConfigurableCompletionProposal.IReplacementTextApplier _textApplier_1 = ((ConfigurableCompletionProposal)completionProposal).getTextApplier(); proposedText = ((ReplacementTextApplier) _textApplier_1).getActualReplacementString(((ConfigurableCompletionProposal)completionProposal)); } } return proposedText; }
Example #5
Source File: AbstractContentAssistTest.java From sarl with Apache License 2.0 | 5 votes |
private static String getProposedText(ICompletionProposal completionProposal) { String proposedText = completionProposal.getDisplayString(); if (completionProposal instanceof ConfigurableCompletionProposal) { ConfigurableCompletionProposal configurableProposal = (ConfigurableCompletionProposal) completionProposal; proposedText = configurableProposal.getReplacementString(); if (configurableProposal.getTextApplier() instanceof ReplacementTextApplier) { proposedText = ((ReplacementTextApplier) configurableProposal.getTextApplier()) .getActualReplacementString(configurableProposal); } } return proposedText; }