1 | /* |
2 | * Copyright 2009, SDQ, IPD, Uni Karlsruhe (TH) |
3 | */ |
4 | package de.uka.ipd.sdq.pcm.gmf.resource.navigator; |
5 | |
6 | import org.eclipse.jface.viewers.ViewerSorter; |
7 | |
8 | import de.uka.ipd.sdq.pcm.gmf.resource.part.PalladioComponentModelVisualIDRegistry; |
9 | |
10 | /** |
11 | * @generated |
12 | */ |
13 | public class PalladioComponentModelNavigatorSorter extends ViewerSorter { |
14 | |
15 | /** |
16 | * @generated |
17 | */ |
18 | private static final int GROUP_CATEGORY = 7005; |
19 | |
20 | /** |
21 | * @generated |
22 | */ |
23 | public int category(Object element) { |
24 | if (element instanceof PalladioComponentModelNavigatorItem) { |
25 | PalladioComponentModelNavigatorItem item = (PalladioComponentModelNavigatorItem) element; |
26 | return PalladioComponentModelVisualIDRegistry.getVisualID(item |
27 | .getView()); |
28 | } |
29 | return GROUP_CATEGORY; |
30 | } |
31 | |
32 | } |