Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 240344
Collapse All | Expand All

(-)src/org/eclipse/ui/internal/browser/WebBrowserEditorActionBarContributor.java (-16 / +1 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2003, 2006 IBM Corporation and others.
2
 * Copyright (c) 2003, 2008 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 12-20 Link Here
12
12
13
import org.eclipse.jface.action.Action;
13
import org.eclipse.jface.action.Action;
14
import org.eclipse.jface.action.IToolBarManager;
14
import org.eclipse.jface.action.IToolBarManager;
15
import org.eclipse.ui.IActionBars;
16
import org.eclipse.ui.IEditorPart;
15
import org.eclipse.ui.IEditorPart;
17
import org.eclipse.ui.actions.ActionFactory;
18
import org.eclipse.ui.part.EditorActionBarContributor;
16
import org.eclipse.ui.part.EditorActionBarContributor;
19
/**
17
/**
20
 * ActionBarContributor for the Web browser.
18
 * ActionBarContributor for the Web browser.
Lines 49-67 Link Here
49
	public void setActiveEditor(IEditorPart targetEditor) {
47
	public void setActiveEditor(IEditorPart targetEditor) {
50
		if (targetEditor instanceof WebBrowserEditor) {
48
		if (targetEditor instanceof WebBrowserEditor) {
51
			editor = (WebBrowserEditor) targetEditor;
49
			editor = (WebBrowserEditor) targetEditor;
52
			WebBrowserEditorInput input = editor.getWebBrowserEditorInput();
53
			
54
			if (input == null || input.isLocationBarLocal()) {
55
				IActionBars actionBars = getActionBars();
56
				actionBars.setGlobalActionHandler(ActionFactory.COPY.getId(), editor.getCopyAction());
57
				actionBars.setGlobalActionHandler(ActionFactory.CUT.getId(), editor.getCutAction());
58
				actionBars.setGlobalActionHandler(ActionFactory.PASTE.getId(), editor.getPasteAction());
59
			}
60
			
61
			//if (input.isToolbarGlobal())
62
			//	getWebBrowser().backNextListener = this.updater;
63
				
64
			//editor.updateActions();
65
		} else
50
		} else
66
			editor = null;
51
			editor = null;
67
	}
52
	}

Return to bug 240344