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

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.jface.text
Interface ISlaveDocumentManager

All Known Implementing Classes:
ChildDocumentManager, ProjectionDocumentManager

public interface ISlaveDocumentManager

Slave documents are documents whose contents is defined in terms of a master document. Thus, slave documents usually reflect a projection of the master document. Slave documents are causally connected to the master document. This means, changes of the master document have immediate effect on the slave document and vice versa.

A slave document manager creates slave documents for given master documents, manages the life cycle of the slave documents, and keeps track of the information flow between master and slave documents. The slave document manager defines the construction rules of the slave documents in terms of the master document.

In order to provided backward compatibility for clients of ISlaveDocumentManager, extension interfaces are used to provide a means of evolution. The following extension interfaces exist:

Since:
2.1
See Also:
IDocument

Method Summary
  IDocumentInformationMapping createMasterSlaveMapping ( IDocument slave)
          Creates a new document information mapping between the given slave document and its master document.
  IDocument createSlaveDocument ( IDocument master)
          Creates a new slave document for the given master document.
 void freeSlaveDocument ( IDocument slave)
          Frees the given slave document.
  IDocument getMasterDocument ( IDocument slave)
          Returns the master document of the given slave document or null if the given document is unknown to this slave document manager.
 boolean isSlaveDocument ( IDocument document)
          Returns whether the given document is a slave document known to this slave document manager.
 void setAutoExpandMode ( IDocument slave, boolean autoExpand)
          Sets the given slave document's auto expand mode.
 

Method Detail

createSlaveDocument


IDocument createSlaveDocument(
IDocument master)
Creates a new slave document for the given master document. The slave document is causally connected to its master document until freeSlaveDocument is called. The connection between the newly created slave document and the master document is managed by this slave document manager.

Parameters:
master - the master document
Returns:
the newly created slave document
See Also:
freeSlaveDocument(IDocument)

freeSlaveDocument

void freeSlaveDocument(
IDocument slave)
Frees the given slave document. If the given document is not a slave document known to this slave document manager, this call does not have any effect. A slave document is known to this slave document manager if it has been created by this manager using createSlaveDocument.

Parameters:
slave - the slave document to be freed
See Also:
createSlaveDocument(IDocument)

createMasterSlaveMapping


IDocumentInformationMapping createMasterSlaveMapping(
IDocument slave)
Creates a new document information mapping between the given slave document and its master document. Returns null if the given document is unknown to this slave document manager.

Parameters:
slave - the slave document
Returns:
a document information mapping between the slave document and its master document or null

getMasterDocument


IDocument getMasterDocument(
IDocument slave)
Returns the master document of the given slave document or null if the given document is unknown to this slave document manager.

Parameters:
slave - the slave document
Returns:
the master document of the given slave document or null

isSlaveDocument

boolean isSlaveDocument(
IDocument document)
Returns whether the given document is a slave document known to this slave document manager. A slave document is known to this slave document manager, if the document has been created by this manager.

Parameters:
document - the document to be checked whether it is a slave document known to this manager
Returns:
true if the document is a slave document, false otherwise

setAutoExpandMode

void setAutoExpandMode(
IDocument slave,
                       boolean autoExpand)
Sets the given slave document's auto expand mode. In auto expand mode, a slave document is automatically adapted to reflect all changes applied to it's master document. Assume a master document contains 30 lines and the slave is defined to contain the lines 11-20. In auto expand mode, when the master document is changed at line 8, the slave document is expanded to contain the lines 8-20.

This call is without effect if the given document is unknown to this slave document manager.

Parameters:
slave - the slave whose auto expand mode should be set
autoExpand - true for auto expand, false otherwise

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


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