当前位置: 首页>>代码示例>>Java>>正文


Java DefaultProjectProfileManager类代码示例

本文整理汇总了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();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:34,代码来源:InspectionProfileImpl.java

示例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);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:SingleInspectionProfilePanel.java

示例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();
}
 
开发者ID:consulo,项目名称:consulo,代码行数:34,代码来源:InspectionProfileImpl.java


注:本文中的com.intellij.profile.DefaultProjectProfileManager类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。