use of com.intellij.facet.impl.invalid.InvalidFacetConfiguration in project intellij-community by JetBrains.
the class FacetManagerImpl method addInvalidFacet.
private void addInvalidFacet(final FacetState state, ModifiableFacetModel model, final Facet underlyingFacet, final String errorMessage, final String typeId) {
final InvalidFacetManager invalidFacetManager = InvalidFacetManager.getInstance(myModule.getProject());
final InvalidFacetType type = InvalidFacetType.getInstance();
final InvalidFacetConfiguration configuration = new InvalidFacetConfiguration(state, errorMessage);
final InvalidFacet facet = createFacet(type, StringUtil.notNullize(state.getName()), configuration, underlyingFacet);
model.addFacet(facet);
if (!invalidFacetManager.isIgnored(facet)) {
FacetLoadingErrorDescription description = new FacetLoadingErrorDescription(facet);
ProjectLoadingErrorsNotifier.getInstance(myModule.getProject()).registerError(description);
if (typeId != null) {
UnknownFeaturesCollector.getInstance(myModule.getProject()).registerUnknownFeature("com.intellij.facetType", typeId, "Facet");
}
}
}
Aggregations