org.eclipse.jface.text.DefaultIndentLineAutoEditStrategy Java Examples
The following examples show how to use
org.eclipse.jface.text.DefaultIndentLineAutoEditStrategy.
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: ModulaSourceViewerConfiguration.java From xds-ide with Eclipse Public License 1.0 | 5 votes |
/** * {@inheritDoc} */ @Override public IAutoEditStrategy[] getAutoEditStrategies( ISourceViewer sourceViewer , String contentType ) { IAutoEditStrategy strategy = IDocument.DEFAULT_CONTENT_TYPE.equals(contentType) ? new ModulaAutoEditStrategy() : new DefaultIndentLineAutoEditStrategy(); return new IAutoEditStrategy[] { strategy }; }
Example #2
Source File: ImpexSourceViewerConfig.java From hybris-commerce-eclipse-plugin with Apache License 2.0 | 3 votes |
@Override public IAutoEditStrategy[] getAutoEditStrategies(ISourceViewer sourceViewer, String contentType) { IAutoEditStrategy strategy= (IDocument.DEFAULT_CONTENT_TYPE.equalsIgnoreCase(contentType) ? new ImpexBracesAutoEditStrategy() : new DefaultIndentLineAutoEditStrategy()); IAutoEditStrategy headerStr = (ImpexDocumentPartitioner.IMPEX_HEADER.equalsIgnoreCase(contentType) ? new ImpexBracesAutoEditStrategy() : new DefaultIndentLineAutoEditStrategy()); return new IAutoEditStrategy[] { strategy, headerStr }; }