public static void displayInEditor(IFile file, IWorkbench workbench) {
		new UIJob("Display in editor") {
			@Override
			public IStatus runInUIThread(IProgressMonitor m) {
				try {
					IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
					IDE.openEditor(window.getActivePage(), file);
					workbench.showPerspective("org.eclipse.jdt.ui.JavaPerspective", window);
					return Status.OK_STATUS;
				}
				catch (NullPointerException | WorkbenchException e) {
					return Status.CANCEL_STATUS;
				}
			}
		}.schedule();
	}
Displays the given file in an editor using the Java perspective.  
If something goes wrong, this method has no effect. 

@param file The file to display.
@param workbench The workbench.
GhidraBuild/EclipsePlugins/GhidraDev/GhidraDevPlugin/src/main/java/ghidradev/EclipseMessageUtils.java