make method name discoverable

This commit is contained in:
Konstantin Bulenkov
2014-05-01 02:03:39 +04:00
parent 0d2fc45dff
commit ad18e4bb2f
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2013 JetBrains s.r.o.
* Copyright 2000-2014 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.
@@ -141,12 +141,21 @@ public class AnActionEvent implements PlaceProvider<String> {
}
@NotNull
public <T> T getRequiredData(@NotNull DataKey<T> key) {
public <T> T getDataChecked(@NotNull DataKey<T> key) {
T data = getData(key);
assert data != null;
return data;
}
/**
* @deprecated
* @use getDataChecked
*/
@NotNull
public <T> T getRequiredData(@NotNull DataKey<T> key) {
return getDataChecked(key);
}
/**
* Returns the identifier of the place in the IDEA user interface from where the action is invoked
* or updated.