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.ltk.ui.refactoring.model
Class AbstractSynchronizationLabelProvider


java.lang.Object
  extended by 

org.eclipse.team.ui.synchronize.AbstractSynchronizeLabelProvider
      extended by 

org.eclipse.team.ui.mapping.SynchronizationLabelProvider
          extended by 
org.eclipse.ltk.ui.refactoring.model.AbstractSynchronizationLabelProvider
All Implemented Interfaces:
IBaseLabelProvider, IFontProvider, ILabelProvider, ICommonLabelProvider, IDescriptionProvider, IMementoAware

public abstract class AbstractSynchronizationLabelProvider
extends SynchronizationLabelProvider

Partial implementation of a refactoring-aware synchronization label provider.

This class overrides several methods from SynchronizationLabelProvider to customize the rendering of refactoring history objects in team synchronization views.

Note: this class is designed to be extended by clients. Programming language implementers who need refactoring support in a synchronization label provider used in team synchronization views may use this class as a basis for refactoring-aware synchronization label providers.

Since:
3.2
See Also:
SynchronizationLabelProvider

Constructor Summary
AbstractSynchronizationLabelProvider ()
           
 
Method Summary
protected   String decorateText ( String base, Object element)
          Decorate the text with the appropriate diff decorations.
protected   IDiff getDiff ( Object element)
          Return the sync kind of the given element.
protected  int getDirection ( Object element)
          Returns the direction of the difference of the specified refactoring history object.
protected  int getKind ( Object element)
          Returns the kind of difference between the three sides ancestor, left and right of the specified refactoring history object.
 
Methods inherited from class org.eclipse.team.ui.mapping. SynchronizationLabelProvider
getContext, getDescription, getExtensionSite, getImage, getModelRoot, getScope, getText, init, isDecorationEnabled, restoreState, saveState
 
Methods inherited from class org.eclipse.team.ui.synchronize. AbstractSynchronizeLabelProvider
addListener, decorateImage, dispose, getDelegateImage, getDelegateLabelProvider, getDelegateText, getFont, getMarkerSeverity, hasDecendantConflicts, isBusy, isIncludeOverlays, isLabelProperty, isSyncInfoInTextEnabled, removeListener
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.jface.viewers. IBaseLabelProvider
addListener, dispose, isLabelProperty, removeListener
 
Methods inherited from interface org.eclipse.jface.viewers. IFontProvider
getFont
 

Constructor Detail

AbstractSynchronizationLabelProvider

public AbstractSynchronizationLabelProvider()
Method Detail

decorateText

protected 
String decorateText(
String base,
                              
Object element)
Decorate the text with the appropriate diff decorations. By default, this method uses the diff associated with the given element to determine how to decorate the text.

Overrides:
decorateText in class AbstractSynchronizeLabelProvider
Parameters:
base - the base text to be decorated.
element - the element
Returns:
the text decorated appropriately using the diff associated with the element
See Also:
AbstractSynchronizeLabelProvider.getDiff(Object)

getDiff

protected 
IDiff getDiff(
Object element)
Return the sync kind of the given element. This is used to determine how to decorate the image and label of the element. The sync kind is described in the SyncInfo class. A null is returned by default.

Overrides:
getDiff in class AbstractSynchronizeLabelProvider
Parameters:
element - the element being tested
Returns:
the sync kind of the given element

getDirection

protected int getDirection(
Object element)
Returns the direction of the difference of the specified refactoring history object.

The result of this method is used to compose an icon which reflects the direction of the difference between the two or three versions of the refactoring history object.

Parameters:
element - the refactoring history object
Returns:
the direction of the difference
See Also:
IThreeWayDiff.getDirection()

getKind

protected int getKind(
Object element)
Returns the kind of difference between the three sides ancestor, left and right of the specified refactoring history object.

The result of this method is used to compose an icon which reflects the kind of difference between the two or three versions of the refactoring history object.

Parameters:
element - the refactoring history object
Returns:
the kind of difference
See Also:
IDiff.getKind()

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