blob: 17783fc8864751f8516dd4aad74f4ba7a19d2917 [file] [log] [blame]
/*
* Copyright (c) 2006 Borland Software Corporation
*
* 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:
* Dmitry Stadnik (Borland) - initial API and implementation
*/
package org.eclipse.gmf.map.editor.navigator;
import org.eclipse.gmf.map.editor.edit.parts.MappingEditPart;
import org.eclipse.jface.viewers.ViewerSorter;
/**
* @generated
*/
public class GMFMapNavigatorSorter extends ViewerSorter {
/**
* @generated
*/
private static final int GROUP_CATEGORY = 7005;
/**
* @generated
*/
public int category(Object element) {
if (element instanceof GMFMapNavigatorItem) {
GMFMapNavigatorItem item = (GMFMapNavigatorItem) element;
if (MappingEditPart.MODEL_ID.equals(item.getModelID())) {
return item.getVisualID();
}
}
return GROUP_CATEGORY;
}
}