*/
private static String makeDebuggerVariableHover(final ITextViewer textViewer,
final int offset, final int length) {
final IAdaptable adaptable = DebugUITools.getDebugContext();
if (adaptable != null) {
final IStackFrame frame = (IStackFrame) adaptable
.getAdapter(IStackFrame.class);
try {
if (frame != null && frame.hasVariables()) {
String varName = "";
try {
varName = textViewer.getDocument().get(offset, length);
} catch (final BadLocationException e) {
}
if (varName.length() > 0) {
final String firstLetter = varName.substring(0, 1);
if (firstLetter.toUpperCase().equals(firstLetter)) {
final IVariable[] vars = frame.getVariables();
for (final IVariable variable : vars) {
if (variable.getName().equals(varName)) {
final String value = variable.getValue()
.getValueString();
return makeVariablePresentation(varName, value);