// Path: src/org/art_core/dev/cinder/model/IItem.java
// public interface IItem extends IAdaptable {
// 	String getName();
// 
// 	String getLocation();
// 	
// 	String getMessage();
// 
// 	int getLine();
// 
// 	int getOffset();
// 	
// 	int getTimestamp();
// 	
// 	ItemStatus getStatus();
// 	
// 	ItemSource getSource();
// 	
// 	HashMap<String, String> getDetails();
// 	
// 	ItemType getType();
// 	
// 	void setStatus(ItemStatus status);
// 
// 	IItem[] NONE = new IItem[] {};
// }


import org.art_core.dev.cinder.model.IItem;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerSorter;
package org.art_core.dev.cinder.views;


/**
 * A custom sorter for a content provider.
 */
public class JFSorter extends ViewerSorter {
	private int propertyIndex;
	private int direction;
	//private static int ASC = 0;
	private static int DESC = 1;
	
	/**
	 * Constructor.
	 */
	public JFSorter() {
		this.propertyIndex = 0;
		direction = DESC;
	}
	
	/**
	 * Set column to be sorted.
	 * @param col
	 */
	public void setColumn(int col) {
		if (col == this.propertyIndex) {
			direction = 1 - direction;
		} else {
			this.propertyIndex = col;
			direction = DESC;
		}
	}
	
	/**
	 * Compare to determine sort order.
	 */
	public int compare(Viewer viewer, Object o1, Object o2) {
// Path: src/org/art_core/dev/cinder/model/IItem.java
// public interface IItem extends IAdaptable {
// 	String getName();
// 
// 	String getLocation();
// 	
// 	String getMessage();
// 
// 	int getLine();
// 
// 	int getOffset();
// 	
// 	int getTimestamp();
// 	
// 	ItemStatus getStatus();
// 	
// 	ItemSource getSource();
// 	
// 	HashMap<String, String> getDetails();
// 	
// 	ItemType getType();
// 	
// 	void setStatus(ItemStatus status);
// 
// 	IItem[] NONE = new IItem[] {};
// }


// Path: src/org/art_core/dev/cinder/views/JFSorter.java
import org.art_core.dev.cinder.model.IItem;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerSorter;

package org.art_core.dev.cinder.views;


/**
 * A custom sorter for a content provider.
 */
public class JFSorter extends ViewerSorter {
	private int propertyIndex;
	private int direction;
	//private static int ASC = 0;
	private static int DESC = 1;
	
	/**
	 * Constructor.
	 */
	public JFSorter() {
		this.propertyIndex = 0;
		direction = DESC;
	}
	
	/**
	 * Set column to be sorted.
	 * @param col
	 */
	public void setColumn(int col) {
		if (col == this.propertyIndex) {
			direction = 1 - direction;
		} else {
			this.propertyIndex = col;
			direction = DESC;
		}
	}
	
	/**
	 * Compare to determine sort order.
	 */
	public int compare(Viewer viewer, Object o1, Object o2) {
		IItem item1 = (IItem) o1;