Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2011 itemis AG (http://www.itemis.eu) and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html /
 
 package org.eclipse.xtext.ui.compare;
 
import  org.eclipse.compare.CompareConfiguration;
import  org.eclipse.jface.text.source.ISourceViewer;
import  org.eclipse.jface.viewers.ISelection;
import  org.eclipse.jface.viewers.Viewer;
import  org.eclipse.swt.widgets.Composite;
import  org.eclipse.swt.widgets.Control;

Author(s):
Michael Clay - Initial contribution and API
public abstract class AbstractContentViewer extends Viewer {
	protected Composite parent;
	protected CompareConfiguration compareConfiguration;
	protected ISelection selection;
	protected ISourceViewer sourceViewer;
	protected Object input;
	public void init(Composite parent, CompareConfiguration config) {
		this. = parent;
		this. = config;
	}
	public Control getControl() {
		if ( == null) {
		}
		return  != null ? .getTextWidget() : null;
	}
	protected abstract ISourceViewer createSourceViewer();
	protected abstract void configureSourceViewer(ISourceViewer sourceViewer);
	public Object getInput() {
		return this.;
	}
	public ISelection getSelection() {
		return this.;
	}
	public void refresh() {
	}
	public void setInput(Object input) {
		this. = input;
	}
	public void setSelection(ISelection selectionboolean reveal) {
		this. = selection;
	}
	public Composite getParent() {
		return ;
	}
	public CompareConfiguration getCompareConfiguration() {
	}
New to GrepCode? Check out our FAQ X