blob: df5e3fe8895fe73010b02d4c6ecda33b0e126dba [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
* accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Description:
* This class implements the implementation of the R4E-Gerrit UI my drafts comments reviews handler.
*
* Contributors:
* Jacques Bouthillier - Initial Implementation of the plug-in handler
******************************************************************************/
package org.eclipse.mylyn.reviews.r4e_gerrit.ui.internal.commands.my;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.commands.common.NotDefinedException;
import org.eclipse.mylyn.internal.gerrit.core.GerritQuery;
import org.eclipse.mylyn.reviews.r4e_gerrit.ui.R4EGerritUi;
import org.eclipse.mylyn.reviews.r4e_gerrit.ui.internal.utils.UIUtils;
import org.eclipse.mylyn.reviews.r4egerrit.ui.views.R4EGerritTableView;
/**
* @author Jacques Bouthillier
* @version $Revision: 1.0 $
*
*/
public class MyDraftCommentsReviewsHandler extends AbstractHandler {
/* (non-Javadoc)
* @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
*/
@Override
public Object execute(ExecutionEvent aEvent) throws ExecutionException {
R4EGerritUi.Ftracer.traceInfo("Search the Gerrit reviews for My Drafts Comments " ); //$NON-NLS-1$
//
// R4EGerritUi.Ftracer.traceInfo("Execute: " ); //$NON-NLS-1$
// try {
// UIUtils.notInplementedDialog(aEvent.getCommand().getName());
// } catch (NotDefinedException e) {
// // TODO Auto-generated catch block
// e.printStackTrace();
// }
R4EGerritTableView reviewTableView = R4EGerritTableView
.getActiveView();
// see http://gerrit-documentation.googlecode.com/svn/Documentation/2.5.2/user-search.html
//for MY > Drafts Comments--> has:draft
R4EGerritUi.Ftracer.traceInfo("Execute command : " + "My > Draft Comments"); //$NON-NLS-1$
reviewTableView.processCommands("has:draft");
return null;
}
}