|
| 1 | +/** |
| 2 | + * Copyright (c) 2016 NumberFour AG. |
| 3 | + * All rights reserved. This program and the accompanying materials |
| 4 | + * are made available under the terms of the Eclipse Public License v1.0 |
| 5 | + * which accompanies this distribution, and is available at |
| 6 | + * http://www.eclipse.org/legal/epl-v10.html |
| 7 | + * |
| 8 | + * Contributors: |
| 9 | + * NumberFour AG - Initial API and implementation |
| 10 | + */ |
| 11 | +package org.eclipse.n4js.formatting2; |
| 12 | + |
| 13 | +import org.eclipse.xtext.formatting2.FormatterPreferenceKeys; |
| 14 | +import org.eclipse.xtext.preferences.BooleanKey; |
| 15 | +import org.eclipse.xtext.preferences.IntegerKey; |
| 16 | + |
| 17 | +/** |
| 18 | + * |
| 19 | + */ |
| 20 | +public class N4JSFormatterPreferenceKeys extends FormatterPreferenceKeys { |
| 21 | + /***/ |
| 22 | + public static BooleanKey FORMAT_PARENTHESIS = new BooleanKey("format.parenthesis", false); |
| 23 | + /***/ |
| 24 | + public static BooleanKey FORMAT_SURROUND_PAREN_CONTENT_WITH_SPACE = new BooleanKey( |
| 25 | + "format.surround_paren_content_with_space", false); |
| 26 | + /***/ |
| 27 | + public static IntegerKey FORMAT_MAX_CONSECUTIVE_NEWLINES = new IntegerKey("format.max_consecutive_newlines", 2); |
| 28 | + /***/ |
| 29 | + public static BooleanKey FORMAT_SWITCH_CASES_HAVE_SPACE_IN_FRONT_OF_COLON = new BooleanKey( |
| 30 | + "format.switch_cases_have_space_in_front_of_colon", false); |
| 31 | + /***/ |
| 32 | + public static BooleanKey FORMAT_AUTO_WRAP_IN_FRONT_OF_LOGICAL_OPERATOR = new BooleanKey( |
| 33 | + "format.auto_wrap_in_front_of_logical_operator", true); |
| 34 | + /** |
| 35 | + * Considering the code <code>import a, {b,c,d} from "xy";</code> a value of <code>true</code> will render an |
| 36 | + * additional space after "{" and one before the closing bracket "}" Default value is <code>false</code> and the |
| 37 | + * line will be rendered as above. |
| 38 | + */ |
| 39 | + public static BooleanKey FORMAT_SURROUND_IMPORT_LIST_WITH_SPACE = new BooleanKey( |
| 40 | + "format.surround_import_list_with_space", false); |
| 41 | + |
| 42 | +} |
0 commit comments