/**
* Copyright (C) Intersect 2012.
*
* This module contains Proprietary Information of Intersect,
* and should be treated as Confidential.
*/
package au.org.intersect.exsite9.commands.handlers;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.commands.IHandler;
import org.eclipse.core.commands.IHandlerListener;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.handlers.HandlerUtil;
import au.org.intersect.exsite9.wizard.listexcludedfiles.ListExcludedFilesWizard;
/**
* Handler used to list the set of Excluded files in a project.
* Allows the user to "remove" them, so they will appear back in the New Files Group.
*/
public final class ListExcludedFilesHandler implements IHandler
{
/**
* @{inheritDoc}
*/
@Override
public void addHandlerListener(final IHandlerListener handlerListener)
{
}
/**
* @{inheritDoc}
*/
@Override
public void dispose()
{
}
/**
* @{inheritDoc}
*/
@Override
public Object execute(final ExecutionEvent event) throws ExecutionException
{
final IWorkbenchWindow activeWorkbenchWindow = HandlerUtil.getActiveWorkbenchWindow(event);
final Shell shell = activeWorkbenchWindow.getShell();
final ListExcludedFilesWizard wizard = new ListExcludedFilesWizard();
final WizardDialog wizardDialog = new WizardDialog(shell, wizard);
wizardDialog.open();
return null;
}
/**
* @{inheritDoc}
*/
@Override
public boolean isEnabled()
{
return true;
}
/**
* @{inheritDoc}
*/
@Override
public boolean isHandled()
{
return true;
}
/**
* @{inheritDoc}
*/
@Override
public void removeHandlerListener(final IHandlerListener handlerListener)
{
}
}