當前位置: 首頁>>代碼示例>>Java>>正文


Java PropertiesElementTypes類代碼示例

本文整理匯總了Java中com.intellij.lang.properties.parsing.PropertiesElementTypes的典型用法代碼示例。如果您正苦於以下問題:Java PropertiesElementTypes類的具體用法?Java PropertiesElementTypes怎麽用?Java PropertiesElementTypes使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


PropertiesElementTypes類屬於com.intellij.lang.properties.parsing包,在下文中一共展示了PropertiesElementTypes類的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: ensurePropertiesLoaded

import com.intellij.lang.properties.parsing.PropertiesElementTypes; //導入依賴的package包/類
private void ensurePropertiesLoaded() {
  if (myPropertiesMap != null) return;

  final ASTNode[] props = getPropertiesList().getChildren(PropertiesElementTypes.PROPERTIES);
  MostlySingularMultiMap<String, IProperty> propertiesMap = new MostlySingularMultiMap<String, IProperty>();
  List<IProperty> properties = new ArrayList<IProperty>(props.length);
  for (final ASTNode prop : props) {
    final Property property = (Property)prop.getPsi();
    String key = property.getUnescapedKey();
    propertiesMap.add(key, property);
    properties.add(property);
  }
  final boolean isAlphaSorted = PropertiesImplUtil.isAlphaSorted(properties);
  synchronized (lock) {
    if (myPropertiesMap != null) return;
    myProperties = properties;
    myPropertiesMap = propertiesMap;
    myAlphaSorted = isAlphaSorted;
  }
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:21,代碼來源:PropertiesFileImpl.java

示例2: ensurePropertiesLoaded

import com.intellij.lang.properties.parsing.PropertiesElementTypes; //導入依賴的package包/類
private void ensurePropertiesLoaded() {
  if (myPropertiesMap != null) return;

  final ASTNode[] props = getPropertiesList().getChildren(PropertiesElementTypes.PROPERTIES);
  MostlySingularMultiMap<String, IProperty> propertiesMap = new MostlySingularMultiMap<String, IProperty>();
  List<IProperty> properties = new ArrayList<IProperty>(props.length);
  for (final ASTNode prop : props) {
    final Property property = (Property)prop.getPsi();
    String key = property.getUnescapedKey();
    propertiesMap.add(key, property);
    properties.add(property);
  }
  synchronized (lock) {
    if (myPropertiesMap != null) return;
    myProperties = properties;
    myPropertiesMap = propertiesMap;
  }
}
 
開發者ID:lshain-android-source,項目名稱:tools-idea,代碼行數:19,代碼來源:PropertiesFileImpl.java

示例3: ApplicationEnvironment

import com.intellij.lang.properties.parsing.PropertiesElementTypes; //導入依賴的package包/類
public ApplicationEnvironment(CoreApplicationEnvironment appEnvironment) {
  appEnvironment.registerFileType(PropertiesFileType.INSTANCE, "properties");
  appEnvironment.addExplicitExtension(SyntaxHighlighterFactory.LANGUAGE_FACTORY, PropertiesLanguage.INSTANCE,
                                      new PropertiesSyntaxHighlighterFactory());
  appEnvironment.addExplicitExtension(LanguageParserDefinitions.INSTANCE, PropertiesLanguage.INSTANCE, new PropertiesParserDefinition());
  appEnvironment.addExtension(FileBasedIndexExtension.EXTENSION_POINT_NAME, new XmlPropertiesIndex());
  appEnvironment.addExtension(StubIndexExtension.EP_NAME, new PropertyKeyIndex());

  appEnvironment.registerApplicationService(PropertiesQuickFixFactory.class, new EmptyPropertiesQuickFixFactory());
  appEnvironment.registerApplicationService(PropertiesRefactoringSettings.class, new PropertiesRefactoringSettings());
  appEnvironment.addExplicitExtension(LanguageAnnotators.INSTANCE, PropertiesLanguage.INSTANCE, new PropertiesAnnotator());
  appEnvironment.addExplicitExtension(LanguageFindUsages.INSTANCE, PropertiesLanguage.INSTANCE, new PropertiesFindUsagesProvider());

  appEnvironment.addExplicitExtension(LanguageASTFactory.INSTANCE, PropertiesLanguage.INSTANCE, new PropertiesASTFactory());
  appEnvironment.addExplicitExtension(LanguageFolding.INSTANCE, PropertiesLanguage.INSTANCE, new PropertiesFoldingBuilder());
  appEnvironment.addExplicitExtension(ElementManipulators.INSTANCE, PropertyImpl.class, new PropertyManipulator());
  appEnvironment.addExplicitExtension(ElementManipulators.INSTANCE, PropertyKeyImpl.class, new PropertyKeyManipulator());
  appEnvironment.addExplicitExtension(ElementManipulators.INSTANCE, PropertyValueImpl.class, new PropertyValueManipulator());

  final StubElementTypeHolderEP stubElementTypeHolderBean = new StubElementTypeHolderEP();
  stubElementTypeHolderBean.holderClass = PropertiesElementTypes.class.getName();
  appEnvironment.addExtension(StubElementTypeHolderEP.EP_NAME, stubElementTypeHolderBean);

  appEnvironment.addExplicitExtension(LanguageCommenters.INSTANCE, PropertiesLanguage.INSTANCE, new PropertiesCommenter());
  appEnvironment.addExplicitExtension(IdIndexers.INSTANCE, PropertiesFileType.INSTANCE, new PropertiesIdIndexer());
  appEnvironment.addExplicitExtension(TodoIndexers.INSTANCE, PropertiesFileType.INSTANCE, new PropertiesTodoIndexer());

  appEnvironment.addExtension(IconProvider.EXTENSION_POINT_NAME, new XmlPropertiesIconProvider());
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:30,代碼來源:PropertiesCoreEnvironment.java

示例4: isWordCompletionEnabledIn

import com.intellij.lang.properties.parsing.PropertiesElementTypes; //導入依賴的package包/類
public boolean isWordCompletionEnabledIn(final IElementType element) {
  return super.isWordCompletionEnabledIn(element) || element == PropertiesElementTypes.PROPERTY;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:4,代碼來源:PropertiesWordCompletionFilter.java

示例5: PropertyStubElementType

import com.intellij.lang.properties.parsing.PropertiesElementTypes; //導入依賴的package包/類
public PropertyStubElementType() {
  super("PROPERTY", PropertiesElementTypes.LANG);
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:4,代碼來源:PropertyStubElementType.java

示例6: PropertiesListStubImpl

import com.intellij.lang.properties.parsing.PropertiesElementTypes; //導入依賴的package包/類
public PropertiesListStubImpl(final StubElement parent) {
  super(parent, PropertiesElementTypes.PROPERTIES_LIST);
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:4,代碼來源:PropertiesListStubImpl.java

示例7: PropertyStubImpl

import com.intellij.lang.properties.parsing.PropertiesElementTypes; //導入依賴的package包/類
public PropertyStubImpl(final StubElement parent, final String key) {
  super(parent, PropertiesElementTypes.PROPERTY);
  myKey = key;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:5,代碼來源:PropertyStubImpl.java

示例8: PropertiesListImpl

import com.intellij.lang.properties.parsing.PropertiesElementTypes; //導入依賴的package包/類
public PropertiesListImpl(final PropertiesListStub stub) {
  super(stub, PropertiesElementTypes.PROPERTIES_LIST);
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:4,代碼來源:PropertiesListImpl.java

示例9: isCustomFoldingRoot

import com.intellij.lang.properties.parsing.PropertiesElementTypes; //導入依賴的package包/類
@Override
protected boolean isCustomFoldingRoot(ASTNode node) {
  return node.getElementType() == PropertiesElementTypes.FILE;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:5,代碼來源:PropertiesFoldingBuilder.java


注:本文中的com.intellij.lang.properties.parsing.PropertiesElementTypes類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。