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


Java HaxeLanguage类代码示例

本文整理汇总了Java中com.intellij.plugins.haxe.HaxeLanguage的典型用法代码示例。如果您正苦于以下问题:Java HaxeLanguage类的具体用法?Java HaxeLanguage怎么用?Java HaxeLanguage使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: isCommentToken

import com.intellij.plugins.haxe.HaxeLanguage; //导入依赖的package包/类
private boolean isCommentToken(PsiElement e, CharSequence token) {
  final Commenter commenter = LanguageCommenters.INSTANCE.forLanguage(HaxeLanguage.INSTANCE);
  assert(commenter instanceof HaxeCommenter);
  final IElementType tokenType = e.getNode().getElementType();

  if (tokenType == HaxeTokenTypeSets.DOC_COMMENT) {

    // XXX: Should we be checking that the token is at the beginning or end of the element?
    //      Or, that the line prefix is actually the first thing on the line?
    return  ((HaxeCommenter)commenter).getDocumentationCommentLinePrefix().contentEquals(token)
            || ((HaxeCommenter)commenter).getDocumentationCommentPrefix().contentEquals(token)
            || ((HaxeCommenter)commenter).getDocumentationCommentSuffix().contentEquals(token)
            // A lot of folks don't use the proper doc comment terminator "**/", and the compiler
            // accepts a normal block comment terminator "*/".
            || commenter.getBlockCommentSuffix().contentEquals(token);

  } else if (tokenType == HaxeTokenTypeSets.MML_COMMENT) {

    return  commenter.getBlockCommentPrefix().contentEquals(token)
            || commenter.getBlockCommentSuffix().contentEquals(token);

  }
  return commenter.getLineCommentPrefix().contentEquals(token);
}
 
开发者ID:HaxeFoundation,项目名称:intellij-haxe,代码行数:25,代码来源:HaxeCommentSelectioner.java

示例2: doTest

import com.intellij.plugins.haxe.HaxeLanguage; //导入依赖的package包/类
private void doTest(String... additionalPaths) throws Exception {
  final String[] paths = ArrayUtil.append(additionalPaths, getTestName(false) + ".hx");
  myFixture.configureByFiles(ArrayUtil.reverseArray(paths));
  final HaxeTypeAnnotator annotator = new HaxeTypeAnnotator();
  try {
    LanguageAnnotators.INSTANCE.addExplicitExtension(HaxeLanguage.INSTANCE, annotator);
    myFixture.enableInspections(getAnnotatorBasedInspection());
    try {
      myFixture.testHighlighting(true, true, true, myFixture.getFile().getVirtualFile());
    }
    finally {
      LanguageAnnotators.INSTANCE.removeExplicitExtension(HaxeLanguage.INSTANCE, annotator);
    }
  } finally {
    LanguageAnnotators.INSTANCE.removeExplicitExtension(HaxeLanguage.INSTANCE, annotator);
  }
}
 
开发者ID:HaxeFoundation,项目名称:intellij-haxe,代码行数:18,代码来源:HaxeAnnotationTest.java

示例3: canFindUsages

import com.intellij.plugins.haxe.HaxeLanguage; //导入依赖的package包/类
@Override
public boolean canFindUsages(@NotNull final PsiElement element) {

  if (element instanceof PsiFileSystemItem) {
    if (((PsiFileSystemItem)element).getVirtualFile() == null)
      return false;
  }

  if (element.getLanguage() != HaxeLanguage.INSTANCE
  ||  !getHaxeProvider().canFindUsagesFor(element)) {
    return false;
  }

  return element.isValid();
}
 
开发者ID:HaxeFoundation,项目名称:intellij-haxe,代码行数:16,代码来源:HaxeFindUsagesHandlerFactory.java

示例4: HaxeBlock

