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
79730a81
Unverified
Commit
79730a81
authored
6 years ago
by
Vladimir Krivosheev
Browse files
Options
Download
Email Patches
Plain Diff
avoid area.getExtensionPoint and do not use set — area always returns list without duplicated EP
parent
7f7de2e6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
platform/core-impl/src/com/intellij/ide/plugins/IdeaPluginDescriptorImpl.java
+7
-3
...rc/com/intellij/ide/plugins/IdeaPluginDescriptorImpl.java
platform/core-impl/src/com/intellij/ide/plugins/PluginManagerCore.java
+2
-7
...-impl/src/com/intellij/ide/plugins/PluginManagerCore.java
with
9 additions
and
10 deletions
+9
-10
platform/core-impl/src/com/intellij/ide/plugins/IdeaPluginDescriptorImpl.java
+
7
-
3
View file @
79730a81
...
...
@@ -328,16 +328,20 @@ public class IdeaPluginDescriptorImpl implements IdeaPluginDescriptor {
// made public for Upsource
public
void
registerExtensions
(
@NotNull
ExtensionsArea
area
,
@NotNull
String
epName
)
{
registerExtensions
(
area
,
area
.
getExtensionPoint
(
epName
));
}
// made public for Upsource
public
void
registerExtensions
(
@NotNull
ExtensionsArea
area
,
@NotNull
ExtensionPoint
<?>
extensionPoint
)
{
if
(
myExtensions
==
null
)
{
return
;
}
Collection
<
Element
>
elements
=
myExtensions
.
get
(
e
p
Name
);
Collection
<
Element
>
elements
=
myExtensions
.
get
(
e
xtensionPoint
.
get
Name
()
);
if
(
elements
.
isEmpty
())
{
return
;
}
ExtensionPoint
<
Object
>
extensionPoint
=
area
.
getExtensionPoint
(
epName
);
for
(
Element
element
:
elements
)
{
area
.
registerExtension
(
extensionPoint
,
this
,
element
);
}
...
...
@@ -640,7 +644,7 @@ public class IdeaPluginDescriptorImpl implements IdeaPluginDescriptor {
myOptionalDescriptors
=
optionalDescriptors
;
}
void
mergeOptionalConfig
(
fina
l
IdeaPluginDescriptorImpl
descriptor
)
{
void
mergeOptionalConfig
(
@NotNul
l
IdeaPluginDescriptorImpl
descriptor
)
{
if
(
myExtensions
==
null
)
{
myExtensions
=
descriptor
.
myExtensions
;
}
...
...
This diff is collapsed.
Click to expand it.
platform/core-impl/src/com/intellij/ide/plugins/PluginManagerCore.java
+
2
-
7
View file @
79730a81
...
...
@@ -1438,14 +1438,9 @@ public class PluginManagerCore {
}
ExtensionPoint
[]
extensionPoints
=
area
.
getExtensionPoints
();
Set
<
String
>
epNames
=
new
THashSet
<>(
extensionPoints
.
length
);
for
(
ExtensionPoint
point
:
extensionPoints
)
{
epNames
.
add
(
point
.
getName
());
}
for
(
IdeaPluginDescriptorImpl
descriptor
:
loadedPlugins
)
{
for
(
Str
in
g
e
pName
:
epName
s
)
{
descriptor
.
registerExtensions
(
area
,
e
pName
);
for
(
ExtensionPo
in
t
e
xtensionPoint
:
extensionPoint
s
)
{
descriptor
.
registerExtensions
(
area
,
e
xtensionPoint
);
}
}
}
...
...
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