org.chromium.debug.core/src/org/chromium/debug/core/model/LineBreakpointAdapter.java
equal
deleted
inserted
replaced
26 protected ITextEditor getEditor(IWorkbenchPart part) { |
26 protected ITextEditor getEditor(IWorkbenchPart part) { |
27 if (part instanceof ITextEditor) { |
27 if (part instanceof ITextEditor) { |
28 ITextEditor editorPart = (ITextEditor) part; |
28 ITextEditor editorPart = (ITextEditor) part; |
29 IResource resource = (IResource) editorPart.getEditorInput().getAdapter(IResource.class); |
29 IResource resource = (IResource) editorPart.getEditorInput().getAdapter(IResource.class); |
30 if (resource != null && |
30 if (resource != null && |
31 ChromiumDebugPluginUtil.CHROMIUM_EXTENSION.equals(resource.getFileExtension())) { |
31 ChromiumDebugPluginUtil.SUPPORTED_EXTENSIONS.contains(resource.getFileExtension())) { |
32 return editorPart; |
32 return editorPart; |
33 } |
33 } |
34 } |
34 } |
35 return null; |
35 return null; |
36 } |
36 } |
60 } |
60 } |
61 } |
61 } |
62 } |
62 } |
63 |
63 |
64 // Line numbers start with 0 in V8, with 1 in Eclipse. |
64 // Line numbers start with 0 in V8, with 1 in Eclipse. |
65 ChromiumLineBreakpoint lineBreakpoint = new ChromiumLineBreakpoint(resource, lineNumber + 1); |
65 ChromiumLineBreakpoint lineBreakpoint = new ChromiumLineBreakpoint(resource, lineNumber + 1, |
|
66 getDebugModelId()); |
66 DebugPlugin.getDefault().getBreakpointManager().addBreakpoint(lineBreakpoint); |
67 DebugPlugin.getDefault().getBreakpointManager().addBreakpoint(lineBreakpoint); |
67 } |
68 } |
68 } |
69 } |
69 |
70 |
70 public boolean canToggleLineBreakpoints(IWorkbenchPart part, ISelection selection) { |
71 public boolean canToggleLineBreakpoints(IWorkbenchPart part, ISelection selection) { |