コード例 #1
0
  private Collection<SubmitterListener> lookupExtensions() {
    String extensionPointId = "edu.illinois.codingspectator.monitor.core.submitter";

    IConfigurationElement[] config =
        Platform.getExtensionRegistry().getConfigurationElementsFor(extensionPointId);
    Collection<SubmitterListener> submitterListeners = new ArrayList<SubmitterListener>();
    try {
      for (IConfigurationElement e : config) {
        Object o = e.createExecutableExtension("class");
        submitterListeners.add((SubmitterListener) o);
      }
    } catch (CoreException e) {
      Activator.getDefault()
          .createErrorStatus(
              String.format("Failed to lookup extensions for %s.", extensionPointId), e);
    }
    return submitterListeners;
  }
コード例 #2
0
 public IPreferenceStore getPreferenceStore() {
   return Activator.getDefault().getPreferenceStore();
 }