PlatformDataKeys -> CommonDataKeys

This commit is contained in:
Konstantin Bulenkov
2013-11-03 23:41:55 +01:00
parent 7c2e72142c
commit 2cab88d212
6 changed files with 19 additions and 24 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.
@@ -22,10 +22,7 @@ import com.intellij.debugger.settings.*;
import com.intellij.debugger.ui.breakpoints.*;
import com.intellij.ide.DataManager;
import com.intellij.openapi.Disposable;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.PlatformDataKeys;
import com.intellij.openapi.actionSystem.Presentation;
import com.intellij.openapi.actionSystem.*;
import com.intellij.openapi.editor.Document;
import com.intellij.openapi.editor.markup.GutterIconRenderer;
import com.intellij.openapi.editor.markup.RangeHighlighter;
@@ -338,7 +335,7 @@ public class JavaDebuggerSupport extends DebuggerSupport {
public static Project getCurrentProject() {
//todo[nik] improve
Project project = PlatformDataKeys.PROJECT.getData(DataManager.getInstance().getDataContext());
Project project = CommonDataKeys.PROJECT.getData(DataManager.getInstance().getDataContext());
if (project != null) {
return project;
}
@@ -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,7 +19,7 @@ import com.intellij.execution.ExecutionException;
import com.intellij.execution.process.OSProcessHandler;
import com.intellij.execution.runners.ExecutionEnvironment;
import com.intellij.ide.DataManager;
import com.intellij.openapi.actionSystem.PlatformDataKeys;
import com.intellij.openapi.actionSystem.CommonDataKeys;
import org.jetbrains.annotations.NotNull;
@@ -49,7 +49,8 @@ public abstract class JavaCommandLineState extends CommandLineState implements J
protected abstract JavaParameters createJavaParameters() throws ExecutionException;
protected GeneralCommandLine createCommandLine() throws ExecutionException {
return CommandLineBuilder.createFromJavaParameters(getJavaParameters(), PlatformDataKeys.PROJECT.getData(DataManager.getInstance().getDataContext()), true);
return CommandLineBuilder.createFromJavaParameters(getJavaParameters(), CommonDataKeys.PROJECT
.getData(DataManager.getInstance().getDataContext()), true);
}
public boolean shouldAddJavaProgramRunnerActions() {