import com.intellij.plugins.haxe.HaxeLanguage; //导入依赖的package包/类
protected HaxeBlock(ASTNode node,
                    Wrap wrap,
                    Alignment alignment,
                    CodeStyleSettings settings) {
  super(node, wrap, alignment);
  mySettings = settings;
  final HaxeCodeStyleSettings haxeCodeStyleSettings = mySettings.getCustomSettings(HaxeCodeStyleSettings.class);
  myIndentProcessor = new HaxeIndentProcessor(mySettings.getCommonSettings(HaxeLanguage.INSTANCE));
  mySpacingProcessor = new HaxeSpacingProcessor(node, mySettings.getCommonSettings(HaxeLanguage.INSTANCE), haxeCodeStyleSettings);
  myWrappingProcessor = new HaxeWrappingProcessor(node, mySettings.getCommonSettings(HaxeLanguage.INSTANCE));
  myAlignmentProcessor = new HaxeAlignmentProcessor(node, mySettings.getCommonSettings(HaxeLanguage.INSTANCE));
  myIndent = myIndentProcessor.getChildIndent(myNode);
}
 
开发者ID:HaxeFoundation,项目名称:intellij-haxe,代码行数:14,代码来源:HaxeBlock.java

示例5: defineStyleSettings

import com.intellij.plugins.haxe.HaxeLanguage; //导入依赖的package包/类
protected void defineStyleSettings(CodeStyleSettings tempSettings) {
  myTestStyleSettings = tempSettings.getCommonSettings(HaxeLanguage.INSTANCE);
  myTestStyleSettings.KEEP_BLANK_LINES_IN_CODE = 2;
  myTestStyleSettings.METHOD_BRACE_STYLE = CommonCodeStyleSettings.END_OF_LINE;
  myTestStyleSettings.BRACE_STYLE = CommonCodeStyleSettings.END_OF_LINE;
  myTestStyleSettings.ALIGN_MULTILINE_PARAMETERS = false;
  myTestStyleSettings.ALIGN_MULTILINE_PARAMETERS_IN_CALLS = false;
  myTestStyleSettings.KEEP_FIRST_COLUMN_COMMENT = false;
}
 
开发者ID:HaxeFoundation,项目名称:intellij-haxe,代码行数:10,代码来源:HaxeFormatterTest.java

示例6: doTest

import com.intellij.plugins.haxe.HaxeLanguage; //导入依赖的package包/类
public void doTest() {
  myFixture.configureByFile(getTestName(false) + ".hx");
  final List<SmartEnterProcessor> processors = SmartEnterProcessors.INSTANCE.forKey(HaxeLanguage.INSTANCE);
  new WriteCommandAction(myFixture.getProject()) {
    @Override
    protected void run(@NotNull Result result) throws Throwable {
      final Editor editor = myFixture.getEditor();
      for (SmartEnterProcessor processor : processors) {
        processor.process(myFixture.getProject(), editor, myFixture.getFile());
      }
    }
  }.execute();
  myFixture.checkResultByFile(getTestName(false) + "_after.hx", true);
}
 
开发者ID:HaxeFoundation,项目名称:intellij-haxe,代码行数:15,代码来源:HaxeSmartEnterTest.java

示例7: doTestNoFix

import com.intellij.plugins.haxe.HaxeLanguage; //导入依赖的package包/类
private void doTestNoFix(boolean checkWarnings, boolean checkInfos, boolean checkWeakWarnings, String... additionalFiles) throws Exception {
  myFixture.configureByFiles(ArrayUtil.mergeArrays(new String[]{getTestName(false) + ".hx"}, additionalFiles));
  final HaxeTypeAnnotator annotator = new HaxeTypeAnnotator();
  LanguageAnnotators.INSTANCE.addExplicitExtension(HaxeLanguage.INSTANCE, annotator);
  myFixture.enableInspections(getAnnotatorBasedInspection());
  myFixture.testHighlighting(true, false, true);
}
 
开发者ID:HaxeFoundation,项目名称:intellij-haxe,代码行数:8,代码来源:HaxeSemanticAnnotatorTest.java

示例8: doTestNoFix

import com.intellij.plugins.haxe.HaxeLanguage; //导入依赖的package包/类
private void doTestNoFix(boolean checkWarnings, boolean checkInfos, boolean checkWeakWarnings) throws Exception {
  boolean old = HaxeSemanticAnnotatorConfig.ENABLE_EXPERIMENTAL_BODY_CHECK;
  HaxeSemanticAnnotatorConfig.ENABLE_EXPERIMENTAL_BODY_CHECK = true;
  myFixture.configureByFiles(getTestName(false) + ".hx");
  final HaxeTypeAnnotator annotator = new HaxeTypeAnnotator();
  LanguageAnnotators.INSTANCE.addExplicitExtension(HaxeLanguage.INSTANCE, annotator);
  myFixture.enableInspections(getAnnotatorBasedInspection());
  myFixture.testHighlighting(true, false, false);
  HaxeSemanticAnnotatorConfig.ENABLE_EXPERIMENTAL_BODY_CHECK = old;
}
 
