本文整理了Java中org.eclipse.jdt.core.dom.Type.getLocationInParent()
方法的一些代码示例,展示了Type.getLocationInParent()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Type.getLocationInParent()
方法的具体详情如下:
包路径:org.eclipse.jdt.core.dom.Type
类名称:Type
方法名:getLocationInParent
暂无
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui
/**
* @param root the AST root
* @param node the selected node
* @return returns a message if there is a problem
*/
@Override
public String initialize(CompilationUnit root, ASTNode node) {
fASTRoot= root;
if (node instanceof ReturnStatement) {
fMethodDeclaration= ASTResolving.findParentMethodDeclaration(node);
if (fMethodDeclaration == null)
return SearchMessages.MethodExitsFinder_no_return_type_selected;
return null;
}
Type type= ASTNodes.getTopMostType(node);
if (type == null)
return SearchMessages.MethodExitsFinder_no_return_type_selected;
if (type.getLocationInParent() != MethodDeclaration.RETURN_TYPE2_PROPERTY)
return SearchMessages.MethodExitsFinder_no_return_type_selected;
fMethodDeclaration= (MethodDeclaration)type.getParent();
fExitDescription= Messages.format(SearchMessages.MethodExitsFinder_occurrence_exit_description, BasicElementLabels.getJavaElementName(fMethodDeclaration.getName().toString()));
return null;
}
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui
if (type.getLocationInParent() == MethodDeclaration.THROWN_EXCEPTION_TYPES_PROPERTY) {
MethodDeclaration method= ASTResolving.findParentMethodDeclaration(node);
if (method == null)
if (type.getLocationInParent() == UnionType.TYPES_PROPERTY) {
topType= (Type) type.getParent();
if (topType.getLocationInParent() == SingleVariableDeclaration.TYPE_PROPERTY
&& topType.getParent().getLocationInParent() == CatchClause.EXCEPTION_PROPERTY) {
fSelectedNode= type;
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui
if (type.getLocationInParent() == MethodDeclaration.THROWN_EXCEPTION_TYPES_PROPERTY) {
MethodDeclaration method= ASTResolving.findParentMethodDeclaration(node);
if (method == null)
if (type.getLocationInParent() == UnionType.TYPES_PROPERTY) {
topType= (Type) type.getParent();
if (topType.getLocationInParent() == SingleVariableDeclaration.TYPE_PROPERTY
&& topType.getParent().getLocationInParent() == CatchClause.EXCEPTION_PROPERTY) {
fSelectedNode= type;
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui
/**
* @param root the AST root
* @param node the selected node
* @return returns a message if there is a problem
*/
@Override
public String initialize(CompilationUnit root, ASTNode node) {
fASTRoot= root;
if (node instanceof ReturnStatement) {
fMethodDeclaration= ASTResolving.findParentMethodDeclaration(node);
if (fMethodDeclaration == null)
return SearchMessages.MethodExitsFinder_no_return_type_selected;
return null;
}
Type type= ASTNodes.getTopMostType(node);
if (type == null)
return SearchMessages.MethodExitsFinder_no_return_type_selected;
if (type.getLocationInParent() != MethodDeclaration.RETURN_TYPE2_PROPERTY)
return SearchMessages.MethodExitsFinder_no_return_type_selected;
fMethodDeclaration= (MethodDeclaration)type.getParent();
fExitDescription= Messages.format(SearchMessages.MethodExitsFinder_occurrence_exit_description, BasicElementLabels.getJavaElementName(fMethodDeclaration.getName().toString()));
return null;
}
内容来源于网络,如有侵权,请联系作者删除!