/******************************************************************************* * Copyright (c) 2000, 2005 IBM Corporation 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 * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package org.rubypeople.rdt.internal.ui.search; import org.eclipse.jface.viewers.Viewer; import org.eclipse.jface.viewers.ViewerSorter; public class RubyElementLineSorter extends ViewerSorter { /* * @see org.eclipse.jface.viewers.ViewerSorter#compare(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object) */ public int compare(Viewer viewer, Object e1, Object e2) { RubyElementLine jel1= (RubyElementLine) e1; RubyElementLine jel2= (RubyElementLine) e2; return jel1.getLine() - jel2.getLine(); } }