| 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: | PDT | Assignee: | 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
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" />
fixed, thanks Moshe. fixed Changing OS from Mac OS to Mac OS X as per bug 185991 |