public class FacetModelImpl extends FacetModelBase implements ModifiableFacetModel
ModifiableFacetModel.Listener
Constructor and Description |
---|
FacetModelImpl(FacetManagerImpl manager) |
Modifier and Type | Method and Description |
---|---|
void |
addFacet(Facet<?> facet) |
void |
addFacet(Facet<?> facet,
ProjectModelExternalSource externalSource) |
void |
addFacetsFromManager() |
void |
addListener(ModifiableFacetModel.Listener listener,
Disposable parentDisposable) |
void |
commit() |
protected void |
facetsChanged() |
Facet<?> [] |
getAllFacets() |
java.lang.String |
getFacetName(Facet<?> facet) |
java.lang.String |
getNewName(Facet<?> facet) |
boolean |
isModified() |
boolean |
isNewFacet(Facet<?> facet) |
void |
removeFacet(Facet<?> facet) |
void |
rename(Facet<?> facet,
java.lang.String newName) |
void |
replaceFacet(Facet<?> original,
Facet<?> replacement)
Replaces
original facet by replacement . |
findFacet, getFacetByType, getFacetByType, getFacetsByType, getFacetsByType, getSortedFacets
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
findFacet, getFacetByType, getFacetByType, getFacetsByType, getFacetsByType, getSortedFacets
public FacetModelImpl(FacetManagerImpl manager)
public void addFacetsFromManager()
public void addFacet(Facet<?> facet)
addFacet
in interface ModifiableFacetModel
public void addFacet(Facet<?> facet, ProjectModelExternalSource externalSource)
addFacet
in interface ModifiableFacetModel
public void removeFacet(Facet<?> facet)
removeFacet
in interface ModifiableFacetModel
public void replaceFacet(Facet<?> original, Facet<?> replacement)
ModifiableFacetModel
original
facet by replacement
. The only difference with removeFacet(original); addFacet(replacement);
is that this method preserves order of facets in internal structures to avoid modifications of *.iml files.replaceFacet
in interface ModifiableFacetModel
public void rename(Facet<?> facet, java.lang.String newName)
rename
in interface ModifiableFacetModel
public java.lang.String getNewName(Facet<?> facet)
getNewName
in interface ModifiableFacetModel
public void commit()
commit
in interface ModifiableFacetModel
public boolean isModified()
isModified
in interface ModifiableFacetModel
public boolean isNewFacet(Facet<?> facet)
isNewFacet
in interface ModifiableFacetModel
public Facet<?> [] getAllFacets()
getAllFacets
in interface FacetModel
public java.lang.String getFacetName(Facet<?> facet)
getFacetName
in interface FacetModel
getFacetName
in class FacetModelBase
public void addListener(ModifiableFacetModel.Listener listener, Disposable parentDisposable)
addListener
in interface ModifiableFacetModel
protected void facetsChanged()
facetsChanged
in class FacetModelBase