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

File types

The presence of a repository management system may dictate special handling needs for files.  For example, some files should be omitted from version control.  Some providers have special handling for text vs. binary files.  The team plug-in defines extension points that allow other plug-ins to provide information about their file types.  In all cases, special handling is ultimately left up to the user via the team Preferences page.  These extensions allow plug-ins to seed the preferences with values appropriate for the plug-in.

Ignored files

In several cases, it may be unnecessary to keep certain files under repository control.  For example, resources that are derived from existing resources can often be omitted from the repository.  For example, compiled source files, (such as Java ".class" files), can be omitted since their corresponding source (".java") file is in the repository.  It also may be inappropriate to version control metadata files that are generated by repository providers.  The org.eclipse.team.core.ignore extension point allows providers to declare file types that should be ignored for repository provider operations.  For example, the CVS client declares the following:

<extension point="org.eclipse.team.core.ignore">
	<ignore pattern = ".#*" selected = "true"/>
</extension>

The markup simply declares a file name pattern that should be ignored and a selected attribute which declares the default selection value of the file type in the preferences dialog.  It is ultimately up to the user to decide which files should be ignored.  The user may select, deselect, add or delete file types from the default list of ignored files.

Text vs. binary files

Some repositories implement different handling for text vs. binary files.  The org.eclipse.team.core.fileTypes extension allows plug-ins to declare file types as text or binary files.  For example, the Java tooling declares the following:

<extension point="org.eclipse.team.core.fileTypes">
  <fileTypes extension="java" type="text"/>
  <fileTypes extension="classpath" type="text"/>
  <fileTypes extension="properties" type="text"/>
  <fileTypes extension="class" type="binary"/>
  <fileTypes extension="jar" type="binary"/>
  <fileTypes extension="zip" type="binary"/>
</extension> 

The markup lets plug-ins define a file type by extension and assign a type of text or binary.  As with ignored files, it is ultimately up to the user to manage the list of text and binary file types.


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