public class InspectionProfileImpl
extends NewInspectionProfile
Modifier and Type | Field and Description |
---|---|
static boolean |
INIT_INSPECTIONS |
protected static Logger |
LOG |
protected InspectionProfileImpl |
myBaseProfile |
protected java.util.Set<java.lang.String> |
myChangedToolNames |
protected boolean |
myLockedProfile |
protected java.util.Map<java.lang.String,ToolsImpl> |
myTools |
protected InspectionToolsSupplier |
myToolSupplier |
protected java.util.Map<java.lang.String,Element> |
myUninitializedSettings |
Modifier | Constructor and Description |
---|---|
|
InspectionProfileImpl(java.lang.String profileName) |
|
InspectionProfileImpl(java.lang.String profileName,
InspectionToolsSupplier toolSupplier,
BaseInspectionProfileManager profileManager) |
|
InspectionProfileImpl(java.lang.String profileName,
InspectionToolsSupplier toolSupplier,
BaseInspectionProfileManager profileManager,
<any> dataHolder) |
protected |
InspectionProfileImpl(java.lang.String profileName,
InspectionToolsSupplier toolSupplier,
BaseInspectionProfileManager profileManager,
InspectionProfileImpl baseProfile,
<any> dataHolder) |
Modifier and Type | Method and Description |
---|---|
ScopeToolState |
addScope(InspectionToolWrapper toolWrapper,
NamedScope scope,
HighlightDisplayLevel level,
boolean enabled,
Project project) |
void |
addTool(Project project,
InspectionToolWrapper toolWrapper,
java.util.Map<java.lang.String,java.util.List<java.lang.String>> dependencies) |
void |
cleanup(Project project) |
void |
collectDependentInspections(InspectionToolWrapper toolWrapper,
java.util.Set<? super InspectionToolWrapper<?,?>> dependentEntries,
Project project) |
void |
convert(Element element,
Project project) |
protected void |
copyToolsConfigurations(Project project) |
protected static InspectionToolWrapper |
copyToolSettings(InspectionToolWrapper toolWrapper) |
protected java.util.List<InspectionToolWrapper> |
createTools(Project project) |
void |
disableAllTools(Project project) |
void |
disableToolByDefault(java.util.Collection<java.lang.String> toolShortNames,
Project project) |
void |
disableTools(java.util.List<java.lang.String> inspectionTools,
NamedScope namedScope,
Project project) |
void |
enableAllTools(Project project) |
void |
enableTool(java.lang.String inspectionTool,
NamedScope namedScope,
Project project) |
void |
enableTool(java.lang.String toolShortName,
Project project) |
void |
enableTools(java.util.List<java.lang.String> inspectionTools,
NamedScope namedScope,
Project project) |
void |
enableToolsByDefault(java.util.List<java.lang.String> toolShortNames,
Project project) |
java.util.List<InspectionToolWrapper> |
findToolsById(java.lang.String id,
PsiElement element) |
java.util.List<Tools> |
getAllEnabledInspectionTools(Project project) |
java.util.List<ScopeToolState> |
getAllTools() |
java.util.List<ScopeToolState> |
getDefaultStates(Project project) |
java.lang.String |
getDescription() |
java.lang.String |
getDisplayName() |
HighlightDisplayLevel |
getErrorLevel(HighlightDisplayKey key,
NamedScope scope,
Project project) |
HighlightDisplayLevel |
getErrorLevel(HighlightDisplayKey inspectionToolKey,
PsiElement element) |
InspectionToolWrapper |
getInspectionTool(java.lang.String shortName,
Project project)
Warning: Usage of this method is discouraged as if separate tool options are defined for different scopes, it just returns
the options for the first scope which may lead to unexpected results.
|
InspectionToolWrapper |
getInspectionTool(java.lang.String shortName,
PsiElement element) |
InspectionToolWrapper [] |
getInspectionTools(PsiElement element) |
InspectionProfileModifiableModel |
getModifiableModel() |
java.util.List<ScopeToolState> |
getNonDefaultTools(java.lang.String shortName,
Project project) |
java.lang.String [] |
getScopesOrder() |
java.lang.String |
getSingleTool() |
InspectionToolWrapper |
getToolById(java.lang.String id,
PsiElement element) |
ScopeToolState |
getToolDefaultState(java.lang.String toolShortName,
Project project) |
ToolsImpl |
getToolsOrNull(java.lang.String name,
Project project) |
<T extends InspectionProfileEntry> |
getUnwrappedTool(Key<T> shortNameKey,
PsiElement element) |
InspectionProfileEntry |
getUnwrappedTool(java.lang.String shortName,
PsiElement element) |
java.util.Set<HighlightSeverity> |
getUsedSeverities() |
protected void |
initialize(Project project) |
boolean |
isExecutable(Project project) |
boolean |
isProfileLocked() |
boolean |
isToolEnabled(HighlightDisplayKey key,
NamedScope namedScope,
Project project) |
boolean |
isToolEnabled(HighlightDisplayKey key,
PsiElement element) |
void |
lockProfile(boolean isLocked) |
void |
modifyProfile(Consumer<? super InspectionProfileModifiableModel> modelConsumer) |
<T extends InspectionProfileEntry> |
modifyToolSettings(Key<T> shortNameKey,
PsiElement psiElement,
Consumer<? super T> toolConsumer) |
void |
profileChanged() |
void |
readExternal(Element element) |
void |
removeScope(java.lang.String toolShortName,
java.lang.String scopeName,
Project project) |
void |
removeScopes(java.util.List<java.lang.String> shortNames,
java.lang.String scopeName,
Project project) |
void |
removeTool(InspectionToolWrapper inspectionTool) |
void |
removeTool(java.lang.String shortName) |
void |
resetToBase(java.lang.String toolId,
NamedScope scope,
Project project) |
void |
scopesChanged() |
void |
setDescription(java.lang.String description) |
void |
setErrorLevel(HighlightDisplayKey key,
HighlightDisplayLevel level,
Project project) |
void |
setErrorLevel(HighlightDisplayKey key,
HighlightDisplayLevel level,
java.lang.String scopeName,
Project project) |
void |
setErrorLevel(java.util.List<? extends HighlightDisplayKey> keys,
HighlightDisplayLevel level,
java.lang.String scopeName,
Project project) |
void |
setScopesOrder(java.lang.String [] scopesOrder) |
void |
setSingleTool(java.lang.String toolShortName) |
static void |
setToolEnabled(boolean newState,
InspectionProfileImpl profile,
java.lang.String shortName,
Project project) |
void |
writeExternal(Element element) |
Element |
writeScheme() |
protected static void |
writeVersion(Element element) |
protected static final Logger LOG
public static boolean INIT_INSPECTIONS
protected final InspectionToolsSupplier myToolSupplier
protected final java.util.Map<java.lang.String,Element> myUninitializedSettings
protected java.util.Map<java.lang.String,ToolsImpl> myTools
protected volatile java.util.Set<java.lang.String> myChangedToolNames
protected boolean myLockedProfile
protected final InspectionProfileImpl myBaseProfile
public InspectionProfileImpl(java.lang.String profileName, InspectionToolsSupplier toolSupplier, BaseInspectionProfileManager profileManager)
public InspectionProfileImpl(java.lang.String profileName)
protected InspectionProfileImpl(java.lang.String profileName, InspectionToolsSupplier toolSupplier, BaseInspectionProfileManager profileManager, InspectionProfileImpl baseProfile, <any> dataHolder)
public InspectionProfileImpl(java.lang.String profileName, InspectionToolsSupplier toolSupplier, BaseInspectionProfileManager profileManager, <any> dataHolder)
protected static InspectionToolWrapper copyToolSettings(InspectionToolWrapper toolWrapper)
public HighlightDisplayLevel getErrorLevel(HighlightDisplayKey inspectionToolKey, PsiElement element)
public void readExternal(Element element)
public java.util.Set<HighlightSeverity> getUsedSeverities()
public Element writeScheme()
public void writeExternal(Element element)
protected static void writeVersion(Element element)
public void collectDependentInspections(InspectionToolWrapper toolWrapper, java.util.Set<? super InspectionToolWrapper<?,?>> dependentEntries, Project project)
public InspectionToolWrapper getInspectionTool(java.lang.String shortName, PsiElement element)
public InspectionProfileEntry getUnwrappedTool(java.lang.String shortName, PsiElement element)
public <T extends InspectionProfileEntry> T getUnwrappedTool(Key<T> shortNameKey, PsiElement element)
public void modifyProfile(Consumer<? super InspectionProfileModifiableModel> modelConsumer)
public <T extends InspectionProfileEntry> void modifyToolSettings(Key<T> shortNameKey, PsiElement psiElement, Consumer<? super T> toolConsumer)
public InspectionToolWrapper getInspectionTool(java.lang.String shortName, Project project)
getInspectionTool(String, PsiElement)
instead.shortName
- an inspection short nameproject
- a projectpublic InspectionToolWrapper getToolById(java.lang.String id, PsiElement element)
public java.util.List<InspectionToolWrapper> findToolsById(java.lang.String id, PsiElement element)
public java.lang.String getSingleTool()
public void setSingleTool(java.lang.String toolShortName)
public java.lang.String getDisplayName()
public void scopesChanged()
public boolean isProfileLocked()
public void lockProfile(boolean isLocked)
public InspectionToolWrapper [] getInspectionTools(PsiElement element)
public java.util.List<Tools> getAllEnabledInspectionTools(Project project)
public void disableToolByDefault(java.util.Collection<java.lang.String> toolShortNames, Project project)
public ScopeToolState getToolDefaultState(java.lang.String toolShortName, Project project)
public void enableToolsByDefault(java.util.List<java.lang.String> toolShortNames, Project project)
protected java.util.List<InspectionToolWrapper> createTools(Project project)
protected void initialize(Project project)
protected void copyToolsConfigurations(Project project)
public void addTool(Project project, InspectionToolWrapper toolWrapper, java.util.Map<java.lang.String,java.util.List<java.lang.String>> dependencies)
public void removeTool(InspectionToolWrapper inspectionTool)
public void removeTool(java.lang.String shortName)
public java.lang.String [] getScopesOrder()
public void setScopesOrder(java.lang.String [] scopesOrder)
public InspectionProfileModifiableModel getModifiableModel()
public void cleanup(Project project)
public void enableTool(java.lang.String toolShortName, Project project)
public void enableTool(java.lang.String inspectionTool, NamedScope namedScope, Project project)
public void enableTools(java.util.List<java.lang.String> inspectionTools, NamedScope namedScope, Project project)
public void disableTools(java.util.List<java.lang.String> inspectionTools, NamedScope namedScope, Project project)
public void setErrorLevel(HighlightDisplayKey key, HighlightDisplayLevel level, Project project)
public boolean isToolEnabled(HighlightDisplayKey key, PsiElement element)
public boolean isExecutable(Project project)
public java.lang.String getDescription()
public void setDescription(java.lang.String description)
public void resetToBase(java.lang.String toolId, NamedScope scope, Project project)
public void convert(Element element, Project project)
public java.util.List<ScopeToolState> getAllTools()
public java.util.List<ScopeToolState> getDefaultStates(Project project)
public java.util.List<ScopeToolState> getNonDefaultTools(java.lang.String shortName, Project project)
public boolean isToolEnabled(HighlightDisplayKey key, NamedScope namedScope, Project project)
public void removeScope(java.lang.String toolShortName, java.lang.String scopeName, Project project)
public void removeScopes(java.util.List<java.lang.String> shortNames, java.lang.String scopeName, Project project)
public void profileChanged()
public HighlightDisplayLevel getErrorLevel(HighlightDisplayKey key, NamedScope scope, Project project)
public ScopeToolState addScope(InspectionToolWrapper toolWrapper, NamedScope scope, HighlightDisplayLevel level, boolean enabled, Project project)
public void setErrorLevel(HighlightDisplayKey key, HighlightDisplayLevel level, java.lang.String scopeName, Project project)
public void setErrorLevel(java.util.List<? extends HighlightDisplayKey> keys, HighlightDisplayLevel level, java.lang.String scopeName, Project project)
public void enableAllTools(Project project)
public void disableAllTools(Project project)
public static void setToolEnabled(boolean newState, InspectionProfileImpl profile, java.lang.String shortName, Project project)