diff options
Diffstat (limited to 'bundles/org.eclipse.team.core/src/org/eclipse/team/core/Team.java')
-rw-r--r-- | bundles/org.eclipse.team.core/src/org/eclipse/team/core/Team.java | 142 |
1 files changed, 71 insertions, 71 deletions
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/Team.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/Team.java index 480c90177..d65e49f24 100644 --- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/Team.java +++ b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/Team.java @@ -65,25 +65,25 @@ import org.eclipse.team.internal.core.importing.BundleImporterExtension; */ public final class Team { - private static class StringMappingWrapper implements IFileTypeInfo { + private static class StringMappingWrapper implements IFileTypeInfo { - private final IStringMapping fMapping; + private final IStringMapping fMapping; - public StringMappingWrapper(IStringMapping mapping) { - fMapping= mapping; - } + public StringMappingWrapper(IStringMapping mapping) { + fMapping= mapping; + } - @Override + @Override public String getExtension() { - return fMapping.getString(); - } + return fMapping.getString(); + } - @Override + @Override public int getType() { - return fMapping.getType(); - } + return fMapping.getType(); + } - } + } private static final String PREF_TEAM_IGNORES = "ignore_files"; //$NON-NLS-1$ private static final String PREF_TEAM_SEPARATOR = "\n"; //$NON-NLS-1$ @@ -99,19 +99,19 @@ public final class Team { protected static SortedMap<String, Boolean> globalIgnore, pluginIgnore; private static StringMatcher[] ignoreMatchers; - private final static FileContentManager fFileContentManager; + private final static FileContentManager fFileContentManager; private static List<IBundleImporter> fBundleImporters; - static { - fFileContentManager= new FileContentManager(); - } + static { + fFileContentManager= new FileContentManager(); + } /** - * Return the type of the given IStorage. First, we check whether a mapping has - * been defined for the name of the IStorage. If this is not the case, we check for - * a mapping with the extension. If no mapping is defined, UNKNOWN is returned. + * Return the type of the given IStorage. First, we check whether a mapping has + * been defined for the name of the IStorage. If this is not the case, we check for + * a mapping with the extension. If no mapping is defined, UNKNOWN is returned. * * Valid return values are: * Team.TEXT @@ -120,12 +120,12 @@ public final class Team { * * @param storage the IStorage * @return whether the given IStorage is TEXT, BINARY, or UNKNOWN - * - * @deprecated Use <code>getFileContentManager().getType(IStorage storage)</code> instead. + * + * @deprecated Use <code>getFileContentManager().getType(IStorage storage)</code> instead. */ @Deprecated public static int getType(IStorage storage) { - return fFileContentManager.getType(storage); + return fFileContentManager.getType(storage); } /** @@ -179,19 +179,19 @@ public final class Team { /** - * Return all known file types. + * Return all known file types. * * @return all known file types - * @deprecated Use <code>getFileContentManager().getExtensionMappings()</code> instead. + * @deprecated Use <code>getFileContentManager().getExtensionMappings()</code> instead. */ @Deprecated public static IFileTypeInfo[] getAllTypes() { - final IStringMapping [] mappings= fFileContentManager.getExtensionMappings(); - final IFileTypeInfo [] infos= new IFileTypeInfo[mappings.length]; - for (int i = 0; i < infos.length; i++) { - infos[i]= new StringMappingWrapper(mappings[i]); - } - return infos; + final IStringMapping [] mappings= fFileContentManager.getExtensionMappings(); + final IFileTypeInfo [] infos= new IFileTypeInfo[mappings.length]; + for (int i = 0; i < infos.length; i++) { + infos[i]= new StringMappingWrapper(mappings[i]); + } + return infos; } /** @@ -262,8 +262,8 @@ public final class Team { /** - * Set the file type for the give extensions. This - * will replace the existing file types with this new list. + * Set the file type for the give extensions. This + * will replace the existing file types with this new list. * * Valid types are: * Team.TEXT @@ -272,12 +272,12 @@ public final class Team { * * @param extensions the file extensions * @param types the file types - * - * @deprecated Use <code>getFileContentManager().setExtensionMappings()</code> instead. + * + * @deprecated Use <code>getFileContentManager().setExtensionMappings()</code> instead. */ @Deprecated public static void setAllTypes(String[] extensions, int[] types) { - fFileContentManager.addExtensionMappings(extensions, types); + fFileContentManager.addExtensionMappings(extensions, types); } /** @@ -529,40 +529,40 @@ public final class Team { } /** - * TODO: change to file content manager + * TODO: change to file content manager * Return the default file type bindings * (i.e. those that are specified in * plugin manifests). * @return the default file type bindings * @since 3.0 - * @deprecated Use Team.getFileContentManager().getDefaultExtensionMappings() instead. + * @deprecated Use Team.getFileContentManager().getDefaultExtensionMappings() instead. */ @Deprecated public static IFileTypeInfo[] getDefaultTypes() { - return asFileTypeInfo(getFileContentManager().getDefaultExtensionMappings()); + return asFileTypeInfo(getFileContentManager().getDefaultExtensionMappings()); } - private static IFileTypeInfo [] asFileTypeInfo(IStringMapping [] mappings) { - final IFileTypeInfo [] infos= new IFileTypeInfo[mappings.length]; - for (int i = 0; i < infos.length; i++) { - infos[i]= new StringMappingWrapper(mappings[i]); - } - return infos; - } - - /** - * Get the file content manager which implements the API for manipulating the mappings between - * file names, file extensions and content types. - * - * @return an instance of IFileContentManager - * - * @see IFileContentManager - * - * @since 3.1 - */ - public static IFileContentManager getFileContentManager() { - return fFileContentManager; - } + private static IFileTypeInfo [] asFileTypeInfo(IStringMapping [] mappings) { + final IFileTypeInfo [] infos= new IFileTypeInfo[mappings.length]; + for (int i = 0; i < infos.length; i++) { + infos[i]= new StringMappingWrapper(mappings[i]); + } + return infos; + } + + /** + * Get the file content manager which implements the API for manipulating the mappings between + * file names, file extensions and content types. + * + * @return an instance of IFileContentManager + * + * @see IFileContentManager + * + * @since 3.1 + */ + public static IFileContentManager getFileContentManager() { + return fFileContentManager; + } /** * Creates a storage merger for the given content type. @@ -574,9 +574,9 @@ public final class Team { * * @since 3.4 */ - public static IStorageMerger createMerger(IContentType type) { - return StorageMergerRegistry.getInstance().createStreamMerger(type); - } + public static IStorageMerger createMerger(IContentType type) { + return StorageMergerRegistry.getInstance().createStreamMerger(type); + } /** * Creates a storage merger for the given file extension. @@ -588,9 +588,9 @@ public final class Team { * * @since 3.4 */ - public static IStorageMerger createMerger(String extension) { - return StorageMergerRegistry.getInstance().createStreamMerger(extension); - } + public static IStorageMerger createMerger(String extension) { + return StorageMergerRegistry.getInstance().createStreamMerger(extension); + } /** * Creates a storage merger for the given content type. @@ -602,10 +602,10 @@ public final class Team { * @deprecated Use {@link #createMerger(IContentType)} instead. * @since 3.2 */ - @Deprecated + @Deprecated public IStorageMerger createStorageMerger(IContentType type) { - return createMerger(type); - } + return createMerger(type); + } /** * Creates a storage merger for the given file extension. @@ -617,10 +617,10 @@ public final class Team { * @deprecated Use {@link #createMerger(String)} instead. * @since 3.2 */ - @Deprecated + @Deprecated public IStorageMerger createStorageMerger(String extension) { - return createMerger(extension); - } + return createMerger(extension); + } /** * Returns the available bundle importers. |