/
DotStyleFormatter.java
32 lines (28 loc) · 1.31 KB
/
DotStyleFormatter.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/*******************************************************************************
* Copyright (c) 2016 itemis AG and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Alexander Nyßen (itemis AG) - initial API and implementation
*******************************************************************************/
package org.eclipse.gef4.dot.internal.parser.formatting;
import org.eclipse.xtext.formatting.impl.AbstractDeclarativeFormatter;
import org.eclipse.xtext.formatting.impl.FormattingConfig;
/**
* This class contains custom formatting declarations.
*/
public class DotStyleFormatter extends AbstractDeclarativeFormatter {
// @Inject
// private DotStyleGrammarAccess grammarAccess;
@Override
protected void configureFormatting(FormattingConfig c) {
// It's usually a good idea to activate the following three statements.
// They will add and preserve newlines around comments
// c.setLinewrap(0, 1, 2).before(grammarAccess.getSL_COMMENTRule());
// c.setLinewrap(0, 1, 2).before(grammarAccess.getML_COMMENTRule());
// c.setLinewrap(0, 1, 1).after(grammarAccess.getML_COMMENTRule());
}
}