/*
 * Copyright (c) 2006-2008 Maskat Project.
 *
 * 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:
 *     Maskat Project - initial API and implementation
 */
package org.maskat.ui.views.properties.advanced;

import org.maskat.ui.views.properties.descriptor.Category;

import org.eclipse.ui.views.properties.IPropertySheetEntry;


public class UnsortPropertySheetSorter extends
		org.eclipse.ui.views.properties.PropertySheetSorter {

	/**Do nothing to display them as were registered*/
	public void sort(IPropertySheetEntry[] entries) {
		// do nothing to display them as were registered
	}
	
	public int compareCategories(String categoryA, String categoryB) {
		if (Category.BASE_CATEGORY.equals(categoryA)
				&& Category.MISC_CATEGORY.equals(categoryB)) {
			return -1;
		}
		if (Category.BASE_CATEGORY.equals(categoryB)
				&& Category.MISC_CATEGORY.equals(categoryA)) {
			return 1;
		}
		return super.compareCategories(categoryA, categoryB);
	}
}
