| PatternGuideAction.java |
1 /**
2 * QJ-Pro
3 * Copyright (c) 2004, http://qjpro.sourceforge.net
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
13 * details.
14 *
15 * You should have received a copy of the GNU General Public License along with
16 * this program; if not, write to the Free Software Foundation, Inc.,
17 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19 package com.qasystems.qstudio.java.integration.eclipse.actions;
20
21 import com.qasystems.qstudio.java.browser.EditionBrowser;
22
23 import org.eclipse.jface.action.Action;
24
25 /**
26 * Implements the pattern guide actions.
27 */
28 public class PatternGuideAction extends Action {
29 private String htmlLink = null;
30
31 /**
32 * Creates a new PatternGuideAction object.
33 *
34 * @param title DOCUMENT ME!
35 */
36 public PatternGuideAction(String title) {
37 super(title);
38 }
39
40 /**
41 * Creates a new PatternGuideAction object.
42 *
43 * @param title DOCUMENT ME!
44 * @param link DOCUMENT ME!
45 */
46 public PatternGuideAction(String title, String link) {
47 this(title);
48 htmlLink = link;
49 }
50
51 /**
52 * DOCUMENT ME!
53 */
54 public void run() {
55 if (htmlLink != null) {
56 new EditionBrowser().openPatternGuide(htmlLink);
57 } else {
58 new EditionBrowser().openPatternGuide();
59 }
60 }
61 }
62