use of org.eclipse.titan.designer.editors.HeuristicalIntervalDetector in project titan.EclipsePlug-ins by eclipse.
the class Configuration method getAutoEditStrategies.
/**
* Returns the auto indentation strategy ready to be used with the given
* source viewer when manipulating text of the given content type..
*
* @param sourceViewer
* the source viewer to be configured by this
* configuration
* @param contentType
* the content type for which the strategy is applicable
* @return the auto indent strategy or <code>null</code> if automatic
* indentation is not to be enabled
*/
@Override
public IAutoEditStrategy[] getAutoEditStrategies(final ISourceViewer sourceViewer, final String contentType) {
HeuristicalIntervalDetector detector = new HeuristicalIntervalDetector();
GeneralTITANAutoEditStrategy strategy2 = new ClosingBracketIndentationAutoEditStrategy();
strategy2.setHeuristicIntervalDetector(detector);
GeneralTITANAutoEditStrategy strategy3 = new SmartIndentAfterNewLineAutoEditStrategy();
strategy3.setHeuristicIntervalDetector(detector);
return new IAutoEditStrategy[] { new BracketCompletionAutoEditStrategy(), strategy2, strategy3 };
}
use of org.eclipse.titan.designer.editors.HeuristicalIntervalDetector in project titan.EclipsePlug-ins by eclipse.
the class Configuration method getAutoEditStrategies.
/**
* Returns the auto indentation strategy ready to be used with the given
* source viewer when manipulating text of the given content type..
*
* @param sourceViewer
* the source viewer to be configured by this
* configuration
* @param contentType
* the content type for which the strategy is applicable
* @return the auto indent strategy or <code>null</code> if automatic
* indentation is not to be enabled
*/
@Override
public IAutoEditStrategy[] getAutoEditStrategies(final ISourceViewer sourceViewer, final String contentType) {
HeuristicalIntervalDetector detector = new HeuristicalIntervalDetector();
GeneralTITANAutoEditStrategy strategy2 = new ClosingBracketIndentationAutoEditStrategy();
strategy2.setHeuristicIntervalDetector(detector);
GeneralTITANAutoEditStrategy strategy3 = new SmartIndentAfterNewLineAutoEditStrategy();
strategy3.setHeuristicIntervalDetector(detector);
return new IAutoEditStrategy[] { new BracketCompletionAutoEditStrategy(), strategy2, strategy3 };
}
Aggregations