//$NON-NLS-1$
@Override
    public String getAdditionalProposalInfo() {
        try {
            ASTNode coveringNode = mContext.getCoveringNode();
            int start = coveringNode.getStartPosition();
            int length = coveringNode.getLength();
            IBuffer buffer = mContext.getCompilationUnit().getBuffer();
            StringBuilder sb = new StringBuilder();
            String string = buffer.getText(start, length);
            string = ExtractStringRefactoring.unquoteAttrValue(string);
            String token = ExtractStringInputPage.guessId(string);
            // Look up the beginning and the end of the line (outside of the extracted string)
            // such that we can show a preview of the diff, e.g. if you have
            // foo.setTitle("Hello"); we want to show foo.setTitle(R.string.hello);
            // so we need to extract "foo.setTitle(" and ");".
            // Look backwards to the beginning of the line (and strip whitespace)
            int i = start - 1;
            while (i > 0) {
                char c = buffer.getChar(i);
                if (c == '\r' || (c == '\n')) {
                    break;
                }
                i--;
            }
            String linePrefix = buffer.getText(i + 1, start - (i + 1)).trim();
            // Look forwards to the end of the line (and strip whitespace)
            i = start + length;
            while (i < buffer.getLength()) {
                char c = buffer.getChar(i);
                if (c == '\r' || (c == '\n')) {
                    break;
                }
                i++;
            }
            String lineSuffix = buffer.getText(start + length, i - (start + length));
            // Should we show the replacement as just R.string.foo or
            // context.getString(R.string.foo) ?
            boolean useContext = false;
            ASTNode parent = coveringNode.getParent();
            if (parent != null) {
                int type = parent.getNodeType();
                if (type == ASTNode.ASSIGNMENT
                        || type == ASTNode.VARIABLE_DECLARATION_STATEMENT
                        || type == ASTNode.VARIABLE_DECLARATION_FRAGMENT
                        || type == ASTNode.VARIABLE_DECLARATION_EXPRESSION) {
                    useContext = true;
                }
            }
            // Display .java change:
            sb.append("...<br>");                   //$NON-NLS-1$
            sb.append(linePrefix);
            sb.append("<b>");                       //$NON-NLS-1$
            if (useContext) {
                sb.append("context.getString(");    //$NON-NLS-1$
            }
            sb.append("R.string.");                 //$NON-NLS-1$
            sb.append(token);
            if (useContext) {
                sb.append(")");                     //$NON-NLS-1$
            }
            sb.append("</b>");                      //$NON-NLS-1$
            sb.append(lineSuffix);
            sb.append("<br>...<br>");               //$NON-NLS-1$
            // Display strings.xml change:
            sb.append("<br>");                      //$NON-NLS-1$
            sb.append("&lt;resources&gt;<br>");     //$NON-NLS-1$
            sb.append("    <b>&lt;string name=\""); //$NON-NLS-1$
            sb.append(token);
            sb.append("\"&gt;");                    //$NON-NLS-1$
            sb.append(string);
            sb.append("&lt;/string&gt;</b><br>");   //$NON-NLS-1$
            sb.append("&lt;/resources&gt;");        //$NON-NLS-1$
            return sb.toString();
        } catch (JavaModelException e) {
            AdtPlugin.log(e, null);
        }
        return "Initiates the Extract String refactoring operation";
    }
}
// Display .java change:
sb.append("...<br>"); //$NON-NLS-1$
sb.append(linePrefix);
sb.append("<b>"); //$NON-NLS-1$
if (parent != null) {
int type = parent.getNodeType();
if (type == ASTNode.ASSIGNMENT
|| type == ASTNode.VARIABLE_DECLARATION_STATEMENT
|| type == ASTNode.VARIABLE_DECLARATION_FRAGMENT
|| type == ASTNode.VARIABLE_DECLARATION_EXPRESSION) {
useContext = true;
}
}
// Display .java change:
sb.append("...<br>"); //$NON-NLS-1$
sb.append(linePrefix);
sb.append("<b>"); //$NON-NLS-1$
if (useContext) {
sb.append("context.getString("); //$NON-NLS-1$
}
sb.append("R.string."); //$NON-NLS-1$
sb.append(token);
if (useContext) {
sb.append(")"); //$NON-NLS-1$
}
if (c == '\r' || (c == '\n')) {
break;
}
i++;
}
String lineSuffix = buffer.getText(start + length, i - (start + length));
// Should we show the replacement as just R.string.foo or
// context.getString(R.string.foo) ?
boolean useContext = false;
ASTNode parent = coveringNode.getParent();
if (parent != null) {
int type = parent.getNodeType();
if (type == ASTNode.ASSIGNMENT
|| type == ASTNode.VARIABLE_DECLARATION_STATEMENT
|| type == ASTNode.VARIABLE_DECLARATION_FRAGMENT
|| type == ASTNode.VARIABLE_DECLARATION_EXPRESSION) {
useContext = true;
}
}
// Display .java change:
sb.append("...<br>"); //$NON-NLS-1$
sb.append(linePrefix);
sb.append("<b>"); //$NON-NLS-1$
if (useContext) {
sb.append("context.getString("); //$NON-NLS-1$
}
sb.append("R.string."); //$NON-NLS-1$
sb.append(token);
if (useContext) {
sb.append(")"); //$NON-NLS-1$
}
sb.append("</b>"); //$NON-NLS-1$
sb.append(lineSuffix);
sb.append("<br>...<br>"); //$NON-NLS-1$
// Display strings.xml change:
sb.append("<br>"); //$NON-NLS-1$
sb.append("&lt;resources&gt;<br>"); //$NON-NLS-1$
sb.append(" <b>&lt;string name=\""); //$NON-NLS-1$
sb.append(token);
sb.append("\"&gt;"); //$NON-NLS-1$
sb.append(string);