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.revisions
Class Revision

java.lang.Object
  extended by 
org.eclipse.jface.text.revisions.Revision

public abstract class Revision
extends Object

Describes a revision of a document. A revision consists of one ore more ILineRanges.

Clients may subclass.

Since:
3.2

Constructor Summary
protected Revision ()
          Creates a new revision.
 
Method Summary
 void addRange ( ILineRange range)
          Adds a line range to this revision.
  String getAuthor ()
          Returns the display string for the author of this revision.
abstract   RGB getColor ()
          Returns the author color for this revision.
abstract   Date getDate ()
          Returns the modification date of this revision.
abstract   Object getHoverInfo ()
          Returns the hover information that will be shown when the user hovers over the a change region of this revision.
abstract   String getId ()
          Returns the unique (within the document) id of this revision.
  List getRegions ()
          Returns the contained RevisionRanges adapted to the current diff state.
  String toString ()
           
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Revision

protected Revision()
Creates a new revision.

Method Detail

addRange

public final void addRange(
ILineRange range)
                    throws 
IndexOutOfBoundsException
Adds a line range to this revision. The range must be non-empty and have a legal start line (not -1).

Parameters:
range - a line range that was changed with this revision
Throws:
IndexOutOfBoundsException - if the line range is empty or has a negative start line

getRegions

public final 
List getRegions()
Returns the contained RevisionRanges adapted to the current diff state. The returned information is only valid at the moment it is returned, and may change as the annotated document is modified.

Returns:
an unmodifiable view of the contained ranges (element type: RevisionRange)

getHoverInfo

public abstract 
Object getHoverInfo()
Returns the hover information that will be shown when the user hovers over the a change region of this revision.

Note: The hover information control which is used to display the information must be able process the given object. If the default information control creator is used the supported format is simple text, full HTML or an HTML fragment.

Returns:
the hover information for this revision or null for no hover
See Also:
RevisionInformation.setHoverControlCreator(IInformationControlCreator)

getColor

public abstract 
RGB getColor()
Returns the author color for this revision. This color can be used to visually distinguish one revision from another, for example as background color.

Revisions from the same author must return the same color and revisions from different authors must return distinct colors.

Returns:
the RGB color for this revision's author

getId

public abstract 
String getId()
Returns the unique (within the document) id of this revision. This may be the version string or a different identifier.

Returns:
the id of this revision

getDate

public abstract 
Date getDate()
Returns the modification date of this revision.

Returns:
the modification date of this revision

toString

public 
String toString()
Overrides:
toString in class Object

getAuthor

public 
String getAuthor()
Returns the display string for the author of this revision.

Subclasses should replace - the default implementation returns the empty string.

Returns:
the author name
Since:
3.3

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