diff options
Diffstat (limited to 'plugins/org.eclipse.tm.tcf/src/org/eclipse')
2 files changed, 15 insertions, 14 deletions
diff --git a/plugins/org.eclipse.tm.tcf/src/org/eclipse/tm/tcf/extensions/TcfAbstractExtensionPointManager.java b/plugins/org.eclipse.tm.tcf/src/org/eclipse/tm/tcf/extensions/TcfAbstractExtensionPointManager.java index 4973190fd..75cf854d4 100644 --- a/plugins/org.eclipse.tm.tcf/src/org/eclipse/tm/tcf/extensions/TcfAbstractExtensionPointManager.java +++ b/plugins/org.eclipse.tm.tcf/src/org/eclipse/tm/tcf/extensions/TcfAbstractExtensionPointManager.java @@ -50,7 +50,7 @@ public abstract class TcfAbstractExtensionPointManager<V> { /** * Returns if or if not the service provider extension point manager * got initialized. Initialized means that the manager read the - * contributitions for the managed extension point. + * contributions for the managed extension point. * * @return <code>True</code> if already initialized, <code>false</code> otherwise. */ @@ -61,7 +61,7 @@ public abstract class TcfAbstractExtensionPointManager<V> { /** * Sets if or if not the service provider extension point manager * is initialized. Initialized means that the manager has read - * the contributitions for the managed extension point. + * the contributions for the managed extension point. * * @return <code>True</code> to set the extension point manager is initialized, <code>false</code> otherwise. */ @@ -74,11 +74,11 @@ public abstract class TcfAbstractExtensionPointManager<V> { * this methods trigger the loading of the extensions to the managed * extension point. * - * @return The map of contributables. + * @return The map of contributions. */ protected Map<String, TcfExtensionProxy<V>> getExtensions() { - if (!isInitialized()) { loadExtensions(); setInitialized(true); } - return fExtensions; + if (!isInitialized()) { loadExtensions(); setInitialized(true); } + return fExtensions; } /** @@ -143,7 +143,7 @@ public abstract class TcfAbstractExtensionPointManager<V> { * @param element The configuration element of the extension. Must be not <code>null</code>. * @return The extension proxy instance. * - * @throws CoreException If the extension proxy instanciation failed. + * @throws CoreException If the extension proxy instantiation failed. */ protected TcfExtensionProxy<V> doCreateExtensionProxy(IConfigurationElement element) throws CoreException { assert element != null; @@ -168,7 +168,7 @@ public abstract class TcfAbstractExtensionPointManager<V> { try { TcfExtensionProxy<V> candidate = doCreateExtensionProxy(element); if (candidate.getId() != null) { - // If no contributable with this id had been registered before, register now. + // If no contribution with this id had been registered before, register now. if (!fExtensions.containsKey(candidate.getId())) { fExtensions.put(candidate.getId(), candidate); } @@ -179,14 +179,16 @@ public abstract class TcfAbstractExtensionPointManager<V> { NLS.bind(TcfPluginMessages.Extension_error_duplicateExtension, candidate.getId(), element.getContributor().getName()), null)); } - } else { + } + else { throw new CoreException(new Status(IStatus.ERROR, Activator.PLUGIN_ID, 0, NLS.bind(TcfPluginMessages.Extension_error_missingRequiredAttribute, "id", element.getAttribute("label")), //$NON-NLS-1$ //$NON-NLS-2$ null)); } - } catch (CoreException e) { + } + catch (CoreException e) { IStatus status = new Status(IStatus.ERROR, Activator.PLUGIN_ID, NLS.bind(TcfPluginMessages.Extension_error_invalidExtensionPoint, element.getDeclaringExtension().getUniqueIdentifier()), e); diff --git a/plugins/org.eclipse.tm.tcf/src/org/eclipse/tm/tcf/extensions/TcfExtensionPointComparator.java b/plugins/org.eclipse.tm.tcf/src/org/eclipse/tm/tcf/extensions/TcfExtensionPointComparator.java index ab6b24aaf..a6b71ecd0 100644 --- a/plugins/org.eclipse.tm.tcf/src/org/eclipse/tm/tcf/extensions/TcfExtensionPointComparator.java +++ b/plugins/org.eclipse.tm.tcf/src/org/eclipse/tm/tcf/extensions/TcfExtensionPointComparator.java @@ -33,7 +33,7 @@ public class TcfExtensionPointComparator implements Comparator<IExtension> { * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object) */ public int compare(IExtension o1, IExtension o2) { - // We ignore any comparisation with null and + // We ignore any comparison with null and if (o1 == null || o2 == null) return 0; // Check if it is the exact same element if (o1 == o2) return 0; @@ -49,10 +49,10 @@ public class TcfExtensionPointComparator implements Comparator<IExtension> { return 1; if (contributor1.startsWith(TCF_PLUGIN_PATTERN) && contributor2.startsWith(TCF_PLUGIN_PATTERN)) { int value = contributor1.compareTo(contributor2); - // Within the same plugins, the extension are sorted by thier unique id (if available) + // Within the same plugins, the extension are sorted by their unique id (if available) if (value == 0 && o1.getUniqueIdentifier() != null && o2.getUniqueIdentifier() != null) return o1.getUniqueIdentifier().compareTo(o2.getUniqueIdentifier()); - // Otherwise, just return the comparisation result from the contributors + // Otherwise, just return the comparison result from the contributors return value; } @@ -61,8 +61,7 @@ public class TcfExtensionPointComparator implements Comparator<IExtension> { // Within the same plugins, the extension are sorted by thier unique id (if available) if (value == 0 && o1.getUniqueIdentifier() != null && o2.getUniqueIdentifier() != null) return o1.getUniqueIdentifier().compareTo(o2.getUniqueIdentifier()); - // Otherwise, just return the comparisation result from the contributors + // Otherwise, just return the comparison result from the contributors return value; } - } |