PHP "Add to watches" should add a symbol under cursor, currently it adds only if it's in selection (WI-6863) [rev=nik](cherry picked from commit 15e7990)

This commit is contained in:
Nikolay Matveev
2011-07-14 18:37:10 +04:00
parent 294c7c8fc1
commit 07a67c7040
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2010 JetBrains s.r.o.
* Copyright 2000-2011 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -52,7 +52,7 @@ public class XAddToWatchesFromEditorActionHandler extends XDebuggerActionHandler
if (evaluator != null) {
final int offset = editor.getCaretModel().getOffset();
final Document document = editor.getDocument();
final TextRange textRange = evaluator.getExpressionRangeAtOffset(session.getProject(), document, offset);
final TextRange textRange = evaluator.getExpressionRangeAtOffset(session.getProject(), document, offset, false);
if (textRange != null) {
text = document.getText(textRange);
}