public abstract class LogicalModelExtender extends java.lang.Object implements ILogicalModelExtender
Constructor and Description |
---|
LogicalModelExtender() |
Modifier and Type | Method and Description |
---|---|
org.eclipse.core.resources.IFile |
findCorrespondingRootModelFile(org.eclipse.core.resources.IFile localRootModelFile,
IFileStorage storage)
Finds the corresponding root model file from the given file system
storage.
|
protected static org.eclipse.core.resources.IFile |
findFileInWorkspace(java.io.File file) |
org.eclipse.core.resources.IFile |
findRootModelFileFromSubUnit(org.eclipse.core.resources.IFile localSubUnitFile,
IFileStorage storage)
Finds the root model file that reference the given subunit.
|
SubUnitFile[] |
getAllSubUnitFiles(org.eclipse.core.resources.IFile rootModelFile,
IFileStorage storage)
Computes list of subunit files from the given root model file.
|
protected java.lang.String |
getExtenderCustomData() |
java.lang.String |
getModelFileLabel(java.io.File modelFile) |
java.lang.String |
getModelId(java.io.InputStream is)
Extracts the model id from the file content
|
java.lang.String[] |
getRootModelFileExtensions()
Returns list of subunit file extensions
|
java.lang.String[] |
getSubUnitFileExtensions()
Returns list of subunit file extensions
|
boolean |
isRootModelFile(org.eclipse.core.resources.IFile file,
IFileStorage storage)
Returns true if the given file is a root model file.
|
boolean |
isRootModelFileExtension(java.lang.String fileExtension)
Determines if the given file extension is the root model file extension
|
boolean |
isSubUnitFile(org.eclipse.core.resources.IFile file,
IFileStorage storage)
Returns true if the given file is a subunit file.
|
boolean |
isSubUnitFileExtension(java.lang.String fileExtension)
Determines if the given file extension is the subunit file extension
|
void |
setCustomData(java.lang.String customData)
Sets the custom Data from the extension declaration.
|
void |
setFileExtensions(java.lang.String rootModelFileExtensions,
java.lang.String subunitFileExtensions)
Sets the file extensions of root model files and subunit files from the
extension declaration.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
canParseSubUnitReferences, getLogicalModelLabel, getModelFileLabel, isModelHasUniqueId, parseClosureSubUnitReferences, parseSubUnitReferences
public boolean isSubUnitFileExtension(java.lang.String fileExtension)
ILogicalModelExtender
isSubUnitFileExtension
in interface ILogicalModelExtender
fileExtension
- -
file extensionpublic boolean isRootModelFileExtension(java.lang.String fileExtension)
ILogicalModelExtender
isRootModelFileExtension
in interface ILogicalModelExtender
fileExtension
- -
file extensionpublic boolean isSubUnitFile(org.eclipse.core.resources.IFile file, IFileStorage storage)
ILogicalModelExtender
isSubUnitFile
in interface ILogicalModelExtender
file
- -
subunit file.storage
- -
storage that holds the file content.public boolean isRootModelFile(org.eclipse.core.resources.IFile file, IFileStorage storage)
ILogicalModelExtender
isRootModelFile
in interface ILogicalModelExtender
file
- -
subunit file.storage
- -
storage that holds the file content.public org.eclipse.core.resources.IFile findCorrespondingRootModelFile(org.eclipse.core.resources.IFile localRootModelFile, IFileStorage storage)
ILogicalModelExtender
findCorrespondingRootModelFile
in interface ILogicalModelExtender
localRootModelFile
- -
file in local workspace.storage
- -
storage that holds the file content and directory infopublic org.eclipse.core.resources.IFile findRootModelFileFromSubUnit(org.eclipse.core.resources.IFile localSubUnitFile, IFileStorage storage)
ILogicalModelExtender
findRootModelFileFromSubUnit
in interface ILogicalModelExtender
localSubUnitFile
- -
The local subunit file.storage
- -
storage that holds the file content and directory info.public SubUnitFile[] getAllSubUnitFiles(org.eclipse.core.resources.IFile rootModelFile, IFileStorage storage)
ILogicalModelExtender
getAllSubUnitFiles
in interface ILogicalModelExtender
rootModelFile
- -
Root model file.storage
- -
storage that holds the file content and directory infopublic java.lang.String getModelFileLabel(java.io.File modelFile)
public java.lang.String getModelId(java.io.InputStream is)
ILogicalModelExtender
getModelId
in interface ILogicalModelExtender
public void setCustomData(java.lang.String customData)
ILogicalModelExtender
setCustomData
in interface ILogicalModelExtender
customData
- - String data from the extension declaration.protected java.lang.String getExtenderCustomData()
public void setFileExtensions(java.lang.String rootModelFileExtensions, java.lang.String subunitFileExtensions)
ILogicalModelExtender
setFileExtensions
in interface ILogicalModelExtender
rootModelFileExtensions
- -
list of comma separated root model file extensions.subunitFileExtensions
- -
list of comma separated subunit file extensions.public java.lang.String[] getSubUnitFileExtensions()
ILogicalModelExtender
getSubUnitFileExtensions
in interface ILogicalModelExtender
public java.lang.String[] getRootModelFileExtensions()
ILogicalModelExtender
getRootModelFileExtensions
in interface ILogicalModelExtender
protected static org.eclipse.core.resources.IFile findFileInWorkspace(java.io.File file)