org.eclipse.xtext.formatting.impl.AbstractFormattingConfig.ElementPattern Java Examples

The following examples show how to use org.eclipse.xtext.formatting.impl.AbstractFormattingConfig.ElementPattern. 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: DotFormatter.java    From gef with Eclipse Public License 2.0 5 votes vote down vote up
/**
 * Instantiates a formatting configuration based stream
 */
DotFormattingConfigBasedStream(ITokenStream out,
		String initialIndentation, FormattingConfig cfg,
		IElementMatcher<ElementPattern> matcher,
		IHiddenTokenHelper hiddenTokenHelper, boolean preserveSpaces) {
	super(out, initialIndentation, cfg, matcher, hiddenTokenHelper,
			preserveSpaces);
}
 
Example #2
Source File: FormattingConfigBasedStream.java    From xtext-core with Eclipse Public License 2.0 5 votes vote down vote up
public FormattingConfigBasedStream(ITokenStream out, String initialIndentation, FormattingConfig cfg,
		IElementMatcher<ElementPattern> matcher, IHiddenTokenHelper hiddenTokenHelper, boolean preserveSpaces) {
	super(out);
	this.cfg = cfg;
	this.matcher = matcher;
	this.hiddenTokenHelper = hiddenTokenHelper;
	this.preserveSpaces = preserveSpaces;
	this.indentationPrefix = initialIndentation == null ? "" : initialIndentation;
}
 
Example #3
Source File: ExtendedFormattingConfigBasedStream.java    From dsl-devkit with Eclipse Public License 1.0 5 votes vote down vote up
public ExtendedFormattingConfigBasedStream(final ITokenStream out, final String indentation, final FormattingConfig cfg, final IElementMatcher<ElementPattern> matcher,
                                      final IHiddenTokenHelper hiddenTokenHelper, final boolean preserveSpaces, final AbstractExtendedFormatter formatter) {
// @Format-On
  super(out, indentation, cfg, matcher, hiddenTokenHelper, preserveSpaces);
  this.storedPreserveSpacesValue = preserveSpaces;
  this.formatter = formatter;
  this.noFormatMemento = new NoFormatLocator(cfg);
}
 
Example #4
Source File: AbstractDeclarativeFormatter.java    From xtext-core with Eclipse Public License 2.0 4 votes vote down vote up
protected IElementMatcher<ElementPattern> createMatcher() {
	return matcherProvider.createMatcher(getConfig().getLocatorsForSemanticTokens());
}