Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 139443

Summary: There should be a hot key F3 for opening a file or php element from the PHP Explorer View.
Product: z_Archived Reporter: Moty Keret <moty>
Component: PDTAssignee: moshe <moshe>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P2 Keywords: plan
Version: unspecified   
Target Milestone: ---   
Hardware: Macintosh   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

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