diff --git a/plugins/commander/src/com/intellij/ide/actions/CommanderViewActionGroup.java b/plugins/commander/src/com/intellij/ide/actions/CommanderViewActionGroup.java index 76785d068c39..8f9441e52259 100644 --- a/plugins/commander/src/com/intellij/ide/actions/CommanderViewActionGroup.java +++ b/plugins/commander/src/com/intellij/ide/actions/CommanderViewActionGroup.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2016 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. @@ -16,9 +16,7 @@ package com.intellij.ide.actions; import com.intellij.openapi.actionSystem.AnActionEvent; -import com.intellij.openapi.actionSystem.CommonDataKeys; import com.intellij.openapi.actionSystem.DefaultActionGroup; -import com.intellij.openapi.actionSystem.PlatformDataKeys; import com.intellij.openapi.actionSystem.Presentation; import com.intellij.openapi.project.DumbAware; import com.intellij.openapi.project.Project; @@ -30,9 +28,9 @@ public class CommanderViewActionGroup extends DefaultActionGroup implements Dum super(); } - public void update(AnActionEvent event){ - Presentation presentation = event.getPresentation(); - Project project = CommonDataKeys.PROJECT.getData(event.getDataContext()); + public void update(AnActionEvent e){ + Presentation presentation = e.getPresentation(); + Project project = e.getProject(); if (project == null) { presentation.setVisible(false); return; diff --git a/plugins/commander/src/com/intellij/ide/actions/SwapPanelsAction.java b/plugins/commander/src/com/intellij/ide/actions/SwapPanelsAction.java index 97eed35f7071..853fb4f14a82 100644 --- a/plugins/commander/src/com/intellij/ide/actions/SwapPanelsAction.java +++ b/plugins/commander/src/com/intellij/ide/actions/SwapPanelsAction.java @@ -1,6 +1,6 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2016 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,8 +19,6 @@ package com.intellij.ide.actions; import com.intellij.ide.commander.Commander; 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.actionSystem.Presentation; import com.intellij.openapi.project.Project; import com.intellij.openapi.wm.ToolWindowId; @@ -28,16 +26,16 @@ import com.intellij.openapi.wm.ToolWindowManager; public class SwapPanelsAction extends AnAction { public void actionPerformed(AnActionEvent e) { - Project project = CommonDataKeys.PROJECT.getData(e.getDataContext()); + Project project = e.getProject(); if (project == null) { return; } Commander.getInstance(project).swapPanels(); } - public void update(AnActionEvent event){ - Presentation presentation = event.getPresentation(); - Project project = CommonDataKeys.PROJECT.getData(event.getDataContext()); + public void update(AnActionEvent e){ + Presentation presentation = e.getPresentation(); + Project project = e.getProject(); if (project == null) { presentation.setEnabled(false); return; diff --git a/plugins/commander/src/com/intellij/ide/actions/SyncViewsAction.java b/plugins/commander/src/com/intellij/ide/actions/SyncViewsAction.java index 5ba99b554395..099708b96302 100644 --- a/plugins/commander/src/com/intellij/ide/actions/SyncViewsAction.java +++ b/plugins/commander/src/com/intellij/ide/actions/SyncViewsAction.java @@ -1,6 +1,6 @@ /* - * Copyright 2000-2013 JetBrains s.r.o. + * Copyright 2000-2016 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. @@ -17,22 +17,24 @@ package com.intellij.ide.actions; import com.intellij.ide.commander.Commander; -import com.intellij.openapi.actionSystem.*; +import com.intellij.openapi.actionSystem.AnAction; +import com.intellij.openapi.actionSystem.AnActionEvent; +import com.intellij.openapi.actionSystem.Presentation; import com.intellij.openapi.project.Project; import com.intellij.openapi.wm.ToolWindowId; import com.intellij.openapi.wm.ToolWindowManager; public class SyncViewsAction extends AnAction { public void actionPerformed(AnActionEvent e) { - Project project = CommonDataKeys.PROJECT.getData(e.getDataContext()); + Project project = e.getProject(); if (project == null) { return; } Commander.getInstance(project).syncViews(); } - public void update(AnActionEvent event){ - Presentation presentation = event.getPresentation(); - Project project = CommonDataKeys.PROJECT.getData(event.getDataContext()); + public void update(AnActionEvent e){ + Presentation presentation = e.getPresentation(); + Project project = e.getProject(); if (project == null) { presentation.setEnabled(false); return;