Lines 711-718
Link Here
|
711 |
* Register all external source or non-source roots using {@link FileOwnerQuery#markExternalOwner}. |
711 |
* Register all external source or non-source roots using {@link FileOwnerQuery#markExternalOwner}. |
712 |
* <p> |
712 |
* <p> |
713 |
* Only roots added by {@link #addPrincipalSourceRoot} and {@link #addNonSourceRoot} |
713 |
* Only roots added by {@link #addPrincipalSourceRoot} and {@link #addNonSourceRoot} |
714 |
* are considered. They are registered if (and only if) they in fact fall |
714 |
* are considered. They are registered only if the folders really |
715 |
* outside of the project directory, and of course only if the folders really |
|
|
716 |
* exist on disk. Currently it is not defined when this file existence check |
715 |
* exist on disk. Currently it is not defined when this file existence check |
717 |
* is done (e.g. when this method is first called, or periodically) or whether |
716 |
* is done (e.g. when this method is first called, or periodically) or whether |
718 |
* folders which are created subsequently will be registered, so project type |
717 |
* folders which are created subsequently will be registered, so project type |
Lines 761-768
Link Here
|
761 |
* Register all external source or non-source roots using {@link FileOwnerQuery#markExternalOwner}. |
760 |
* Register all external source or non-source roots using {@link FileOwnerQuery#markExternalOwner}. |
762 |
* <p> |
761 |
* <p> |
763 |
* Only roots added by {@link #addPrincipalSourceRoot} and {@link #addNonSourceRoot} |
762 |
* Only roots added by {@link #addPrincipalSourceRoot} and {@link #addNonSourceRoot} |
764 |
* are considered. They are registered if (and only if) they in fact fall |
763 |
* are considered. They are registered only if the folders really |
765 |
* outside of the project directory, and of course only if the folders really |
|
|
766 |
* exist on disk. Currently it is not defined when this file existence check |
764 |
* exist on disk. Currently it is not defined when this file existence check |
767 |
* is done (e.g. when this method is first called, or periodically) or whether |
765 |
* is done (e.g. when this method is first called, or periodically) or whether |
768 |
* folders which are created subsequently will be registered, so project type |
766 |
* folders which are created subsequently will be registered, so project type |
Lines 836-849
Link Here
|
836 |
// up calling APH.resolveFileObject repeatedly (for each property change) |
834 |
// up calling APH.resolveFileObject repeatedly (for each property change) |
837 |
for (Root r : allRoots) { |
835 |
for (Root r : allRoots) { |
838 |
for (FileObject loc : r.getIncludeRoots(minimalSubfolders)) { |
836 |
for (FileObject loc : r.getIncludeRoots(minimalSubfolders)) { |
839 |
if (FileUtil.getRelativePath(pdir, loc) != null) { |
|
|
840 |
// Inside projdir already. Skip it. |
841 |
continue; |
842 |
} |
843 |
if (loc.isFolder()) { |
837 |
if (loc.isFolder()) { |
844 |
try { |
838 |
try { |
845 |
Project other = ProjectManager.getDefault().findProject(loc); |
839 |
Project other = ProjectManager.getDefault().findProject(loc); |
846 |
if (other != null) { |
840 |
if (other != null && other != p) { |
847 |
// This is a foreign project; we cannot own it. Skip it. |
841 |
// This is a foreign project; we cannot own it. Skip it. |
848 |
continue; |
842 |
continue; |
849 |
} |
843 |
} |