Search in sources :

Example 1 with GeneralTITANAutoEditStrategy

use of org.eclipse.titan.designer.editors.GeneralTITANAutoEditStrategy in project titan.EclipsePlug-ins by eclipse.

the class Configuration method getAutoEditStrategies.

@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 };
}
Also used : ClosingBracketIndentationAutoEditStrategy(org.eclipse.titan.designer.editors.ClosingBracketIndentationAutoEditStrategy) IAutoEditStrategy(org.eclipse.jface.text.IAutoEditStrategy) BracketCompletionAutoEditStrategy(org.eclipse.titan.designer.editors.BracketCompletionAutoEditStrategy) GeneralTITANAutoEditStrategy(org.eclipse.titan.designer.editors.GeneralTITANAutoEditStrategy)

Example 2 with GeneralTITANAutoEditStrategy

use of org.eclipse.titan.designer.editors.GeneralTITANAutoEditStrategy in project titan.EclipsePlug-ins by eclipse.

the class Configuration method getAutoEditStrategies.

@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 };
}
Also used : ClosingBracketIndentationAutoEditStrategy(org.eclipse.titan.designer.editors.ClosingBracketIndentationAutoEditStrategy) IAutoEditStrategy(org.eclipse.jface.text.IAutoEditStrategy) BracketCompletionAutoEditStrategy(org.eclipse.titan.designer.editors.BracketCompletionAutoEditStrategy) SmartIndentAfterNewLineAutoEditStrategy(org.eclipse.titan.designer.editors.ttcn3editor.SmartIndentAfterNewLineAutoEditStrategy) GeneralTITANAutoEditStrategy(org.eclipse.titan.designer.editors.GeneralTITANAutoEditStrategy) HeuristicalIntervalDetector(org.eclipse.titan.designer.editors.HeuristicalIntervalDetector)

Example 3 with GeneralTITANAutoEditStrategy

use of org.eclipse.titan.designer.editors.GeneralTITANAutoEditStrategy 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 };
}
Also used : ClosingBracketIndentationAutoEditStrategy(org.eclipse.titan.designer.editors.ClosingBracketIndentationAutoEditStrategy) IAutoEditStrategy(org.eclipse.jface.text.IAutoEditStrategy) BracketCompletionAutoEditStrategy(org.eclipse.titan.designer.editors.BracketCompletionAutoEditStrategy) GeneralTITANAutoEditStrategy(org.eclipse.titan.designer.editors.GeneralTITANAutoEditStrategy) HeuristicalIntervalDetector(org.eclipse.titan.designer.editors.HeuristicalIntervalDetector)

Example 4 with GeneralTITANAutoEditStrategy

use of org.eclipse.titan.designer.editors.GeneralTITANAutoEditStrategy 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 };
}
Also used : ClosingBracketIndentationAutoEditStrategy(org.eclipse.titan.designer.editors.ClosingBracketIndentationAutoEditStrategy) IAutoEditStrategy(org.eclipse.jface.text.IAutoEditStrategy) BracketCompletionAutoEditStrategy(org.eclipse.titan.designer.editors.BracketCompletionAutoEditStrategy) SmartIndentAfterNewLineAutoEditStrategy(org.eclipse.titan.designer.editors.ttcn3editor.SmartIndentAfterNewLineAutoEditStrategy) GeneralTITANAutoEditStrategy(org.eclipse.titan.designer.editors.GeneralTITANAutoEditStrategy) HeuristicalIntervalDetector(org.eclipse.titan.designer.editors.HeuristicalIntervalDetector)

Aggregations

IAutoEditStrategy (org.eclipse.jface.text.IAutoEditStrategy)4 BracketCompletionAutoEditStrategy (org.eclipse.titan.designer.editors.BracketCompletionAutoEditStrategy)4 ClosingBracketIndentationAutoEditStrategy (org.eclipse.titan.designer.editors.ClosingBracketIndentationAutoEditStrategy)4 GeneralTITANAutoEditStrategy (org.eclipse.titan.designer.editors.GeneralTITANAutoEditStrategy)4 HeuristicalIntervalDetector (org.eclipse.titan.designer.editors.HeuristicalIntervalDetector)3 SmartIndentAfterNewLineAutoEditStrategy (org.eclipse.titan.designer.editors.ttcn3editor.SmartIndentAfterNewLineAutoEditStrategy)2