Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 877038aaaa7ea4b392de2ece8f5d46ecc7792603 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/*******************************************************************************
 * Copyright (c) 2000, 2006 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/

package org.eclipse.ui.internal.ide.dialogs;

import org.eclipse.ui.IActionBars;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.actions.ActionFactory;
import org.eclipse.ui.part.EditorActionBarContributor;

/**
 * Manages the installation and deinstallation of global actions for
 * the welcome editor.
 */
public class WelcomeEditorActionContributor extends EditorActionBarContributor {
    /**
     * The <code>WelcomeEditorActionContributor</code> implementation of this
     * <code>IEditorActionBarContributor</code> method installs the global
     * action handler for the given editor.
     */
    @Override
	public void setActiveEditor(IEditorPart part) {
        IActionBars actionBars = getActionBars();
        if (actionBars != null) {
            actionBars.setGlobalActionHandler(ActionFactory.COPY.getId(),
                    ((WelcomeEditor) part).getCopyAction());
        }
    }
}

Back to the top