热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

org.eclipse.jdt.core.IJavaElement.isStructureKnown()方法的使用及代码示例

本文整理了Java中org.eclipse.jdt.core.IJavaElement.isStructureKnown()方法的一些代码示例,展示了IJa

本文整理了Java中org.eclipse.jdt.core.IJavaElement.isStructureKnown()方法的一些代码示例,展示了IJavaElement.isStructureKnown()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。IJavaElement.isStructureKnown()方法的具体详情如下:
包路径:org.eclipse.jdt.core.IJavaElement
类名称:IJavaElement
方法名:isStructureKnown

IJavaElement.isStructureKnown介绍

[英]Returns whether the structure of this element is known. For example, for a compilation unit that has syntax errors, false is returned. If the structure of an element is unknown, navigations will return reasonable defaults. For example, getChildren for a compilation unit with syntax errors will return a collection of the children that could be parsed.

Note: This does not imply anything about consistency with the underlying resource/buffer contents.
[中]返回此元素的结构是否已知。例如,对于有语法错误的编译单元,将返回false。如果元素的结构未知,导航将返回合理的默认值。例如,对于有语法错误的编译单元,getChildren将返回可以解析的子级集合。
注意:这并不意味着与底层资源/缓冲区内容的一致性。

代码示例

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core

@Override
public boolean isStructureKnown() throws JavaModelException {
return ((IJavaElement)getOpenableParent()).isStructureKnown();
}
/*

代码示例来源:origin: trylimits/Eclipse-Postfix-Code-Completion

public boolean isStructureKnown() throws JavaModelException {
return ((IJavaElement)getOpenableParent()).isStructureKnown();
}
/*

代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core

public boolean isStructureKnown() throws JavaModelException {
return ((IJavaElement)getOpenableParent()).isStructureKnown();
}
/*

代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core

public boolean isStructureKnown() throws JavaModelException {
return ((IJavaElement)getOpenableParent()).isStructureKnown();
}
/*

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core

public boolean isStructureKnown() throws JavaModelException {
return ((IJavaElement)getOpenableParent()).isStructureKnown();
}
/*

代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core

public boolean isStructureKnown() throws JavaModelException {
return ((IJavaElement)getOpenableParent()).isStructureKnown();
}
/*

代码示例来源:origin: org.eclipse/org.eclipse.jdt.ui

public static boolean isAvailable(IJavaElement javaElement) throws JavaModelException {
if (javaElement == null)
return false;
if (! javaElement.exists())
return false;
if (javaElement.isReadOnly())
return false;
// work around for https://bugs.eclipse.org/bugs/show_bug.cgi?id=48422
// the Java project is now cheating regarding its children so we shouldn't
// call isStructureKnown if the project isn't open.
// see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=52474
if (!(javaElement instanceof IJavaProject) && !(javaElement instanceof ILocalVariable) && !javaElement.isStructureKnown())
return false;
if (javaElement instanceof IMember && ((IMember)javaElement).isBinary())
return false;
return true;
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

public static boolean isAvailable(IJavaElement javaElement) throws JavaModelException {
if (javaElement == null)
return false;
if (! javaElement.exists())
return false;
if (javaElement.isReadOnly())
return false;
// work around for https://bugs.eclipse.org/bugs/show_bug.cgi?id=48422
// the Java project is now cheating regarding its children so we shouldn't
// call isStructureKnown if the project isn't open.
// see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=52474
if (!(javaElement instanceof IJavaProject) && !(javaElement instanceof ILocalVariable) && !javaElement.isStructureKnown())
return false;
if (javaElement instanceof IMember && ((IMember)javaElement).isBinary())
return false;
return true;
}

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core.manipulation

public static boolean isAvailable(IJavaElement javaElement) throws JavaModelException {
if (javaElement == null)
return false;
if (! javaElement.exists())
return false;
if (javaElement.isReadOnly())
return false;
// work around for https://bugs.eclipse.org/bugs/show_bug.cgi?id=48422
// the Java project is now cheating regarding its children so we shouldn't
// call isStructureKnown if the project isn't open.
// see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=52474
if (!(javaElement instanceof IJavaProject) && !(javaElement instanceof ILocalVariable) && !javaElement.isStructureKnown())
return false;
if (javaElement instanceof IMember && ((IMember)javaElement).isBinary())
return false;
return true;
}

代码示例来源:origin: org.eclipse/org.eclipse.jdt.ui

return RefactoringStatus.createFatalErrorStatus(RefactoringCoreMessages.ReorgPolicyFactory_readonly);
if (!javaElement.isStructureKnown())
return RefactoringStatus.createFatalErrorStatus(RefactoringCoreMessages.ReorgPolicyFactory_structure);

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui

return RefactoringStatus.createFatalErrorStatus(RefactoringCoreMessages.ReorgPolicyFactory_readonly);
if (!javaElement.isStructureKnown())
return RefactoringStatus.createFatalErrorStatus(RefactoringCoreMessages.ReorgPolicyFactory_structure);

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

return RefactoringStatus.createFatalErrorStatus(RefactoringCoreMessages.ReorgPolicyFactory_readonly);
if (!javaElement.isStructureKnown())
return RefactoringStatus.createFatalErrorStatus(RefactoringCoreMessages.ReorgPolicyFactory_structure);

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core.manipulation

/**
* Checks whether it is possible to modify the given IJavaElement.
* The IJavaElement must exist and be non read-only to be modifiable.
* Moreover, if it is a IMember it must not be binary.
* The returned RefactoringStatus has ERROR severity if
* it is not possible to modify the element.
* @param javaElement
* @return the status
* @throws JavaModelException
*
* @see IJavaElement#exists
* @see IJavaElement#isReadOnly
* @see IMember#isBinary
* @see RefactoringStatus
*/
public static RefactoringStatus checkAvailability(IJavaElement javaElement) throws JavaModelException{
RefactoringStatus result= new RefactoringStatus();
if (! javaElement.exists())
result.addFatalError(Messages.format(RefactoringCoreMessages.Refactoring_not_in_model, getJavaElementName(javaElement)));
if (javaElement.isReadOnly())
result.addFatalError(Messages.format(RefactoringCoreMessages.Refactoring_read_only, getJavaElementName(javaElement)));
if (javaElement.exists() && !javaElement.isStructureKnown())
result.addFatalError(Messages.format(RefactoringCoreMessages.Refactoring_unknown_structure, getJavaElementName(javaElement)));
if (javaElement instanceof IMember && ((IMember)javaElement).isBinary())
result.addFatalError(Messages.format(RefactoringCoreMessages.Refactoring_binary, getJavaElementName(javaElement)));
return result;
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

/**
* Checks whether it is possible to modify the given IJavaElement.
* The IJavaElement must exist and be non read-only to be modifiable.
* Moreover, if it is a IMember it must not be binary.
* The returned RefactoringStatus has ERROR severity if
* it is not possible to modify the element.
* @param javaElement
* @return the status
* @throws JavaModelException
*
* @see IJavaElement#exists
* @see IJavaElement#isReadOnly
* @see IMember#isBinary
* @see RefactoringStatus
*/
public static RefactoringStatus checkAvailability(IJavaElement javaElement) throws JavaModelException{
RefactoringStatus result= new RefactoringStatus();
if (! javaElement.exists())
result.addFatalError(Messages.format(RefactoringCoreMessages.Refactoring_not_in_model, getJavaElementName(javaElement)));
if (javaElement.isReadOnly())
result.addFatalError(Messages.format(RefactoringCoreMessages.Refactoring_read_only, getJavaElementName(javaElement)));
if (javaElement.exists() && !javaElement.isStructureKnown())
result.addFatalError(Messages.format(RefactoringCoreMessages.Refactoring_unknown_structure, getJavaElementName(javaElement)));
if (javaElement instanceof IMember && ((IMember)javaElement).isBinary())
result.addFatalError(Messages.format(RefactoringCoreMessages.Refactoring_binary, getJavaElementName(javaElement)));
return result;
}

代码示例来源:origin: org.eclipse/org.eclipse.jdt.ui

/**
* Checks whether it is possible to modify the given IJavaElement.
* The IJavaElement must exist and be non read-only to be modifiable.
* Moreover, if it is a IMember it must not be binary.
* The returned RefactoringStatus has ERROR severity if
* it is not possible to modify the element.
* @param javaElement
* @return the status
* @throws JavaModelException
*
* @see IJavaElement#exists
* @see IJavaElement#isReadOnly
* @see IMember#isBinary
* @see RefactoringStatus
*/
public static RefactoringStatus checkAvailability(IJavaElement javaElement) throws JavaModelException{
RefactoringStatus result= new RefactoringStatus();
if (! javaElement.exists())
result.addFatalError(Messages.format(RefactoringCoreMessages.Refactoring_not_in_model, javaElement.getElementName()));
if (javaElement.isReadOnly())
result.addFatalError(Messages.format(RefactoringCoreMessages.Refactoring_read_only, javaElement.getElementName()));
if (javaElement.exists() && !javaElement.isStructureKnown())
result.addFatalError(Messages.format(RefactoringCoreMessages.Refactoring_unknown_structure, javaElement.getElementName()));
if (javaElement instanceof IMember && ((IMember)javaElement).isBinary())
result.addFatalError(Messages.format(RefactoringCoreMessages.Refactoring_binary, javaElement.getElementName()));
return result;
}

代码示例来源:origin: eclipse/eclipse.jdt.ls

if (!javaElement.isStructureKnown()) {
return RefactoringStatus.createFatalErrorStatus(RefactoringCoreMessages.ReorgPolicyFactory_structure);

推荐阅读
  • 本文介绍了在rhel5.5操作系统下搭建网关+LAMP+postfix+dhcp的步骤和配置方法。通过配置dhcp自动分配ip、实现外网访问公司网站、内网收发邮件、内网上网以及SNAT转换等功能。详细介绍了安装dhcp和配置相关文件的步骤,并提供了相关的命令和配置示例。 ... [详细]
  • baresip android编译、运行教程1语音通话
    本文介绍了如何在安卓平台上编译和运行baresip android,包括下载相关的sdk和ndk,修改ndk路径和输出目录,以及创建一个c++的安卓工程并将目录考到cpp下。详细步骤可参考给出的链接和文档。 ... [详细]
  • 自动轮播,反转播放的ViewPagerAdapter的使用方法和效果展示
    本文介绍了如何使用自动轮播、反转播放的ViewPagerAdapter,并展示了其效果。该ViewPagerAdapter支持无限循环、触摸暂停、切换缩放等功能。同时提供了使用GIF.gif的示例和github地址。通过LoopFragmentPagerAdapter类的getActualCount、getActualItem和getActualPagerTitle方法可以实现自定义的循环效果和标题展示。 ... [详细]
  • 本文介绍了iOS数据库Sqlite的SQL语句分类和常见约束关键字。SQL语句分为DDL、DML和DQL三种类型,其中DDL语句用于定义、删除和修改数据表,关键字包括create、drop和alter。常见约束关键字包括if not exists、if exists、primary key、autoincrement、not null和default。此外,还介绍了常见的数据库数据类型,包括integer、text和real。 ... [详细]
  • Nginx使用AWStats日志分析的步骤及注意事项
    本文介绍了在Centos7操作系统上使用Nginx和AWStats进行日志分析的步骤和注意事项。通过AWStats可以统计网站的访问量、IP地址、操作系统、浏览器等信息,并提供精确到每月、每日、每小时的数据。在部署AWStats之前需要确认服务器上已经安装了Perl环境,并进行DNS解析。 ... [详细]
  • Iamtryingtomakeaclassthatwillreadatextfileofnamesintoanarray,thenreturnthatarra ... [详细]
  • Java容器中的compareto方法排序原理解析
    本文从源码解析Java容器中的compareto方法的排序原理,讲解了在使用数组存储数据时的限制以及存储效率的问题。同时提到了Redis的五大数据结构和list、set等知识点,回忆了作者大学时代的Java学习经历。文章以作者做的思维导图作为目录,展示了整个讲解过程。 ... [详细]
  • 阿,里,云,物,联网,net,core,客户端,czgl,aliiotclient, ... [详细]
  • 本文讨论了一个关于cuowu类的问题,作者在使用cuowu类时遇到了错误提示和使用AdjustmentListener的问题。文章提供了16个解决方案,并给出了两个可能导致错误的原因。 ... [详细]
  • http:my.oschina.netleejun2005blog136820刚看到群里又有同学在说HTTP协议下的Get请求参数长度是有大小限制的,最大不能超过XX ... [详细]
  • HDFS2.x新特性
    一、集群间数据拷贝scp实现两个远程主机之间的文件复制scp-rhello.txtroothadoop103:useratguiguhello.txt推pushscp-rr ... [详细]
  • imx6ull开发板驱动MT7601U无线网卡的方法和步骤详解
    本文详细介绍了在imx6ull开发板上驱动MT7601U无线网卡的方法和步骤。首先介绍了开发环境和硬件平台,然后说明了MT7601U驱动已经集成在linux内核的linux-4.x.x/drivers/net/wireless/mediatek/mt7601u文件中。接着介绍了移植mt7601u驱动的过程,包括编译内核和配置设备驱动。最后,列举了关键词和相关信息供读者参考。 ... [详细]
  • 本文介绍了Android 7的学习笔记总结,包括最新的移动架构视频、大厂安卓面试真题和项目实战源码讲义。同时还分享了开源的完整内容,并提醒读者在使用FileProvider适配时要注意不同模块的AndroidManfiest.xml中配置的xml文件名必须不同,否则会出现问题。 ... [详细]
  • Java学习笔记之面向对象编程(OOP)
    本文介绍了Java学习笔记中的面向对象编程(OOP)内容,包括OOP的三大特性(封装、继承、多态)和五大原则(单一职责原则、开放封闭原则、里式替换原则、依赖倒置原则)。通过学习OOP,可以提高代码复用性、拓展性和安全性。 ... [详细]
  • 本文介绍了如何使用C#制作Java+Mysql+Tomcat环境安装程序,实现一键式安装。通过将JDK、Mysql、Tomcat三者制作成一个安装包,解决了客户在安装软件时的复杂配置和繁琐问题,便于管理软件版本和系统集成。具体步骤包括配置JDK环境变量和安装Mysql服务,其中使用了MySQL Server 5.5社区版和my.ini文件。安装方法为通过命令行将目录转到mysql的bin目录下,执行mysqld --install MySQL5命令。 ... [详细]
author-avatar
sdauilk_299
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有