private static boolean componentLevelsEqual(Component component, Component checkedComponent) {
      return (component instanceof Component.Application && checkedComponent instanceof Component.Application) ||
             (component instanceof Component.Project && checkedComponent instanceof Component.Project) ||
             (component instanceof Component.Module && checkedComponent instanceof Component.Module);
    }
private static boolean componentLevelsEqual(Component component, Component checkedComponent)