开发者ID:HaxeFoundation,项目名称:intellij-haxe,代码行数:11,代码来源:HaxeSemanticBodyAnnotatorTest.java

示例9: doTest

import com.intellij.plugins.haxe.HaxeLanguage; //导入依赖的package包/类
private void doTest(String... additionalPaths) throws Exception {
  final String[] paths = ArrayUtil.append(additionalPaths, getTestName(false) + ".hx");
  myFixture.configureByFiles(ArrayUtil.reverseArray(paths));
  final HaxeTypeAnnotator annotator = new HaxeTypeAnnotator();
  LanguageAnnotators.INSTANCE.addExplicitExtension(HaxeLanguage.INSTANCE, annotator);
  myFixture.enableInspections(new DefaultHighlightVisitorBasedInspection.AnnotatorBasedInspection());
  try {
    myFixture.testHighlighting(true, true, true, myFixture.getFile().getVirtualFile());
  }
  finally {
    LanguageAnnotators.INSTANCE.removeExplicitExtension(HaxeLanguage.INSTANCE, annotator);
  }
}
 
开发者ID:consulo,项目名称:consulo-haxe,代码行数:14,代码来源:HaxeAnnotationTest.java

示例10: HaxeFile

import com.intellij.plugins.haxe.HaxeLanguage; //导入依赖的package包/类
public HaxeFile(@NotNull FileViewProvider viewProvider) {
  super(viewProvider, HaxeLanguage.INSTANCE);
}
 
开发者ID:HaxeFoundation,项目名称:intellij-haxe,代码行数:4,代码来源:HaxeFile.java

示例11: MyHaxeFileElementType

import com.intellij.plugins.haxe.HaxeLanguage; //导入依赖的package包/类
public MyHaxeFileElementType() {
  super(HaxeLanguage.INSTANCE);
}
 
开发者ID:HaxeFoundation,项目名称:intellij-haxe,代码行数:4,代码来源:HaxeExpressionCodeFragmentImpl.java

示例12: HaxeElementType

import com.intellij.plugins.haxe.HaxeLanguage; //导入依赖的package包/类
public HaxeElementType(@NotNull @NonNls String debugName) {
  super(debugName, HaxeLanguage.INSTANCE);
}
 
开发者ID:HaxeFoundation,项目名称:intellij-haxe,代码行数:4,代码来源:HaxeElementType.java

示例13: HaxeMacroClassListElementType

import com.intellij.plugins.haxe.HaxeLanguage; //导入依赖的package包/类
public HaxeMacroClassListElementType(@NotNull @NonNls String debugName) {
  super(debugName, HaxeLanguage.INSTANCE);
}
 
开发者ID:HaxeFoundation,项目名称:intellij-haxe,代码行数:4,代码来源:HaxeMacroClassListElementType.java

示例14: canSelect

import com.intellij.plugins.haxe.HaxeLanguage; //导入依赖的package包/类
@Override
public boolean canSelect(PsiElement e) {
  return e.getLanguage().equals(HaxeLanguage.INSTANCE) && HaxeTokenTypeSets.ONLY_COMMENTS.contains(e.getNode().getElementType());
}
 
开发者ID:HaxeFoundation,项目名称:intellij-haxe,代码行数:5,代码来源:HaxeCommentSelectioner.java

示例15: canSelect

import com.intellij.plugins.haxe.HaxeLanguage; //导入依赖的package包/类
@Override
public boolean canSelect(PsiElement e) {
  return (e instanceof HaxePsiToken
          && e.getLanguage().equals(HaxeLanguage.INSTANCE)
          && HaxeTokenTypes.REGULAR_STRING_PART.equals(((HaxePsiToken)e).getTokenType()));
}
 
开发者ID:HaxeFoundation,项目名称:intellij-haxe,代码行数:7,代码来源:HaxeStringSelectioner.java


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