Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Runtime

org.eclipse.gmf.runtime.diagram.ui.resources.editor.ide.document
Class StorageDiagramDocumentProvider

java.lang.Object
  extended by 

org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.AbstractDocumentProvider
      extended by 

org.eclipse.gmf.runtime.diagram.ui.resources.editor.ide.document.StorageDocumentProvider
          extended by 
org.eclipse.gmf.runtime.diagram.ui.resources.editor.ide.document.StorageDiagramDocumentProvider
All Implemented Interfaces:
IDiagramDocumentProvider, IDocumentProvider

public class StorageDiagramDocumentProvider
extends StorageDocumentProvider
implements IDiagramDocumentProvider

An implementation of IDiagramDocumentProvider for connecting org.eclipse.ui.IStorageEditorInput and IDiagramDocument.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.gmf.runtime.diagram.ui.resources.editor.ide.document. StorageDocumentProvider
StorageDocumentProvider.StorageInfo
 
Nested classes/interfaces inherited from class org.eclipse.gmf.runtime.diagram.ui.resources.editor.document. AbstractDocumentProvider
AbstractDocumentProvider.DocumentProviderOperation, AbstractDocumentProvider.ElementInfo
 
Field Summary
 
Fields inherited from class org.eclipse.gmf.runtime.diagram.ui.resources.editor.document. AbstractDocumentProvider
PR10806_UC5_ENABLED, PR14469_ENABLED, STATUS_ERROR, STATUS_OK
 
Constructor Summary
StorageDiagramDocumentProvider ()
           
 
Method Summary
protected   IDocument createEmptyDocument ()
          Factory method for creating empty documents.
  IEditorInput createInputWithEditingDomain ( IEditorInput editorInput, org.eclipse.emf.transaction.TransactionalEditingDomain domain)
           
  AbstractDocumentProvider.ElementInfo createNewElementInfo ( IDocument document)
          Create a new ElementInfo
protected  void disposeElementInfo (java.lang.Object element, AbstractDocumentProvider.ElementInfo info)
          Disposes of the given element info object.
  IDiagramDocument getDiagramDocument (java.lang.Object element)
          Returns the diagram document.
protected  boolean setDocumentContent ( IDocument document, IEditorInput editorInput)
          Initializes the given document from the given editor input using the given character encoding.
protected  void setDocumentContentFromStorage ( IDocument document, IStorage storage)
          Initializes the given document with the given stream using the given encoding.
 
Methods inherited from class org.eclipse.gmf.runtime.diagram.ui.resources.editor.ide.document. StorageDocumentProvider
createDocument, createElementInfo, doSaveDocument, doUpdateStateCache, getOperationRunner, handleCoreException, isModifiable, isReadOnly, setupDocument, updateCache
 
Methods inherited from class org.eclipse.gmf.runtime.diagram.ui.resources.editor.document. AbstractDocumentProvider
aboutToChange, addElementStateListener, addUnchangedElementListeners, canSaveDocument, changed, connect, connected, disconnect, disconnected, doResetDocument, doSynchronize, doValidateState, executeOperation, fireElementContentAboutToBeReplaced, fireElementContentReplaced, fireElementDeleted, fireElementDirtyStateChanged, fireElementMoved, fireElementStateChangeFailed, fireElementStateChanging, fireElementStateValidationChanged, getConnectedElements, getDocument, getElementInfo, getModificationStamp, getProgressMonitor, getResetOperation, getResetRule, getSaveOperation, getSaveRule, getStatus, getSynchronizationStamp, getSynchronizeRule, getValidateStateRule, invalidatesState, isDeleted, isStateValidated, isSynchronized, mustSaveDocument, removeElementStateListener, removeUnchangedElementListeners, resetDocument, saveDocument, setCanSaveDocument, setProgressMonitor, synchronize, updateStateCache, validateState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StorageDiagramDocumentProvider

public StorageDiagramDocumentProvider()
Method Detail

createEmptyDocument

protected 
IDocument createEmptyDocument()
Description copied from class: StorageDocumentProvider
Factory method for creating empty documents.

Specified by:
createEmptyDocument in class StorageDocumentProvider
Returns:
the newly created document

getDiagramDocument

public 
IDiagramDocument getDiagramDocument(java.lang.Object element)
Description copied from interface: IDiagramDocumentProvider
Returns the diagram document.

Specified by:
getDiagramDocument in interface IDiagramDocumentProvider
Parameters:
element - The Editor Input for which the diagram document is requred.
Returns:
the Diagram document.
See Also:
IDocumentProvider.getDocument(Object)

disposeElementInfo

protected void disposeElementInfo(java.lang.Object element,
                                  
AbstractDocumentProvider.ElementInfo info)
Description copied from class: AbstractDocumentProvider
Disposes of the given element info object.

This method is called when an element info is disposed. The AbstractDocumentProvider implementation of this method does nothing. Subclasses may reimplement.

Overrides:
disposeElementInfo in class AbstractDocumentProvider
Parameters:
element - the element
info - the element info object

setDocumentContentFromStorage

protected void setDocumentContentFromStorage(
IDocument document,
                                             
IStorage storage)
                                      throws 
CoreException
Description copied from class: StorageDocumentProvider
Initializes the given document with the given stream using the given encoding.

Specified by:
setDocumentContentFromStorage in class StorageDocumentProvider
Parameters:
document - the document to be initialized
Throws:
CoreException - if the given stream can not be read

setDocumentContent

protected boolean setDocumentContent(
IDocument document,
                                     
IEditorInput editorInput)
                              throws 
CoreException
Description copied from class: StorageDocumentProvider
Initializes the given document from the given editor input using the given character encoding.

Overrides:
setDocumentContent in class StorageDocumentProvider
Parameters:
document - the document to be initialized
editorInput - the input from which to derive the content of the document
Returns:
true if the document content could be set, false otherwise
Throws:
CoreException - if the given editor input cannot be accessed

createInputWithEditingDomain

public 
IEditorInput createInputWithEditingDomain(
IEditorInput editorInput,
                                                 org.eclipse.emf.transaction.TransactionalEditingDomain domain)
Specified by:
createInputWithEditingDomain in interface IDiagramDocumentProvider

createNewElementInfo

public 
AbstractDocumentProvider.ElementInfo createNewElementInfo(
IDocument document)
Description copied from class: StorageDocumentProvider
Create a new ElementInfo

Overrides:
createNewElementInfo in class StorageDocumentProvider
Returns:
ElementInfo

Runtime

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire