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 Plug-in Developer Guide
Previous Page Home Next Page

Merging multiple files

In some cases, the ability to merge files without the assist of a user is desirable. The extension point org.eclipse.team.core.storageMergers allows you to contribute a class that merges three different files (or storage units) into a single output stream. Storage mergers can be associated with file extensions or bound to a particular content type. The Platform defines a storage merger for merging three files of plain text:

<extension
	point="org.eclipse.team.core.storageMergers">
	<storageMerger
		extensions="txt"
		class="org.eclipse.team.internal.ui.mapping.TextStorageMerger"
		id="org.eclipse.team.ui.textStorageMerger">
	</storageMerger>
	<contentTypeBinding
		contentTypeId="org.eclipse.core.runtime.text"
		streamMergerId="org.eclipse.team.ui.textStorageMerger">
	</contentTypeBinding>
</extension>

The storage merger itself is described in the storageMerger element. You must specify the id of the merger and the class that implements it. You may also specify any file extensions for which the the storage merger should be used.

You may also use the contentTypeBinding element to associate a content type with a storage merger.

Storage mergers must implement IStorageMerger. This simple interface merges the contents from three different storage units into a single output stream. The not-so-simple implementation depends upon your plug-in and its content types.


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