}
protected IAction getPropertiesAction() {
if (propertiesAction == null) {
final Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
final PropertyDialogAction tmp = new PropertyDialogAction(new SameShellProvider(shell),
new ISelectionProvider(){
public void addSelectionChangedListener( ISelectionChangedListener listener ) {
}
public ISelection getSelection() {
return new StructuredSelection(getMap());
}
public void removeSelectionChangedListener(
ISelectionChangedListener listener ) {
}
public void setSelection( ISelection selection ) {
}
});
propertiesAction = new Action(){
@Override
public void runWithEvent( Event event ) {
tmp.createDialog().open();
}
};
propertiesAction.setText(tmp.getText());
propertiesAction.setActionDefinitionId(tmp.getActionDefinitionId());
propertiesAction.setDescription(tmp.getDescription());
propertiesAction.setHoverImageDescriptor(tmp.getHoverImageDescriptor());
propertiesAction.setImageDescriptor(tmp.getImageDescriptor());
propertiesAction.setToolTipText(tmp.getToolTipText());
}
getEditorSite().getActionBars().setGlobalActionHandler(ActionFactory.PROPERTIES.getId(),
propertiesAction);
return propertiesAction;