Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/PluginStringMappings.java')
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/PluginStringMappings.java32
1 files changed, 16 insertions, 16 deletions
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/PluginStringMappings.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/PluginStringMappings.java
index c9e6c69b8..ef9277282 100644
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/PluginStringMappings.java
+++ b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/PluginStringMappings.java
@@ -17,48 +17,48 @@ import org.eclipse.core.runtime.*;
import org.eclipse.team.core.Team;
/**
- *
+ *
*/
public class PluginStringMappings {
-
+
private final String fExtensionID;
private final String fAttributeName;
-
+
private SortedMap fMappings;
public PluginStringMappings(String extensionID, String stringAttributeName) {
fExtensionID= extensionID;
fAttributeName= stringAttributeName;
}
-
+
/**
* Load all the extension patterns contributed by plugins.
* @return a map with the patterns
*/
private SortedMap loadPluginPatterns() {
-
+
final SortedMap result= new TreeMap();
-
+
final TeamPlugin plugin = TeamPlugin.getPlugin();
if (plugin == null)
return result;
-
+
final IExtensionPoint extension = Platform.getExtensionRegistry().getExtensionPoint(TeamPlugin.ID, fExtensionID);//TeamPlugin.FILE_TYPES_EXTENSION);
if (extension == null)
return result;
-
+
final IExtension[] extensions = extension.getExtensions();
-
+
for (int i = 0; i < extensions.length; i++) {
IConfigurationElement[] configElements = extensions[i].getConfigurationElements();
-
+
for (int j = 0; j < configElements.length; j++) {
-
- final String ext = configElements[j].getAttribute(fAttributeName);//"extension");
+
+ final String ext = configElements[j].getAttribute(fAttributeName);//"extension");
final String type = configElements[j].getAttribute("type"); //$NON-NLS-1$
- if (ext == null || type == null)
+ if (ext == null || type == null)
continue;
-
+
if (type.equals("text")) { //$NON-NLS-1$
result.put(ext, new Integer(Team.TEXT));
} else if (type.equals("binary")) { //$NON-NLS-1$
@@ -68,7 +68,7 @@ public class PluginStringMappings {
}
return result;
}
-
+
public Map referenceMap() {
if (fMappings == null) {
fMappings= loadPluginPatterns();
@@ -79,5 +79,5 @@ public class PluginStringMappings {
public int getType(String filename) {
final Map mappings= referenceMap();
return mappings.containsKey(filename) ? ((Integer)mappings.get(filename)).intValue() : Team.UNKNOWN;
- }
+ }
}

Back to the top