Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(982)

Side by Side Diff: plugins/org.chromium.debug.ui/src/org/chromium/debug/ui/actions/JsBreakpointPropertiesAction.java

Issue 10918154: Allow breakpoint enable and properties ruler actions for all breakpoints (Closed) Base URL: https://chromedevtools.googlecode.com/svn/trunk
Patch Set: spaces Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | plugins/org.chromium.debug.ui/src/org/chromium/debug/ui/actions/JsBreakpointPropertiesRulerAction.java » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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.ChromiumExceptionBreakpoint; 7 import org.chromium.debug.core.model.ChromiumExceptionBreakpoint;
8 import org.chromium.debug.core.model.ChromiumLineBreakpoint; 8 import org.chromium.debug.core.model.ChromiumLineBreakpoint;
9 import org.eclipse.debug.core.model.IBreakpoint; 9 import org.eclipse.debug.core.model.IBreakpoint;
10 import org.eclipse.jface.action.IAction; 10 import org.eclipse.jface.action.IAction;
11 import org.eclipse.jface.preference.PreferenceDialog;
11 import org.eclipse.jface.viewers.ISelection; 12 import org.eclipse.jface.viewers.ISelection;
12 import org.eclipse.jface.viewers.ISelectionChangedListener;
13 import org.eclipse.jface.viewers.ISelectionProvider;
14 import org.eclipse.jface.viewers.IStructuredSelection; 13 import org.eclipse.jface.viewers.IStructuredSelection;
15 import org.eclipse.jface.viewers.StructuredSelection;
16 import org.eclipse.jface.window.IShellProvider; 14 import org.eclipse.jface.window.IShellProvider;
17 import org.eclipse.ui.IObjectActionDelegate; 15 import org.eclipse.ui.IObjectActionDelegate;
18 import org.eclipse.ui.IWorkbenchPart; 16 import org.eclipse.ui.IWorkbenchPart;
19 import org.eclipse.ui.IWorkbenchPartSite; 17 import org.eclipse.ui.IWorkbenchPartSite;
20 import org.eclipse.ui.dialogs.PropertyDialogAction; 18 import org.eclipse.ui.dialogs.PreferencesUtil;
21 19
22 /** 20 /**
23 * Action to bring up the breakpoint properties dialog. 21 * Action to bring up the breakpoint properties dialog.
24 */ 22 */
25 public abstract class JsBreakpointPropertiesAction implements IObjectActionDeleg ate { 23 public abstract class JsBreakpointPropertiesAction implements IObjectActionDeleg ate {
26 24
27 public static class Line extends JsBreakpointPropertiesAction { 25 public static class Line extends JsBreakpointPropertiesAction {
28 @Override protected boolean isCorrectType(IBreakpoint breakpoint) { 26 @Override protected boolean isCorrectType(IBreakpoint breakpoint) {
29 return breakpoint instanceof ChromiumLineBreakpoint; 27 return breakpoint instanceof ChromiumLineBreakpoint;
30 } 28 }
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 return null; 69 return null;
72 } 70 }
73 71
74 return new Runnable() { 72 return new Runnable() {
75 public void run() { 73 public void run() {
76 runAction(breakpoint, site); 74 runAction(breakpoint, site);
77 } 75 }
78 }; 76 };
79 } 77 }
80 78
81 protected static void runAction(final IBreakpoint breakpoint, IShellProvider s hell) { 79 protected static void runAction(IBreakpoint breakpoint, IShellProvider shell) {
82 PropertyDialogAction action = 80 PreferenceDialog propertyDialog = PreferencesUtil.createPropertyDialogOn(
83 new PropertyDialogAction(shell, 81 shell.getShell(), breakpoint, (String) null, (String[]) null, null);
84 new ISelectionProvider() {
85 public void addSelectionChangedListener(ISelectionChangedListener li stener) {
86 }
87 82
88 public ISelection getSelection() { 83 propertyDialog.open();
89 return new StructuredSelection(breakpoint);
90 }
91
92 public void removeSelectionChangedListener(ISelectionChangedListener listener) {
93 }
94
95 public void setSelection(ISelection selection) {
96 }
97 });
98 action.run();
99 } 84 }
100 } 85 }
OLDNEW
« no previous file with comments | « no previous file | plugins/org.chromium.debug.ui/src/org/chromium/debug/ui/actions/JsBreakpointPropertiesRulerAction.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698