Package org.palladiosimulator.protocom
Class PCMEclipseResourceFileSystemAccess2
- java.lang.Object
-
- org.eclipse.xtext.generator.AbstractFileSystemAccess
-
- org.eclipse.xtext.generator.AbstractFileSystemAccess2
-
- org.palladiosimulator.protocom.PCMEclipseResourceFileSystemAccess2
-
- All Implemented Interfaces:
org.eclipse.xtext.generator.IFileSystemAccess
,org.eclipse.xtext.generator.IFileSystemAccess2
,org.eclipse.xtext.generator.IFileSystemAccessExtension
,org.eclipse.xtext.generator.IFileSystemAccessExtension2
,org.eclipse.xtext.generator.IFileSystemAccessExtension3
public class PCMEclipseResourceFileSystemAccess2 extends org.eclipse.xtext.generator.AbstractFileSystemAccess2
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
PCMEclipseResourceFileSystemAccess2.IFileCallback
-
Constructor Summary
Constructors Constructor Description PCMEclipseResourceFileSystemAccess2()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected void
createContainer(IContainer container)
protected void
createFolder(IFolder folder)
Deprecated.usecreateContainer(IContainer)
insteadvoid
deleteFile(String fileName, String outputName)
void
deleteFile(IFile file, String outputName, IProgressMonitor monitor)
void
deleteFile(IFile file, IProgressMonitor monitor)
protected void
ensureExists(IContainer container)
protected boolean
ensureOutputConfigurationDirectoryExists(org.eclipse.xtext.generator.OutputConfiguration outputConfig)
protected void
ensureParentExists(IFile file)
void
flushSourceTraces(String generatorName)
Can be used to announce that a builder participant is done with this file system access and all potentially recorded trace information should be persisted.void
generateFile(String fileName, String outputName, InputStream content)
void
generateFile(String fileName, String outputName, CharSequence contents)
protected PCMEclipseResourceFileSystemAccess2.IFileCallback
getCallBack()
protected IContainer
getContainer(org.eclipse.xtext.generator.OutputConfiguration outputConfig)
protected String
getEncoding(IFile file)
protected IFile
getFile(String fileName, String outputName)
protected IFile
getFile(String fileName, String outputName, IProgressMonitor progressMonitor)
protected IFolder
getFolder(org.eclipse.xtext.generator.OutputConfiguration outputConfig)
Deprecated.usegetContainer(OutputConfiguration)
insteadprotected org.eclipse.xtext.util.StringInputStream
getInputStream(String contentsAsString, String encoding)
protected IProgressMonitor
getMonitor()
protected IProject
getProject()
protected IProject
getProjectContext(Resource resource)
protected IFile
getSmapFile(IFile javaSourceFile)
Deprecated.protected com.google.common.collect.Multimap<URI,IPath>
getSourceTraces()
URI
getURI(String path, String outputConfiguration)
We cannot use the storage to URI mapper here, as it only works for Xtext based languagesURI
getURI(String path, String outputName, IProgressMonitor progressMonitor)
URI
getURI(String path, IProgressMonitor progressMonitor)
protected boolean
hasContentsChanged(IFile file, InputStream newContent)
protected boolean
hasContentsChanged(IFile file, org.eclipse.xtext.util.StringInputStream newContent)
InputStream
readBinaryFile(String fileName, String outputCfgName)
InputStream
readBinaryFile(String fileName, String outputCfgName, IProgressMonitor progressMonitor)
InputStream
readBinaryFile(String fileName, IProgressMonitor progressMonitor)
CharSequence
readTextFile(String fileName, String outputCfgName)
CharSequence
readTextFile(String fileName, String outputCfgName, IProgressMonitor progressMonitor)
CharSequence
readTextFile(String fileName, IProgressMonitor progressMonitor)
protected void
resetSourceTraces()
void
setContext(Object context)
protected void
setDerived(IFile file, boolean derived)
void
setMonitor(IProgressMonitor monitor)
void
setPostProcessor(PCMEclipseResourceFileSystemAccess2.IFileCallback callBack)
void
setProject(IProject project)
-
Methods inherited from class org.eclipse.xtext.generator.AbstractFileSystemAccess2
generateFile, isFile, isFile, readBinaryFile, readTextFile
-
Methods inherited from class org.eclipse.xtext.generator.AbstractFileSystemAccess
deleteFile, generateFile, getCurrentSource, getOutputConfig, getOutputConfigurations, getPathes, getURI, postProcess, postProcess, setCurrentSource, setOutputConfigurations, setOutputPath, setOutputPath
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Method Detail
-
getSourceTraces
protected com.google.common.collect.Multimap<URI,IPath> getSourceTraces()
- Since:
- 2.4
-
resetSourceTraces
protected void resetSourceTraces()
- Since:
- 2.4
-
getCallBack
protected PCMEclipseResourceFileSystemAccess2.IFileCallback getCallBack()
- Since:
- 2.3
-
setProject
public void setProject(IProject project)
-
setContext
public void setContext(Object context)
- Overrides:
setContext
in classorg.eclipse.xtext.generator.AbstractFileSystemAccess2
-
getProject
protected IProject getProject()
- Since:
- 2.6
-
setMonitor
public void setMonitor(IProgressMonitor monitor)
-
setPostProcessor
public void setPostProcessor(PCMEclipseResourceFileSystemAccess2.IFileCallback callBack)
-
getMonitor
protected IProgressMonitor getMonitor()
-
ensureOutputConfigurationDirectoryExists
protected boolean ensureOutputConfigurationDirectoryExists(org.eclipse.xtext.generator.OutputConfiguration outputConfig)
- Since:
- 2.4
-
generateFile
public void generateFile(String fileName, String outputName, CharSequence contents)
-
generateFile
public void generateFile(String fileName, String outputName, InputStream content)
- Since:
- 2.4
-
getEncoding
protected String getEncoding(IFile file) throws CoreException
- Throws:
CoreException
- Since:
- 2.3
-
setDerived
protected void setDerived(IFile file, boolean derived) throws CoreException
- Throws:
CoreException
- Since:
- 2.3
-
createFolder
@Deprecated protected void createFolder(IFolder folder) throws CoreException
Deprecated.usecreateContainer(IContainer)
instead- Throws:
CoreException
-
createContainer
protected void createContainer(IContainer container) throws CoreException
- Throws:
CoreException
- Since:
- 2.4
-
ensureParentExists
protected void ensureParentExists(IFile file) throws CoreException
- Throws:
CoreException
-
ensureExists
protected void ensureExists(IContainer container) throws CoreException
- Throws:
CoreException
-
getInputStream
protected org.eclipse.xtext.util.StringInputStream getInputStream(String contentsAsString, String encoding)
-
getFolder
@Deprecated protected IFolder getFolder(org.eclipse.xtext.generator.OutputConfiguration outputConfig)
Deprecated.usegetContainer(OutputConfiguration)
instead
-
getContainer
protected IContainer getContainer(org.eclipse.xtext.generator.OutputConfiguration outputConfig)
- Since:
- 2.4
-
hasContentsChanged
protected boolean hasContentsChanged(IFile file, org.eclipse.xtext.util.StringInputStream newContent)
-
hasContentsChanged
protected boolean hasContentsChanged(IFile file, InputStream newContent)
- Since:
- 2.4
-
getSmapFile
@Deprecated protected IFile getSmapFile(IFile javaSourceFile)
Deprecated.- Since:
- 2.3
-
flushSourceTraces
public void flushSourceTraces(String generatorName) throws CoreException
Can be used to announce that a builder participant is done with this file system access and all potentially recorded trace information should be persisted.- Parameters:
generatorName
- the name of the generator.- Throws:
CoreException
- Since:
- 2.3
-
deleteFile
public void deleteFile(String fileName, String outputName)
- Specified by:
deleteFile
in interfaceorg.eclipse.xtext.generator.IFileSystemAccessExtension
- Overrides:
deleteFile
in classorg.eclipse.xtext.generator.AbstractFileSystemAccess
-
deleteFile
public void deleteFile(IFile file, IProgressMonitor monitor) throws CoreException
- Throws:
CoreException
- Since:
- 2.3
-
deleteFile
public void deleteFile(IFile file, String outputName, IProgressMonitor monitor) throws CoreException
- Throws:
CoreException
- Since:
- 2.5
-
getFile
protected IFile getFile(String fileName, String outputName, IProgressMonitor progressMonitor)
- Since:
- 2.7
-
getURI
public URI getURI(String path, IProgressMonitor progressMonitor)
- Since:
- 2.7
-
getURI
public URI getURI(String path, String outputConfiguration)
We cannot use the storage to URI mapper here, as it only works for Xtext based languages- Since:
- 2.3
-
getURI
public URI getURI(String path, String outputName, IProgressMonitor progressMonitor)
- Since:
- 2.7
-
readBinaryFile
public InputStream readBinaryFile(String fileName, IProgressMonitor progressMonitor)
- Since:
- 2.7
-
readBinaryFile
public InputStream readBinaryFile(String fileName, String outputCfgName) throws org.eclipse.xtext.util.RuntimeIOException
- Throws:
org.eclipse.xtext.util.RuntimeIOException
- Since:
- 2.4
-
readBinaryFile
public InputStream readBinaryFile(String fileName, String outputCfgName, IProgressMonitor progressMonitor) throws org.eclipse.xtext.util.RuntimeIOException
- Throws:
org.eclipse.xtext.util.RuntimeIOException
- Since:
- 2.7
-
readTextFile
public CharSequence readTextFile(String fileName, IProgressMonitor progressMonitor)
- Since:
- 2.7
-
readTextFile
public CharSequence readTextFile(String fileName, String outputCfgName) throws org.eclipse.xtext.util.RuntimeIOException
- Throws:
org.eclipse.xtext.util.RuntimeIOException
- Since:
- 2.4
-
readTextFile
public CharSequence readTextFile(String fileName, String outputCfgName, IProgressMonitor progressMonitor) throws org.eclipse.xtext.util.RuntimeIOException
- Throws:
org.eclipse.xtext.util.RuntimeIOException
- Since:
- 2.7
-
-