Bug 139443 - There should be a hot key F3 for opening a file or php element from the PHP Explorer View.
Summary: There should be a hot key F3 for opening a file or php element from the PHP E...
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: PDT (show other bugs)
Version: unspecified   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P2 normal (vote)
Target Milestone: ---   Edit
Assignee: moshe CLA
QA Contact:
URL:
Whiteboard:
Keywords: plan
Depends on:
Blocks:
 
Reported: 2006-04-30 12:48 EDT by Moty Keret CLA
Modified: 2020-05-14 11:07 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Moty Keret CLA 2006-04-30 12:48:02 EDT
It should be a hot key, F3, for opening a file or php element, from the PHP
Explorer View.
Comment 1 moshe CLA 2007-02-20 09:56:18 EST
1. Replace 2 method in ExplorerPart:
	public void focusGained(FocusEvent e) {
		fContentProvider.postRefresh(fViewer.getInput());
		// activate the org.eclipse.php.ui.contexts.window context 
		// only for this view the allow the F3 shortcut which conflict with JDT
		IContextService service = (IContextService) PHPUiPlugin.getDefault().getWorkbench().getService(IContextService.class);
		if (service != null) {
			contextActivation = service.activateContext("org.eclipse.php.ui.contexts.window");
		}
	}

	/* (non-Javadoc)
	 * @see org.eclipse.swt.events.FocusListener#focusLost(org.eclipse.swt.events.FocusEvent)
	 */
	public void focusLost(FocusEvent e) {
		// deactivate the org.eclipse.php.ui.contexts.window context
		// the context used only for this view menu
		IContextService service = (IContextService) PHPUiPlugin.getDefault().getWorkbench().getService(IContextService.class);
		if (service != null && contextActivation != null) {
			service.deactivateContext(contextActivation);
		}
	}


2. Add the follopwing rows in OpenEditorActionGroup (in method fillContextMenu) :
		fOpen = new OpenAction(fSite);
		fOpen.setActionDefinitionId(IPHPEditorActionDefinitionIds.OPEN_EDITOR);

3. in plugin.xml (php.ui) add context and key:
(line 590)
		<context
			name="Open PHP File"
			description="Open PHP File"
			parentId="org.eclipse.ui.contexts.window"
			id="org.eclipse.php.ui.contexts.window">
		</context>	

(line 786)

		<key
			sequence="F3"		
			commandId="org.eclipse.php.ui.edit.text.open.editor"	
			contextId="org.eclipse.php.ui.contexts.window"		
			schemeId="org.eclipse.ui.defaultAcceleratorConfiguration" />
Comment 2 Guy Gurfinkel CLA 2007-02-20 11:16:29 EST
fixed, thanks Moshe.
Comment 3 Gadi Goldbarg CLA 2007-02-21 10:21:23 EST
fixed
Comment 4 Eclipse Webmaster CLA 2007-07-29 09:19:42 EDT
Changing OS from Mac OS to Mac OS X as per bug 185991