|
Runtime | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.gmf.runtime.diagram.ui.resources.editor.util.DiagramFileCreator
public abstract class DiagramFileCreator
Constructor Summary | |
---|---|
DiagramFileCreator()
|
Method Summary | |
---|---|
java.lang.String |
appendExtensionToFileName(java.lang.String szFileName)
Given a string representing the possible file name, this function will ensure the proper extension is attached to it. |
protected void |
createFile(IFile fileHandle,
java.io.InputStream contents,
IProgressMonitor monitor)
Creates a file resource given the file handle and contents. |
IFile |
createNewFile(IPath containerPath,
java.lang.String fileName,
java.io.InputStream initialContents,
Shell shell,
IRunnableContext runContext)
Creates a new file cache given the name and containment path |
abstract java.lang.String |
getExtension()
|
protected Plugin |
getPlugin()
|
java.lang.String |
getUniqueFileName(IPath containerPath,
java.lang.String szFileName)
Returns a unique file name for a given path and file name |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DiagramFileCreator()
Method Detail |
---|
public abstract java.lang.String getExtension()
protected Plugin getPlugin()
public java.lang.String appendExtensionToFileName(java.lang.String szFileName)
szFileName
- String representing the file name.
public java.lang.String getUniqueFileName(IPath containerPath, java.lang.String szFileName)
containerPath
- the container's full pathszFileName
- original file name
protected void createFile(IFile fileHandle, java.io.InputStream contents, IProgressMonitor monitor) throws CoreException
fileHandle
- the file handle to create a file resource withcontents
- the initial contents of the new file resource, or
null
if none (equivalent to an empty stream)monitor
- the progress monitor to show visual progress with
CoreException
- if the operation fails
OperationCanceledException
- if the operation is canceledpublic IFile createNewFile(IPath containerPath, java.lang.String fileName, java.io.InputStream initialContents, Shell shell, IRunnableContext runContext)
containerPath
- - IPath Directory path where the file will be storedfileName
- - IPath Name of the file to be created.initialContents
- InputStream of the initial contents of the file if desired.shell
- SWT Shell object as a context so that error messages / progress can be displayed.runContext
- IRunnableContext object which will run the file creation operation.
|
Runtime | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.