提交 673f0f90 编写于 作者: A Alexander Fedorov

#2556 fix selection processing for details pane

上级 6de5c08a
......@@ -22,15 +22,19 @@ public class DatabaseDetailPaneFactory implements IDetailPaneFactory {
{
HashSet<String> set = new HashSet<>();
if (selection.size() == 1) {
IBreakpoint b = (IBreakpoint) selection.getFirstElement();
try {
String type = b.getMarker().getType();
if (DebugCore.BREAKPOINT_DATABASE_LINE.equals(type)) {
set.add(DatabaseStandardBreakpointPane.DETAIL_PANE_STANDARD_BREAKPOINT);
} else {
set.add(DatabaseStandardBreakpointPane.DETAIL_PANE_STANDARD_BREAKPOINT);
Object first = selection.getFirstElement();
if (first instanceof IBreakpoint) {
IBreakpoint breakpoint = (IBreakpoint) first;
try {
String type = breakpoint.getMarker().getType();
if (DebugCore.BREAKPOINT_DATABASE_LINE.equals(type)) {
set.add(DatabaseStandardBreakpointPane.DETAIL_PANE_STANDARD_BREAKPOINT);
} else {
set.add(DatabaseStandardBreakpointPane.DETAIL_PANE_STANDARD_BREAKPOINT);
}
} catch (CoreException e) {
}
} catch (CoreException e) {
}
}
return set;
......@@ -40,15 +44,19 @@ public class DatabaseDetailPaneFactory implements IDetailPaneFactory {
public String getDefaultDetailPane(IStructuredSelection selection)
{
if (selection.size() == 1) {
IBreakpoint b = (IBreakpoint) selection.getFirstElement();
try {
String type = b.getMarker().getType();
if (DebugCore.BREAKPOINT_DATABASE_LINE.equals(type)) {
return DatabaseStandardBreakpointPane.DETAIL_PANE_STANDARD_BREAKPOINT;
} else {
return DatabaseStandardBreakpointPane.DETAIL_PANE_STANDARD_BREAKPOINT;
Object first = selection.getFirstElement();
if (first instanceof IBreakpoint) {
IBreakpoint breakpoint = (IBreakpoint) first;
try {
String type = breakpoint.getMarker().getType();
if (DebugCore.BREAKPOINT_DATABASE_LINE.equals(type)) {
return DatabaseStandardBreakpointPane.DETAIL_PANE_STANDARD_BREAKPOINT;
} else {
return DatabaseStandardBreakpointPane.DETAIL_PANE_STANDARD_BREAKPOINT;
}
} catch (CoreException e) {
}
} catch (CoreException e) {
}
}
return null;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册