¿Cómo agregar IResourceChangeListener en el complemento eclipse?

Estoy tratando de agregar IResourceChangeListener en mi complemento eclipse, usando el siguiente tutorial:

https://eclipse.org/articles/Article-Resource-deltas/resource-deltas.html

Sin embargo, nunca encontré ningún lugar, ¿dónde debo agregar estos códigos de escucha? Descubrí que solo están creando una nueva clase donde agregaron el código de escucha. Si lo agrego solo en cualquier clase de Java, entonces, ¿cómo sabrá el eclipse, qué clase se activará cuando ocurran los eventos? Traté de poner el código en activator.java de la siguiente manera (lo agregué allí porque mantiene el ciclo de vida del complemento).

Modifiqué el método de inicio y detención.

package testPlugin;

import org.eclipse.core.resources.IResourceChangeEvent;
import org.eclipse.core.resources.IResourceChangeListener;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;

/**
 * The activator class controls the plug-in life cycle
 */
public class Activator extends AbstractUIPlugin {

    // The plug-in ID
    public static final String PLUGIN_ID = "testPlugin"; //$NON-NLS-1$

    /** the resource listener on URI changes */
    IWorkspace workspace = ResourcesPlugin.getWorkspace();
    IResourceChangeListener listener;

    // The shared instance
    private static Activator plugin;

    /**
     * The constructor
     * 
     */

    public Activator() {

    }

    /*
     * (non-Javadoc)
     * 
     * @see
     * org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext
     * )
     */
    public void start(BundleContext context) throws Exception {
        super.start(context);
        plugin = this;
        listener = new IResourceChangeListener() {
            public void resourceChanged(IResourceChangeEvent event) {
                System.out.println("Something changed!");
            }
        };

        workspace.addResourceChangeListener(listener);
    }

    /*
     * (non-Javadoc)
     * 
     * @see
     * org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext
     * )
     */
    public void stop(BundleContext context) throws Exception {
        if (workspace != null) {
            workspace.removeResourceChangeListener(listener);
        }
        plugin = null;
        super.stop(context);
    }

    /**
     * Returns the shared instance
     *
     * @return the shared instance
     */
    public static Activator getDefault() {

        return plugin;
    }

    /**
     * Returns an image descriptor for the image file at the given plug-in
     * relative path
     *
     * @param path
     *            the path
     * @return the image descriptor
     */
    public static ImageDescriptor getImageDescriptor(String path) {
        return imageDescriptorFromPlugin(PLUGIN_ID, path);
    }
}

Pero no está funcionando. Cuando cambio mi editor actual mediante un MKS externo, no se imprime "Algo ha cambiado" a consol, o simplemente no funciona.

¿Cómo puedo hacer que funcione? ¿Dónde debo agregar el código en realidad? Quiero modificar el editor de trabajo (puede ser el editor java predeterminado) en eclipse sin crear ningún editor nuevo con este oyente.

Muchas gracias por adelantado.

Respuestas a la pregunta(0)

Su respuesta a la pregunta