fix unsupported breakpoint at method entry/exit or class (#129)

* Add location type check on breakpoint

Add location type check to avoid breakpoint on method/field which will never be hit in current implementation.

* fix breakpoint pos

update lines to the next line which is valid for breakpoint

* 1. add the logic to avoid duplicate install breakpoint when updated breakpoint lines have duplicate lines.

* revert unneeded change.

* removes invalid breakpoint

* fix checkstyle hint.

* Update typo in javadoc

* remove useless if condition

* remove tailing spaces.

* update javadoc

* revert the code to modify line numbers because in vscode, the action to set breakpoint will not report to our lang server immediately

* revert changes.
This commit is contained in:
Andy Xu(devdiv) 2018-03-06 14:36:09 +08:00 коммит произвёл GitHub
Родитель 405a8be910
Коммит 700637c5bf
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -150,7 +150,8 @@ public class JdtSourceLookUpProvider implements ISourceLookUpProvider {
ValidBreakpointLocationLocator locator = new ValidBreakpointLocationLocator(astUnit, lines[i], true, true);
astUnit.accept(locator);
// When the final valid line location is same as the original line, that represents it's a valid breakpoint.
if (lines[i] == locator.getLineLocation()) {
// Add location type check to avoid breakpoint on method/field which will never be hit in current implementation.
if (lines[i] == locator.getLineLocation() && locator.getLocationType() == ValidBreakpointLocationLocator.LOCATION_LINE) {
fqns[i] = locator.getFullyQualifiedTypeName();
}
}