mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Remove deprecated method
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user