/** @generated */
 public int category(Object element) {
   if (element instanceof TOENavigatorItem) {
     TOENavigatorItem item = (TOENavigatorItem) element;
     return TOEVisualIDRegistry.getVisualID(item.getView());
   }
   return GROUP_CATEGORY;
 }
 /** @generated */
 public String getText(View view) {
   if (view.getElement() != null && view.getElement().eIsProxy()) {
     return getUnresolvedDomainElementProxyText(view);
   }
   switch (TOEVisualIDRegistry.getVisualID(view)) {
     case AllHolderEditPart.VISUAL_ID:
       return getAllHolder_1000Text(view);
     case EmployeeEditPart.VISUAL_ID:
       return getEmployee_2001Text(view);
     case DepartmentEditPart.VISUAL_ID:
       return getDepartment_2002Text(view);
     case ProjectEditPart.VISUAL_ID:
       return getProject_2003Text(view);
     case ManagerEditPart.VISUAL_ID:
       return getManager_2004Text(view);
     case Employee2EditPart.VISUAL_ID:
       return getEmployee_3001Text(view);
     case Department2EditPart.VISUAL_ID:
       return getDepartment_3002Text(view);
     case ManagerManagedDepartmentEditPart.VISUAL_ID:
       return getManagerManagedDepartment_4001Text(view);
     case ManagerLeadsEditPart.VISUAL_ID:
       return getManagerLeads_4002Text(view);
     case ContributionEditPart.VISUAL_ID:
       return getContribution_4003Text(view);
   }
   return getUnknownElementText(view);
 }
 /** @generated */
 private String getProject_2003Text(View view) {
   IParser parser =
       TOEParserProvider.getParser(
           TOEElementTypes.Project_2003,
           view.getElement() != null ? view.getElement() : view,
           TOEVisualIDRegistry.getType(ProjectNameEditPart.VISUAL_ID));
   if (parser != null) {
     return parser.getPrintString(
         new EObjectAdapter(view.getElement() != null ? view.getElement() : view),
         ParserOptions.NONE.intValue());
   } else {
     TOEDiagramEditorPlugin.getInstance()
         .logError("Parser was not found for label " + 5009); // $NON-NLS-1$
     return ""; //$NON-NLS-1$
   }
 }
 /** @generated */
 public Image getImage(View view) {
   switch (TOEVisualIDRegistry.getVisualID(view)) {
     case AllHolderEditPart.VISUAL_ID:
       return getImage(
           "Navigator?Diagram?http://www.eclipse.org/examples/gmf/ocldriven/table-of-organization-and-equipment?AllHolder",
           TOEElementTypes.AllHolder_1000); // $NON-NLS-1$
     case EmployeeEditPart.VISUAL_ID:
       return getImage(
           "Navigator?TopLevelNode?http://www.eclipse.org/examples/gmf/ocldriven/table-of-organization-and-equipment?Employee",
           TOEElementTypes.Employee_2001); // $NON-NLS-1$
     case DepartmentEditPart.VISUAL_ID:
       return getImage(
           "Navigator?TopLevelNode?http://www.eclipse.org/examples/gmf/ocldriven/table-of-organization-and-equipment?Department",
           TOEElementTypes.Department_2002); // $NON-NLS-1$
     case ProjectEditPart.VISUAL_ID:
       return getImage(
           "Navigator?TopLevelNode?http://www.eclipse.org/examples/gmf/ocldriven/table-of-organization-and-equipment?Project",
           TOEElementTypes.Project_2003); // $NON-NLS-1$
     case ManagerEditPart.VISUAL_ID:
       return getImage(
           "Navigator?TopLevelNode?http://www.eclipse.org/examples/gmf/ocldriven/table-of-organization-and-equipment?Manager",
           TOEElementTypes.Manager_2004); // $NON-NLS-1$
     case Employee2EditPart.VISUAL_ID:
       return getImage(
           "Navigator?Node?http://www.eclipse.org/examples/gmf/ocldriven/table-of-organization-and-equipment?Employee",
           TOEElementTypes.Employee_3001); // $NON-NLS-1$
     case Department2EditPart.VISUAL_ID:
       return getImage(
           "Navigator?Node?http://www.eclipse.org/examples/gmf/ocldriven/table-of-organization-and-equipment?Department",
           TOEElementTypes.Department_3002); // $NON-NLS-1$
     case ManagerManagedDepartmentEditPart.VISUAL_ID:
       return getImage(
           "Navigator?Link?http://www.eclipse.org/examples/gmf/ocldriven/table-of-organization-and-equipment?Manager?managedDepartment",
           TOEElementTypes.ManagerManagedDepartment_4001); // $NON-NLS-1$
     case ManagerLeadsEditPart.VISUAL_ID:
       return getImage(
           "Navigator?Link?http://www.eclipse.org/examples/gmf/ocldriven/table-of-organization-and-equipment?Manager?leads",
           TOEElementTypes.ManagerLeads_4002); // $NON-NLS-1$
     case ContributionEditPart.VISUAL_ID:
       return getImage(
           "Navigator?Link?http://www.eclipse.org/examples/gmf/ocldriven/table-of-organization-and-equipment?Contribution",
           TOEElementTypes.Contribution_4003); // $NON-NLS-1$
   }
   return getImage("Navigator?UnknownElement", null); // $NON-NLS-1$
 }
 /** @generated */
 public final void selectionChanged(IStructuredSelection selection) {
   myDiagram = null;
   if (selection.size() == 1) {
     Object selectedElement = selection.getFirstElement();
     if (selectedElement instanceof TOENavigatorItem) {
       selectedElement = ((TOENavigatorItem) selectedElement).getView();
     } else if (selectedElement instanceof IAdaptable) {
       selectedElement = ((IAdaptable) selectedElement).getAdapter(View.class);
     }
     if (selectedElement instanceof Diagram) {
       Diagram diagram = (Diagram) selectedElement;
       if (AllHolderEditPart.MODEL_ID.equals(TOEVisualIDRegistry.getModelID(diagram))) {
         myDiagram = diagram;
       }
     }
   }
   setEnabled(myDiagram != null);
 }
 /** @generated */
 private boolean isOwnView(View view) {
   return AllHolderEditPart.MODEL_ID.equals(TOEVisualIDRegistry.getModelID(view));
 }