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


Java AndroidFacet.getSystemResourceManager方法代码示例

本文整理汇总了Java中org.jetbrains.android.facet.AndroidFacet.getSystemResourceManager方法的典型用法代码示例。如果您正苦于以下问题:Java AndroidFacet.getSystemResourceManager方法的具体用法?Java AndroidFacet.getSystemResourceManager怎么用?Java AndroidFacet.getSystemResourceManager使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.jetbrains.android.facet.AndroidFacet的用法示例。


在下文中一共展示了AndroidFacet.getSystemResourceManager方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: askForAttributeValue

import org.jetbrains.android.facet.AndroidFacet; //导入方法依赖的package包/类
@Nullable
private String askForAttributeValue(@NotNull PsiElement context) {
  final AndroidFacet facet = AndroidFacet.getInstance(context);
  final String message = "Specify value of attribute '" + myAttributeName + "'";
  final String title = "Set Attribute Value";

  if (facet != null) {
    final SystemResourceManager srm = facet.getSystemResourceManager();

    if (srm != null) {
      final AttributeDefinitions attrDefs = srm.getAttributeDefinitions();

      if (attrDefs != null) {
        final AttributeDefinition def = attrDefs.getAttrDefByName(myAttributeName);
        if (def != null) {
          final String[] variants = def.getValues();

          if (variants.length > 0) {
            return Messages.showEditableChooseDialog(message, title, Messages.getQuestionIcon(), variants, variants[0], null);
          }
        }
      }
    }
  }
  return Messages.showInputDialog(context.getProject(), message, title, Messages.getQuestionIcon());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:27,代码来源:SetAttributeQuickFix.java

示例2: findAttributeDefinitionGlobally

import org.jetbrains.android.facet.AndroidFacet; //导入方法依赖的package包/类
@Nullable
private static AttributeDefinition findAttributeDefinitionGlobally(@NotNull AndroidFacet facet,
                                                                   @NotNull String namespace,
                                                                   @NotNull String localName) {
  ResourceManager resourceManager;
  if (ANDROID_URI.equals(namespace) || TOOLS_URI.equals(namespace)) {
    resourceManager = facet.getSystemResourceManager();
  }
  else if (namespace.equals(AUTO_URI) || namespace.startsWith(URI_PREFIX)) {
      resourceManager = facet.getLocalResourceManager();
  }
  else {
    resourceManager = facet.getSystemResourceManager();
  }

  if (resourceManager != null) {
    final AttributeDefinitions attrDefs = resourceManager.getAttributeDefinitions();

    if (attrDefs != null) {
      return attrDefs.getAttrDefByName(localName);
    }
  }
  return null;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:25,代码来源:AndroidXmlDocumentationProvider.java

示例3: getAttrDefs

import org.jetbrains.android.facet.AndroidFacet; //导入方法依赖的package包/类
@Nullable
private static AttributeDefinitions getAttrDefs(AndroidFacet facet) {
  final SystemResourceManager manager = facet.getSystemResourceManager();
  return manager != null ? manager.getAttributeDefinitions() : null;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:AndroidDomExtender.java

示例4: getInstance

import org.jetbrains.android.facet.AndroidFacet; //导入方法依赖的package包/类
@Nullable
public static SystemResourceManager getInstance(@NotNull ConvertContext context) {
  AndroidFacet facet = AndroidFacet.getInstance(context);
  return facet != null ? facet.getSystemResourceManager() : null;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:SystemResourceManager.java


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