| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 package org.chromium.debug.ui.actions; | 5 package org.chromium.debug.ui.actions; |
| 6 | 6 |
| 7 import org.chromium.debug.core.model.ChromiumLineBreakpoint; | 7 import org.chromium.debug.core.model.ChromiumLineBreakpoint; |
| 8 import org.eclipse.debug.core.model.IBreakpoint; | 8 import org.eclipse.debug.core.model.IBreakpoint; |
| 9 import org.eclipse.debug.ui.actions.RulerBreakpointAction; | 9 import org.eclipse.debug.ui.actions.RulerBreakpointAction; |
| 10 import org.eclipse.jface.action.IAction; | 10 import org.eclipse.jface.action.IAction; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 } | 26 } |
| 27 | 27 |
| 28 @Override | 28 @Override |
| 29 public void run() { | 29 public void run() { |
| 30 if (getBreakpoint() != null) { | 30 if (getBreakpoint() != null) { |
| 31 JsBreakpointPropertiesAction.runAction(getBreakpoint(), getEditor().getEdi
torSite()); | 31 JsBreakpointPropertiesAction.runAction(getBreakpoint(), getEditor().getEdi
torSite()); |
| 32 } | 32 } |
| 33 } | 33 } |
| 34 | 34 |
| 35 public void update() { | 35 public void update() { |
| 36 breakpoint = null; | 36 breakpoint = getBreakpoint(); |
| 37 IBreakpoint activeBreakpoint = getBreakpoint(); | |
| 38 if (activeBreakpoint != null && | |
| 39 activeBreakpoint instanceof ChromiumLineBreakpoint) { | |
| 40 breakpoint = activeBreakpoint; | |
| 41 } | |
| 42 setEnabled(breakpoint != null); | 37 setEnabled(breakpoint != null); |
| 43 } | 38 } |
| 44 | 39 |
| 45 | |
| 46 public static class Delegate extends AbstractRulerActionDelegate { | 40 public static class Delegate extends AbstractRulerActionDelegate { |
| 47 | |
| 48 @Override | 41 @Override |
| 49 protected IAction createAction(ITextEditor editor, IVerticalRulerInfo rulerI
nfo) { | 42 protected IAction createAction(ITextEditor editor, IVerticalRulerInfo rulerI
nfo) { |
| 50 return new JsBreakpointPropertiesRulerAction(editor, rulerInfo); | 43 return new JsBreakpointPropertiesRulerAction(editor, rulerInfo); |
| 51 } | 44 } |
| 52 | 45 |
| 53 } | 46 } |
| 54 } | 47 } |
| OLD | NEW |