Integer offset; for (int i= 0; i < fLineOffsets.size(); i++) { offset= (Integer)fLineOffsets.get(i); try { doc.replace(offset.intValue(), 1, doc.getLegalLineDelimiters()[0]); } catch (BadLocationException ble) { DebugUIUtils.logError(ble); } } for (int i= 0; i < fTabOffsets.size(); i++) { offset= (Integer)fTabOffsets.get(i); try { doc.replace(offset.intValue(), 1, "\t"); } catch (BadLocationException ble) { DebugUIUtils.logError(ble); } }
	public void createPartControl(Composite parent) {				int styles= SWT.V_SCROLL | SWT.H_SCROLL | SWT.MULTI | SWT.FULL_SELECTION;		fSourceViewer= new SourceViewer(parent, null, styles);		JavaTextTools textTools= JavaPlugin.getDefault().getJavaTextTools();		fSourceViewer.configure(new DisplayViewerConfiguration(textTools, this));		fSourceViewer.addSelectionChangedListener(this);		IDocument doc= null;		if (fRestoredContents != null) {			doc= new Document(fRestoredContents);		} else {			doc= new Document();		}		fSourceViewer.setDocument(doc);		fRestoredContents= null;		initializeActions();		initializeToolBar();		// create context menu		MenuManager menuMgr = new MenuManager("#PopUp", ID_DISPLAY_VIEW); //$NON-NLS-1$		menuMgr.setRemoveAllWhenShown(true);		menuMgr.addMenuListener(new IMenuListener() {			public void menuAboutToShow(IMenuManager mgr) {				fillContextMenu(mgr);			}		});				Menu menu = menuMgr.createContextMenu(fSourceViewer.getTextWidget());		fSourceViewer.getTextWidget().setMenu(menu);		getSite().registerContextMenu(menuMgr, fSourceViewer);		getSite().setSelectionProvider(fSourceViewer.getSelectionProvider());				WorkbenchHelp.setHelp(fSourceViewer.getTextWidget(), new ViewContextComputer(this, IJavaHelpContextIds.DISPLAY_VIEW));			}