/*
*
* Perforce/JBuilder Opentool
* Copyright (C) 2002 Mark Ackerman
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
package com.dafreels.opentools.actions;
//JBuilder
import com.borland.primetime.ide.Browser;
import com.dafreels.opentools.Main;
import com.dafreels.opentools.actions.ui.JobsDialog;
import com.dafreels.vcs.command.CommandTool;
import com.dafreels.vcs.command.MessageFormatter;
import com.dafreels.vcs.util.ActionImages;
/**
* Title: Perforce Open Tool
* Description: get the job list
* Copyright: Copyright (c) 2005
* Company:
* @author George Lindholm
* @version 1.0
*
* Cloned from FileHistoryAction
*/
public class JobsAction extends PerforceAction
{
public JobsAction(boolean onFileTabMenu)
{
super("Jobs", null, ActionImages.P4_JOBS, onFileTabMenu);
}
public void actionPerformed(Browser browser)
{
com.dafreels.vcs.command.Command cmd =
new com.dafreels.vcs.command.Command(
com.dafreels.vcs.command.Command.JOBS);
CommandTool.runCommand(cmd, Main.m_props);
if (cmd.getPathCount() == 0)
{
return;
}
JobsDialog dialog =
new JobsDialog(Browser.getActiveBrowser(), "Jobs", false);
dialog.fillForm(MessageFormatter.getInstance());
dialog.setVisible(true);
//Output the p4 messages
//MessageWriter.outputMessages(MessageFormatter.getInstance());
}
}