Storing link to facet in configuration
Hello, in my facet I want to hold link to another facet(web facet).
Since one module can hold many facets with same name and type I need some unique ID of
facet that I'm linking - but I didn't find any.
How can I store link to facet in configuration?
Thanks in advance!
请先登录再写评论。
You can store the name of the facet and use ProjectWideFacetListener.facetConfigurationChanged() to update your configuration when a facet is renamed.
Thanks Dmitry, however in one module can be more than one one web facet with same name(tested),
in this situation after restarting we can't distinguish them.
I understand that two web facets with same name in one module its like "shoot youself in the foot", but potentially in my situation it can be.
The possibility to have the same name for two different facets is a bug.
You can store FacetPointer created using FacetPointersManager. Actually there should be no facets of same type with same name in same module. It's a
bug that IDEA doesn't report an error in such cases.
--
Nikolay Chashnikov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
Thanks Nikolay! This seems exactly what I need.
Filled issue in youtrack http://youtrack.jetbrains.com/issue/IDEA-97329 about this bug.