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

#2556 fix selection processing for details pane

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