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.team.core.mapping
Interface IStorageMerger

All Known Implementing Classes:
DelegatingStorageMerger

public interface IStorageMerger

This interface defines a single operation for performing a three-way merge on three instances of IStorage. The merged result is written to an output stream.

Clients must implement this interface when contributing new mergers to the org.eclipse.team.core.storageMergers extension point.

Since:
3.2

Field Summary
static int CONFLICT
          Indicates that a change conflict prevented the merge from successful completion (value 1)
static int INTERNAL_ERROR
          Status code describing an internal error (value 2)
static int OK
          Indicates the successful completion of the merge operation (value IStatus.OK)
static int UNSUPPORTED_ENCODING
          Indicates that at least one of the encodings associated with the input was unsupported (value 3)
 
Method Summary
 boolean canMergeWithoutAncestor ()
          Return whether this merger can merge the two contributors without an ancestor.
  IStatus merge ( OutputStream output, String outputEncoding, IStorage ancestor, IStorage target, IStorage other, IProgressMonitor monitor)
          Performs a merge operation on the given storage instances and writes the merge result to the output stream.
 

Field Detail

OK

static final int OK
Indicates the successful completion of the merge operation (value IStatus.OK)

See Also:
Constant Field Values

CONFLICT

static final int CONFLICT
Indicates that a change conflict prevented the merge from successful completion (value 1)

See Also:
Constant Field Values

INTERNAL_ERROR

static final int INTERNAL_ERROR
Status code describing an internal error (value 2)

See Also:
Constant Field Values

UNSUPPORTED_ENCODING

static final int UNSUPPORTED_ENCODING
Indicates that at least one of the encodings associated with the input was unsupported (value 3)

See Also:
Constant Field Values
Method Detail

merge

IStatus merge(
OutputStream output,
              
String outputEncoding,
              
IStorage ancestor,
              
IStorage target,
              
IStorage other,
              
IProgressMonitor monitor)
              throws 
CoreException
Performs a merge operation on the given storage instances and writes the merge result to the output stream. On success a status IStatus.OK is returned, on error a status IStatus.ERROR. If the merge operation cannot deal with conflicts, the code of the error status has the value IStreamMerger.CONFLICT. For text oriented mergers the encoding for the input and output is honored if they implement IEncodedStorage. It is the responsibility of callers to close the output stream.

The provided ancestor may be null if this merger returns true from canMergeWithoutAncestor().

Parameters:
output - the byte stream to which the merge result is written; the merger will not close the stream
outputEncoding - the encoding to use when writing to the output stream
ancestor - the storage from which the common ancestor is read
target - the storage containing the target of the merge
other - the storage containing the target of the merge
monitor - reports progress of the merge operation
Returns:
returns the completion status of the operation
Throws:
CoreException - if an error occurs

canMergeWithoutAncestor

boolean canMergeWithoutAncestor()
Return whether this merger can merge the two contributors without an ancestor. This is typically not possible but may be for some file types (for instances, files that contain a timestamp based list of events).

Returns:
whether this merger can merge the two contributors without an ancestor

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