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!

6 comments
Comment actions Permalink

You can store the name of the facet and use ProjectWideFacetListener.facetConfigurationChanged() to update your configuration when a facet is renamed.

0
Comment actions Permalink

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.

0
Comment actions Permalink

The possibility to have the same name for two different facets is a bug.

0
Comment actions Permalink

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!"

0
Comment actions Permalink

Thanks Nikolay! This seems exactly what I need.

0

Please sign in to leave a comment.