|
Dali Provisional API Release 3.2 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
public interface JpaSelectionManager
Each workbench,
workbench window,
and workbench page has a corresponding
JPA selection manager
that can be used to set the JPA selection in that workbench, window, or page.
To access a workbench's JPA selection manager:
JpaStructureNode structureNode = ...;
IWorkbench workbench = PlatformUI.getWorkbench();
// even though IWorkbench extends IAdaptable, it does not delegate to the
// Platform adapter manager; so registered adapter factories are *not* used... :-(
// JpaSelectionManager selectionManager = (JpaSelectionManager) workbench.getAdapter(JpaSelectionManager.class);
JpaSelectionManager selectionManager = PlatformTools.getAdapter(workbench, JpaSelectionManager.class);
selectionManager.setSelection(structureNode);
To access a workbench window's JPA selection manager:
JpaStructureNode structureNode = ...;
IWorkbenchWindow window = ...;
// IWorkbenchWindow does not extend IAdaptable(!)
JpaSelectionManager selectionManager = PlatformTools.getAdapter(window, JpaSelectionManager.class);
selectionManager.setSelection(structureNode);
To access a workbench page's JPA selection manager:
JpaStructureNode structureNode = ...;
IWorkbenchPage page = ...;
// IWorkbenchPage does not extend IAdaptable(!)
JpaSelectionManager selectionManager = PlatformTools.getAdapter(page, JpaSelectionManager.class);
selectionManager.setSelection(structureNode);
org.eclipse.jpt.jpa.ui.internal.selection.WorkbenchAdapterFactory,
org.eclipse.jpt.jpa.ui.internal.selection.WorkbenchWindowAdapterFactory,
org.eclipse.jpt.jpa.ui.internal.selection.WorkbenchPageAdapterFactory,
org.eclipse.jpt.jpa.ui.internal.selection.JpaWorkbenchSelectionManager| Nested Class Summary | |
|---|---|
static class |
JpaSelectionManager.Null
A "null" JPA selection manager does nothing. |
| Method Summary | |
|---|---|
void |
setSelection(JpaStructureNode selection)
Set the JPA selection for the selection manager's subject. |
| Method Detail |
|---|
void setSelection(JpaStructureNode selection)
|
Dali Provisional API Release 3.2 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||