public static void invokeContentAssist(ScriptEditor editor, int offset) {
editor.getViewer().setSelectedRange(offset, 0);
ITextOperationTarget target= (ITextOperationTarget) editor.getAdapter(ITextOperationTarget.class);
if (target != null && target.canDoOperation(ISourceViewer.CONTENTASSIST_PROPOSALS)) {
target.doOperation(ISourceViewer.CONTENTASSIST_PROPOSALS);
}
}
public static ContentAssistant getContentAssistant(ScriptEditor scriptEditor) {
// Need to do this because AdaptedSourceViewer is not extendable