}
public String getRefactorString(String key) throws BadLocationException {
ITextSelection textSelection = ((ITextSelection) _editor.getEditorSite().getSelectionProvider().getSelection());
ITypedRegion region = _doc.getPartition(textSelection.getOffset());
String tmlLabelTag = "";
if (region.getType().equals(IDocument.DEFAULT_CONTENT_TYPE)) {
// generats tmltag
tmlLabelTag = "<tml:label";
if (!_labelFileName.equals("general")) {
tmlLabelTag += " file=\"" + _labelFileName + "\"";
}
tmlLabelTag += " key=\"" + key + "\"/>";
}
if (region.getType().equals(TMLPartitionScanner.TML_TAG_START)) {
try {
TMLRegion tmlRegion = TMLRegion.parse(region, _doc, textSelection.getOffset());
if (tmlRegion.isCursorInAttributeValue()) {
tmlLabelTag = "{label(\'" + key + "\')}";
}