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); } }); }
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); } }); }