提交 d46de710 编写于 作者: S serge-rider

Debug shortcuts redesign

上级 22cd42d3
......@@ -29,3 +29,15 @@ launchGroups.launchGroup.title = Select or configure database object debugger
launchShortcuts.shortcut.label=Database Debug
launchShortcuts.shortcut.description=Database object debugger
commands.command.menuDelegateToolbar.name=Debug last launched database object
commands.command.menuDelegateToolbar.description=Debug last launched database object
commands.command.debugConfigurations.name=Database debug ...
commands.command.debugConfigurations.description=Open database debug launch configuration dialog
actionSets.actionSet.label=Database Debug actions
actionSets.actionSet.menu.debug.label=Database Debug
actionSets.action.menu.label=Database Debug
actionSets.action.toolbar.label=Database Debug
actionSets.action.toolbar.tooltip=Database Debug
actionSets.action.debugConfigurations.label=Database debug configurations ...
\ No newline at end of file
......@@ -111,20 +111,66 @@
</extension>
<extension point="org.eclipse.ui.handlers">
<handler class="org.jkiss.dbeaver.debug.ui.actions.ToggleBreakpointHandler"
commandId="org.eclipse.debug.ui.commands.ToggleBreakpoint"/>
<handler commandId="org.eclipse.debug.ui.commands.ToggleBreakpoint" class="org.jkiss.dbeaver.debug.ui.actions.ToggleBreakpointHandler"/>
</extension>
<extension point="org.eclipse.ui.menus">
<menuContribution allPopups="false" locationURI="popup:#SQLRulerContext?before=additions">
<command commandId="org.eclipse.debug.ui.commands.ToggleBreakpoint" label="%command.ToggleBreakpoint.label"
style="push"/>
<command commandId="org.eclipse.debug.ui.commands.ToggleBreakpoint" label="%command.ToggleBreakpoint.label" style="push"/>
</menuContribution>
</extension>
<extension point="org.eclipse.ui.commands">
<category description="Debug Procedure commands" id="org.jkiss.dbeaver.debug.ui.commands.category.procedure"
name="Debug Procedure"/>
<category description="Database Debug commands" id="org.jkiss.dbeaver.debug.ui.commands.category" name="Database Debug"/>
<command
name="%commands.command.menuDelegateToolbar.name"
description="%commands.command.menuDelegateToolbar.description"
categoryId="org.jkiss.dbeaver.debug.ui.commands.category"
id="org.jkiss.dbeaver.debug.ui.commands.command.menuDelegateToolbar">
</command>
<command
name="%commands.command.debugConfigurations.name"
categoryId="org.jkiss.dbeaver.debug.ui.commands.category"
description="%commands.command.debugConfigurations.description"
id="org.jkiss.dbeaver.debug.ui.commands.command.debugConfigurations">
</command>
</extension>
<extension point="org.eclipse.ui.actionSets">
<actionSet label="%actionSets.actionSet.label" visible="true" id="org.jkiss.dbeaver.debug.actionSet">
<!-- Do we need an entry in main menu? I guess not -->
<!--
<menu label="%actionSets.actionSet.menu.debug.label" path="additions" id="org.eclipse.ui.debug">
<separator name="org.jkiss.dbeaver.debug.group"/>
</menu>
<action
label="%actionSets.action.menu.label"
style="pulldown"
icon="platform:/plugin/org.eclipse.debug.ui/$nl$/icons/full/obj16/ldebug_obj.png"
class="org.jkiss.dbeaver.debug.ui.internal.DebugMenuDelegate"
menubarPath="org.eclipse.ui.debug/org.jkiss.dbeaver.debug.group"
id="org.jkiss.dbeaver.debug.ui.actionSets.action.menuAction">
</action>
-->
<action
definitionId="org.jkiss.dbeaver.debug.ui.commands.command.menuDelegateToolbar"
label="%actionSets.action.toolbar.label"
style="pulldown"
icon="platform:/plugin/org.eclipse.debug.ui/$nl$/icons/full/obj16/ldebug_obj.png"
tooltip="%actionSets.action.toolbar.tooltip"
class="org.jkiss.dbeaver.debug.ui.internal.DebugMenuDelegate"
toolbarPath="org.eclipse.debug.ui.launchActionSet/debug"
id="org.jkiss.dbeaver.debug.ui.actionSets.action.debugToolbar">
</action>
<action
definitionId="org.jkiss.dbeaver.debug.ui.commands.command.debugConfigurations"
label="%actionSets.action.debugConfigurations.label"
class="org.jkiss.dbeaver.debug.ui.internal.DebugLaunchDialogAction"
id="org.jkiss.dbeaver.debug.ui.actionSets.action.debugConfigurations">
</action>
</actionSet>
</extension>
</plugin>
......@@ -29,6 +29,8 @@ import org.jkiss.dbeaver.model.struct.DBSObject;
public class DebugUI {
public static final String BUNDLE_SYMBOLIC_NAME = "org.jkiss.dbeaver.debug.ui"; //$NON-NLS-1$
public static final String DEBUG_LAUNCH_GROUP_ID = "org.jkiss.dbeaver.debug.launchGroup";
public static final String DEBUG_OPEN_CONFIGURATION_COMMAND_ID = "org.jkiss.dbeaver.debug.ui.commands.command.debugConfigurations"; //$NON-NLS-1$
public static DBGEditorAdvisor findEditorAdvisor(DBPDataSourceContainer dataSourceContainer) {
DBGEditorAdvisor advisor = Adapters.adapt(dataSourceContainer, DBGEditorAdvisor.class);
......
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2018 Serge Rider (serge@jkiss.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jkiss.dbeaver.debug.ui.internal;
import org.eclipse.debug.ui.actions.OpenLaunchDialogAction;
import org.jkiss.dbeaver.debug.ui.DebugUI;
public class DebugLaunchDialogAction extends OpenLaunchDialogAction {
public DebugLaunchDialogAction() {
super(DebugUI.DEBUG_LAUNCH_GROUP_ID);
setActionDefinitionId(DebugUI.DEBUG_OPEN_CONFIGURATION_COMMAND_ID);
}
}
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2018 Serge Rider (serge@jkiss.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jkiss.dbeaver.debug.ui.internal;
import org.eclipse.debug.ui.actions.AbstractLaunchToolbarAction;
import org.eclipse.jface.action.IAction;
import org.jkiss.dbeaver.debug.ui.DebugUI;
public class DebugMenuDelegate extends AbstractLaunchToolbarAction {
public DebugMenuDelegate() {
super(DebugUI.DEBUG_LAUNCH_GROUP_ID);
}
@Override
protected IAction getOpenDialogAction() {
return new DebugLaunchDialogAction();
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册