diff options
author | Tor Norbye <tnorbye@google.com> | 2013-05-01 12:55:43 -0700 |
---|---|---|
committer | Tor Norbye <tnorbye@google.com> | 2013-05-01 12:55:43 -0700 |
commit | 8fb0021093e7d978cc06043ba4c06b0a47778294 (patch) | |
tree | b95f5f920574415ae49b26ad6abac86eb6d7b38d /plugins/properties/src/com/intellij | |
parent | b17587c84879dd2ea42495f1fbdadbc806b9475b (diff) | |
download | idea-8fb0021093e7d978cc06043ba4c06b0a47778294.tar.gz |
Snapshot dddb119296e7ee16fa8180784610b89b89112ebb from master branch of git://git.jetbrains.org/idea/community.git
Change-Id: I5fe892d3e4d06009445cc2270aa90bb57dea9d39
Diffstat (limited to 'plugins/properties/src/com/intellij')
5 files changed, 13 insertions, 13 deletions
diff --git a/plugins/properties/src/com/intellij/lang/properties/PropertiesAnnotator.java b/plugins/properties/src/com/intellij/lang/properties/PropertiesAnnotator.java index a438cdfcf0f1..316a0f8c09b7 100644 --- a/plugins/properties/src/com/intellij/lang/properties/PropertiesAnnotator.java +++ b/plugins/properties/src/com/intellij/lang/properties/PropertiesAnnotator.java @@ -15,7 +15,7 @@ */ package com.intellij.lang.properties; -import com.intellij.codeInsight.CodeInsightUtilBase; +import com.intellij.codeInsight.FileModificationService; import com.intellij.codeInsight.intention.IntentionAction; import com.intellij.lang.ASTNode; import com.intellij.lang.annotation.Annotation; @@ -68,7 +68,7 @@ public class PropertiesAnnotator implements Annotator { Lexer lexer = highlighter.getHighlightingLexer(); final String s = node.getText(); lexer.start(s); - + while (lexer.getTokenType() != null) { IElementType elementType = lexer.getTokenType(); TextAttributesKey[] keys = highlighter.getTokenHighlights(elementType); @@ -113,7 +113,7 @@ public class PropertiesAnnotator implements Annotator { } public void invoke(@NotNull Project project, Editor editor, PsiFile file) { - if (!CodeInsightUtilBase.prepareFileForWrite(file)) return; + if (!FileModificationService.getInstance().prepareFileForWrite(file)) return; int offset = annotation.getStartOffset(); if (property.getPropertiesFile().getContainingFile().getText().charAt(offset) == '\\') { editor.getDocument().deleteString(offset, offset+1); diff --git a/plugins/properties/src/com/intellij/lang/properties/PropertySuppressableInspectionBase.java b/plugins/properties/src/com/intellij/lang/properties/PropertySuppressableInspectionBase.java index fb763ed16a7f..7aff26844901 100644 --- a/plugins/properties/src/com/intellij/lang/properties/PropertySuppressableInspectionBase.java +++ b/plugins/properties/src/com/intellij/lang/properties/PropertySuppressableInspectionBase.java @@ -15,7 +15,7 @@ */ package com.intellij.lang.properties; -import com.intellij.codeInsight.CodeInsightUtilBase; +import com.intellij.codeInsight.FileModificationService; import com.intellij.codeInspection.CustomSuppressableInspectionTool; import com.intellij.codeInspection.LocalInspectionTool; import com.intellij.codeInspection.SuppressIntentionAction; @@ -112,7 +112,7 @@ public abstract class PropertySuppressableInspectionBase extends LocalInspection public void invoke(@NotNull final Project project, final Editor editor, @NotNull final PsiElement element) throws IncorrectOperationException { final PsiFile file = element.getContainingFile(); - if (!CodeInsightUtilBase.prepareFileForWrite(file)) return; + if (!FileModificationService.getInstance().prepareFileForWrite(file)) return; final Property property = PsiTreeUtil.getParentOfType(element, Property.class); LOG.assertTrue(property != null); @@ -151,7 +151,7 @@ public abstract class PropertySuppressableInspectionBase extends LocalInspection public void invoke(@NotNull final Project project, final Editor editor, @NotNull final PsiElement element) throws IncorrectOperationException { final PsiFile file = element.getContainingFile(); - if (!CodeInsightUtilBase.prepareFileForWrite(file)) return; + if (!FileModificationService.getInstance().prepareFileForWrite(file)) return; @NonNls final Document doc = PsiDocumentManager.getInstance(project).getDocument(file); LOG.assertTrue(doc != null, file); diff --git a/plugins/properties/src/com/intellij/lang/properties/RemovePropertyFix.java b/plugins/properties/src/com/intellij/lang/properties/RemovePropertyFix.java index 175d94f00fd5..a5fd365f58c5 100644 --- a/plugins/properties/src/com/intellij/lang/properties/RemovePropertyFix.java +++ b/plugins/properties/src/com/intellij/lang/properties/RemovePropertyFix.java @@ -15,11 +15,11 @@ */ package com.intellij.lang.properties; +import com.intellij.codeInsight.FileModificationService; import com.intellij.codeInsight.intention.IntentionAction; -import com.intellij.codeInsight.CodeInsightUtilBase; import com.intellij.lang.properties.psi.Property; -import com.intellij.openapi.project.Project; import com.intellij.openapi.editor.Editor; +import com.intellij.openapi.project.Project; import com.intellij.psi.PsiFile; import com.intellij.util.IncorrectOperationException; import org.jetbrains.annotations.NotNull; @@ -53,7 +53,7 @@ class RemovePropertyFix implements IntentionAction { } public void invoke(@NotNull Project project, Editor editor, PsiFile file) throws IncorrectOperationException { - if (!CodeInsightUtilBase.prepareFileForWrite(file)) return; + if (!FileModificationService.getInstance().prepareFileForWrite(file)) return; myProperty.delete(); } diff --git a/plugins/properties/src/com/intellij/lang/properties/refactoring/ResourceBundleRenameHandler.java b/plugins/properties/src/com/intellij/lang/properties/refactoring/ResourceBundleRenameHandler.java index 5164276f5323..2eb402aa23a6 100644 --- a/plugins/properties/src/com/intellij/lang/properties/refactoring/ResourceBundleRenameHandler.java +++ b/plugins/properties/src/com/intellij/lang/properties/refactoring/ResourceBundleRenameHandler.java @@ -19,7 +19,7 @@ */ package com.intellij.lang.properties.refactoring; -import com.intellij.codeInsight.CodeInsightUtilBase; +import com.intellij.codeInsight.FileModificationService; import com.intellij.lang.properties.PropertiesBundle; import com.intellij.lang.properties.ResourceBundle; import com.intellij.lang.properties.editor.ResourceBundleAsVirtualFile; @@ -103,7 +103,7 @@ public class ResourceBundleRenameHandler implements RenameHandler { private boolean doRename(final String inputString) { final List<PropertiesFile> propertiesFiles = myResourceBundle.getPropertiesFiles(myProject); for (PropertiesFile propertiesFile : propertiesFiles) { - if (!CodeInsightUtilBase.prepareFileForWrite(propertiesFile.getContainingFile())) return false; + if (!FileModificationService.getInstance().prepareFileForWrite(propertiesFile.getContainingFile())) return false; } RenameProcessor renameProcessor = null; diff --git a/plugins/properties/src/com/intellij/lang/properties/references/CreatePropertyFix.java b/plugins/properties/src/com/intellij/lang/properties/references/CreatePropertyFix.java index 0a3fc8ef7b0d..398f31cb48c6 100644 --- a/plugins/properties/src/com/intellij/lang/properties/references/CreatePropertyFix.java +++ b/plugins/properties/src/com/intellij/lang/properties/references/CreatePropertyFix.java @@ -16,7 +16,7 @@ package com.intellij.lang.properties.references; import com.intellij.codeInsight.CodeInsightBundle; -import com.intellij.codeInsight.CodeInsightUtilBase; +import com.intellij.codeInsight.FileModificationService; import com.intellij.codeInsight.intention.IntentionAction; import com.intellij.codeInspection.LocalQuickFix; import com.intellij.codeInspection.ProblemDescriptor; @@ -147,7 +147,7 @@ public class CreatePropertyFix implements IntentionAction, LocalQuickFix { @NotNull final String key, @NotNull final String value) { for (PropertiesFile selectedFile : selectedPropertiesFiles) { - if (!CodeInsightUtilBase.prepareFileForWrite(selectedFile.getContainingFile())) return; + if (!FileModificationService.getInstance().prepareFileForWrite(selectedFile.getContainingFile())) return; } UndoUtil.markPsiFileForUndo(psiElement.getContainingFile()); |