com.intellij.psi.util.PsiUtilBase



API Populatity

4 Client projects

Project: com.intellij

Package: com.intellij.psi

Project JetBrains/intellij-community in file ...ctoring.rename.inplace.VariableInplaceRenamer.java (2011-08-09)
@@ -55,6 +55,7 @@ import com.intellij.psi.search.ProjectScope;
 import com.intellij.psi.search.SearchScope;
 import com.intellij.psi.search.searches.ReferencesSearch;
 import com.intellij.psi.util.PsiTreeUtil;
+import com.intellij.psi.util.PsiUtilBase;
 import com.intellij.refactoring.RefactoringBundle;
 import com.intellij.refactoring.rename.AutomaticRenamingDialog;
 import com.intellij.refactoring.rename.NameSuggestionProvider;
@@ -382,6 +383,7 @@ public class VariableInplaceRenamer {
             return;
           }
 
+          if (!CommonRefactoringUtil.checkReadOnlyStatus(myProject, PsiUtilBase.toPsiElementArray(renamer.getElements()))) return;
           final UsageInfo[] usageInfos = usages.toArray(new UsageInfo[usages.size()]);
           final MultiMap<PsiElement,UsageInfo> classified = RenameProcessor.classifyUsages(renamer.getElements(), usageInfos);
           for (final PsiNamedElement element : renamer.getElements()) {
Project JetBrains/intellij-community in file ...ight.navigation.actions.GotoDeclarationAction.java (2008-01-28)
@@ -20,6 +20,7 @@ import com.intellij.psi.*;
 import com.intellij.psi.search.PsiElementProcessor;
 import com.intellij.psi.tree.IElementType;
 import com.intellij.psi.util.PsiUtil;
+import com.intellij.psi.util.PsiUtilBase;
 import org.jetbrains.annotations.NotNull;
 
 import java.text.MessageFormat;
@@ -71,7 +72,7 @@ public class GotoDeclarationAction extends BaseCodeInsightAction implements Code
     }
     else if (navElement != null) {
       int navOffset = navElement.getTextOffset();
-      VirtualFile virtualFile = PsiUtil.getVirtualFile(navElement);
+      VirtualFile virtualFile = PsiUtilBase.getVirtualFile(navElement);
       if (virtualFile != null) {
         new OpenFileDescriptor(project, virtualFile, navOffset).navigate(true);
       }
Project JetBrains/intellij-community in file ...eInsight.hint.actions.ShowParameterInfoAction.java (2008-05-20)
@@ -6,6 +6,7 @@ import com.intellij.codeInsight.hint.ShowParameterInfoHandler;
 import com.intellij.openapi.editor.Editor;
 import com.intellij.openapi.project.Project;
 import com.intellij.psi.PsiFile;
+import com.intellij.psi.util.PsiUtilBase;
 
 public class ShowParameterInfoAction extends BaseCodeInsightAction{
   public ShowParameterInfoAction() {
@@ -17,7 +18,7 @@ public class ShowParameterInfoAction extends BaseCodeInsightAction{
   }
 
   protected boolean isValidForFile(Project project, Editor editor, final PsiFile file) {
-    return ShowParameterInfoHandler.getHandlers(file.getLanguage()) != null;
+    return ShowParameterInfoHandler.getHandlers(PsiUtilBase.getLanguageAtOffset(file, editor.getCaretModel().getOffset())) != null;
   }
 
   protected boolean isValidForLookup() {