0
|
1 |
/*
|
|
2 |
* Copyright (c) 2006 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 |
|
|
19 |
package com.nokia.s60tools.appdep.ui.actions;
|
|
20 |
|
|
21 |
import org.eclipse.jface.action.Action;
|
|
22 |
|
|
23 |
import com.nokia.s60tools.appdep.ui.views.main.MainView;
|
|
24 |
|
|
25 |
/**
|
|
26 |
* Common abstract base class for all main view
|
|
27 |
* related actions.
|
|
28 |
*/
|
|
29 |
public abstract class AbstractMainViewAction extends Action {
|
|
30 |
|
|
31 |
/**
|
|
32 |
* Reference to the view.
|
|
33 |
*/
|
|
34 |
MainView view;
|
|
35 |
|
|
36 |
/**
|
|
37 |
* Constructor.
|
|
38 |
* @param view Reference to the view.
|
|
39 |
*/
|
|
40 |
public AbstractMainViewAction(MainView view) {
|
|
41 |
super();
|
|
42 |
this.view = view;
|
|
43 |
}
|
|
44 |
|
|
45 |
/* (non-Javadoc)
|
|
46 |
* @see org.eclipse.jface.action.IAction#run()
|
|
47 |
*/
|
|
48 |
public void run() {
|
|
49 |
// Makes sure that action buttons states are updated
|
|
50 |
// correctly whenever some action is performed.
|
|
51 |
view.updateViewActionEnabledStates();
|
|
52 |
}
|
|
53 |
|
|
54 |
}
|