boolean (Object o) { if (o instanceof StructureViewTreeElement) { final Object value = ((StructureViewTreeElement)o).getValue(); final String name = myElement.getName(); if (value instanceof PyElement && name != null) { return name.equals(((PyElement)value).getName()); } } return false; }