/*
 * 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.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.intellij.openapi.actionSystem;

import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.Nullable;

/**
 * Allows an action to retrieve information about the context in which it was invoked.
 *
 * @see AnActionEvent#getDataContext()
 * @see com.intellij.openapi.actionSystem.PlatformDataKeys
 * @see DataKey
 * @see com.intellij.ide.DataManager
 * @see DataProvider
 */
public interface DataContext {
  /**
   * Returns the object corresponding to the specified data identifier. Some of the supported
   * data identifiers are defined in the {@link com.intellij.openapi.actionSystem.PlatformDataKeys} class.
   *
   * @param dataId the data identifier for which the value is requested.
   * @return the value, or null if no value is available in the current context for this identifier.
   */
  @Nullable
  Object getData(@NonNls String dataId);

  DataContext EMPTY_CONTEXT = new DataContext() {
    @Nullable
    @Override
    public Object getData(@NonNls String dataId) {
      return null;
    }
  };
}

@@ -21,9 +21,9 @@
 -201
-3
+6
  Jet
@@ -679,16 +679,58 @@
 NonNls;%0A
+import org.jetbrains.annotations.NotNull;%0A
 import o
@@ -1452,16 +1452,74 @@
 tifier.%0A
+   * @deprecated use %7B@link DataContext#getData(DataKey)%7D%0A
    */%0A  
@@ -1728,11 +1728,491 @@
   %7D%0A
-
   %7D;
+%0A%0A  /**%0A   * Returns the value corresponding to the specified data key. Some of the supported%0A   * data identifiers are defined in the %7B@link com.intellij.openapi.actionSystem.PlatformDataKeys%7D class.%0A   *%0A   * @param key the data key for which the value is requested.%0A   * @return the value, or null if no value is available in the current context for this identifier.%0A   */%0A  @Nullable%0A  default %3CT%3E T getData(@NotNull DataKey%3CT%3E key) %7B%0A    return (T)getData(key.getName());%0A  %7D
 %0A%7D%0A

add default method getData(DataKey) to DataContext interface