• <tfoot id='YPUOJ'></tfoot>

  • <legend id='YPUOJ'><style id='YPUOJ'><dir id='YPUOJ'><q id='YPUOJ'></q></dir></style></legend>

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

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

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

        为什么 IResource.getRawLocation() 为 IProject 返回 null

        Why does IResource.getRawLocation() return null for IProject(为什么 IResource.getRawLocation() 为 IProject 返回 null)
        <i id='4ME1l'><tr id='4ME1l'><dt id='4ME1l'><q id='4ME1l'><span id='4ME1l'><b id='4ME1l'><form id='4ME1l'><ins id='4ME1l'></ins><ul id='4ME1l'></ul><sub id='4ME1l'></sub></form><legend id='4ME1l'></legend><bdo id='4ME1l'><pre id='4ME1l'><center id='4ME1l'></center></pre></bdo></b><th id='4ME1l'></th></span></q></dt></tr></i><div id='4ME1l'><tfoot id='4ME1l'></tfoot><dl id='4ME1l'><fieldset id='4ME1l'></fieldset></dl></div>

            <tbody id='4ME1l'></tbody>
        1. <tfoot id='4ME1l'></tfoot>

                <legend id='4ME1l'><style id='4ME1l'><dir id='4ME1l'><q id='4ME1l'></q></dir></style></legend>
                • <bdo id='4ME1l'></bdo><ul id='4ME1l'></ul>

                  <small id='4ME1l'></small><noframes id='4ME1l'>

                • 本文介绍了为什么 IResource.getRawLocation() 为 IProject 返回 null的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我需要一个项目文件夹的绝对位置,所以我尝试了

                  I need the absolute location of a project folder, so I tried

                  project.getRawLocation()
                  

                  但这会返回 null (至少在我使用 Import ... Existing projects into workspace 手动导入项目的情况下,我已经检查了 将项目复制到工作区复选框).

                  but this returns null (at least in my case in which I have imported the project manually using Import ... Existing projects into workspace and I have checked the Copy projects into workspace checkbox).

                  事情是这样的

                  project.getParent().getRawLocation() 
                  

                  返回正确的 /work/Projekte/runtime-MyProduct.product

                  project.members()[0].getRawLocation()
                  

                  返回 /work/Projekte/runtime-MyProduct.product/Test/.cproject 这也是正确的.

                  returns /work/Projekte/runtime-MyProduct.product/Test/.cproject which is correct as well.

                  因此,我希望如此

                  project.getRawLocation() 
                  

                  会返回 /work/Projekte/runtime-MyProduct.product/Test,但它会返回 null.

                  would return /work/Projekte/runtime-MyProduct.product/Test, but it returns null.

                  谁能解释和/或告诉我哪里错了?

                  Can anyone explain and/or show me where I'm wrong?

                  推荐答案

                  getRawLocation()

                  如果此资源是现有项目,则返回的路径将为等于项目描述中的位置路径.

                  If this resource is an existing project, the returned path will be equal to the location path in the project description.

                  以及项目描述的 JavaDoc IProjectDescription.getLocation() 说:

                  and the JavaDoc for the project description IProjectDescription.getLocation() says:

                  如果应该使用默认位置,则返回null

                  null is returned if the default location should be used

                  getLocation() 调用会返回一个路径.

                  The getLocation() call will return a path.

                  这篇关于为什么 IResource.getRawLocation() 为 IProject 返回 null的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  How to send data to COM PORT using JAVA?(如何使用 JAVA 向 COM PORT 发送数据?)
                  Use cyrillic .properties file in eclipse project(在 Eclipse 项目中使用西里尔文 .properties 文件)
                  Eclipse gets stuck when trying to launch Android app(Eclipse 在尝试启动 Android 应用程序时卡住了)
                  Java Delegates?(Java 代表?)
                  Eclipse: Failed to initialize Monitor Thread: Unable to establish loopback connection(Eclipse:无法初始化监视器线程:无法建立环回连接)
                  Eclipse- JDK not found(Eclipse-找不到JDK)

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

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

                          <tbody id='tlmYD'></tbody>

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