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

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.document
Interface IDocumentEditor

All Known Implementing Classes:
DiagramDocumentEditor, FileDiagramEditor, FileDiagramEditorWithFlyoutPalette, IDEDiagramDocumentEditor

public interface IDocumentEditor

An interface to be implemented by all the editors displaying a diagram


Method Summary
 void close (boolean save)
          Closes this text editor after optionally saving changes.
  IDocumentProvider getDocumentProvider ()
          Returns this text editor's document provider.
 boolean isEditable ()
          Returns whether the text in this text editor can be changed by the user.
 boolean isEditorInputModifiable ()
          Returns whether the editor's input can be persistently be modified.
 boolean isEditorInputReadOnly ()
          Returns whether the editor's input is read-only.
 boolean validateEditorInputState ()
          Validates the state of the given editor input.
 

Method Detail

getDocumentProvider

IDocumentProvider getDocumentProvider()
Returns this text editor's document provider.

Returns:
the document provider or null if none, e.g. after closing the editor

close

void close(boolean save)
Closes this text editor after optionally saving changes.

Parameters:
save - true if unsaved changed should be saved, and false if unsaved changed should be discarded

isEditable

boolean isEditable()
Returns whether the text in this text editor can be changed by the user.

Returns:
true if it can be edited, and false if it is read-only

isEditorInputReadOnly

boolean isEditorInputReadOnly()
Returns whether the editor's input is read-only. The semantics of this method is orthogonal to isEditable as it talks about the editor input, i.e. the domain element, and not about the editor document.

Returns:
true if the editor input is read-only

isEditorInputModifiable

boolean isEditorInputModifiable()
Returns whether the editor's input can be persistently be modified. This is orthogonal to ITextEditorExtension.isEditorInputReadOnly as read-only elements may be modifiable and writable elements may not be modifiable. If the given element is not connected to this document provider, the result is undefined. Document providers are allowed to use a cache to answer this question, i.e. there can be a difference between the "real" state of the element and the return value.

Returns:
true if the editor input is modifiable

validateEditorInputState

boolean validateEditorInputState()
Validates the state of the given editor input. The predominate intent of this method is to take any action probably necessary to ensure that the input can persistently be changed.

Returns:
true if the input was validated, false otherwise

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