Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Intellij Community
Commits
7efc188b
Commit
7efc188b
authored
7 years ago
by
Yaroslav Pankratyev
Browse files
Options
Download
Email Patches
Plain Diff
IDEA-168449 Change search scope for plugin descriptors
parent
8eaddd30
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
platform/core-api/src/com/intellij/psi/search/GlobalSearchScope.java
+3
-0
...re-api/src/com/intellij/psi/search/GlobalSearchScope.java
plugins/devkit/src/util/PluginRelatedLocatorsUtils.java
+6
-1
plugins/devkit/src/util/PluginRelatedLocatorsUtils.java
with
9 additions
and
1 deletion
+9
-1
platform/core-api/src/com/intellij/psi/search/GlobalSearchScope.java
+
3
-
0
View file @
7efc188b
...
...
@@ -353,6 +353,9 @@ public abstract class GlobalSearchScope extends SearchScope implements ProjectAw
return
filesWithLibrariesScope
(
project
,
files
,
false
);
}
/**
* @since 2017.3
*/
@NotNull
public
static
GlobalSearchScope
filesWithLibrariesScope
(
@NotNull
Project
project
,
@NotNull
Collection
<
VirtualFile
>
files
,
boolean
searchOutsideRootModel
)
{
...
...
This diff is collapsed.
Click to expand it.
plugins/devkit/src/util/PluginRelatedLocatorsUtils.java
+
6
-
1
View file @
7efc188b
...
...
@@ -16,8 +16,10 @@
package
org.jetbrains.idea.devkit.util
;
import
com.intellij.openapi.project.Project
;
import
com.intellij.openapi.roots.impl.LibraryScopeCache
;
import
com.intellij.openapi.vfs.VirtualFile
;
import
com.intellij.psi.search.GlobalSearchScope
;
import
com.intellij.psi.search.GlobalSearchScopesCore
;
import
com.intellij.util.xml.DomService
;
import
org.jetbrains.annotations.NotNull
;
import
org.jetbrains.idea.devkit.dom.IdeaPlugin
;
...
...
@@ -30,8 +32,11 @@ class PluginRelatedLocatorsUtils {
@NotNull
static
GlobalSearchScope
getCandidatesScope
(
@NotNull
Project
project
)
{
GlobalSearchScope
scope
=
GlobalSearchScopesCore
.
projectProductionScope
(
project
)
.
uniteWith
(
LibraryScopeCache
.
getInstance
(
project
).
getLibrariesOnlyScope
());
Collection
<
VirtualFile
>
candidates
=
DomService
.
getInstance
()
.
getDomFileCandidates
(
IdeaPlugin
.
class
,
project
,
GlobalSearchScope
.
allScope
(
project
)
);
.
getDomFileCandidates
(
IdeaPlugin
.
class
,
project
,
scope
);
return
GlobalSearchScope
.
filesWithLibrariesScope
(
project
,
candidates
,
true
);
}
}
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment