public static void printContributions(ArrayList<MMenuContribution> contributions) {
   for (MMenuContribution c : contributions) {
     trace("\n" + c, null); // $NON-NLS-1$
     for (MMenuElement element : c.getChildren()) {
       printElement(1, element);
     }
   }
 }
 private static void printElement(int level, MMenuElement element) {
   StringBuilder buf = new StringBuilder();
   for (int i = 0; i < level; i++) {
     buf.append('\t');
   }
   buf.append(element.toString());
   trace(buf.toString(), null);
   if (element instanceof MMenu) {
     for (MMenuElement item : ((MMenu) element).getChildren()) {
       printElement(level + 1, item);
     }
   }
 }