Fixed: 1774625 - duplicate one function block down into a folded php-doc
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / ui / text / folding / DefaultJavaFoldingStructureProvider.java
index 2b8c0ee..0739690 100644 (file)
@@ -860,42 +860,47 @@ public class DefaultJavaFoldingStructureProvider implements
                        while (e.hasNext()) {
                                JavaProjectionAnnotation newAnnotation = (JavaProjectionAnnotation) e
                                                .next();
-                               IJavaElement element = newAnnotation.getElement();
+//+
                                Position newPosition = (Position) updated.get(newAnnotation);
-
-                               List annotations = (List) previous.get(element);
-                               if (annotations == null) {
-
-                                       additions.put(newAnnotation, newPosition);
-
-                               } else {
-                                       Iterator x = annotations.iterator();
-                                       boolean matched = false;
-                                       while (x.hasNext()) {
-                                               Tuple tuple = (Tuple) x.next();
-                                               JavaProjectionAnnotation existingAnnotation = tuple.annotation;
-                                               Position existingPosition = tuple.position;
-                                               if (newAnnotation.isComment() == existingAnnotation
-                                                               .isComment()) {
-                                                       if (existingPosition != null
-                                                                       && (!newPosition.equals(existingPosition))) {
-                                                               existingPosition.setOffset(newPosition
-                                                                               .getOffset());
-                                                               existingPosition.setLength(newPosition
-                                                                               .getLength());
-                                                               updates.add(existingAnnotation);
-                                                       }
-                                                       matched = true;
-                                                       x.remove();
-                                                       break;
-                                               }
-                                       }
-                                       if (!matched)
-                                               additions.put(newAnnotation, newPosition);
-
-                                       if (annotations.isEmpty())
-                                               previous.remove(element);
-                               }
+                               additions.put(newAnnotation, newPosition);
+//-
+//                             IJavaElement element = newAnnotation.getElement();
+//                             Position newPosition = (Position) updated.get(newAnnotation);
+//
+//                             List annotations = (List) previous.get(element);
+//                             if (annotations == null) {
+//
+//                                     additions.put(newAnnotation, newPosition);
+//
+//                             } else {
+//                                     Iterator x = annotations.iterator();
+//                                     boolean matched = false;
+//                                     while (x.hasNext()) {
+//                                             Tuple tuple = (Tuple) x.next();
+//                                             JavaProjectionAnnotation existingAnnotation = tuple.annotation;
+//                                             Position existingPosition = tuple.position;
+//                                             if (newAnnotation.isComment() == existingAnnotation
+//                                                             .isComment()) {
+//                                                     if (existingPosition != null
+//                                                                     && (!newPosition.equals(existingPosition))) {
+//                                                             existingPosition.setOffset(newPosition
+//                                                                             .getOffset());
+//                                                             existingPosition.setLength(newPosition
+//                                                                             .getLength());
+//                                                             updates.add(existingAnnotation);
+//                                                     }
+//                                                     matched = true;
+//                                                     x.remove();
+//                                                     break;
+//                                             }
+//                                     }
+//                                     if (!matched)
+//                                             additions.put(newAnnotation, newPosition);
+//
+//                                     if (annotations.isEmpty())
+//                                             previous.remove(element);
+//                             }
+//-
                        }
 
                        e = previous.values().iterator();