Search in sources :

Example 1 with FacetEditorContext

use of com.intellij.facet.ui.FacetEditorContext in project intellij-community by JetBrains.

the class ProjectFacetsConfigurator method getOrCreateEditor.

@NotNull
public FacetEditorImpl getOrCreateEditor(Facet facet) {
    FacetEditorImpl editor = myEditors.get(facet);
    if (editor == null) {
        final Facet underlyingFacet = facet.getUnderlyingFacet();
        final FacetEditorContext parentContext = underlyingFacet != null ? getOrCreateEditor(underlyingFacet).getContext() : null;
        final FacetEditorContext context = createContext(facet, parentContext);
        editor = new FacetEditorImpl(context, facet.getConfiguration());
        editor.getComponent();
        editor.reset();
        myEditors.put(facet, editor);
    }
    return editor;
}
Also used : FacetEditorImpl(com.intellij.facet.impl.ui.FacetEditorImpl) FacetEditorContext(com.intellij.facet.ui.FacetEditorContext) NotNull(org.jetbrains.annotations.NotNull)

Aggregations

FacetEditorImpl (com.intellij.facet.impl.ui.FacetEditorImpl)1 FacetEditorContext (com.intellij.facet.ui.FacetEditorContext)1 NotNull (org.jetbrains.annotations.NotNull)1