Package com.nomagic.magicdraw.core
Class ProjectSpecificLocationRegister
java.lang.Object
com.dassault_systemes.modeler.foundation.project.service.ModelElementProjectService<Project>
com.nomagic.magicdraw.core.project.service.ProjectService
com.nomagic.magicdraw.core.ProjectSpecificLocationRegister
- All Implemented Interfaces:
com.dassault_systemes.modeler.foundation.project.service.DisposableService
,FileLocationRegister
@OpenApi
public final class ProjectSpecificLocationRegister
extends com.nomagic.magicdraw.core.project.service.ProjectService
implements FileLocationRegister
This class is for storing file locations which depends on project.
All locations stored is project specific.
-
Method Summary
Modifier and TypeMethodDescriptiongetInstance
(Project prj) Method to get instance.void
setFileLocation
(String locationNameID, File file) Before saving file locations file is checked if it still exist.Methods inherited from class com.dassault_systemes.modeler.foundation.project.service.ModelElementProjectService
disposeService, getIfPresent, getOrCreateInstance, getOrCreateInstanceWithNullSupport, getReferencedProject
-
Method Details
-
getInstance
Method to get instance.- Parameters:
prj
- project type object.- Returns:
- ProjectSpecificLocationRegister instance.
-
setFileLocation
Before saving file locations file is checked if it still exist. It is done because user may delete directory, rename it, move it... If file location does not exist anymore default(project directory) location is used.- Specified by:
setFileLocation
in interfaceFileLocationRegister
- Parameters:
locationNameID
- a unique id for storing/getting file locations.file
- type object
-