org.eclipse.xtext.ide.editor.bracketmatching.IBracePairProvider Java Examples
The following examples show how to use
org.eclipse.xtext.ide.editor.bracketmatching.IBracePairProvider.
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: BracePairMatcher.java From xtext-eclipse with Eclipse Public License 2.0 | 5 votes |
protected List<Character> getChars(IBracePairProvider bracePairProvider) { List<Character> chars = new ArrayList<>(); for (BracePair pair : bracePairProvider.getPairs()) { if (pair.getLeftBrace().length() == 1 && pair.getRightBrace().length() == 1) { chars.add(pair.getLeftBrace().charAt(0)); chars.add(pair.getRightBrace().charAt(0)); } else { throw new IllegalStateException( "Brace pair is invalid: " + pair + "; left and right braces should have length of one character."); } } return chars; }
Example #2
Source File: DefaultUiModule.java From xtext-eclipse with Eclipse Public License 2.0 | 4 votes |
/** * @since 2.8 */ @SingletonBinding public Class<? extends IBracePairProvider> bindIBracePairProvider() { return DefaultBracePairProvider.class; }
Example #3
Source File: BracePairMatcher.java From xtext-eclipse with Eclipse Public License 2.0 | 4 votes |
@Inject public void setBracePairProvider(IBracePairProvider bracePairProvider) { List<Character> chars = getChars(bracePairProvider); characterPairMatcher = new DefaultCharacterPairMatcher(((char[])Conversions.unwrapArray(chars, char.class))); }
Example #4
Source File: XtendUiModule.java From xtext-xtend with Eclipse Public License 2.0 | 4 votes |
/** * @since 2.8 */ @Override @SingletonBinding public Class<? extends IBracePairProvider> bindIBracePairProvider() { return XtendBracePairProvider.class; }
Example #5
Source File: AbstractSARLUiModule.java From sarl with Apache License 2.0 | 4 votes |
@SingletonBinding public Class<? extends IBracePairProvider> bindIBracePairProvider() { return XtendBracePairProvider.class; }