Accessing FacetLibrariesValidator directly after project load

Problem: I want to access the validator directly after project load, but createEditorTabs() is called only upon facet editor creation, so what's the best way to access the FacetLibrariesValidator in order to check facet configuration before this happened?

0
5 comments
Avatar
Permanently deleted user

Hello Yann,

FacetLibrariesValidator is used to check libraries which are required for
facet and show error message (with "fix" button) in facet editor. So FacetLibrariesValidator
may be used only in facet editor. If you want to check facet libraries outside
facet editor you can use LibrariesValidationComponent (see FacetEditorsFactory.createLibrariesValidationComponent).

Problem: I want to access the validator directly after project load,
but createEditorTabs() is called only upon facet editor creation, so
what's the best way to access the FacetLibrariesValidator in order to
check facet configuration before this happened?



0

Hello Nikolay,

thanks for the fast hint, I'll give that one a try.

PS: com.intellij.facet.* could really use some basic javadoc :(

0

This does not seem to work, I'm passing in an invalid (not linked) library (facet config page is correctly marked with errors) and still isValid() returns true, both before and after calling setupLibraries()

0
Avatar
Permanently deleted user

Hello Yann,

Did you call validate() before isValid()?

This does not seem to work, I'm passing in an invalid (not linked)
library (facet config page is correctly marked with errors) and still
isValid() returns true, both before and after calling setupLibraries()



0

I must have been blind..

0

Please sign in to leave a comment.