//CFMLEditor curDoc = (CFMLEditor) this.fViewer.getDocument();
//ICFDocument cfd = (ICFDocument) curDoc.getDocumentProvider().getDocument(curDoc.getEditorInput());
TextSelection sel = (TextSelection) this.fViewer.getSelection();
int startPos = sel.getOffset();
ICFDocument cfd = (ICFDocument) this.fViewer.getDocument();
DocItem cti = cfd.getTagAt(startPos, startPos, true);
if(cti != null && this.selectedTag != null) {
if(cti.getStartPosition() == this.selectedTag.getStartPosition()){
this.selectedTagWasSelected = true;
} else {
clearTagBeginEndMarkers();
this.selectedTagWasSelected = false;
}
} else {
clearTagBeginEndMarkers();
}
this.selectedTag = null;
try {
// cfcomponent returns ASTVarDeclaration -- syntax is null for whatever reason (ASTVar's from cfscript?!)
if(cti != null
&& !cti.getName().equals("CfmlComment") && !cti.getName().equals("cfscript")
&& !cti.getName().startsWith("AST") && !cti.getName().equals("ScriptItem")) {
if (cti instanceof CfmlTagItem) {
if (cti.getName().equals("CfmlCustomTag") || ((TagItem) cti).hasClosingTag()) {
markBeginEndTags((CfmlTagItem) cti);
}
}
}
} catch (Exception e) {
System.err.println(cti.getName());
e.printStackTrace();
}
CFEPartitioner partitioner = (CFEPartitioner)cfd.getDocumentPartitioner();
CFEPartition part = partitioner.findClosestPartition(startPos);
if(part == null) {