本文整理汇总了Java中com.intellij.plugins.haxe.lang.psi.HaxeTryStatement类的典型用法代码示例。如果您正苦于以下问题:Java HaxeTryStatement类的具体用法?Java HaxeTryStatement怎么用?Java HaxeTryStatement使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
HaxeTryStatement类属于com.intellij.plugins.haxe.lang.psi包,在下文中一共展示了HaxeTryStatement类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: doSurroundElements
import com.intellij.plugins.haxe.lang.psi.HaxeTryStatement; //导入依赖的package包/类
@NotNull
@Override
protected PsiElement doSurroundElements(PsiElement[] elements, PsiElement parent) {
final HaxeTryStatement tryStatement =
(HaxeTryStatement)HaxeElementGenerator.createStatementFromText(elements[0].getProject(), "try {\n} catch(a) {\n}");
List<HaxeBlockStatement> blockStatementList = tryStatement.getBlockStatementList();
addStatements(blockStatementList.get(0), elements);
return tryStatement;
}
示例2: doSurroundElements
import com.intellij.plugins.haxe.lang.psi.HaxeTryStatement; //导入依赖的package包/类
@NotNull
@Override
protected PsiElement doSurroundElements(PsiElement[] elements, PsiElement parent) {
final HaxeTryStatement tryStatement =
(HaxeTryStatement)HaxeElementGenerator.createStatementFromText(elements[0].getProject(), "try {\n} catch(a) {\n}");
addStatements(tryStatement.getBlockStatement(), elements);
return tryStatement;
}
示例3: getSurroundSelectionRange
import com.intellij.plugins.haxe.lang.psi.HaxeTryStatement; //导入依赖的package包/类
@Override
protected TextRange getSurroundSelectionRange(PsiElement element) {
final HaxeCatchStatement catchStatement = ((HaxeTryStatement)element).getCatchStatementList().iterator().next();
final HaxeParameter parameter = catchStatement.getParameter();
return parameter == null ? catchStatement.getTextRange() : parameter.getTextRange();
}