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

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.jface.text.link
Class LinkedPositionGroup

java.lang.Object
  extended by 
org.eclipse.jface.text.link.LinkedPositionGroup

public class LinkedPositionGroup
extends Object

A group of positions in multiple documents that are simultaneously modified - if one gets edited, all other positions in a group are edited the same way. All linked positions in a group have the same content.

Normally, new positions are given a tab stop weight which can be used by clients, e.g. the UI. If no weight is given, a position will not be visited. If no weights are used at all, the first position in a document is taken as the only stop as to comply with the behavior of the old linked position infrastructure.

Clients may instantiate this class.

Since:
3.0
Restriction:
This class is not intended to be subclassed by clients.

Field Summary
static int NO_STOP
          Sequence constant declaring that a position should not be stopped by.
 
Constructor Summary
LinkedPositionGroup ()
           
 
Method Summary
 void addPosition ( LinkedPosition position)
          Adds a position to this group.
  LinkedPosition[] getPositions ()
          Returns the positions contained in the receiver as an array.
 boolean isEmpty ()
          Returns whether this group contains any positions.
 boolean isEmtpy ()
          Deprecated. As of 3.1, replaced by isEmpty()
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NO_STOP

public static final int NO_STOP
Sequence constant declaring that a position should not be stopped by.

See Also:
Constant Field Values
Constructor Detail

LinkedPositionGroup

public LinkedPositionGroup()
Method Detail

addPosition

public void addPosition(
LinkedPosition position)
                 throws 
BadLocationException
Adds a position to this group. The document region defined by the position must contain the same content (and thus have the same length) as any of the other positions already in this group. Additionally, all positions added must be disjoint; otherwise a BadLocationException is thrown.

Positions added using this method are owned by this group afterwards and may not be updated or modified thereafter.

Once a group has been added to a LinkedModeModel, it becomes sealed and no positions may be added any more.

Parameters:
position - the position to add
Throws:
BadLocationException - if the position is invalid or conflicts with other positions in the group
IllegalStateException - if the group has already been added to a model

isEmpty

public boolean isEmpty()
Returns whether this group contains any positions.

Returns:
true if this group is empty, false otherwise
Since:
3.1

isEmtpy

public boolean isEmtpy()
Deprecated. As of 3.1, replaced by isEmpty()

Returns whether this group contains any positions.

Returns:
true if this group is empty, false otherwise

getPositions

public 
LinkedPosition[] getPositions()
Returns the positions contained in the receiver as an array. The positions are the actual positions and must not be modified; the array is a copy of internal structures.

Returns:
the positions of this group in no particular order

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