01: /*******************************************************************************
02: * Copyright (c) 2000, 2005 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.ui.internal.ide.dialogs;
11:
12: import org.eclipse.jface.action.Action;
13: import org.eclipse.ui.internal.ide.IDEWorkbenchMessages;
14:
15: /**
16: * Global copy action for the welcome editor.
17: */
18: public class WelcomeEditorCopyAction extends Action {
19: private WelcomeEditor editorPart;
20:
21: public WelcomeEditorCopyAction(WelcomeEditor editor) {
22: editorPart = editor;
23: setText(IDEWorkbenchMessages.WelcomeEditor_copy_text);
24: }
25:
26: public void run() {
27: editorPart.getCurrentText().copy();
28: }
29: }
|