getViewSite() .getWorkbenchWindow() .getShell() .getDisplay() .asyncExec(new Runnable() {
IViewSite viewSite = getViewSite(); if (viewSite == null) return; IWorkbenchWindow workbenchWindow = viewSite.getWorkbenchWindow(); if (workbenchWindow == null) return; Shell shell = workbenchWindow.getShell(); if (shell == null) return; Display display = shell.getDisplay(); if (display == null) return; display.asyncExec(new Runnable() {
	public void createPartControl(Composite parent) {		viewer = new TableViewer(parent, 770);		viewer.setContentProvider(new ViewContentProvider());		viewer.setLabelProvider(			new DecoratingLabelProvider(				new StorageLabelProvider(),				getSite()					.getWorkbenchWindow()					.getWorkbench()					.getDecoratorManager()					.getLabelDecorator()));		viewer.setSorter(new NameSorter());		viewer.getTable().addKeyListener(new KeyListener() {			public void keyPressed(KeyEvent e) {				if (e.keyCode == SWT.COMMAND || e.keyCode == SWT.ALT)					setForceOpenInTextEditor(true);			}			public void keyReleased(KeyEvent e) {				setForceOpenInTextEditor(false);			}		});		doubleClickAction = new Action() {			public void run() {				ISelection selection = getViewer().getSelection();				List list = ((IStructuredSelection) selection).toList();				for (int i = 0; i < list.size(); i++) {					Object object = list.get(i);					IWOLipsResource wolipsResource = null;					if (object != null) {						if (object instanceof IResource) {							wolipsResource =								WOLipsCore.getWOLipsModel().getWOLipsResource(									(IResource) object);						} else if (object instanceof ICompilationUnit) {							wolipsResource =								WOLipsCore									.getWOLipsModel()									.getWOLipsCompilationUnit(									(ICompilationUnit) object);						}						if (wolipsResource != null) {							wolipsResource.open(isForceOpenInTextEditor());						}					}				}			}		};		viewer.addDoubleClickListener(new IDoubleClickListener() {			public void doubleClick(DoubleClickEvent event) {				getDoubleClickAction().run();				setForceOpenInTextEditor(false);			}		});		ResourcesPlugin			.getWorkspace()			.addResourceChangeListener(new IResourceChangeListener() {			public void resourceChanged(IResourceChangeEvent event) {				getViewSite()					.getWorkbenchWindow()					.getShell()					.getDisplay()					.asyncExec(new Runnable() {					public void run() {						getViewer().refresh(false);					}				});			}		});		getViewSite().getPage().addSelectionListener(this);	}