|
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 "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 */ |
|
17 |
|
18 package com.nokia.s60tools.remotecontrol.ftp.ui.actions; |
|
19 |
|
20 import org.eclipse.jface.action.IAction; |
|
21 |
|
22 import com.nokia.s60tools.remotecontrol.ftp.ui.view.FtpView; |
|
23 import com.nokia.s60tools.remotecontrol.resources.ImageKeys; |
|
24 import com.nokia.s60tools.remotecontrol.resources.ImageResourceManager; |
|
25 import com.nokia.s60tools.remotecontrol.resources.Messages; |
|
26 import com.nokia.s60tools.ui.actions.S60ToolsBaseAction; |
|
27 |
|
28 /** |
|
29 * Action for refreshing FTP view (files and folders) |
|
30 */ |
|
31 public class RefreshAction extends S60ToolsBaseAction { |
|
32 |
|
33 /** |
|
34 * Instance of FtpView. Used for refreshing view. |
|
35 */ |
|
36 private FtpView ftpView; |
|
37 |
|
38 /** |
|
39 * Constructor |
|
40 * |
|
41 * @param ftpView Instance of FtpView |
|
42 */ |
|
43 public RefreshAction(FtpView ftpView) { |
|
44 super(Messages.getString("RefreshAction.Action_Name"), //$NON-NLS-1$ |
|
45 Messages.getString("RefreshAction.Tooltip_Name"), //$NON-NLS-1$ |
|
46 IAction.AS_PUSH_BUTTON, |
|
47 ImageResourceManager.getImageDescriptor(ImageKeys.IMG_REFRESH)); |
|
48 this.ftpView = ftpView; |
|
49 } |
|
50 |
|
51 /* |
|
52 * (non-Javadoc) |
|
53 * |
|
54 * @see org.eclipse.jface.action.Action#run() |
|
55 */ |
|
56 public void run() { |
|
57 ftpView.refreshFolderContent(); |
|
58 } |
|
59 } |