This repository has been archived by the owner on Apr 3, 2018. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
08b762d
commit 0116a5e
Showing
4 changed files
with
104 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
plugin_ide.ui/src-lang/melnorme/lang/ide/ui/editor/text/ILangAutoEditsPreferencesAccess.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2015 Bruno Medeiros and other Contributors. | ||
* 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: | ||
* Bruno Medeiros - initial API and implementation | ||
*******************************************************************************/ | ||
package melnorme.lang.ide.ui.editor.text; | ||
|
||
import melnorme.lang.ide.ui.CodeFormatterConstants.IndentMode; | ||
import melnorme.lang.ide.ui.text.util.AutoEditUtils; | ||
|
||
|
||
public interface ILangAutoEditsPreferencesAccess { | ||
|
||
boolean isSmartIndent(); | ||
|
||
boolean isSmartDeIndent(); | ||
|
||
boolean closeBlocks(); | ||
|
||
boolean closeBraces(); | ||
|
||
boolean isSmartPaste(); | ||
|
||
IndentMode getTabStyle(); | ||
|
||
int getIndentSize(); | ||
|
||
default String getIndentUnit() { | ||
if (getTabStyle() == IndentMode.SPACES) { | ||
return AutoEditUtils.getNSpaces(getIndentSize()); | ||
} else { | ||
return "\t"; | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters