diff --git a/platform/core-impl/src/com/intellij/psi/impl/PsiTreeChangePreprocessorBase.java b/platform/core-impl/src/com/intellij/psi/impl/PsiTreeChangePreprocessorBase.java index 273caa025885..6e840a88af35 100644 --- a/platform/core-impl/src/com/intellij/psi/impl/PsiTreeChangePreprocessorBase.java +++ b/platform/core-impl/src/com/intellij/psi/impl/PsiTreeChangePreprocessorBase.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2010 JetBrains s.r.o. + * Copyright 2000-2016 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. @@ -20,30 +20,13 @@ import com.intellij.openapi.project.Project; import com.intellij.psi.PsiElement; import com.intellij.psi.PsiFile; import com.intellij.psi.PsiManager; -import com.intellij.util.ObjectUtils; import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; public abstract class PsiTreeChangePreprocessorBase implements PsiTreeChangePreprocessor { @NotNull private final Project myProject; - @Nullable private final PsiManagerImpl myPsiManager; public PsiTreeChangePreprocessorBase(@NotNull Project project) { myProject = project; - myPsiManager = null; - } - - /** - * Note that this constructor can't be used for preprocessors that is defined in extensions - * because it will be invoke during constructing PsiManager. - * - * @deprecated to delete in IDEA 15, define preprocessor as an extension of {@link PsiTreeChangePreprocessor#EP_NAME} and - * use {@link this#PsiTreeChangePreprocessorBase(Project)} instead - */ - public PsiTreeChangePreprocessorBase(@NotNull PsiManagerImpl psiManager) { - myPsiManager = psiManager; - myProject = psiManager.getProject(); - psiManager.addTreeChangePreprocessor(this); } @Override @@ -94,7 +77,7 @@ public abstract class PsiTreeChangePreprocessorBase implements PsiTreeChangePrep @NotNull private PsiModificationTrackerImpl getModificationTracker() { - return (PsiModificationTrackerImpl)ObjectUtils.notNull(myPsiManager, PsiManager.getInstance(myProject)).getModificationTracker(); + return (PsiModificationTrackerImpl)PsiManager.getInstance(myProject).getModificationTracker(); } protected abstract boolean isInsideCodeBlock(PsiElement element);