/*
- * Copyright 2000-2014 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.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
package com.intellij.codeInspection;
import com.intellij.analysis.AnalysisScope;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.openapi.vfs.VirtualFileManager;
import com.intellij.profile.Profile;
-import com.intellij.profile.codeInspection.InspectionProfileManager;
import com.intellij.profile.codeInspection.InspectionProjectProfileManager;
import com.intellij.psi.PsiDirectory;
import com.intellij.psi.PsiManager;
application.doNotSave();
logMessageLn(1, InspectionsBundle.message("inspection.done"));
- InspectionApplication.this.run();
+ this.run();
}
catch (Exception e) {
LOG.error(e);
if (mySourceDirectory == null) {
final String scopeName = System.getProperty("idea.analyze.scope");
final NamedScope namedScope = scopeName != null ? NamedScopesHolder.getScope(myProject, scopeName) : null;
- scope = namedScope != null ? new AnalysisScope(GlobalSearchScopesCore.filterScope(myProject, namedScope), myProject)
+ scope = namedScope != null ? new AnalysisScope(GlobalSearchScopesCore.filterScope(myProject, namedScope), myProject)
: new AnalysisScope(myProject);
}
else {
if (inspectionProfile != null) return inspectionProfile;
}
- inspectionProfile = InspectionProjectProfileManager.getInstance(myProject).getInspectionProfile();
+ inspectionProfile = InspectionProjectProfileManager.getInstance(myProject).getCurrentProfile();
logError("Using default project profile");
}
return inspectionProfile;
@Nullable
private Profile loadProfileByPath(final String profilePath) throws IOException, JDOMException {
- Profile inspectionProfile = InspectionProfileManager.getInstance().loadProfile(profilePath);
+ Profile inspectionProfile = ApplicationInspectionProfileManagerImpl.getInstanceImpl().loadProfile(profilePath);
if (inspectionProfile != null) {
logMessageLn(1, "Loaded profile \'" + inspectionProfile.getName() + "\' from file \'" + profilePath + "\'");
}
@Nullable
- private InspectionsReportConverter getReportConverter(@Nullable final String outputFormat) {
+ private static InspectionsReportConverter getReportConverter(@Nullable final String outputFormat) {
for (InspectionsReportConverter converter : InspectionsReportConverter.EP_NAME.getExtensions()) {
if (converter.getFormatName().equals(outputFormat)) {
return converter;