@OpenApi public class Project extends ElementImpl implements EnvironmentOptions.EnvironmentChangeListener, com.nomagic.uml2.ext.jmi.reflect.ElementRegistry, com.nomagic.uml2.ext.jmi.reflect.RepositoryProvider
Project class represents main storage of all project data like: main package,
all diagrams and diagram windows.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
COMMAND_EXECUTED
The any command (adding object, deleting object, changing specifications)
executing event type and naming.
|
static java.lang.String |
DIAGRAM_ACTIVATED
The diagram focus on event type and naming.
|
static java.lang.String |
DIAGRAM_CLOSED
The diagram window closing event type and naming.
|
static java.lang.String |
DIAGRAM_EDITED
The any diagram properties editing event type and naming.
|
static java.lang.String |
DIAGRAM_OPENED
The diagram window opening event type and naming.
|
static java.lang.String |
DIAGRAM_WINDOW_ACTIVATED
The diagram window focus on event type and naming.
|
static java.lang.String |
SELECTION_CHANGED
Deprecated.
now SelectionProvider fires selection changed,
use
SelectionProvider.SelectionChangedListener
The diagram objects selecting event type and naming. |
| Modifier and Type | Method and Description |
|---|---|
void |
addToProjectRepository(Element element)
Adds element into this project repository and removes it from previous
project repository.
|
DiagramPresentationElement |
getActiveDiagram()
Returns currently active diagram.
|
Browser |
getBrowser()
Get browser.
|
DiagramPresentationElement |
getDiagram(Diagram diagramElement)
Returns diagram presentation element for specified diagram model element.
|
java.util.Collection<DiagramPresentationElement> |
getDiagrams()
Returns all existing diagrams stored in this Project.
|
java.util.Collection<DiagramPresentationElement> |
getDiagrams(java.lang.String type)
Returns existing diagrams of given type stored in Project.
|
StateChangeHandler.DirtyType |
getDirtyType()
Returns project dirty type if project is dirty, otherwise - null.
|
BaseElement |
getElementByID(java.lang.String id)
Return the element with given id.
|
ElementsFactory |
getElementsFactory() |
java.lang.String |
getFileName()
Method returns file name of this project.
|
Model |
getModel()
Deprecated.
|
java.util.List<Package> |
getModels()
Returns a list of models in the project
(the primary model of the project and all the models of the modules (attached projects)).
|
java.lang.String |
getName()
Returns project name.
|
ProjectOptions |
getOptions()
Getter for project options.
|
Package |
getPrimaryModel()
Returns the primary (main) model of the project (not including the ones from modules).
|
IPrimaryProject |
getPrimaryProject()
Primary project of MagicDraw project.
|
static Project |
getProject(BaseElement element)
Returns Project for given element
|
ProxyManager |
getProxyManager() |
AbstractRepository |
getRepository()
Get project repository.
|
RepositoryListenerRegistry |
getRepositoryListenerRegistry()
Return listener registry for repository.
|
SmartEventSupport |
getSmartEventSupport()
Returns registry that allows to register smart listener configurations by element type.
|
SymbolElementMap |
getSymbolElementMap()
Get element symbol map.
|
boolean |
isDirty()
Returns true if this project was modified after last save/load.
|
boolean |
isDisposed(BaseElement element)
Check if given element is unregistered from project.
|
static boolean |
isElementDisposed(Element element)
Check if given element is unregistered from project.
|
boolean |
isEsiProject()
Determines whether this is an ESI project
|
boolean |
isRemote()
Returns the remote or not remote state of the project.
|
boolean |
isTeamworkServerProject()
Returns the state of project, whether it teamwork server project or not.
|
void |
reSetDirty(boolean dirty,
StateChangeHandler.DirtyType dirtyType)
Marks this project modified and sets modification type without checking previous project's dirty type.
|
void |
setDirty(boolean dirty)
Deprecated.
Use
. |
void |
setDirty(boolean dirty,
StateChangeHandler.DirtyType dirtyType)
Marks this project modified and sets modification type depending on previous type.
|
cloneaccept, accept, addPropertyChangeListener, atInsert, canAdd, canAdd, canAddChild, canAddChild, canAddInstance, canBeDeleted, canChangeParent, canDeleteChild, compareTo, createSortKeys, dispose, firePropertyChange, generateID, getClassType, getCommandForAppending, getHumanName, getHumanType, getID, getObjectParent, getProject, getProjectImpl, getResourceID, getSortKeys, hasListeners, isEditable, isParentOf, removeAllChildren, removeAllParents, removeAllPropertyChangeListeners, removePropertyChangeListener, setID, setMDElement, sGetID, toStringequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitupdateByEnvironmentProperties@OpenApi public static final java.lang.String COMMAND_EXECUTED
@OpenApi @Deprecated public static final java.lang.String SELECTION_CHANGED
SelectionProvider.SelectionChangedListener
The diagram objects selecting event type and naming.@OpenApi public static final java.lang.String DIAGRAM_OPENED
@OpenApi public static final java.lang.String DIAGRAM_CLOSED
@OpenApi public static final java.lang.String DIAGRAM_EDITED
@OpenApi public static final java.lang.String DIAGRAM_ACTIVATED
@OpenApi public static final java.lang.String DIAGRAM_WINDOW_ACTIVATED
@OpenApi public ProxyManager getProxyManager()
@OpenApi public Browser getBrowser()
@OpenApi public ProjectOptions getOptions()
@CheckForNull @OpenApi public DiagramPresentationElement getActiveDiagram()
DiagramPresentationElement@OpenApi public java.util.Collection<DiagramPresentationElement> getDiagrams()
DiagramPresentationElement@OpenApi public java.util.Collection<DiagramPresentationElement> getDiagrams(@CheckForNull java.lang.String type)
type - the given diagrams type. Returns all diagrams if type is null.DiagramPresentationElement@CheckForNull @OpenApi public DiagramPresentationElement getDiagram(Diagram diagramElement)
diagramElement - diagram model element@CheckForNull @OpenApi public java.lang.String getFileName()
@OpenApi public java.lang.String getName()
@OpenApi public boolean isRemote()
@OpenApi public boolean isTeamworkServerProject()
@OpenApi public boolean isEsiProject()
true if ESI project, false otherwise@OpenApi public boolean isDirty()
@Deprecated @OpenApi public void setDirty(boolean dirty)
#setDirty(boolean dirty, DirtyType dirtyType).dirty - new dirty flag.@OpenApi
public void setDirty(boolean dirty,
StateChangeHandler.DirtyType dirtyType)
dirty - new dirty flag.dirtyType - specifies how much dirty is project.
dirtyType == null, then default dirtyType
value (DirtyType.HARD_DIRTY) is set.
dirty == true && dirtyType == DirtyType.SOFT_DIRTY and
project is already in state dirty == true && dirtyType == DirtyType.HARD_DIRTY,
then project's state is not going to be changed.@OpenApi public StateChangeHandler.DirtyType getDirtyType()
@OpenApi
public void reSetDirty(boolean dirty,
StateChangeHandler.DirtyType dirtyType)
dirty - new dirty flag.dirtyType - specifies how much dirty is project.
If dirtyType == null, then default dirtyType
value (DirtyType.HARD_DIRTY) is set.@OpenApi public void addToProjectRepository(Element element)
getElementByID(String).element - any element@OpenApi @CheckForNull public BaseElement getElementByID(@CheckForNull java.lang.String id)
getElementByID in interface com.nomagic.uml2.ext.jmi.reflect.ElementRegistryid - the id of the element.@OpenApi public static boolean isElementDisposed(Element element)
element - element@OpenApi public boolean isDisposed(BaseElement element)
element - element@OpenApi public AbstractRepository getRepository()
getRepository in interface com.nomagic.uml2.ext.jmi.reflect.RepositoryProvider@OpenApi public ElementsFactory getElementsFactory()
@OpenApi public SmartEventSupport getSmartEventSupport()
@OpenApi @Deprecated @CheckForNull public Model getModel()
getModels() or getPrimaryModel() should be used instead as needed.java.lang.IllegalStateException - in case root element is not a Model, but a Package@OpenApi public Package getPrimaryModel()
@OpenApi public java.util.List<Package> getModels()
@OpenApi public SymbolElementMap getSymbolElementMap()
@OpenApi public RepositoryListenerRegistry getRepositoryListenerRegistry()
@OpenApi public static Project getProject(@CheckForNull BaseElement element)
element - project element.@OpenApi public IPrimaryProject getPrimaryProject()