本文整理汇总了Java中com.intellij.profile.DefaultProjectProfileManager类的典型用法代码示例。如果您正苦于以下问题:Java DefaultProjectProfileManager类的具体用法?Java DefaultProjectProfileManager怎么用?Java DefaultProjectProfileManager使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
DefaultProjectProfileManager类属于com.intellij.profile包,在下文中一共展示了DefaultProjectProfileManager类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: convert
import com.intellij.profile.DefaultProjectProfileManager; //导入依赖的package包/类
@Override
public void convert(@NotNull Element element, @NotNull Project project) {
initInspectionTools(project);
final Element scopes = element.getChild(DefaultProjectProfileManager.SCOPES);
if (scopes == null) {
return;
}
final List children = scopes.getChildren(SCOPE);
for (Object s : children) {
Element scopeElement = (Element)s;
final String profile = scopeElement.getAttributeValue(DefaultProjectProfileManager.PROFILE);
if (profile != null) {
final InspectionProfileImpl inspectionProfile = (InspectionProfileImpl)getProfileManager().getProfile(profile);
if (inspectionProfile != null) {
final NamedScope scope = getProfileManager().getScopesManager().getScope(scopeElement.getAttributeValue(NAME));
if (scope != null) {
for (InspectionToolWrapper toolWrapper : inspectionProfile.getInspectionTools(null)) {
final HighlightDisplayKey key = HighlightDisplayKey.find(toolWrapper.getShortName());
try {
InspectionToolWrapper toolWrapperCopy = copyToolSettings(toolWrapper);
HighlightDisplayLevel errorLevel = inspectionProfile.getErrorLevel(key, null, project);
getTools(toolWrapper.getShortName(), project).addTool(scope, toolWrapperCopy, inspectionProfile.isToolEnabled(key), errorLevel);
}
catch (Exception e) {
LOG.error(e);
}
}
}
}
}
}
reduceConvertedScopes();
}
示例2: getExpandedNodes
import com.intellij.profile.DefaultProjectProfileManager; //导入依赖的package包/类
private static VisibleTreeState getExpandedNodes(InspectionProfileImpl profile) {
if (profile.getProfileManager() instanceof ApplicationProfileManager) {
return AppInspectionProfilesVisibleTreeState.getInstance().getVisibleTreeState(profile);
}
else {
DefaultProjectProfileManager projectProfileManager = (DefaultProjectProfileManager)profile.getProfileManager();
return ProjectInspectionProfilesVisibleTreeState.getInstance(projectProfileManager.getProject()).getVisibleTreeState(profile);
}
}
示例3: convert
import com.intellij.profile.DefaultProjectProfileManager; //导入依赖的package包/类
@Override
public void convert(@Nonnull Element element, @Nonnull Project project) {
initInspectionTools(project);
final Element scopes = element.getChild(DefaultProjectProfileManager.SCOPES);
if (scopes == null) {
return;
}
final List children = scopes.getChildren(SCOPE);
for (Object s : children) {
Element scopeElement = (Element)s;
final String profile = scopeElement.getAttributeValue(DefaultProjectProfileManager.PROFILE);
if (profile != null) {
final InspectionProfileImpl inspectionProfile = (InspectionProfileImpl)getProfileManager().getProfile(profile);
if (inspectionProfile != null) {
final NamedScope scope = getProfileManager().getScopesManager().getScope(scopeElement.getAttributeValue(NAME));
if (scope != null) {
for (InspectionToolWrapper toolWrapper : inspectionProfile.getInspectionTools(null)) {
final HighlightDisplayKey key = HighlightDisplayKey.find(toolWrapper.getShortName());
try {
InspectionToolWrapper toolWrapperCopy = copyToolSettings(toolWrapper);
HighlightDisplayLevel errorLevel = inspectionProfile.getErrorLevel(key, null, project);
getTools(toolWrapper.getShortName(), project).addTool(scope, toolWrapperCopy, inspectionProfile.isToolEnabled(key), errorLevel);
}
catch (Exception e) {
LOG.error(e);
}
}
}
}
}
}
reduceConvertedScopes();
}