com.intellij.codeInsight.CodeInsightUtilBasecom.intellij.codeInsight.FileModificationService



Project JetBrains/intellij-community in file ...igration.TypeMigrationVariableTypeFixProvider.java (2013-04-25)
@@ -4,7 +4,7 @@
  */
 package com.intellij.refactoring.typeMigration;
 
-import com.intellij.codeInsight.CodeInsightUtilBase;
+import com.intellij.codeInsight.FileModificationService;
 import com.intellij.codeInsight.daemon.impl.quickfix.VariableTypeFix;
 import com.intellij.codeInsight.intention.IntentionAction;
 import com.intellij.codeInsight.quickfix.ChangeVariableTypeQuickFixProvider;
@@ -41,7 +41,7 @@ public class TypeMigrationVariableTypeFixProvider implements ChangeVariableTypeQ
                          @NotNull PsiElement endElement) {
         final PsiVariable myVariable = (PsiVariable)startElement;
 
-        if (!CodeInsightUtilBase.prepareFileForWrite(myVariable.getContainingFile())) return;
+        if (!FileModificationService.getInstance().prepareFileForWrite(myVariable.getContainingFile())) return;
         try {
           myVariable.normalizeDeclaration();
           final TypeMigrationRules rules = new TypeMigrationRules(TypeMigrationLabeler.getElementType(myVariable));
Project JetBrains/intellij-community in file ...tion.intentions.ConvertFieldToAtomicIntention.java (2013-04-25)
@@ -4,7 +4,7 @@
  */
 package com.intellij.refactoring.typeMigration.intentions;
 
-import com.intellij.codeInsight.CodeInsightUtilBase;
+import com.intellij.codeInsight.FileModificationService;
 import com.intellij.codeInsight.intention.LowPriorityAction;
 import com.intellij.codeInsight.intention.PsiElementBaseIntentionAction;
 import com.intellij.lang.java.JavaLanguage;
@@ -91,7 +91,7 @@ public class ConvertFieldToAtomicIntention extends PsiElementBaseIntentionAction
     for (PsiReference reference : refs) {
       elements.add(reference.getElement());
     }
-    if (!CodeInsightUtilBase.preparePsiElementsForWrite(elements)) return;
+    if (!FileModificationService.getInstance().preparePsiElementsForWrite(elements)) return;
 
     final JavaPsiFacade psiFacade = JavaPsiFacade.getInstance(project);
     final PsiElementFactory elementFactory = JavaPsiFacade.getElementFactory(project);
Project JetBrains/intellij-community in file ...intentions.ConvertFieldToThreadLocalIntention.java (2013-04-25)
@@ -4,7 +4,7 @@
  */
 package com.intellij.refactoring.typeMigration.intentions;
 
-import com.intellij.codeInsight.CodeInsightUtilBase;
+import com.intellij.codeInsight.FileModificationService;
 import com.intellij.codeInsight.intention.LowPriorityAction;
 import com.intellij.codeInsight.intention.PsiElementBaseIntentionAction;
 import com.intellij.lang.java.JavaLanguage;
@@ -71,7 +71,7 @@ public class ConvertFieldToThreadLocalIntention extends PsiElementBaseIntentionA
     for (PsiReference reference : refs) {
       elements.add(reference.getElement());
     }
-    if (!CodeInsightUtilBase.preparePsiElementsForWrite(elements)) return;
+    if (!FileModificationService.getInstance().preparePsiElementsForWrite(elements)) return;
 
     final JavaPsiFacade psiFacade = JavaPsiFacade.getInstance(project);
     final PsiElementFactory elementFactory = JavaPsiFacade.getElementFactory(project);
Project JetBrains/intellij-community in file ...sight.daemon.impl.RemoveSuppressWarningAction.java (2013-04-25)
@@ -15,7 +15,7 @@
  */
 package com.intellij.codeInsight.daemon.impl;
 
-import com.intellij.codeInsight.CodeInsightUtilBase;
+import com.intellij.codeInsight.FileModificationService;
 import com.intellij.codeInsight.daemon.QuickFixBundle;
 import com.intellij.codeInspection.LocalQuickFix;
 import com.intellij.codeInspection.ProblemDescriptor;
@@ -72,7 +72,7 @@ public class RemoveSuppressWarningAction implements LocalQuickFix {
     PsiElement element = descriptor.getPsiElement();
     try {
       if (element instanceof PsiIdentifier) {
-        if (!CodeInsightUtilBase.prepareFileForWrite(element.getContainingFile())) return;
+        if (!FileModificationService.getInstance().prepareFileForWrite(element.getContainingFile())) return;
         final PsiIdentifier identifier = (PsiIdentifier)element;
         final PsiDocCommentOwner commentOwner = PsiTreeUtil.getParentOfType(identifier, PsiDocCommentOwner.class);
         if (commentOwner != null) {
Project JetBrains/intellij-community in file ...deInsight.daemon.impl.actions.AddImportAction.java (2013-04-25)
@@ -20,7 +20,7 @@ import com.intellij.application.options.editor.AutoImportOptionsConfigurable;
 import com.intellij.application.options.editor.JavaAutoImportOptions;
 import com.intellij.codeInsight.CodeInsightSettings;
 import com.intellij.codeInsight.CodeInsightUtil;
-import com.intellij.codeInsight.CodeInsightUtilBase;
+import com.intellij.codeInsight.FileModificationService;
 import com.intellij.codeInsight.actions.OptimizeImportsProcessor;
 import com.intellij.codeInsight.daemon.DaemonCodeAnalyzer;
 import com.intellij.codeInsight.daemon.QuickFixBundle;
@@ -207,7 +207,7 @@ public class AddImportAction implements QuestionAction {
     if (!ref.getElement().isValid() || !targetClass.isValid() || ref.resolve() == targetClass) {
       return;
     }
-    if (!CodeInsightUtilBase.preparePsiElementForWrite(ref.getElement())){
+    if (!FileModificationService.getInstance().preparePsiElementForWrite(ref.getElement())){
       return;
     }