本文整理匯總了Java中com.intellij.lang.ParserDefinition.SpaceRequirements方法的典型用法代碼示例。如果您正苦於以下問題:Java ParserDefinition.SpaceRequirements方法的具體用法?Java ParserDefinition.SpaceRequirements怎麽用?Java ParserDefinition.SpaceRequirements使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.intellij.lang.ParserDefinition
的用法示例。
在下文中一共展示了ParserDefinition.SpaceRequirements方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: spaceExistanceTypeBetweenTokens
import com.intellij.lang.ParserDefinition; //導入方法依賴的package包/類
public ParserDefinition.SpaceRequirements spaceExistanceTypeBetweenTokens(ASTNode left, ASTNode right) {
return ParserDefinition.SpaceRequirements.MAY;
}
示例2: main
import com.intellij.lang.ParserDefinition; //導入方法依賴的package包/類
public static void main(String[] args) throws ClassNotFoundException {
String source = args.length == 0 ? DEFAULT_SOURCE : args[0];
PsiFile psi = LightPsi.parseFile("dummy", source, new SchemaParserDefinition());
String psiDump = DebugUtil.psiToString(psi, true, false).trim();
System.out.println(psiDump);
// load file parsing related classes
try {
LightPsi.parseFile(new File("."), new SchemaParserDefinition());
} catch (IOException e) {
// e.printStackTrace();
}
// force some class loading
@SuppressWarnings({"unused", "MismatchedReadAndWriteOfArray"})
Class<?>[] classes = new Class[]{
PsiTreeUtil.class,
StubBasedPsiElementBase.class,
StubBase.class,
StubOutputStream.class,
StubInputStream.class,
IndexSink.class,
ASTWrapperPsiElement.class,
PsiElementProcessor.class,
ParserDefinition.SpaceRequirements.class,
PsiDirectory.class,
};
String[] extraClasses = {
"com.intellij.lang.parser.GeneratedParserUtilBase$CompletionState",
"com.intellij.lang.parser.GeneratedParserUtilBase$Hooks",
"com.intellij.lang.parser.GeneratedParserUtilBase$DummyBlock",
"com.intellij.psi.impl.source.SubstrateRef$StubRef",
"com.intellij.extapi.psi.StubBasedPsiElementBase$1",
};
for (String extraClass : extraClasses) {
Class.forName(extraClass);
}
}
示例3: spaceExistanceTypeBetweenTokens
import com.intellij.lang.ParserDefinition; //導入方法依賴的package包/類
public ParserDefinition.SpaceRequirements spaceExistanceTypeBetweenTokens(
ASTNode left, ASTNode right) {
return SpaceRequirements.MAY;
}
示例4: spaceExistanceTypeBetweenTokens
import com.intellij.lang.ParserDefinition; //導入方法依賴的package包/類
public ParserDefinition.SpaceRequirements spaceExistanceTypeBetweenTokens(ASTNode left, ASTNode right) {
return ParserDefinition.SpaceRequirements.MAY;
}