예제 #1
0
  private void initGenericActions() {
    final ExtensionPointHandler<GenericAction> extensionPoint =
        (ExtensionPointHandler<GenericAction>)
            ExtensionPointHandler.getOrCreateExtensionPoint(
                this.bundleContext, (Class) GenericAction.class);
    extensionPoint.addListener(
        (ExtensionPointListener)
            new ExtensionPointListener<GenericAction>() {
              public void addService(final GenericAction genericAction) {
                GenericActionHolder.getInstance().addGenericAction(genericAction);
              }

              public void removeService(final GenericAction genericAction) {
                GenericActionHolder.getInstance().removeGenericAction(genericAction);
              }
            });
  }
예제 #2
0
  private void initFileTypeHandlers() {
    final ExtensionPointHandler<FileTypeHandler> extensionPoint =
        (ExtensionPointHandler<FileTypeHandler>)
            ExtensionPointHandler.getOrCreateExtensionPoint(
                this.bundleContext, (Class) FileTypeHandler.class);
    extensionPoint.addListener(
        (ExtensionPointListener)
            new ExtensionPointListener<FileTypeHandler>() {
              public void removeService(final FileTypeHandler fileTypeHandler) {
                FileTypeHolder.getInstance().removeFileTypeHandler(fileTypeHandler);
              }

              public void addService(final FileTypeHandler fileTypeHandler) {
                FileTypeHolder.getInstance().addFileTypeHandler(fileTypeHandler);
              }
            });
  }