com.intellij.openapi.actionSystem.LangDataKeys



API Populatity

3 Client projects

Project: com.intellij

Project JetBrains/intellij-community in file ...pi.roots.ui.configuration.BuildElementsEditor.java (2013-09-11)
@@ -23,6 +23,7 @@
 package com.intellij.openapi.roots.ui.configuration;
 
 import com.intellij.ide.util.BrowseFilesListener;
+import com.intellij.openapi.actionSystem.LangDataKeys;
 import com.intellij.openapi.fileChooser.FileChooserDescriptor;
 import com.intellij.openapi.fileChooser.FileChooserDescriptorFactory;
 import com.intellij.openapi.fileChooser.FileChooserFactory;
@@ -189,6 +190,7 @@ public class BuildElementsEditor extends ModuleElementsEditor {
   private CommitableFieldPanel createOutputPathPanel(final String title, final CommitPathRunnable commitPathRunnable) {
     final JTextField textField = new JTextField();
     final FileChooserDescriptor outputPathsChooserDescriptor = FileChooserDescriptorFactory.createSingleFolderDescriptor();
+    outputPathsChooserDescriptor.putUserData(LangDataKeys.MODULE_CONTEXT, getModel().getModule());
     outputPathsChooserDescriptor.setHideIgnored(false);
     InsertPathAction.addTo(textField, outputPathsChooserDescriptor);
     FileChooserFactory.getInstance().installFileCompletion(textField, outputPathsChooserDescriptor, true, null);
Project JetBrains/intellij-community in file ...ellij.ide.util.NavigationItemListCellRenderer.java (2014-06-30)
@@ -22,7 +22,6 @@ import com.intellij.navigation.NavigationItem;
 import com.intellij.navigation.NavigationItemFileStatus;
 import com.intellij.openapi.actionSystem.CommonDataKeys;
 import com.intellij.openapi.actionSystem.DataProvider;
-import com.intellij.openapi.actionSystem.LangDataKeys;
 import com.intellij.openapi.editor.colors.EditorColorsManager;
 import com.intellij.openapi.editor.colors.EditorColorsScheme;
 import com.intellij.openapi.editor.markup.EffectType;
@@ -107,7 +106,7 @@ public class NavigationItemListCellRenderer extends OpaquePanel implements ListC
       final PsiElement psiElement = value instanceof PsiElement
                                     ? (PsiElement)value
                                     : CommonDataKeys.PSI_ELEMENT.getData((DataProvider) value);
-      if (psiElement != null) {
+      if (psiElement != null && psiElement.isValid()) {
         final FileColorManager fileColorManager = FileColorManager.getInstance(psiElement.getProject());
         final Color fileColor = fileColorManager.getRendererBackground(psiElement.getContainingFile());
         if (fileColor != null) {
Project JetBrains/intellij-community in file ...usageView.impl.UsageContextCallHierarchyPanel.java (2013-10-30)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2000-2012 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.
@@ -21,7 +21,6 @@ import com.intellij.ide.hierarchy.actions.BrowseHierarchyActionBase;
 import com.intellij.openapi.Disposable;
 import com.intellij.openapi.actionSystem.CommonDataKeys;
 import com.intellij.openapi.actionSystem.DataContext;
-import com.intellij.openapi.actionSystem.LangDataKeys;
 import com.intellij.openapi.actionSystem.impl.SimpleDataContext;
 import com.intellij.openapi.progress.util.ProgressIndicatorBase;
 import com.intellij.openapi.project.Project;