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?
请先登录再写评论。
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).
Hello Nikolay,
thanks for the fast hint, I'll give that one a try.
PS: com.intellij.facet.* could really use some basic javadoc :(
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()
Hello Yann,
Did you call validate() before isValid()?
I must have been blind..