Rational Developer for Power Systems Software
V7.6

com.ibm.etools.systems.application.visual.editor.providers
Class ApplicationModelDiagramDocumentProvider

java.lang.Object
  extended by DiagramInputDocumentProvider
      extended by com.ibm.etools.systems.application.visual.editor.providers.ApplicationModelDiagramDocumentProvider

public class ApplicationModelDiagramDocumentProvider
extends DiagramInputDocumentProvider

Document provider for Application Diagram.


Field Summary
protected  ApplicationModel appModel
           
static String copyright
           
protected  IEditorInput input
           
 
Constructor Summary
ApplicationModelDiagramDocumentProvider(IEditorInput input)
          Constructor.
 
Method Summary
protected  ElementInfo createElementInfo(Object element)
          Creates a new element info object for the given element.
protected  void disposeElementInfo(Object element, ElementInfo info)
          Disposes of the given element info object.
protected  void doSaveDocument(IProgressMonitor monitor, Object element, IDocument document, boolean overwrite)
           
protected  boolean getIgnoreResourceChange()
          Getter of ignoreResourceChange.
 boolean isModifiable(Object element)
           
 boolean isReadOnly(Object element)
           
 void saveAsDocument(IProgressMonitor monitor, Object element, IDocument document, IFile diagramFile, boolean overwrite)
          Save diagram to different file.
 void setDiagramResourceChangeMask(boolean ignoreResourceChange)
          Turn on or off the listening of diagram resource.
protected  void setIgnoreResourceChange(boolean ignoreResourceChange)
          Setter for ignoreResourceChange.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

copyright

public static final String copyright
See Also:
Constant Field Values

appModel

protected ApplicationModel appModel

input

protected IEditorInput input
Constructor Detail

ApplicationModelDiagramDocumentProvider

public ApplicationModelDiagramDocumentProvider(IEditorInput input)
Constructor.

Parameters:
input -
Method Detail

isReadOnly

public boolean isReadOnly(Object element)

isModifiable

public boolean isModifiable(Object element)

doSaveDocument

protected void doSaveDocument(IProgressMonitor monitor,
                              Object element,
                              IDocument document,
                              boolean overwrite)
                       throws CoreException
Throws:
CoreException

saveAsDocument

public void saveAsDocument(IProgressMonitor monitor,
                           Object element,
                           IDocument document,
                           IFile diagramFile,
                           boolean overwrite)
                    throws CoreException
Save diagram to different file.

Throws:
CoreException

disposeElementInfo

protected void disposeElementInfo(Object element,
                                  ElementInfo info)
Disposes of the given element info object.

See Also:
org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.AbstractDocumentProvider#disposeElementInfo(Object, ElementInfo)

createElementInfo

protected ElementInfo createElementInfo(Object element)
                                 throws CoreException
Creates a new element info object for the given element. Override to use Application Diagram specific modification listener.

Throws:
CoreException
See Also:
org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.DiagramInputDocumentProvider.createElementInfo(Object)

setDiagramResourceChangeMask

public void setDiagramResourceChangeMask(boolean ignoreResourceChange)
Turn on or off the listening of diagram resource.

Parameters:
ignoreResourceChange: - true to ingore diagram modification event, false otherwise.

getIgnoreResourceChange

protected boolean getIgnoreResourceChange()
Getter of ignoreResourceChange.


setIgnoreResourceChange

protected void setIgnoreResourceChange(boolean ignoreResourceChange)
Setter for ignoreResourceChange.


Rational Developer for Power Systems Software
V7.6

Copyright 2011 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.