try {
ProcessExtension processExtension = (ProcessExtension)
element.createExecutableExtension("className");
Process process = (Process) processInfo.getProcess();
if (processExtension.acceptsProcess(process.getType())) {
ProcessEditPartFactory editPartFactory = processExtension.getProcessEditPartFactory();
editPartFactory.setProject(javaProject);
graphicalViewer.setEditPartFactory(editPartFactory);
ProcessWrapper processWrapper = processExtension.getProcessWrapperBuilder().getProcessWrapper(process, javaProject);
graphicalViewer.setContents(processWrapper);
break;
}