Пример #1
0
 public static String getIndentedClipboardText(
     Object[] elements, IUDetailsLabelProvider labelProvider) {
   StringBuffer buffer = new StringBuffer();
   for (int i = 0; i < elements.length; i++) {
     if (i > 0) buffer.append(NEWLINE);
     appendIndention(buffer, elements[i]);
     buffer.append(labelProvider.getClipboardText(elements[i], DELIMITER));
   }
   return buffer.toString();
 }
Пример #2
0
 private static void appendIndention(StringBuffer buffer, Object element) {
   Object parent;
   while (element instanceof ProvElement
       && (parent = ((ProvElement) element).getParent(element)) != null) {
     buffer.append(NESTING_INDENT);
     element = parent;
   }
 }