<tfoot id='emXox'></tfoot>
    <i id='emXox'><tr id='emXox'><dt id='emXox'><q id='emXox'><span id='emXox'><b id='emXox'><form id='emXox'><ins id='emXox'></ins><ul id='emXox'></ul><sub id='emXox'></sub></form><legend id='emXox'></legend><bdo id='emXox'><pre id='emXox'><center id='emXox'></center></pre></bdo></b><th id='emXox'></th></span></q></dt></tr></i><div id='emXox'><tfoot id='emXox'></tfoot><dl id='emXox'><fieldset id='emXox'></fieldset></dl></div>
  • <legend id='emXox'><style id='emXox'><dir id='emXox'><q id='emXox'></q></dir></style></legend>

    <small id='emXox'></small><noframes id='emXox'>

      <bdo id='emXox'></bdo><ul id='emXox'></ul>

        如何以编程方式从完整的类名中找到 eclipse 中的 java 文件?

        How to programmatically find a java file in eclipse from full classname?(如何以编程方式从完整的类名中找到 eclipse 中的 java 文件?)
          <tbody id='58jt0'></tbody>
      1. <small id='58jt0'></small><noframes id='58jt0'>

          <bdo id='58jt0'></bdo><ul id='58jt0'></ul>
          <legend id='58jt0'><style id='58jt0'><dir id='58jt0'><q id='58jt0'></q></dir></style></legend><tfoot id='58jt0'></tfoot>

                1. <i id='58jt0'><tr id='58jt0'><dt id='58jt0'><q id='58jt0'><span id='58jt0'><b id='58jt0'><form id='58jt0'><ins id='58jt0'></ins><ul id='58jt0'></ul><sub id='58jt0'></sub></form><legend id='58jt0'></legend><bdo id='58jt0'><pre id='58jt0'><center id='58jt0'></center></pre></bdo></b><th id='58jt0'></th></span></q></dt></tr></i><div id='58jt0'><tfoot id='58jt0'></tfoot><dl id='58jt0'><fieldset id='58jt0'></fieldset></dl></div>
                2. 本文介绍了如何以编程方式从完整的类名中找到 eclipse 中的 java 文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  在 Eclipse 插件中,我想在编辑器中打开一个文件.我知道完整的包和类名,如何从中确定java文件的路径?

                  Inside an eclipse plugin, I'd like to open a file in editor. I know the full package and class name, how can I determine the path of the java file from this?

                  推荐答案

                  看看IJavaProject.findType(name)方法.一旦有了 IType,就可以使用 getPath() 或 getResource() 方法来定位文件.此方法搜索整个项目以及该项目中可见的所有内容.要搜索整个工作区,请遍历工作区中的所有 Java 项目,依次调用每个项目的 findType() 方法.

                  Take a look at IJavaProject.findType( name ) method. Once you have an IType, you can use getPath() or getResource() methods to locate the file. This method searches across a project and everything visible from that project. To search the whole workspace, iterate through all the Java projects in the workspace, calling the findType() method on each in turn.

                  这篇关于如何以编程方式从完整的类名中找到 eclipse 中的 java 文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Use cyrillic .properties file in eclipse project(在 Eclipse 项目中使用西里尔文 .properties 文件)
                  Eclipse gets stuck when trying to launch Android app(Eclipse 在尝试启动 Android 应用程序时卡住了)
                  Eclipse: Failed to initialize Monitor Thread: Unable to establish loopback connection(Eclipse:无法初始化监视器线程:无法建立环回连接)
                  Eclipse- JDK not found(Eclipse-找不到JDK)
                  How to make Eclipse behave well in the Windows 7 taskbar?(如何让 Eclipse 在 Windows 7 任务栏中表现良好?)
                  FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)(本机方法中的致命错误:JDWP 未初始化传输,jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197))
                    <tbody id='LmCRy'></tbody>
                  • <small id='LmCRy'></small><noframes id='LmCRy'>

                    <legend id='LmCRy'><style id='LmCRy'><dir id='LmCRy'><q id='LmCRy'></q></dir></style></legend>

                      1. <i id='LmCRy'><tr id='LmCRy'><dt id='LmCRy'><q id='LmCRy'><span id='LmCRy'><b id='LmCRy'><form id='LmCRy'><ins id='LmCRy'></ins><ul id='LmCRy'></ul><sub id='LmCRy'></sub></form><legend id='LmCRy'></legend><bdo id='LmCRy'><pre id='LmCRy'><center id='LmCRy'></center></pre></bdo></b><th id='LmCRy'></th></span></q></dt></tr></i><div id='LmCRy'><tfoot id='LmCRy'></tfoot><dl id='LmCRy'><fieldset id='LmCRy'></fieldset></dl></div>

                          • <bdo id='LmCRy'></bdo><ul id='LmCRy'></ul>

                            <tfoot id='LmCRy'></tfoot>