當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。