mirror of
https://github.com/sigmasternchen/xtext-core
synced 2025-03-16 16:58:56 +00:00
[formatter2] hide a method from public API
This commit is contained in:
parent
e7e8f1bc58
commit
692a5d946a
2 changed files with 3 additions and 6 deletions
|
@ -14,6 +14,7 @@ import org.eclipse.emf.ecore.EObject;
|
|||
import org.eclipse.emf.ecore.EStructuralFeature;
|
||||
import org.eclipse.xtext.AbstractRule;
|
||||
import org.eclipse.xtext.formatting2.internal.CommentReplacer;
|
||||
import org.eclipse.xtext.formatting2.internal.FormattableDocument;
|
||||
import org.eclipse.xtext.formatting2.internal.HiddenRegionFormatting;
|
||||
import org.eclipse.xtext.formatting2.internal.HiddenRegionFormattingMerger;
|
||||
import org.eclipse.xtext.formatting2.internal.HiddenRegionReplacer;
|
||||
|
@ -207,7 +208,7 @@ public abstract class AbstractFormatter2 implements IFormatter2 {
|
|||
IFormattableDocument document = createFormattableDocument();
|
||||
XtextResource xtextResource = request.getTextRegionAccess().getResource();
|
||||
format(xtextResource, document);
|
||||
List<ITextReplacement> replacements = document.renderToTextReplacements();
|
||||
List<ITextReplacement> replacements = ((FormattableDocument) document).renderToTextReplacements();
|
||||
return replacements;
|
||||
} finally {
|
||||
reset();
|
||||
|
|
|
@ -7,8 +7,6 @@
|
|||
*******************************************************************************/
|
||||
package org.eclipse.xtext.formatting2;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.emf.ecore.EObject;
|
||||
import org.eclipse.xtext.formatting2.regionaccess.IHiddenRegion;
|
||||
import org.eclipse.xtext.formatting2.regionaccess.ISemanticRegion;
|
||||
|
@ -39,7 +37,7 @@ import com.google.common.base.Predicate;
|
|||
*
|
||||
* @noextend This interface is not intended to be extended by clients.
|
||||
* @noimplement This interface is not intended to be implemented by clients.
|
||||
* @since 2.7
|
||||
* @since 2.8
|
||||
*/
|
||||
public interface IFormattableDocument {
|
||||
|
||||
|
@ -66,8 +64,6 @@ public interface IFormattableDocument {
|
|||
|
||||
<T extends EObject> T prepend(T semanticRegion, Procedure1<IHiddenRegionFormatter> before);
|
||||
|
||||
List<ITextReplacement> renderToTextReplacements();
|
||||
|
||||
IHiddenRegion set(IHiddenRegion hiddenRegion, Procedure1<IHiddenRegionFormatter> init);
|
||||
|
||||
ISemanticRegion surround(ISemanticRegion semanticRegion, Procedure1<IHiddenRegionFormatter> beforeAndAfter);
|
||||
|
|
Loading…
Reference in a new issue