org.eclipse.xtext.parsetree.reconstr.IHiddenTokenHelper Java Examples

The following examples show how to use org.eclipse.xtext.parsetree.reconstr.IHiddenTokenHelper. 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: FormattingConfig.java    From xtext-core with Eclipse Public License 2.0 5 votes vote down vote up
/**
 * @deprecated use {@link FormattingConfig2} instead
 */
@Deprecated
public FormattingConfig(IGrammarAccess grammarAccess, IHiddenTokenHelper hiddenTokenHelper,
		IIndentationInformation indentInfo) {
	super(grammarAccess, hiddenTokenHelper);
	this.indentInfo = indentInfo;
}
 
Example #4
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 #5
Source File: N4JSRuntimeModule.java    From n4js with Eclipse Public License 1.0 4 votes vote down vote up
/**
 * adds EOL to white spaces
 */
public Class<? extends IHiddenTokenHelper> bindIHiddenTokenHelper() {
	return N4JSHiddenTokenHelper.class;
}
 
Example #6
Source File: JSONRuntimeModule.java    From n4js with Eclipse Public License 1.0 4 votes vote down vote up
/** Bind custom hidden token helper. */
public Class<? extends IHiddenTokenHelper> bindIHiddenTokenHelper() {
	return JSONHiddenTokenHelper.class;
}
 
Example #7
Source File: AbstractFormattingConfig.java    From xtext-core with Eclipse Public License 2.0 4 votes vote down vote up
public AbstractFormattingConfig(IGrammarAccess grammarAccess, IHiddenTokenHelper hiddenTokenHelper) {
	super();
	this.grammarAccess = grammarAccess;
	this.hiddenTokenHelper = hiddenTokenHelper;
}
 
Example #8
Source File: FormattingConfig2.java    From xtext-core with Eclipse Public License 2.0 4 votes vote down vote up
public FormattingConfig2(IGrammarAccess grammarAccess, IHiddenTokenHelper hiddenTokenHelper,
		IIndentationInformation indentInfo, ILineSeparatorInformation lineSeparatorInfo) {
	super(grammarAccess, hiddenTokenHelper, indentInfo);
	this.lineSeparatorInfo = lineSeparatorInfo;
}
 
Example #9
Source File: AbstractDeclarativeFormatter.java    From xtext-core with Eclipse Public License 2.0 4 votes vote down vote up
protected IHiddenTokenHelper getHiddenTokenHelper() {
	return hiddenTokenHelper;
}
 
Example #10
Source File: ExtendedFormattingConfigBasedStream.java    From dsl-devkit with Eclipse Public License 1.0 4 votes vote down vote up
public IHiddenTokenHelper getHiddenTokenHelper() {
  return hiddenTokenHelper;
}
 
Example #11
Source File: WrapEntry.java    From dsl-devkit with Eclipse Public License 1.0 2 votes vote down vote up
/**
 * Instantiates a new wrap entry.
 *
 * @param hiddenTokenHelper
 *          the hidden token helper
 * @param line
 *          the line
 * @param entry
 *          the entry
 */
public WrapEntry(final IHiddenTokenHelper hiddenTokenHelper, final ExtendedLine line, final ExtendedLineEntry entry) {
  this.entry = entry;
  this.hiddenTokenHelper = hiddenTokenHelper;
  this.line = line;
}
 
Example #12
Source File: SpaceEntry.java    From dsl-devkit with Eclipse Public License 1.0 2 votes vote down vote up
/**
 * Instantiates a new space entry.
 *
 * @param hiddenTokenHelper
 *          the hidden token helper
 * @param line
 *          the line
 * @param entry
 *          the entry
 */
public SpaceEntry(final IHiddenTokenHelper hiddenTokenHelper, final ExtendedLine line, final ExtendedLineEntry entry) {
  this.entry = entry;
  this.hiddenTokenHelper = hiddenTokenHelper;
  this.line = line;
}
 
Example #13
Source File: ExtendedFormattingConfig.java    From dsl-devkit with Eclipse Public License 1.0 2 votes vote down vote up
/**
 * Instantiates a new AcfFormattingConfig.
 *
 * @param grammarAccess
 *          the grammar access
 * @param hiddenTokenHelper
 *          the hidden token helper
 * @param indentInfo
 *          the indent info
 * @param lineSeparatorInfo
 *          the line separator info
 */
public ExtendedFormattingConfig(final IGrammarAccess grammarAccess, final IHiddenTokenHelper hiddenTokenHelper, final IIndentationInformation indentInfo, final ILineSeparatorInformation lineSeparatorInfo) {
  super(grammarAccess, hiddenTokenHelper, indentInfo, lineSeparatorInfo);
}