From bdb25c1c7ed9668f34c6e0b4d85df59a8bcd4d64 Mon Sep 17 00:00:00 2001 From: Konstantin Bulenkov Date: Tue, 1 Oct 2013 22:46:01 +0200 Subject: [PATCH] fix yellow code producing by CommonDataKeys --- .../intellij/images/thumbnail/impl/ThumbnailViewUI.java | 4 ++-- .../cyclicDependencies/ui/CyclicDependenciesPanel.java | 2 +- java/java-impl/src/com/intellij/slicer/SlicePanel.java | 4 ++-- .../intellij/codeInspection/ui/InspectionResultsView.java | 4 ++-- .../src/com/intellij/execution/impl/ConsoleViewImpl.java | 2 +- .../src/com/intellij/ide/actions/SelectInContextImpl.java | 2 +- .../src/com/intellij/ide/commander/CommanderPanel.java | 2 +- .../ide/favoritesTreeView/FavoritesTreeViewPanel.java | 4 ++-- .../com/intellij/ide/hierarchy/HierarchyBrowserBase.java | 4 ++-- .../com/intellij/ide/impl/dataRules/NavigatableRule.java | 2 +- .../com/intellij/ide/navigationToolbar/NavBarPanel.java | 2 +- .../ide/projectView/impl/AbstractProjectViewPane.java | 3 ++- .../newStructureView/StructureViewComponent.java | 4 ++-- .../lang-impl/src/com/intellij/ide/todo/TodoPanel.java | 2 +- .../src/com/intellij/ide/util/FileStructureDialog.java | 2 +- .../com/intellij/internal/psiView/PsiViewerDialog.java | 3 ++- .../moduleDependencies/ModulesDependenciesPanel.java | 2 +- .../packageDependencies/ui/DependenciesPanel.java | 2 +- .../com/intellij/openapi/actionSystem/DataConstants.java | 4 ++-- .../src/com/intellij/ui/AutoScrollToSourceHandler.java | 2 +- .../src/com/intellij/util/OpenSourceUtil.java | 5 +++-- .../intellij/ide/actions/BaseNavigateToSourceAction.java | 2 +- .../intellij/ide/errorTreeView/NewErrorTreeViewPanel.java | 4 ++-- .../src/com/intellij/ide/impl/DataManagerImpl.java | 2 +- .../intellij/ide/impl/dataRules/NavigatableArrayRule.java | 3 ++- .../src/com/intellij/openapi/diff/impl/DiffPanelImpl.java | 2 +- .../src/com/intellij/platform/FilesystemToolwindow.java | 2 +- .../com/intellij/execution/testframework/TestsUIUtil.java | 4 ++-- .../src/com/intellij/usages/impl/UsageViewImpl.java | 4 ++-- .../changes/committed/CommittedChangesTreeBrowser.java | 4 ++-- .../vcs/changes/shelf/ShelvedChangesViewManager.java | 4 ++-- .../intellij/openapi/vcs/changes/ui/ChangesBrowser.java | 4 ++-- .../intellij/openapi/vcs/changes/ui/ChangesListView.java | 8 ++++---- .../openapi/vcs/changes/ui/EditSourceInCommitAction.java | 3 ++- .../openapi/vcs/history/FileHistoryPanelImpl.java | 2 +- .../com/intellij/openapi/vcs/update/UpdateInfoTree.java | 2 +- .../com/intellij/lang/ant/config/execution/TreeView.java | 4 ++-- .../intellij/lang/ant/config/explorer/AntExplorer.java | 2 +- .../intellij/cvsSupport2/cvsBrowser/ui/BrowserPanel.java | 6 +++--- .../cvsoperations/cvsEdit/ui/EditorsPanel.java | 4 ++-- .../idea/maven/navigator/MavenProjectsNavigatorPanel.java | 2 +- .../idea/svn/dialogs/IntersectingLocalChangesPanel.java | 2 +- .../idea/svn/dialogs/RepositoryBrowserComponent.java | 2 +- .../intellij/uiDesigner/componentTree/ComponentTree.java | 2 +- .../com/intellij/uiDesigner/designSurface/GlassLayer.java | 2 +- .../intellij/plugins/xsltDebugger/ui/StructureTree.java | 4 ++-- .../src/com/intellij/util/xml/tree/DomModelTreeView.java | 2 +- 47 files changed, 74 insertions(+), 69 deletions(-) diff --git a/images/src/org/intellij/images/thumbnail/impl/ThumbnailViewUI.java b/images/src/org/intellij/images/thumbnail/impl/ThumbnailViewUI.java index d7cedf9428dc..a25254cf1d8c 100644 --- a/images/src/org/intellij/images/thumbnail/impl/ThumbnailViewUI.java +++ b/images/src/org/intellij/images/thumbnail/impl/ThumbnailViewUI.java @@ -427,7 +427,7 @@ final class ThumbnailViewUI extends JPanel implements DataProvider, Disposable { return selectedFiles.length > 0 ? PsiManager.getInstance(thumbnailView.getProject()).findFile(selectedFiles[0]) : null; } else if (LangDataKeys.PSI_ELEMENT_ARRAY.is(dataId)) { return getSelectedElements(); - } else if (PlatformDataKeys.NAVIGATABLE.is(dataId)) { + } else if (CommonDataKeys.NAVIGATABLE.is(dataId)) { VirtualFile[] selectedFiles = getSelectedFiles(); return new ThumbnailNavigatable(selectedFiles.length > 0 ? selectedFiles[0] : null); } else if (PlatformDataKeys.COPY_PROVIDER.is(dataId)) { @@ -438,7 +438,7 @@ final class ThumbnailViewUI extends JPanel implements DataProvider, Disposable { return copyPasteSupport.getPasteProvider(); } else if (PlatformDataKeys.DELETE_ELEMENT_PROVIDER.is(dataId)) { return deleteProvider; - } else if (PlatformDataKeys.NAVIGATABLE_ARRAY.is(dataId)) { + } else if (CommonDataKeys.NAVIGATABLE_ARRAY.is(dataId)) { VirtualFile[] selectedFiles = getSelectedFiles(); Set navigatables = new HashSet(selectedFiles.length); for (VirtualFile selectedFile : selectedFiles) { diff --git a/java/java-impl/src/com/intellij/cyclicDependencies/ui/CyclicDependenciesPanel.java b/java/java-impl/src/com/intellij/cyclicDependencies/ui/CyclicDependenciesPanel.java index 2acdf7191278..9d09e393a2cc 100644 --- a/java/java-impl/src/com/intellij/cyclicDependencies/ui/CyclicDependenciesPanel.java +++ b/java/java-impl/src/com/intellij/cyclicDependencies/ui/CyclicDependenciesPanel.java @@ -526,7 +526,7 @@ public class CyclicDependenciesPanel extends JPanel implements Disposable, DataP private static class MyTree extends Tree implements DataProvider { public Object getData(String dataId) { PackageDependenciesNode node = getSelectedNode(); - if (PlatformDataKeys.NAVIGATABLE.is(dataId)) { + if (CommonDataKeys.NAVIGATABLE.is(dataId)) { return node; } return null; diff --git a/java/java-impl/src/com/intellij/slicer/SlicePanel.java b/java/java-impl/src/com/intellij/slicer/SlicePanel.java index 78e8a3e95916..09f90e409d24 100644 --- a/java/java-impl/src/com/intellij/slicer/SlicePanel.java +++ b/java/java-impl/src/com/intellij/slicer/SlicePanel.java @@ -305,10 +305,10 @@ public abstract class SlicePanel extends JPanel implements TypeSafeDataProvider, @Override public void calcData(DataKey key, DataSink sink) { - if (key == PlatformDataKeys.NAVIGATABLE_ARRAY) { + if (key == CommonDataKeys.NAVIGATABLE_ARRAY) { List navigatables = getNavigatables(); if (!navigatables.isEmpty()) { - sink.put(PlatformDataKeys.NAVIGATABLE_ARRAY, navigatables.toArray(new Navigatable[navigatables.size()])); + sink.put(CommonDataKeys.NAVIGATABLE_ARRAY, navigatables.toArray(new Navigatable[navigatables.size()])); } } } diff --git a/platform/lang-impl/src/com/intellij/codeInspection/ui/InspectionResultsView.java b/platform/lang-impl/src/com/intellij/codeInspection/ui/InspectionResultsView.java index fd0a9fa31089..0bc7fec15f33 100644 --- a/platform/lang-impl/src/com/intellij/codeInspection/ui/InspectionResultsView.java +++ b/platform/lang-impl/src/com/intellij/codeInspection/ui/InspectionResultsView.java @@ -653,14 +653,14 @@ public class InspectionResultsView extends JPanel implements Disposable, Occuren } } - if (PlatformDataKeys.NAVIGATABLE.is(dataId)) { + if (CommonDataKeys.NAVIGATABLE.is(dataId)) { return getSelectedNavigatable(problem, psiElement); } else if (CommonDataKeys.PSI_ELEMENT.is(dataId)) { return psiElement.isValid() ? psiElement : null; } } - else if (selectedNode instanceof ProblemDescriptionNode && PlatformDataKeys.NAVIGATABLE.is(dataId)) { + else if (selectedNode instanceof ProblemDescriptionNode && CommonDataKeys.NAVIGATABLE.is(dataId)) { return getSelectedNavigatable(((ProblemDescriptionNode)selectedNode).getDescriptor()); } diff --git a/platform/lang-impl/src/com/intellij/execution/impl/ConsoleViewImpl.java b/platform/lang-impl/src/com/intellij/execution/impl/ConsoleViewImpl.java index ea50a7cac1d6..3e295665cc1a 100644 --- a/platform/lang-impl/src/com/intellij/execution/impl/ConsoleViewImpl.java +++ b/platform/lang-impl/src/com/intellij/execution/impl/ConsoleViewImpl.java @@ -818,7 +818,7 @@ public class ConsoleViewImpl extends JPanel implements ConsoleView, ObservableCo @Override public Object getData(final String dataId) { - if (PlatformDataKeys.NAVIGATABLE.is(dataId)) { + if (CommonDataKeys.NAVIGATABLE.is(dataId)) { if (myEditor == null) { return null; } diff --git a/platform/lang-impl/src/com/intellij/ide/actions/SelectInContextImpl.java b/platform/lang-impl/src/com/intellij/ide/actions/SelectInContextImpl.java index ce9ef5626282..5674f1e1ac58 100644 --- a/platform/lang-impl/src/com/intellij/ide/actions/SelectInContextImpl.java +++ b/platform/lang-impl/src/com/intellij/ide/actions/SelectInContextImpl.java @@ -88,7 +88,7 @@ public abstract class SelectInContextImpl implements SelectInContext { } if (selectInContext == null) { - Navigatable descriptor = PlatformDataKeys.NAVIGATABLE.getData(dataContext); + Navigatable descriptor = CommonDataKeys.NAVIGATABLE.getData(dataContext); if (descriptor instanceof OpenFileDescriptor) { final VirtualFile file = ((OpenFileDescriptor)descriptor).getFile(); if (file.isValid()) { diff --git a/platform/lang-impl/src/com/intellij/ide/commander/CommanderPanel.java b/platform/lang-impl/src/com/intellij/ide/commander/CommanderPanel.java index 907f3910f4ba..b5af4621705d 100644 --- a/platform/lang-impl/src/com/intellij/ide/commander/CommanderPanel.java +++ b/platform/lang-impl/src/com/intellij/ide/commander/CommanderPanel.java @@ -454,7 +454,7 @@ public class CommanderPanel extends JPanel { final Object element = parentNode != null ? parentNode.getValue() : null; return element instanceof PsiElement && ((PsiElement)element).isValid() ? element : null; } - if (PlatformDataKeys.NAVIGATABLE_ARRAY.is(dataId)) { + if (CommonDataKeys.NAVIGATABLE_ARRAY.is(dataId)) { return getNavigatables(); } if (PlatformDataKeys.COPY_PROVIDER.is(dataId)) { diff --git a/platform/lang-impl/src/com/intellij/ide/favoritesTreeView/FavoritesTreeViewPanel.java b/platform/lang-impl/src/com/intellij/ide/favoritesTreeView/FavoritesTreeViewPanel.java index 52d55e4b12e6..1dd80ac7477e 100644 --- a/platform/lang-impl/src/com/intellij/ide/favoritesTreeView/FavoritesTreeViewPanel.java +++ b/platform/lang-impl/src/com/intellij/ide/favoritesTreeView/FavoritesTreeViewPanel.java @@ -405,11 +405,11 @@ public class FavoritesTreeViewPanel extends JPanel implements DataProvider, Dock if (CommonDataKeys.PROJECT.is(dataId)) { return myProject; } - if (PlatformDataKeys.NAVIGATABLE.is(dataId)) { + if (CommonDataKeys.NAVIGATABLE.is(dataId)) { final FavoritesTreeNodeDescriptor[] selectedNodeDescriptors = FavoritesTreeUtil.getSelectedNodeDescriptors(myTree); return selectedNodeDescriptors.length == 1 ? selectedNodeDescriptors[0].getElement() : null; } - if (PlatformDataKeys.NAVIGATABLE_ARRAY.is(dataId)) { + if (CommonDataKeys.NAVIGATABLE_ARRAY.is(dataId)) { final List selectedElements = getSelectedElements(Navigatable.class); return selectedElements.isEmpty() ? null : selectedElements.toArray(new Navigatable[selectedElements.size()]); } diff --git a/platform/lang-impl/src/com/intellij/ide/hierarchy/HierarchyBrowserBase.java b/platform/lang-impl/src/com/intellij/ide/hierarchy/HierarchyBrowserBase.java index 09931b15957b..11bac987c244 100644 --- a/platform/lang-impl/src/com/intellij/ide/hierarchy/HierarchyBrowserBase.java +++ b/platform/lang-impl/src/com/intellij/ide/hierarchy/HierarchyBrowserBase.java @@ -217,14 +217,14 @@ public abstract class HierarchyBrowserBase extends SimpleToolWindowPanel impleme if (PlatformDataKeys.DELETE_ELEMENT_PROVIDER.is(dataId)) { return null; } - if (PlatformDataKeys.NAVIGATABLE.is(dataId)) { + if (CommonDataKeys.NAVIGATABLE.is(dataId)) { final DefaultMutableTreeNode selectedNode = getSelectedNode(); if (selectedNode == null) return null; final HierarchyNodeDescriptor descriptor = getDescriptor(selectedNode); if (descriptor == null) return null; return getNavigatable(descriptor); } - if (PlatformDataKeys.NAVIGATABLE_ARRAY.is(dataId)) { + if (CommonDataKeys.NAVIGATABLE_ARRAY.is(dataId)) { return getNavigatables(); } if (PlatformDataKeys.TREE_EXPANDER.is(dataId)) { diff --git a/platform/lang-impl/src/com/intellij/ide/impl/dataRules/NavigatableRule.java b/platform/lang-impl/src/com/intellij/ide/impl/dataRules/NavigatableRule.java index 9d2b91b02bc7..61b55de8d8e4 100644 --- a/platform/lang-impl/src/com/intellij/ide/impl/dataRules/NavigatableRule.java +++ b/platform/lang-impl/src/com/intellij/ide/impl/dataRules/NavigatableRule.java @@ -28,7 +28,7 @@ import com.intellij.psi.PsiElement; public class NavigatableRule implements GetDataRule { @Override public Object getData(DataProvider dataProvider) { - final Navigatable navigatable = PlatformDataKeys.NAVIGATABLE.getData(dataProvider); + final Navigatable navigatable = CommonDataKeys.NAVIGATABLE.getData(dataProvider); if (navigatable != null && navigatable instanceof OpenFileDescriptor) { final OpenFileDescriptor openFileDescriptor = (OpenFileDescriptor)navigatable; diff --git a/platform/lang-impl/src/com/intellij/ide/navigationToolbar/NavBarPanel.java b/platform/lang-impl/src/com/intellij/ide/navigationToolbar/NavBarPanel.java index c121b1116a73..33adaf1d1517 100644 --- a/platform/lang-impl/src/com/intellij/ide/navigationToolbar/NavBarPanel.java +++ b/platform/lang-impl/src/com/intellij/ide/navigationToolbar/NavBarPanel.java @@ -647,7 +647,7 @@ public class NavBarPanel extends JPanel implements DataProvider, PopupOwner, Dis return !files.isEmpty() ? VfsUtilCore.toVirtualFileArray(files) : null; } - if (PlatformDataKeys.NAVIGATABLE_ARRAY.is(dataId)) { + if (CommonDataKeys.NAVIGATABLE_ARRAY.is(dataId)) { final List elements = getSelectedElements(Navigatable.class); return elements == null || elements.isEmpty() ? null : elements.toArray(new Navigatable[elements.size()]); } diff --git a/platform/lang-impl/src/com/intellij/ide/projectView/impl/AbstractProjectViewPane.java b/platform/lang-impl/src/com/intellij/ide/projectView/impl/AbstractProjectViewPane.java index 8360ac985940..5aedc767a496 100644 --- a/platform/lang-impl/src/com/intellij/ide/projectView/impl/AbstractProjectViewPane.java +++ b/platform/lang-impl/src/com/intellij/ide/projectView/impl/AbstractProjectViewPane.java @@ -32,6 +32,7 @@ import com.intellij.ide.projectView.impl.nodes.ModuleGroupNode; import com.intellij.ide.util.treeView.*; import com.intellij.injected.editor.VirtualFileWindow; import com.intellij.openapi.Disposable; +import com.intellij.openapi.actionSystem.CommonDataKeys; import com.intellij.openapi.actionSystem.DataContext; import com.intellij.openapi.actionSystem.DataProvider; import com.intellij.openapi.actionSystem.DefaultActionGroup; @@ -265,7 +266,7 @@ public abstract class AbstractProjectViewPane implements DataProvider, Disposabl @Override public Object getData(String dataId) { - if (PlatformDataKeys.NAVIGATABLE_ARRAY.is(dataId)) { + if (CommonDataKeys.NAVIGATABLE_ARRAY.is(dataId)) { TreePath[] paths = getSelectionPaths(); if (paths == null) return null; final ArrayList navigatables = new ArrayList(); diff --git a/platform/lang-impl/src/com/intellij/ide/structureView/newStructureView/StructureViewComponent.java b/platform/lang-impl/src/com/intellij/ide/structureView/newStructureView/StructureViewComponent.java index fafc115626c0..bbf5215c19eb 100644 --- a/platform/lang-impl/src/com/intellij/ide/structureView/newStructureView/StructureViewComponent.java +++ b/platform/lang-impl/src/com/intellij/ide/structureView/newStructureView/StructureViewComponent.java @@ -689,7 +689,7 @@ public class StructureViewComponent extends SimpleToolWindowPanel implements Tre if (myAbstractTreeBuilder == null) return; myAutoscrollFeedback = true; - Navigatable editSourceDescriptor = PlatformDataKeys.NAVIGATABLE.getData(DataManager.getInstance().getDataContext(getTree())); + Navigatable editSourceDescriptor = CommonDataKeys.NAVIGATABLE.getData(DataManager.getInstance().getDataContext(getTree())); if (myFileEditor != null && editSourceDescriptor != null && editSourceDescriptor.canNavigateToSource()) { editSourceDescriptor.navigate(false); } @@ -777,7 +777,7 @@ public class StructureViewComponent extends SimpleToolWindowPanel implements Tre if (PlatformDataKeys.PASTE_PROVIDER.is(dataId)) { return myCopyPasteDelegator.getPasteProvider(); } - if (PlatformDataKeys.NAVIGATABLE.is(dataId)) { + if (CommonDataKeys.NAVIGATABLE.is(dataId)) { Object[] selectedElements = getSelectedTreeElements(); if (selectedElements == null || selectedElements.length == 0) return null; if (selectedElements[0] instanceof Navigatable) { diff --git a/platform/lang-impl/src/com/intellij/ide/todo/TodoPanel.java b/platform/lang-impl/src/com/intellij/ide/todo/TodoPanel.java index f8202e5410eb..ee2e6e5f8e2c 100644 --- a/platform/lang-impl/src/com/intellij/ide/todo/TodoPanel.java +++ b/platform/lang-impl/src/com/intellij/ide/todo/TodoPanel.java @@ -344,7 +344,7 @@ abstract class TodoPanel extends SimpleToolWindowPanel implements OccurenceNavig @Override public Object getData(String dataId) { - if (PlatformDataKeys.NAVIGATABLE.is(dataId)) { + if (CommonDataKeys.NAVIGATABLE.is(dataId)) { TreePath path = myTree.getSelectionPath(); if (path == null) { return null; diff --git a/platform/lang-impl/src/com/intellij/ide/util/FileStructureDialog.java b/platform/lang-impl/src/com/intellij/ide/util/FileStructureDialog.java index 01e8a8e50cfe..2c6196b60902 100644 --- a/platform/lang-impl/src/com/intellij/ide/util/FileStructureDialog.java +++ b/platform/lang-impl/src/com/intellij/ide/util/FileStructureDialog.java @@ -417,7 +417,7 @@ public class FileStructureDialog extends DialogWrapper { if (selectedElement instanceof TreeElement) selectedElement = ((StructureViewTreeElement)selectedElement).getValue(); - if (PlatformDataKeys.NAVIGATABLE.is(dataId)) { + if (CommonDataKeys.NAVIGATABLE.is(dataId)) { return selectedElement instanceof Navigatable ? selectedElement : myNavigatable; } diff --git a/platform/lang-impl/src/com/intellij/internal/psiView/PsiViewerDialog.java b/platform/lang-impl/src/com/intellij/internal/psiView/PsiViewerDialog.java index 3b0408d1588c..124b5d6ca7b5 100644 --- a/platform/lang-impl/src/com/intellij/internal/psiView/PsiViewerDialog.java +++ b/platform/lang-impl/src/com/intellij/internal/psiView/PsiViewerDialog.java @@ -32,6 +32,7 @@ import com.intellij.lang.LanguageFormatting; import com.intellij.lang.LanguageUtil; import com.intellij.lang.injection.InjectedLanguageManager; import com.intellij.openapi.Disposable; +import com.intellij.openapi.actionSystem.CommonDataKeys; import com.intellij.openapi.actionSystem.DataProvider; import com.intellij.openapi.actionSystem.PlatformDataKeys; import com.intellij.openapi.application.AccessToken; @@ -822,7 +823,7 @@ public class PsiViewerDialog extends DialogWrapper implements DataProvider, Disp @Override public Object getData(@NonNls String dataId) { - if (PlatformDataKeys.NAVIGATABLE.is(dataId)) { + if (CommonDataKeys.NAVIGATABLE.is(dataId)) { String fqn = null; if (myPsiTree.hasFocus()) { final TreePath path = myPsiTree.getSelectionPath(); diff --git a/platform/lang-impl/src/com/intellij/moduleDependencies/ModulesDependenciesPanel.java b/platform/lang-impl/src/com/intellij/moduleDependencies/ModulesDependenciesPanel.java index ac63fde71750..ef975a73332e 100644 --- a/platform/lang-impl/src/com/intellij/moduleDependencies/ModulesDependenciesPanel.java +++ b/platform/lang-impl/src/com/intellij/moduleDependencies/ModulesDependenciesPanel.java @@ -527,7 +527,7 @@ public class ModulesDependenciesPanel extends JPanel implements ModuleRootListen if (PlatformDataKeys.HELP_ID.is(dataId)) { return ourHelpID; } - if (PlatformDataKeys.NAVIGATABLE.is(dataId)) { + if (CommonDataKeys.NAVIGATABLE.is(dataId)) { final TreePath selectionPath = myTree.getLeadSelectionPath(); if (selectionPath != null && selectionPath.getLastPathComponent() instanceof DefaultMutableTreeNode){ DefaultMutableTreeNode node = (DefaultMutableTreeNode)selectionPath.getLastPathComponent(); diff --git a/platform/lang-impl/src/com/intellij/packageDependencies/ui/DependenciesPanel.java b/platform/lang-impl/src/com/intellij/packageDependencies/ui/DependenciesPanel.java index c4b6b89a82e7..c6a3211dbee6 100644 --- a/platform/lang-impl/src/com/intellij/packageDependencies/ui/DependenciesPanel.java +++ b/platform/lang-impl/src/com/intellij/packageDependencies/ui/DependenciesPanel.java @@ -777,7 +777,7 @@ public class DependenciesPanel extends JPanel implements Disposable, DataProvide @Override public Object getData(String dataId) { PackageDependenciesNode node = getSelectedNode(); - if (PlatformDataKeys.NAVIGATABLE.is(dataId)) { + if (CommonDataKeys.NAVIGATABLE.is(dataId)) { return node; } if (CommonDataKeys.PSI_ELEMENT.is(dataId) && node != null) { diff --git a/platform/platform-api/src/com/intellij/openapi/actionSystem/DataConstants.java b/platform/platform-api/src/com/intellij/openapi/actionSystem/DataConstants.java index 1d0f99828777..899b24e080e6 100644 --- a/platform/platform-api/src/com/intellij/openapi/actionSystem/DataConstants.java +++ b/platform/platform-api/src/com/intellij/openapi/actionSystem/DataConstants.java @@ -128,14 +128,14 @@ public interface DataConstants { * * @deprecated use {@link com.intellij.openapi.actionSystem.PlatformDataKeys#NAVIGATABLE} instead */ - String NAVIGATABLE = PlatformDataKeys.NAVIGATABLE.getName(); + String NAVIGATABLE = CommonDataKeys.NAVIGATABLE.getName(); /** * Returns an array of {@link com.intellij.pom.Navigatable} * * @deprecated use {@link com.intellij.openapi.actionSystem.PlatformDataKeys#NAVIGATABLE_ARRAY} instead */ - String NAVIGATABLE_ARRAY = PlatformDataKeys.NAVIGATABLE_ARRAY.getName(); + String NAVIGATABLE_ARRAY = CommonDataKeys.NAVIGATABLE_ARRAY.getName(); /** * Returns {@link com.intellij.ide.ExporterToTextFile} diff --git a/platform/platform-api/src/com/intellij/ui/AutoScrollToSourceHandler.java b/platform/platform-api/src/com/intellij/ui/AutoScrollToSourceHandler.java index ddadcb51b734..7dbf1d969d24 100644 --- a/platform/platform-api/src/com/intellij/ui/AutoScrollToSourceHandler.java +++ b/platform/platform-api/src/com/intellij/ui/AutoScrollToSourceHandler.java @@ -198,7 +198,7 @@ public abstract class AutoScrollToSourceHandler { //IDEA-84881 Don't autoscroll to very large files if (vFile.getLength() > PersistentFSConstants.getMaxIntellisenseFileSize()) return; } - Navigatable[] navigatables = PlatformDataKeys.NAVIGATABLE_ARRAY.getData(context); + Navigatable[] navigatables = CommonDataKeys.NAVIGATABLE_ARRAY.getData(context); if (navigatables != null) { if (navigatables.length > 1) { return; diff --git a/platform/platform-api/src/com/intellij/util/OpenSourceUtil.java b/platform/platform-api/src/com/intellij/util/OpenSourceUtil.java index 8350232291f3..e478dabf632b 100644 --- a/platform/platform-api/src/com/intellij/util/OpenSourceUtil.java +++ b/platform/platform-api/src/com/intellij/util/OpenSourceUtil.java @@ -15,6 +15,7 @@ */ package com.intellij.util; +import com.intellij.openapi.actionSystem.CommonDataKeys; import com.intellij.openapi.actionSystem.DataContext; import com.intellij.openapi.actionSystem.DataProvider; import com.intellij.openapi.actionSystem.PlatformDataKeys; @@ -27,11 +28,11 @@ public class OpenSourceUtil { } public static void openSourcesFrom(DataContext context, boolean requestFocus) { - navigate(requestFocus, PlatformDataKeys.NAVIGATABLE_ARRAY.getData(context)); + navigate(requestFocus, CommonDataKeys.NAVIGATABLE_ARRAY.getData(context)); } public static void openSourcesFrom(DataProvider context, boolean requestFocus) { - navigate(requestFocus, PlatformDataKeys.NAVIGATABLE_ARRAY.getData(context)); + navigate(requestFocus, CommonDataKeys.NAVIGATABLE_ARRAY.getData(context)); } /** diff --git a/platform/platform-impl/src/com/intellij/ide/actions/BaseNavigateToSourceAction.java b/platform/platform-impl/src/com/intellij/ide/actions/BaseNavigateToSourceAction.java index f3144836aaea..1c7855d2eedb 100644 --- a/platform/platform-impl/src/com/intellij/ide/actions/BaseNavigateToSourceAction.java +++ b/platform/platform-impl/src/com/intellij/ide/actions/BaseNavigateToSourceAction.java @@ -86,6 +86,6 @@ public abstract class BaseNavigateToSourceAction extends AnAction implements Dum @Nullable protected Navigatable[] getNavigatables(final DataContext dataContext) { - return PlatformDataKeys.NAVIGATABLE_ARRAY.getData(dataContext); + return CommonDataKeys.NAVIGATABLE_ARRAY.getData(dataContext); } } diff --git a/platform/platform-impl/src/com/intellij/ide/errorTreeView/NewErrorTreeViewPanel.java b/platform/platform-impl/src/com/intellij/ide/errorTreeView/NewErrorTreeViewPanel.java index 171d2bf85493..20d2d9266003 100644 --- a/platform/platform-impl/src/com/intellij/ide/errorTreeView/NewErrorTreeViewPanel.java +++ b/platform/platform-impl/src/com/intellij/ide/errorTreeView/NewErrorTreeViewPanel.java @@ -206,7 +206,7 @@ public class NewErrorTreeViewPanel extends JPanel implements DataProvider, Occur if (PlatformDataKeys.COPY_PROVIDER.is(dataId)) { return this; } - if (PlatformDataKeys.NAVIGATABLE.is(dataId)) { + if (CommonDataKeys.NAVIGATABLE.is(dataId)) { final NavigatableMessageElement selectedMessageElement = getSelectedMessageElement(); return selectedMessageElement != null ? selectedMessageElement.getNavigatable() : null; } @@ -379,7 +379,7 @@ public class NewErrorTreeViewPanel extends JPanel implements DataProvider, Occur return; } DefaultActionGroup group = new DefaultActionGroup(); - if (getData(PlatformDataKeys.NAVIGATABLE.getName()) != null) { + if (getData(CommonDataKeys.NAVIGATABLE.getName()) != null) { group.add(ActionManager.getInstance().getAction(IdeActions.ACTION_EDIT_SOURCE)); } group.add(ActionManager.getInstance().getAction(IdeActions.ACTION_COPY)); diff --git a/platform/platform-impl/src/com/intellij/ide/impl/DataManagerImpl.java b/platform/platform-impl/src/com/intellij/ide/impl/DataManagerImpl.java index 14ea4e9f23f1..c94da2e1f4ff 100644 --- a/platform/platform-impl/src/com/intellij/ide/impl/DataManagerImpl.java +++ b/platform/platform-impl/src/com/intellij/ide/impl/DataManagerImpl.java @@ -280,7 +280,7 @@ public class DataManagerImpl extends DataManager implements ApplicationComponent myDataConstantToRuleMap.put(PlatformDataKeys.PASTE_PROVIDER.getName(), new PasteProviderRule()); myDataConstantToRuleMap.put(PlatformDataKeys.FILE_TEXT.getName(), new FileTextRule()); myDataConstantToRuleMap.put(PlatformDataKeys.FILE_EDITOR.getName(), new FileEditorRule()); - myDataConstantToRuleMap.put(PlatformDataKeys.NAVIGATABLE_ARRAY.getName(), new NavigatableArrayRule()); + myDataConstantToRuleMap.put(CommonDataKeys.NAVIGATABLE_ARRAY.getName(), new NavigatableArrayRule()); myDataConstantToRuleMap.put(PlatformDataKeys.EDITOR_EVEN_IF_INACTIVE.getName(), new InactiveEditorRule()); } diff --git a/platform/platform-impl/src/com/intellij/ide/impl/dataRules/NavigatableArrayRule.java b/platform/platform-impl/src/com/intellij/ide/impl/dataRules/NavigatableArrayRule.java index f0e0ae7de1a0..cc0ab1589e36 100644 --- a/platform/platform-impl/src/com/intellij/ide/impl/dataRules/NavigatableArrayRule.java +++ b/platform/platform-impl/src/com/intellij/ide/impl/dataRules/NavigatableArrayRule.java @@ -15,13 +15,14 @@ */ package com.intellij.ide.impl.dataRules; +import com.intellij.openapi.actionSystem.CommonDataKeys; import com.intellij.openapi.actionSystem.DataProvider; import com.intellij.openapi.actionSystem.PlatformDataKeys; import com.intellij.pom.Navigatable; public class NavigatableArrayRule implements GetDataRule { public Object getData(DataProvider dataProvider) { - final Navigatable element = PlatformDataKeys.NAVIGATABLE.getData(dataProvider); + final Navigatable element = CommonDataKeys.NAVIGATABLE.getData(dataProvider); if (element == null) { return null; } diff --git a/platform/platform-impl/src/com/intellij/openapi/diff/impl/DiffPanelImpl.java b/platform/platform-impl/src/com/intellij/openapi/diff/impl/DiffPanelImpl.java index be16ea7289c7..bba05ac42aab 100644 --- a/platform/platform-impl/src/com/intellij/openapi/diff/impl/DiffPanelImpl.java +++ b/platform/platform-impl/src/com/intellij/openapi/diff/impl/DiffPanelImpl.java @@ -868,7 +868,7 @@ public class DiffPanelImpl implements DiffPanelEx, ContentChangeListener, TwoSid if (FocusDiffSide.DATA_KEY.is(dataId)) { return myDiffPanel.myCurrentSide == null ? null : myFocusDiffSide; } - if (PlatformDataKeys.NAVIGATABLE.is(dataId)) { + if (CommonDataKeys.NAVIGATABLE.is(dataId)) { final DiffSideView currentSide = myDiffPanel.myCurrentSide; if (currentSide != null) { return new DiffNavigatable(currentSide); diff --git a/platform/platform-impl/src/com/intellij/platform/FilesystemToolwindow.java b/platform/platform-impl/src/com/intellij/platform/FilesystemToolwindow.java index 503d90a3a940..ce707e3ba2bb 100644 --- a/platform/platform-impl/src/com/intellij/platform/FilesystemToolwindow.java +++ b/platform/platform-impl/src/com/intellij/platform/FilesystemToolwindow.java @@ -78,7 +78,7 @@ public class FilesystemToolwindow { @Nullable public Object getData(@NonNls final String dataId) { - if (PlatformDataKeys.NAVIGATABLE.is(dataId)) { + if (CommonDataKeys.NAVIGATABLE.is(dataId)) { final VirtualFile file = myFsTree.getSelectedFile(); if (file != null) { return new OpenFileDescriptor(myProject, file); diff --git a/platform/testRunner/src/com/intellij/execution/testframework/TestsUIUtil.java b/platform/testRunner/src/com/intellij/execution/testframework/TestsUIUtil.java index e752f6c8d8ae..1a6f98f5c679 100644 --- a/platform/testRunner/src/com/intellij/execution/testframework/TestsUIUtil.java +++ b/platform/testRunner/src/com/intellij/execution/testframework/TestsUIUtil.java @@ -54,8 +54,8 @@ public class TestsUIUtil { final Project project = properties.getProject(); if (testProxy == null) return null; if (AbstractTestProxy.DATA_KEY.is(dataId)) return testProxy; - if (PlatformDataKeys.NAVIGATABLE.is(dataId)) return getOpenFileDescriptor(testProxy, model); - if (PlatformDataKeys.NAVIGATABLE_ARRAY.is(dataId)) { + if (CommonDataKeys.NAVIGATABLE.is(dataId)) return getOpenFileDescriptor(testProxy, model); + if (CommonDataKeys.NAVIGATABLE_ARRAY.is(dataId)) { final Navigatable openFileDescriptor = getOpenFileDescriptor(testProxy, model); return openFileDescriptor != null ? new Navigatable[]{openFileDescriptor} : null; } diff --git a/platform/usageView/src/com/intellij/usages/impl/UsageViewImpl.java b/platform/usageView/src/com/intellij/usages/impl/UsageViewImpl.java index fb495bf940b7..b09d66314319 100644 --- a/platform/usageView/src/com/intellij/usages/impl/UsageViewImpl.java +++ b/platform/usageView/src/com/intellij/usages/impl/UsageViewImpl.java @@ -1436,8 +1436,8 @@ public class UsageViewImpl implements UsageView, UsageModelTracker.UsageModelTra sink.put(USAGE_VIEW_KEY, UsageViewImpl.this); } - else if (key == PlatformDataKeys.NAVIGATABLE_ARRAY) { - sink.put(PlatformDataKeys.NAVIGATABLE_ARRAY, getNavigatablesForNodes(getSelectedNodes())); + else if (key == CommonDataKeys.NAVIGATABLE_ARRAY) { + sink.put(CommonDataKeys.NAVIGATABLE_ARRAY, getNavigatablesForNodes(getSelectedNodes())); } else if (key == PlatformDataKeys.EXPORTER_TO_TEXT_FILE) { diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/committed/CommittedChangesTreeBrowser.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/committed/CommittedChangesTreeBrowser.java index 59b834c01314..aec9a4787bc6 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/committed/CommittedChangesTreeBrowser.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/committed/CommittedChangesTreeBrowser.java @@ -384,10 +384,10 @@ public class CommittedChangesTreeBrowser extends JPanel implements TypeSafeDataP sink.put(VcsDataKeys.CHANGE_LISTS, lists.toArray(new CommittedChangeList[lists.size()])); } } - else if (key.equals(PlatformDataKeys.NAVIGATABLE_ARRAY)) { + else if (key.equals(CommonDataKeys.NAVIGATABLE_ARRAY)) { final Collection changes = collectChanges(getSelectedChangeLists(), false); Navigatable[] result = ChangesUtil.getNavigatableArray(myProject, ChangesUtil.getFilesFromChanges(changes)); - sink.put(PlatformDataKeys.NAVIGATABLE_ARRAY, result); + sink.put(CommonDataKeys.NAVIGATABLE_ARRAY, result); } else if (key.equals(PlatformDataKeys.HELP_ID)) { sink.put(PlatformDataKeys.HELP_ID, myHelpId); diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/shelf/ShelvedChangesViewManager.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/shelf/ShelvedChangesViewManager.java index 9dae247e2148..696ad9e90eef 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/shelf/ShelvedChangesViewManager.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/shelf/ShelvedChangesViewManager.java @@ -340,7 +340,7 @@ public class ShelvedChangesViewManager implements ProjectComponent { } else if (key == PlatformDataKeys.DELETE_ELEMENT_PROVIDER) { sink.put(PlatformDataKeys.DELETE_ELEMENT_PROVIDER, myDeleteProvider); - } else if (PlatformDataKeys.NAVIGATABLE_ARRAY.equals(key)) { + } else if (CommonDataKeys.NAVIGATABLE_ARRAY.equals(key)) { List shelvedChanges = new ArrayList(TreeUtil.collectSelectedObjectsOfType(this, ShelvedChange.class)); final ArrayDeque navigatables = new ArrayDeque(); final List changeLists = TreeUtil.collectSelectedObjectsOfType(this, ShelvedChangeList.class); @@ -362,7 +362,7 @@ public class ShelvedChangesViewManager implements ProjectComponent { } } - sink.put(PlatformDataKeys.NAVIGATABLE_ARRAY, navigatables.toArray(new Navigatable[navigatables.size()])); + sink.put(CommonDataKeys.NAVIGATABLE_ARRAY, navigatables.toArray(new Navigatable[navigatables.size()])); } } diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowser.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowser.java index 06f4e517d002..0ee2002b745c 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowser.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowser.java @@ -180,8 +180,8 @@ public class ChangesBrowser extends JPanel implements TypeSafeDataProvider { } else if (key == CommonDataKeys.VIRTUAL_FILE_ARRAY) { sink.put(CommonDataKeys.VIRTUAL_FILE_ARRAY, getSelectedFiles()); } - else if (key == PlatformDataKeys.NAVIGATABLE_ARRAY) { - sink.put(PlatformDataKeys.NAVIGATABLE_ARRAY, ChangesUtil.getNavigatableArray(myProject, getSelectedFiles())); + else if (key == CommonDataKeys.NAVIGATABLE_ARRAY) { + sink.put(CommonDataKeys.NAVIGATABLE_ARRAY, ChangesUtil.getNavigatableArray(myProject, getSelectedFiles())); } else if (VcsDataKeys.IO_FILE_ARRAY.equals(key)) { sink.put(VcsDataKeys.IO_FILE_ARRAY, getSelectedIoFiles()); } diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesListView.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesListView.java index ebcc2bdc7990..ea6b317b8f2b 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesListView.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesListView.java @@ -189,14 +189,14 @@ public class ChangesListView extends Tree implements TypeSafeDataProvider, Advan else if (key == CommonDataKeys.VIRTUAL_FILE_ARRAY) { sink.put(CommonDataKeys.VIRTUAL_FILE_ARRAY, getSelectedFiles()); } - else if (key == PlatformDataKeys.NAVIGATABLE) { + else if (key == CommonDataKeys.NAVIGATABLE) { final VirtualFile[] files = getSelectedFiles(); if (files.length == 1 && !files [0].isDirectory()) { - sink.put(PlatformDataKeys.NAVIGATABLE, new OpenFileDescriptor(myProject, files[0], 0)); + sink.put(CommonDataKeys.NAVIGATABLE, new OpenFileDescriptor(myProject, files[0], 0)); } } - else if (key == PlatformDataKeys.NAVIGATABLE_ARRAY) { - sink.put(PlatformDataKeys.NAVIGATABLE_ARRAY, ChangesUtil.getNavigatableArray(myProject, getSelectedFiles())); + else if (key == CommonDataKeys.NAVIGATABLE_ARRAY) { + sink.put(CommonDataKeys.NAVIGATABLE_ARRAY, ChangesUtil.getNavigatableArray(myProject, getSelectedFiles())); } else if (key == PlatformDataKeys.DELETE_ELEMENT_PROVIDER) { final TreePath[] paths = getSelectionPaths(); diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/EditSourceInCommitAction.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/EditSourceInCommitAction.java index 7fb88b8b1686..5e16473fee52 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/EditSourceInCommitAction.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/EditSourceInCommitAction.java @@ -19,6 +19,7 @@ import com.intellij.icons.AllIcons; import com.intellij.idea.ActionsBundle; 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.ui.DialogWrapper; import com.intellij.pom.Navigatable; @@ -37,7 +38,7 @@ public class EditSourceInCommitAction extends AnAction { } public void actionPerformed(AnActionEvent e) { - final Navigatable[] navigatableArray = e.getData(PlatformDataKeys.NAVIGATABLE_ARRAY); + final Navigatable[] navigatableArray = e.getData(CommonDataKeys.NAVIGATABLE_ARRAY); if (navigatableArray != null && navigatableArray.length > 0) { SwingUtilities.invokeLater(new Runnable() { public void run() { diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/history/FileHistoryPanelImpl.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/history/FileHistoryPanelImpl.java index 90431e0de3e8..b6f30d3bcccd 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/history/FileHistoryPanelImpl.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/history/FileHistoryPanelImpl.java @@ -1192,7 +1192,7 @@ public class FileHistoryPanelImpl extends PanelWithActionsAndCloseButton { public Object getData(String dataId) { VcsFileRevision firstSelectedRevision = getFirstSelectedRevision(); - if (PlatformDataKeys.NAVIGATABLE.is(dataId)) { + if (CommonDataKeys.NAVIGATABLE.is(dataId)) { List selectedItems = getSelection(); if (selectedItems.size() != 1) return null; if (!myHistorySession.isContentAvailable(firstSelectedRevision)) { diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/update/UpdateInfoTree.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/update/UpdateInfoTree.java index 30136cf5afe3..36c256212dc0 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/update/UpdateInfoTree.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/update/UpdateInfoTree.java @@ -238,7 +238,7 @@ public class UpdateInfoTree extends PanelWithActionsAndCloseButton implements Di if (myTreeBrowser != null && myTreeBrowser.isVisible()) { return null; } - if (PlatformDataKeys.NAVIGATABLE.is(dataId)) { + if (CommonDataKeys.NAVIGATABLE.is(dataId)) { if (mySelectedFile == null || !mySelectedFile.isValid()) return null; return new OpenFileDescriptor(myProject, mySelectedFile); } diff --git a/plugins/ant/src/com/intellij/lang/ant/config/execution/TreeView.java b/plugins/ant/src/com/intellij/lang/ant/config/execution/TreeView.java index b0e2527c2e1a..3a03688d200d 100644 --- a/plugins/ant/src/com/intellij/lang/ant/config/execution/TreeView.java +++ b/plugins/ant/src/com/intellij/lang/ant/config/execution/TreeView.java @@ -365,7 +365,7 @@ public final class TreeView implements AntOutputView, OccurenceNavigator { final TreePath path = myTree.getLeadSelectionPath(); if (path == null) return; if (!(path.getLastPathComponent()instanceof MessageNode)) return; - if (getData(PlatformDataKeys.NAVIGATABLE_ARRAY.getName()) == null) return; + if (getData(CommonDataKeys.NAVIGATABLE_ARRAY.getName()) == null) return; DefaultActionGroup group = new DefaultActionGroup(); group.add(ActionManager.getInstance().getAction(IdeActions.ACTION_EDIT_SOURCE)); ActionPopupMenu menu = ActionManager.getInstance().createActionPopupMenu(ActionPlaces.ANT_MESSAGES_POPUP, group); @@ -382,7 +382,7 @@ public final class TreeView implements AntOutputView, OccurenceNavigator { @Nullable public Object getData(String dataId) { - if (PlatformDataKeys.NAVIGATABLE.is(dataId)) { + if (CommonDataKeys.NAVIGATABLE.is(dataId)) { MessageNode item = getSelectedItem(); if (item == null) return null; if (isValid(item.getFile())) { diff --git a/plugins/ant/src/com/intellij/lang/ant/config/explorer/AntExplorer.java b/plugins/ant/src/com/intellij/lang/ant/config/explorer/AntExplorer.java index c419a7f957ac..f058ce9f1f36 100644 --- a/plugins/ant/src/com/intellij/lang/ant/config/explorer/AntExplorer.java +++ b/plugins/ant/src/com/intellij/lang/ant/config/explorer/AntExplorer.java @@ -421,7 +421,7 @@ public class AntExplorer extends SimpleToolWindowPanel implements DataProvider, @Nullable public Object getData(@NonNls String dataId) { - if (PlatformDataKeys.NAVIGATABLE.is(dataId)) { + if (CommonDataKeys.NAVIGATABLE.is(dataId)) { final AntBuildFile buildFile = getCurrentBuildFile(); if (buildFile == null) { return null; diff --git a/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/cvsBrowser/ui/BrowserPanel.java b/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/cvsBrowser/ui/BrowserPanel.java index d0a8d9dede4d..8c5a5dc7e3bc 100644 --- a/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/cvsBrowser/ui/BrowserPanel.java +++ b/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/cvsBrowser/ui/BrowserPanel.java @@ -102,14 +102,14 @@ public class BrowserPanel extends JPanel implements DataProvider, CvsTabbedWindo } public void actionPerformed(AnActionEvent e) { - final Navigatable[] navigatableArray = e.getData(PlatformDataKeys.NAVIGATABLE_ARRAY); + final Navigatable[] navigatableArray = e.getData(CommonDataKeys.NAVIGATABLE_ARRAY); if (navigatableArray != null && navigatableArray.length > 0) { OpenSourceUtil.navigate(navigatableArray); } } public void update(final AnActionEvent e) { - final Navigatable[] navigatableArray = e.getData(PlatformDataKeys.NAVIGATABLE_ARRAY); + final Navigatable[] navigatableArray = e.getData(CommonDataKeys.NAVIGATABLE_ARRAY); e.getPresentation().setEnabled(navigatableArray != null && navigatableArray.length > 0); } } @@ -206,7 +206,7 @@ public class BrowserPanel extends JPanel implements DataProvider, CvsTabbedWindo } public Object getData(String dataId) { - if (PlatformDataKeys.NAVIGATABLE.is(dataId)) { + if (CommonDataKeys.NAVIGATABLE.is(dataId)) { VirtualFile cvsVirtualFile = getCvsVirtualFile(); if (cvsVirtualFile == null || !cvsVirtualFile.isValid()) return null; return new OpenFileDescriptor(myProject, cvsVirtualFile); diff --git a/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/cvsoperations/cvsEdit/ui/EditorsPanel.java b/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/cvsoperations/cvsEdit/ui/EditorsPanel.java index 76a0ee0dceae..1dffcc2c609b 100644 --- a/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/cvsoperations/cvsEdit/ui/EditorsPanel.java +++ b/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/cvsoperations/cvsEdit/ui/EditorsPanel.java @@ -137,7 +137,7 @@ public class EditorsPanel extends JPanel implements TypeSafeDataProvider { if (key.equals(CommonDataKeys.PROJECT)) { sink.put(CommonDataKeys.PROJECT, myProject); } - else if (key.equals(PlatformDataKeys.NAVIGATABLE)) { + else if (key.equals(CommonDataKeys.NAVIGATABLE)) { final EditorInfo editorInfo = myTable.getSelectedObject(); if (editorInfo == null) { return; @@ -150,7 +150,7 @@ public class EditorsPanel extends JPanel implements TypeSafeDataProvider { final File file = new File(editorInfo.getPath(), filePath); final VirtualFile vf = LocalFileSystem.getInstance().findFileByIoFile(file); if (vf != null) { - sink.put(PlatformDataKeys.NAVIGATABLE, new OpenFileDescriptor(myProject, vf)); + sink.put(CommonDataKeys.NAVIGATABLE, new OpenFileDescriptor(myProject, vf)); } } } diff --git a/plugins/maven/src/main/java/org/jetbrains/idea/maven/navigator/MavenProjectsNavigatorPanel.java b/plugins/maven/src/main/java/org/jetbrains/idea/maven/navigator/MavenProjectsNavigatorPanel.java index b9ba49fcab9d..525f0e74b3d7 100644 --- a/plugins/maven/src/main/java/org/jetbrains/idea/maven/navigator/MavenProjectsNavigatorPanel.java +++ b/plugins/maven/src/main/java/org/jetbrains/idea/maven/navigator/MavenProjectsNavigatorPanel.java @@ -133,7 +133,7 @@ public class MavenProjectsNavigatorPanel extends SimpleToolWindowPanel implement if (CommonDataKeys.VIRTUAL_FILE_ARRAY.is(dataId)) return extractVirtualFiles(); if (Location.DATA_KEY.is(dataId)) return extractLocation(); - if (PlatformDataKeys.NAVIGATABLE_ARRAY.is(dataId)) return extractNavigatables(); + if (CommonDataKeys.NAVIGATABLE_ARRAY.is(dataId)) return extractNavigatables(); if (MavenDataKeys.MAVEN_GOALS.is(dataId)) return extractGoals(true); if (MavenDataKeys.RUN_CONFIGURATION.is(dataId)) return extractRunSettings(); diff --git a/plugins/svn4idea/src/org/jetbrains/idea/svn/dialogs/IntersectingLocalChangesPanel.java b/plugins/svn4idea/src/org/jetbrains/idea/svn/dialogs/IntersectingLocalChangesPanel.java index 925192bdd06c..60a5d798abeb 100644 --- a/plugins/svn4idea/src/org/jetbrains/idea/svn/dialogs/IntersectingLocalChangesPanel.java +++ b/plugins/svn4idea/src/org/jetbrains/idea/svn/dialogs/IntersectingLocalChangesPanel.java @@ -66,7 +66,7 @@ public class IntersectingLocalChangesPanel { } public void calcData(DataKey key, DataSink sink) { - if (PlatformDataKeys.NAVIGATABLE_ARRAY.equals(key)) { + if (CommonDataKeys.NAVIGATABLE_ARRAY.equals(key)) { final TreePath[] treePaths = myJTree.getSelectionModel().getSelectionPaths(); final List navigatables = new ArrayList(treePaths.length); for (TreePath treePath : treePaths) { diff --git a/plugins/svn4idea/src/org/jetbrains/idea/svn/dialogs/RepositoryBrowserComponent.java b/plugins/svn4idea/src/org/jetbrains/idea/svn/dialogs/RepositoryBrowserComponent.java index 5081b1ce410a..78acfe32cf53 100644 --- a/plugins/svn4idea/src/org/jetbrains/idea/svn/dialogs/RepositoryBrowserComponent.java +++ b/plugins/svn4idea/src/org/jetbrains/idea/svn/dialogs/RepositoryBrowserComponent.java @@ -262,7 +262,7 @@ public class RepositoryBrowserComponent extends JPanel implements Disposable, Da @Nullable public Object getData(@NonNls String dataId) { - if (PlatformDataKeys.NAVIGATABLE.is(dataId)) { + if (CommonDataKeys.NAVIGATABLE.is(dataId)) { final Project project = myVCS.getProject(); if (project == null || project.isDefault()) { return null; diff --git a/plugins/ui-designer/src/com/intellij/uiDesigner/componentTree/ComponentTree.java b/plugins/ui-designer/src/com/intellij/uiDesigner/componentTree/ComponentTree.java index a2f50bb6b13c..48a4bd938aa8 100644 --- a/plugins/ui-designer/src/com/intellij/uiDesigner/componentTree/ComponentTree.java +++ b/plugins/ui-designer/src/com/intellij/uiDesigner/componentTree/ComponentTree.java @@ -258,7 +258,7 @@ public final class ComponentTree extends Tree implements DataProvider { return myFormEditor; } - if (!PlatformDataKeys.NAVIGATABLE.is(dataId)) { + if (!CommonDataKeys.NAVIGATABLE.is(dataId)) { return null; } diff --git a/plugins/ui-designer/src/com/intellij/uiDesigner/designSurface/GlassLayer.java b/plugins/ui-designer/src/com/intellij/uiDesigner/designSurface/GlassLayer.java index 281cefc2cb1a..015a9dc4653e 100644 --- a/plugins/ui-designer/src/com/intellij/uiDesigner/designSurface/GlassLayer.java +++ b/plugins/ui-designer/src/com/intellij/uiDesigner/designSurface/GlassLayer.java @@ -135,7 +135,7 @@ public final class GlassLayer extends JComponent implements DataProvider, PopupO * binding of currently selected component (if any) */ public Object getData(final String dataId) { - if(PlatformDataKeys.NAVIGATABLE.is(dataId)) { + if(CommonDataKeys.NAVIGATABLE.is(dataId)) { final ComponentTree componentTree = UIDesignerToolWindowManager.getInstance(myEditor.getProject()).getComponentTree(); if (componentTree != null) { return componentTree.getData(dataId); diff --git a/plugins/xslt-debugger/src/org/intellij/plugins/xsltDebugger/ui/StructureTree.java b/plugins/xslt-debugger/src/org/intellij/plugins/xsltDebugger/ui/StructureTree.java index 79773bfaccb4..a464af9d7bb7 100644 --- a/plugins/xslt-debugger/src/org/intellij/plugins/xsltDebugger/ui/StructureTree.java +++ b/plugins/xslt-debugger/src/org/intellij/plugins/xsltDebugger/ui/StructureTree.java @@ -46,12 +46,12 @@ public class StructureTree extends Tree implements TypeSafeDataProvider { } public void calcData(DataKey key, DataSink sink) { - if (key.equals(PlatformDataKeys.NAVIGATABLE)) { + if (key.equals(CommonDataKeys.NAVIGATABLE)) { final TreePath selection = getSelectionPath(); if (selection != null) { final Object o = selection.getLastPathComponent(); if (o instanceof Navigatable) { - sink.put(PlatformDataKeys.NAVIGATABLE, (Navigatable)o); + sink.put(CommonDataKeys.NAVIGATABLE, (Navigatable)o); } } } else if (key.equals(CopyValueAction.SELECTED_NODE)) { diff --git a/xml/dom-openapi/src/com/intellij/util/xml/tree/DomModelTreeView.java b/xml/dom-openapi/src/com/intellij/util/xml/tree/DomModelTreeView.java index 9f17824657ef..14886ebe1e82 100644 --- a/xml/dom-openapi/src/com/intellij/util/xml/tree/DomModelTreeView.java +++ b/xml/dom-openapi/src/com/intellij/util/xml/tree/DomModelTreeView.java @@ -190,7 +190,7 @@ public class DomModelTreeView extends Wrapper implements DataProvider, Disposabl if (simpleNode instanceof AbstractDomElementNode) { final DomElement domElement = ((AbstractDomElementNode)simpleNode).getDomElement(); if (domElement != null && domElement.isValid()) { - if (PlatformDataKeys.NAVIGATABLE_ARRAY.is(dataId)) { + if (CommonDataKeys.NAVIGATABLE_ARRAY.is(dataId)) { final XmlElement tag = domElement.getXmlElement(); if (tag instanceof Navigatable) { return new Navigatable[] { (Navigatable)tag };