/**
* in tml-start-tag partionions 'ENTER' and ' ' will be a valid auto activation char
*/
if (_viewer != null) {
try {
IDocument document = _viewer.getDocument();
ISelection selection =_viewer.getSelectionProvider().getSelection();
if (selection instanceof TextSelection) {
TextSelection textSelection = (TextSelection) selection;
int offset = textSelection.getOffset();
IRegion region = document.getPartition(offset);
boolean sameLine = document.getLineOfOffset(region.getOffset()) == document.getLineOfOffset(offset);
if (document.getContentType(region.getOffset()).equals(TMLPartitionScanner.TML_TAG_START)) {
TMLRegion tmlInfo = TMLRegion.parse(region, document, offset);
if (tmlInfo.isCursorInTagName()) {
return alphaNumericControlsNoEnter;
} else if (tmlInfo.isCursorInAttributeValue()) {
// check if attribute is tmlscript expression
IFile activeFile = Plugin.getDefault().getActiveFile();
String tagName = tmlInfo.getTagName();
if (activeFile != null && tagName != null) {
VersionCompliance versionCompliance = WGADesignStructureHelper.getWGAVersionCompliance(activeFile);
if (versionCompliance != null) {
TMLTag tag = TMLTagDefinitions.getInstance(versionCompliance).getTagByName(tagName);
if (tag != null) {
String attributeAtCursor = tmlInfo.getAttributeAtCursor();
if (attributeAtCursor != null) {
TMLTagAttribute attribute = tag.getAttribute(attributeAtCursor);
if (attribute != null && attribute.isTmlscriptExpression()) {
return _tmlScriptProcessor.getCompletionProposalAutoActivationCharacters();
}
}
}
}
}
return alphaNumericControls;
} else {
return alphaNumericControls;
}
} else if (document.getContentType(region.getOffset()).equals(IDocument.DEFAULT_CONTENT_TYPE) && sameLine) {
return alphaNumericControlsNoEnter;
}
}
} catch (BadLocationException e) {
} catch (ParseException e) {