use of org.eclipse.wst.jsdt.web.ui.internal.autoedit.AutoEditStrategyForJs in project webtools.sourceediting by eclipse.
the class StructuredTextViewerConfigurationJSDT method getAutoEditStrategies.
/**
* @see org.eclipse.wst.html.ui.StructuredTextViewerConfigurationHTML#getAutoEditStrategies(org.eclipse.jface.text.source.ISourceViewer, java.lang.String)
*/
public IAutoEditStrategy[] getAutoEditStrategies(ISourceViewer sourceViewer, String contentType) {
if (contentType.equals(IHTMLPartitions.SCRIPT) || contentType.equals(IHTMLPartitions.SCRIPT_EVENTHANDLER)) {
IAutoEditStrategy[] strategies = new IAutoEditStrategy[1];
strategies[0] = new AutoEditStrategyForJs();
return strategies;
} else {
return super.getAutoEditStrategies(sourceViewer, contentType);
}
}
use of org.eclipse.wst.jsdt.web.ui.internal.autoedit.AutoEditStrategyForJs in project webtools.sourceediting by eclipse.
the class JSDTStructuredTextViewerConfigurationJSP method getAutoEditStrategies.
/**
* @see org.eclipse.jst.jsp.ui.StructuredTextViewerConfigurationJSP#getAutoEditStrategies(org.eclipse.jface.text.source.ISourceViewer, java.lang.String)
*/
public IAutoEditStrategy[] getAutoEditStrategies(ISourceViewer sourceViewer, String contentType) {
if (contentType.equals(IHTMLPartitions.SCRIPT) || contentType.equals(IHTMLPartitions.SCRIPT_EVENTHANDLER)) {
IAutoEditStrategy[] strategies = new IAutoEditStrategy[1];
strategies[0] = new AutoEditStrategyForJs();
return strategies;
} else {
return super.getAutoEditStrategies(sourceViewer, contentType);
}
}
Aggregations