mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
disable project profiles in platform
This commit is contained in:
@@ -51,7 +51,7 @@ public abstract class DefaultProjectProfileManager extends ProjectProfileManager
|
||||
private final String myProfileType;
|
||||
|
||||
public String PROJECT_PROFILE;
|
||||
public boolean USE_PROJECT_PROFILE = true;
|
||||
public boolean USE_PROJECT_PROFILE = !isPlatform();
|
||||
|
||||
protected ApplicationProfileManager myApplicationProfileManager;
|
||||
|
||||
@@ -168,7 +168,7 @@ public abstract class DefaultProjectProfileManager extends ProjectProfileManager
|
||||
|
||||
@NotNull
|
||||
public Profile getProjectProfileImpl(){
|
||||
if (!USE_PROJECT_PROFILE) return myApplicationProfileManager.getRootProfile();
|
||||
if (isPlatform() || !USE_PROJECT_PROFILE) return myApplicationProfileManager.getRootProfile();
|
||||
if (PROJECT_PROFILE == null || myProfiles.isEmpty()){
|
||||
@NonNls final String projectProfileName = "Project Default";
|
||||
setProjectProfile(projectProfileName);
|
||||
@@ -186,6 +186,10 @@ public abstract class DefaultProjectProfileManager extends ProjectProfileManager
|
||||
return profile;
|
||||
}
|
||||
|
||||
private static boolean isPlatform() {
|
||||
return System.getProperty("idea.platform.prefix") != null;
|
||||
}
|
||||
|
||||
public void addProfilesListener(ProfileChangeAdapter profilesListener) {
|
||||
myProfilesListener.add(profilesListener);
|
||||
}
|
||||
|
||||
-13
@@ -33,7 +33,6 @@ import com.intellij.openapi.wm.impl.status.TogglePopupHintsPanel;
|
||||
import com.intellij.packageDependencies.DependencyValidationManager;
|
||||
import com.intellij.profile.DefaultProjectProfileManager;
|
||||
import com.intellij.profile.Profile;
|
||||
import com.intellij.profile.codeInspection.ui.ProjectInspectionToolsConfigurable;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import org.jdom.Element;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
@@ -214,18 +213,6 @@ public class InspectionProjectProfileManager extends DefaultProjectProfileManage
|
||||
super.readExternal(element);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public Profile getProjectProfileImpl() {
|
||||
try {
|
||||
ProjectInspectionToolsConfigurable.getInstance(myProject);
|
||||
}
|
||||
catch (IllegalStateException e) { //disable project profile in platform
|
||||
USE_PROJECT_PROFILE = false;
|
||||
}
|
||||
return super.getProjectProfileImpl();
|
||||
}
|
||||
|
||||
public void writeExternal(final Element element) throws WriteExternalException {
|
||||
super.writeExternal(element);
|
||||
mySeverityRegistrar.writeExternal(element);
|
||||
|
||||
Reference in New Issue
Block a user