本文整理汇总了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);
}
示例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);
}
}
示例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();
}
示例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);
}
示例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;
}
示例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);
}
示例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);
}
示例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;
}
示例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);
}
}
示例10: HaxeFile
import com.intellij.plugins.haxe.HaxeLanguage; //导入依赖的package包/类
public HaxeFile(@NotNull FileViewProvider viewProvider) {
super(viewProvider, HaxeLanguage.INSTANCE);
}
示例11: MyHaxeFileElementType
import com.intellij.plugins.haxe.HaxeLanguage; //导入依赖的package包/类
public MyHaxeFileElementType() {
super(HaxeLanguage.INSTANCE);
}
示例12: HaxeElementType
import com.intellij.plugins.haxe.HaxeLanguage; //导入依赖的package包/类
public HaxeElementType(@NotNull @NonNls String debugName) {
super(debugName, HaxeLanguage.INSTANCE);
}
示例13: HaxeMacroClassListElementType
import com.intellij.plugins.haxe.HaxeLanguage; //导入依赖的package包/类
public HaxeMacroClassListElementType(@NotNull @NonNls String debugName) {
super(debugName, HaxeLanguage.INSTANCE);
}
示例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());
}
示例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()));
}