PlatformDataKeys -> CommonDataKeys

This commit is contained in:
Konstantin Bulenkov
2013-11-03 23:41:11 +01:00
parent 11e7d75411
commit 7c2e72142c
4 changed files with 16 additions and 16 deletions
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2009 JetBrains s.r.o.
* Copyright 2000-2013 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.
@@ -19,6 +19,7 @@ import com.intellij.ide.actions.ContextHelpAction;
import com.intellij.openapi.Disposable;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.CommonDataKeys;
import com.intellij.openapi.actionSystem.PlatformDataKeys;
import com.intellij.openapi.project.DumbAware;
import com.intellij.openapi.project.Project;
@@ -38,7 +39,7 @@ public class BrowseRepositoryAction extends AnAction implements DumbAware {
public static final String REPOSITORY_BROWSER_TOOLWINDOW = "SVN Repositories";
public void actionPerformed(AnActionEvent e) {
Project project = e.getData(PlatformDataKeys.PROJECT);
Project project = e.getData(CommonDataKeys.PROJECT);
if (project == null) {
RepositoryBrowserDialog dialog = new RepositoryBrowserDialog(ProjectManager.getInstance().getDefaultProject());
dialog.show();
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2009 JetBrains s.r.o.
* Copyright 2000-2013 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.
@@ -15,10 +15,7 @@
*/
package org.jetbrains.idea.svn.actions;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.DataContext;
import com.intellij.openapi.actionSystem.PlatformDataKeys;
import com.intellij.openapi.actionSystem.*;
import com.intellij.openapi.progress.ProgressIndicator;
import com.intellij.openapi.progress.ProgressManager;
import com.intellij.openapi.progress.Task;
@@ -66,7 +63,7 @@ public class MarkTreeConflictResolvedAction extends AnAction implements DumbAwar
public MyChecker(final AnActionEvent e) {
final DataContext dc = e.getDataContext();
myProject = PlatformDataKeys.PROJECT.getData(dc);
myProject = CommonDataKeys.PROJECT.getData(dc);
final Change[] changes = VcsDataKeys.CHANGE_LEAD_SELECTION.getData(dc);
if (myProject == null || changes == null || changes.length != 1) {
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
* Copyright 2000-2013 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.
@@ -76,6 +76,7 @@ import javax.swing.*;
import javax.swing.tree.TreeNode;
import java.awt.*;
import java.awt.datatransfer.StringSelection;
import java.awt.event.InputEvent;
import java.awt.event.KeyEvent;
import java.io.*;
import java.util.ArrayList;
@@ -152,11 +153,11 @@ public class RepositoryBrowserDialog extends DialogWrapper {
copyUrlAction = new CopyUrlAction();
copyUrlAction.registerCustomShortcutSet(new CustomShortcutSet(KeyStroke.getKeyStroke(KeyEvent.VK_INSERT,
KeyEvent.CTRL_MASK|KeyEvent.CTRL_DOWN_MASK|
KeyEvent.ALT_MASK|KeyEvent.ALT_DOWN_MASK)), browser);
InputEvent.CTRL_MASK | InputEvent.CTRL_DOWN_MASK |
InputEvent.ALT_MASK | InputEvent.ALT_DOWN_MASK)), browser);
mkDirAction = new MkDirAction(browser);
mkDirAction.registerCustomShortcutSet(new CustomShortcutSet(KeyStroke.getKeyStroke(KeyEvent.VK_INSERT,
KeyEvent.ALT_MASK|KeyEvent.ALT_DOWN_MASK)), browser);
InputEvent.ALT_MASK | InputEvent.ALT_DOWN_MASK)), browser);
AnAction action = CommonActionsManager.getInstance().createCollapseAllAction(new TreeExpander() {
public void expandAll() {
@@ -890,7 +891,7 @@ public class RepositoryBrowserDialog extends DialogWrapper {
if (dir == null) {
return;
}
Project p = e.getData(PlatformDataKeys.PROJECT);
Project p = e.getData(CommonDataKeys.PROJECT);
ExportOptionsDialog dialog = new ExportOptionsDialog(p, url, dir);
dialog.show();
if (dialog.isOK()) {
@@ -1218,7 +1219,7 @@ public class RepositoryBrowserDialog extends DialogWrapper {
private class CloseToolWindowAction extends AnAction {
public void actionPerformed(AnActionEvent e) {
disposeRepositoryBrowser();
Project p = e.getData(PlatformDataKeys.PROJECT);
Project p = e.getData(CommonDataKeys.PROJECT);
ToolWindowManager.getInstance(p).unregisterToolWindow(BrowseRepositoryAction.REPOSITORY_BROWSER_TOOLWINDOW);
}
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
* Copyright 2000-2013 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.
@@ -18,6 +18,7 @@ package org.jetbrains.idea.svn.history;
import com.intellij.icons.AllIcons;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.CommonDataKeys;
import com.intellij.openapi.actionSystem.PlatformDataKeys;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.vcs.FilePathImpl;
@@ -44,7 +45,7 @@ public class SvnEditCommitMessageFromFileHistoryAction extends AnAction {
@Override
public void actionPerformed(AnActionEvent e) {
final Project project = e.getData(PlatformDataKeys.PROJECT);
final Project project = e.getData(CommonDataKeys.PROJECT);
if (project == null) return;
final VcsKey vcsKey = e.getData(VcsDataKeys.VCS);
if (vcsKey == null || ! SvnVcs.getKey().equals(vcsKey)) return;