org.eclipse.ui.actions.OpenFileAction Java Examples

The following examples show how to use org.eclipse.ui.actions.OpenFileAction. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: NewTextSearchActionGroup.java    From Pydev with Eclipse Public License 1.0 6 votes vote down vote up
public NewTextSearchActionGroup(IViewPart part) {
    Assert.isNotNull(part);
    IWorkbenchPartSite site = part.getSite();
    fSelectionProvider = site.getSelectionProvider();
    fPage = site.getPage();
    fOpenPropertiesDialog = new PropertyDialogAction(site, fSelectionProvider);
    fOpenAction = new OpenFileAction(fPage);
    ISelection selection = fSelectionProvider.getSelection();

    if (selection instanceof IStructuredSelection) {
        fOpenPropertiesDialog.selectionChanged((IStructuredSelection) selection);
    } else {
        fOpenPropertiesDialog.selectionChanged(selection);
    }

}
 
Example #2
Source File: NewTextSearchActionGroup.java    From Pydev with Eclipse Public License 1.0 6 votes vote down vote up
public NewTextSearchActionGroup(IViewPart part) {
    Assert.isNotNull(part);
    IWorkbenchPartSite site = part.getSite();
    fSelectionProvider = site.getSelectionProvider();
    fPage = site.getPage();
    fOpenPropertiesDialog = new PropertyDialogAction(site, fSelectionProvider);
    fOpenAction = new OpenFileAction(fPage);
    ISelection selection = fSelectionProvider.getSelection();

    if (selection instanceof IStructuredSelection) {
        fOpenPropertiesDialog.selectionChanged((IStructuredSelection) selection);
    } else {
        fOpenPropertiesDialog.selectionChanged(selection);
    }

}
 
Example #3
Source File: AppEngineActionProvider.java    From google-cloud-eclipse with Apache License 2.0 4 votes vote down vote up
@Override
public void init(ICommonActionExtensionSite aSite) {
  super.init(aSite);
  openFileAction = new OpenFileAction(getWorkbenchPage());
}