removed unused actions

This commit is contained in:
Egor.Ushakov
2015-02-20 17:29:08 +03:00
parent 7cf55c1aef
commit 4ad508a75f
8 changed files with 0 additions and 318 deletions
@@ -1,34 +0,0 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
*
* 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 com.intellij.debugger.actions;
import com.intellij.debugger.impl.DebuggerContextImpl;
import com.intellij.debugger.ui.impl.watch.DebuggerTreeNodeImpl;
import com.intellij.diff.DiffDialogHints;
import com.intellij.diff.DiffManager;
import com.intellij.diff.DiffRequestFactory;
import com.intellij.diff.requests.DiffRequest;
import com.intellij.openapi.project.Project;
/**
* @author Jeka
*/
public class CompareValueWithClipboardAction extends BaseValueAction {
protected void processText(final Project project, final String text, DebuggerTreeNodeImpl node, DebuggerContextImpl debuggerContext) {
DiffRequest request = DiffRequestFactory.getInstance().createClipboardVsValue(text);
DiffManager.getInstance().showDiff(project, request);
}
}
@@ -1,32 +0,0 @@
/*
* Copyright 2000-2009 JetBrains s.r.o.
*
* 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 com.intellij.debugger.actions;
import com.intellij.debugger.impl.DebuggerContextImpl;
import com.intellij.debugger.ui.impl.watch.DebuggerTreeNodeImpl;
import com.intellij.openapi.ide.CopyPasteManager;
import com.intellij.openapi.project.Project;
import java.awt.datatransfer.StringSelection;
/*
* @author Jeka
*/
public class CopyValueAction extends BaseValueAction {
protected void processText(final Project project, final String text, DebuggerTreeNodeImpl node, DebuggerContextImpl debuggerContext) {
CopyPasteManager.getInstance().setContents(new StringSelection(text));
}
}
@@ -1,51 +0,0 @@
/*
* Copyright 2000-2009 JetBrains s.r.o.
*
* 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 com.intellij.debugger.actions;
import com.intellij.debugger.ui.DebuggerPanelsManager;
import com.intellij.debugger.ui.impl.MainWatchPanel;
import com.intellij.debugger.ui.impl.watch.DebuggerTreeNodeImpl;
import com.intellij.debugger.ui.impl.watch.WatchItemDescriptor;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.CommonDataKeys;
import com.intellij.openapi.actionSystem.PlatformDataKeys;
import com.intellij.openapi.project.Project;
/**
* User: lex
* Date: Sep 26, 2003
* Time: 8:34:01 PM
*/
public class EditWatchAction extends DebuggerAction {
public void actionPerformed(final AnActionEvent e) {
final DebuggerTreeNodeImpl selectedNode = getSelectedNode(e.getDataContext());
if(selectedNode == null || !(selectedNode.getDescriptor() instanceof WatchItemDescriptor)) return;
Project project = CommonDataKeys.PROJECT.getData(e.getDataContext());
MainWatchPanel watchPanel = DebuggerPanelsManager.getInstance(project).getWatchPanel();
if(watchPanel != null) {
watchPanel.editNode(selectedNode);
}
}
public void update(AnActionEvent e) {
final DebuggerTreeNodeImpl selectedNode = getSelectedNode(e.getDataContext());
e.getPresentation().setVisible(selectedNode != null && selectedNode.getDescriptor() instanceof WatchItemDescriptor);
}
};
@@ -1,43 +0,0 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* 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.
*/
/*
* Class NewWatchAction
* @author Jeka
*/
package com.intellij.debugger.actions;
import com.intellij.debugger.ui.DebuggerPanelsManager;
import com.intellij.debugger.ui.impl.MainWatchPanel;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.project.Project;
import org.jetbrains.annotations.NotNull;
public class NewWatchAction extends DebuggerAction {
public void actionPerformed(final AnActionEvent e) {
getWatchPanel(e).newWatch();
}
@Override
public void update(@NotNull AnActionEvent e) {
e.getPresentation().setEnabled(getWatchPanel(e) != null);
}
private static MainWatchPanel getWatchPanel(AnActionEvent e) {
Project project = e.getProject();
return project != null ? DebuggerPanelsManager.getInstance(project).getWatchPanel() : null;
}
}
@@ -1,46 +0,0 @@
/*
* Copyright 2000-2009 JetBrains s.r.o.
*
* 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 com.intellij.debugger.actions;
import com.intellij.debugger.ui.impl.watch.DebuggerTree;
import com.intellij.debugger.ui.impl.watch.DebuggerTreeNodeImpl;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.Presentation;
import java.util.Enumeration;
/**
* User: lex
* Date: Sep 26, 2003
* Time: 6:24:44 PM
*/
public class RemoveAllWatchesAction extends RemoveWatchAction {
protected DebuggerTreeNodeImpl[] getNodesToDelete(AnActionEvent e) {
DebuggerTree tree = getTree(e.getDataContext());
if(tree == null) return null;
DebuggerTreeNodeImpl root = (DebuggerTreeNodeImpl)tree.getModel().getRoot();
DebuggerTreeNodeImpl [] result = new DebuggerTreeNodeImpl[root.getChildCount()];
int i = 0;
for(Enumeration enumeration = root.children(); enumeration.hasMoreElements(); i++) {
DebuggerTreeNodeImpl node = (DebuggerTreeNodeImpl)enumeration.nextElement();
result[i] = node;
}
return result;
}
protected void updatePresentation(Presentation presentation, int watchesCount) {
}
}
@@ -1,68 +0,0 @@
/*
* Copyright 2000-2009 JetBrains s.r.o.
*
* 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 com.intellij.debugger.actions;
import com.intellij.debugger.ui.impl.MainWatchPanel;
import com.intellij.debugger.ui.impl.watch.DebuggerTreeNodeImpl;
import com.intellij.debugger.ui.impl.watch.WatchItemDescriptor;
import com.intellij.debugger.DebuggerBundle;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.Presentation;
import java.util.ArrayList;
public class RemoveWatchAction extends DebuggerAction {
protected DebuggerTreeNodeImpl[] getNodesToDelete(AnActionEvent e) {
DebuggerTreeNodeImpl[] selectedNodes = getSelectedNodes(e.getDataContext());
if(selectedNodes == null) return null;
ArrayList<DebuggerTreeNodeImpl> selectedWatches = new ArrayList<DebuggerTreeNodeImpl>();
for (int i = 0; i < selectedNodes.length; i++) {
if(selectedNodes[i].getDescriptor() instanceof WatchItemDescriptor) {
selectedWatches.add(selectedNodes[i]);
}
}
return selectedWatches.toArray(new DebuggerTreeNodeImpl[selectedWatches.size()]);
}
public void actionPerformed(AnActionEvent e) {
DebuggerTreeNodeImpl [] nodes = getNodesToDelete(e);
if (nodes == null || nodes.length == 0) return;
MainWatchPanel watchPanel = (MainWatchPanel)getPanel(e.getDataContext());
for (int i = 0; i < nodes.length; i++) {
DebuggerTreeNodeImpl node = nodes[i];
watchPanel.getWatchTree().removeWatch(node);
}
}
protected void updatePresentation(Presentation presentation, int watchesCount) {
presentation.setText(DebuggerBundle.message("action.remove.watch.text", watchesCount));
}
public void update(AnActionEvent event) {
Presentation presentation = event.getPresentation();
DebuggerTreeNodeImpl[] nodes = getNodesToDelete(event);
if (nodes != null && nodes.length > 0) {
presentation.setEnabled(true);
}
else {
presentation.setEnabled(false);
}
updatePresentation(presentation, nodes != null? nodes.length : 0);
}
}
@@ -1,38 +0,0 @@
/*
* Copyright 2000-2009 JetBrains s.r.o.
*
* 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 com.intellij.debugger.actions;
import com.intellij.debugger.DebuggerManagerEx;
import com.intellij.debugger.impl.DebuggerSession;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.project.Project;
import com.intellij.xdebugger.impl.actions.DebuggerActionHandler;
import org.jetbrains.annotations.NotNull;
public class ShowExecutionPointActionHandler extends DebuggerActionHandler {
public void perform(@NotNull final Project project, final AnActionEvent event) {
final DebuggerSession session = (DebuggerManagerEx.getInstanceEx(project)).getContext().getDebuggerSession();
if (session != null) {
session.showExecutionPoint();
}
}
public boolean isEnabled(@NotNull final Project project, final AnActionEvent event) {
DebuggerSession debuggerSession = (DebuggerManagerEx.getInstanceEx(project)).getContext().getDebuggerSession();
return debuggerSession != null && debuggerSession.isPaused() &&
debuggerSession.getContextManager().getContext().getSuspendContext().getThread() != null;
}
}
-6
View File
@@ -165,19 +165,13 @@
<action id="Debugger.ViewText" class="com.intellij.debugger.actions.ViewTextAction">
<add-to-group group-id="XDebugger.ValueGroup" anchor="last"/>
</action>
<!--<action id="Debugger.CopyValue" class="com.intellij.debugger.actions.CopyValueAction"/>-->
<!--<action id="Debugger.CompareValueWithClipboard" class="com.intellij.debugger.actions.CompareValueWithClipboardAction"/>-->
<action id="Debugger.CustomizeThreadsView" class="com.intellij.debugger.actions.CustomizeThreadsViewAction">
<add-to-group group-id="XDebugger.Frames.Tree.Popup" anchor="last"/>
</action>
<!--<action id="Debugger.NewWatch" class="com.intellij.debugger.actions.NewWatchAction" icon="AllIcons.Debugger.NewWatch"/>-->
<!--<action id="Debugger.EditWatch" class="com.intellij.debugger.actions.EditWatchAction"/>-->
<action id="Debugger.EditFrameSource" class="com.intellij.debugger.actions.EditFrameSourceAction"/>
<action id="Debugger.EditNodeSource" class="com.intellij.debugger.actions.EditSourceAction"/>
<action id="Debugger.EditTypeSource" class="com.intellij.debugger.actions.JumpToObjectAction"/>
<reference ref="Debugger.PopFrame"/>
<!--<action id="Debugger.RemoveAllWatches" class="com.intellij.debugger.actions.RemoveAllWatchesAction"/>-->
<!--<action id="Debugger.RemoveWatch" class="com.intellij.debugger.actions.RemoveWatchAction" icon="AllIcons.Actions.Delete"/>-->
<action id="Debugger.ViewAsGroup" class="com.intellij.debugger.actions.ViewAsGroup">
<add-to-group group-id="XDebugger.ValueGroup" anchor="last"/>
</action>