github: remove usage of deprecated API

This commit is contained in:
Aleksey Pivovarov
2016-06-29 14:49:47 +03:00
committed by Aleksey Pivovarov
parent 61971ff5ff
commit 8b141111e1
@@ -16,7 +16,9 @@
package org.jetbrains.plugins.github;
import com.intellij.ide.BrowserUtil;
import com.intellij.openapi.actionSystem.*;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.CommonDataKeys;
import com.intellij.openapi.actionSystem.DataProvider;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.components.ServiceManager;
import com.intellij.openapi.diagnostic.Logger;
@@ -51,6 +53,7 @@ import git4idea.util.GitFileUtils;
import git4idea.util.GitUIUtil;
import icons.GithubIcons;
import org.apache.http.HttpStatus;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.plugins.github.api.GithubApiUtil;
@@ -403,7 +406,7 @@ public class GithubShareAction extends DumbAwareAction {
return true;
}
public static class GithubUntrackedFilesDialog extends SelectFilesDialog implements TypeSafeDataProvider {
public static class GithubUntrackedFilesDialog extends SelectFilesDialog implements DataProvider {
@NotNull private final Project myProject;
private CommitMessage myCommitMessagePanel;
@@ -440,11 +443,13 @@ public class GithubShareAction extends DumbAwareAction {
return myCommitMessagePanel.getComment();
}
@Nullable
@Override
public void calcData(DataKey key, DataSink sink) {
if (key == VcsDataKeys.COMMIT_MESSAGE_CONTROL) {
sink.put(VcsDataKeys.COMMIT_MESSAGE_CONTROL, myCommitMessagePanel);
public Object getData(@NonNls String dataId) {
if (VcsDataKeys.COMMIT_MESSAGE_CONTROL.is(dataId)) {
return myCommitMessagePanel;
}
return null;
}
@Override