action= new TextOperationAction(EditorMessages.getBundleForConstructedKeys(), "Editor.OpenHyperlink.", this, HyperlinkManager.OPEN_HYPERLINK, true); //$NON-NLS-1$;
action.setHelpContextId(IAbstractTextEditorHelpContextIds.OPEN_HYPERLINK_ACTION);
action.setActionDefinitionId(ITextEditorActionDefinitionIds.OPEN_HYPERLINK);
setAction(ITextEditorActionConstants.OPEN_HYPERLINK, action);
PropertyDialogAction openProperties= new PropertyDialogAction(
new IShellProvider() {
public Shell getShell() {
return getSite().getShell();
}
},
new ISelectionProvider() {
public void addSelectionChangedListener(ISelectionChangedListener listener) {
}
public ISelection getSelection() {
return new StructuredSelection(getEditorInput());
}
public void removeSelectionChangedListener(ISelectionChangedListener listener) {
}
public void setSelection(ISelection selection) {
}
});
openProperties.setActionDefinitionId(IWorkbenchCommandConstants.FILE_PROPERTIES);
setAction(ITextEditorActionConstants.PROPERTIES, openProperties);
markAsContentDependentAction(ITextEditorActionConstants.UNDO, true);
markAsContentDependentAction(ITextEditorActionConstants.REDO, true);
markAsContentDependentAction(ITextEditorActionConstants.FIND, true);