9
|
1 |
/*
|
|
2 |
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of the License "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description:
|
|
15 |
*
|
|
16 |
*/
|
2
|
17 |
package com.nokia.carbide.cpp.actions;
|
|
18 |
|
|
19 |
import java.net.URL;
|
|
20 |
|
|
21 |
import org.eclipse.jface.action.IAction;
|
|
22 |
import org.eclipse.jface.viewers.ISelection;
|
|
23 |
import org.eclipse.ui.IWorkbenchWindow;
|
|
24 |
import org.eclipse.ui.IWorkbenchWindowActionDelegate;
|
|
25 |
import org.eclipse.ui.PlatformUI;
|
|
26 |
import org.eclipse.ui.help.IWorkbenchHelpSystem;
|
|
27 |
|
|
28 |
|
|
29 |
public class DisplayReleaseNotesAction implements
|
|
30 |
IWorkbenchWindowActionDelegate {
|
|
31 |
|
|
32 |
public DisplayReleaseNotesAction() {
|
|
33 |
}
|
|
34 |
|
|
35 |
/* (non-Javadoc)
|
|
36 |
* @see org.eclipse.ui.IWorkbenchWindowActionDelegate#dispose()
|
|
37 |
*/
|
|
38 |
public void dispose() {
|
|
39 |
|
|
40 |
}
|
|
41 |
|
|
42 |
/* (non-Javadoc)
|
|
43 |
* @see org.eclipse.ui.IWorkbenchWindowActionDelegate#init(org.eclipse.ui.IWorkbenchWindow)
|
|
44 |
*/
|
|
45 |
public void init(IWorkbenchWindow window) {
|
|
46 |
|
|
47 |
}
|
|
48 |
|
|
49 |
/* (non-Javadoc)
|
|
50 |
* @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
|
|
51 |
*/
|
|
52 |
public void run(IAction action) {
|
|
53 |
IWorkbenchHelpSystem helpSystem = PlatformUI.getWorkbench().getHelpSystem();
|
|
54 |
URL url = helpSystem.resolve("com.nokia.carbide.cpp.doc.user/html/release_notes.htm", true);
|
|
55 |
String urlPath = url.getProtocol()+"://"+url.getAuthority()+"/"+"help/topic/com.nokia.carbide.cpp.doc.user/html/release_notes.htm";
|
|
56 |
helpSystem.displayHelpResource(urlPath);
|
|
57 |
}
|
|
58 |
|
|
59 |
/* (non-Javadoc)
|
|
60 |
* @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
|
|
61 |
*/
|
|
62 |
public void selectionChanged(IAction action, ISelection selection) {
|
|
63 |
|
|
64 |
}
|
|
65 |
|
|
66 |
}
|