Refactory: remove unused classes, imports, fields and methods.
[phpeclipse.git] / net.sourceforge.phpeclipse.ui / src / net / sourceforge / phpdt / internal / ui / text / link / LinkedPositionManager.java
index 333a11c..56b2f29 100644 (file)
@@ -34,7 +34,7 @@ import org.eclipse.jface.text.IDocumentListener;
 import org.eclipse.jface.text.IPositionUpdater;
 import org.eclipse.jface.text.Position;
 import org.eclipse.jface.text.TypedPosition;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
+//import org.eclipse.jface.text.contentassist.ICompletionProposal;
 
 /**
  * This class manages linked positions in a document. Positions are linked by
@@ -268,12 +268,12 @@ public class LinkedPositionManager implements IDocumentListener,
         *            a number of additional choices to be displayed when selecting
         *            a position of this <code>type</code>.
         */
-       public void addPosition(int offset, int length,
-                       ICompletionProposal[] additionalChoices)
-                       throws BadLocationException {
-               String type = fDocument.get(offset, length);
-               addPosition(offset, length, type, additionalChoices);
-       }
+//     public void addPosition(int offset, int length,
+//                     ICompletionProposal[] additionalChoices)
+//                     throws BadLocationException {
+//             String type = fDocument.get(offset, length);
+//             addPosition(offset, length, type, additionalChoices);
+//     }
 
        /**
         * Adds a linked position of the specified position type to the manager.
@@ -301,41 +301,41 @@ public class LinkedPositionManager implements IDocumentListener,
         *            a number of additional choices to be displayed when selecting
         *            a position of this <code>type</code>.
         */
-       public void addPosition(int offset, int length, String type,
-                       ICompletionProposal[] additionalChoices)
-                       throws BadLocationException {
-               Position[] positions = getPositions(fDocument);
-
-               if (positions != null) {
-                       for (int i = 0; i < positions.length; i++)
-                               if (collides(positions[i], offset, length))
-                                       throw new BadLocationException(
-                                                       LinkedPositionMessages
-                                                                       .getString(("LinkedPositionManager.error.position.collision"))); //$NON-NLS-1$
-               }
-
-               String content = fDocument.get(offset, length);
-
-               if (containsLineDelimiters(content))
-                       throw new BadLocationException(
-                                       LinkedPositionMessages
-                                                       .getString(("LinkedPositionManager.error.contains.line.delimiters"))); //$NON-NLS-1$
-
-               try {
-                       fDocument.addPosition(fPositionCategoryName, new ProposalPosition(
-                                       offset, length, type, additionalChoices));
-               } catch (BadPositionCategoryException e) {
-                       WebUI.log(e);
-                       Assert.isTrue(false);
-               }
-       }
+//     public void addPosition(int offset, int length, String type,
+//                     ICompletionProposal[] additionalChoices)
+//                     throws BadLocationException {
+//             Position[] positions = getPositions(fDocument);
+//
+//             if (positions != null) {
+//                     for (int i = 0; i < positions.length; i++)
+//                             if (collides(positions[i], offset, length))
+//                                     throw new BadLocationException(
+//                                                     LinkedPositionMessages
+//                                                                     .getString(("LinkedPositionManager.error.position.collision"))); //$NON-NLS-1$
+//             }
+//
+//             String content = fDocument.get(offset, length);
+//
+//             if (containsLineDelimiters(content))
+//                     throw new BadLocationException(
+//                                     LinkedPositionMessages
+//                                                     .getString(("LinkedPositionManager.error.contains.line.delimiters"))); //$NON-NLS-1$
+//
+//             try {
+//                     fDocument.addPosition(fPositionCategoryName, new ProposalPosition(
+//                                     offset, length, type, additionalChoices));
+//             } catch (BadPositionCategoryException e) {
+//                     WebUI.log(e);
+//                     Assert.isTrue(false);
+//             }
+//     }
 
        /**
         * Tests if a manager is already active for a document.
         */
-       public static boolean hasActiveManager(IDocument document) {
-               return fgActiveManagers.get(document) != null;
-       }
+//     public static boolean hasActiveManager(IDocument document) {
+//             return fgActiveManagers.get(document) != null;
+//     }
 
        private void install(boolean canCoexist) {
 
@@ -548,10 +548,10 @@ public class LinkedPositionManager implements IDocumentListener,
                                                + position.getLength());
        }
 
-       public static boolean excludes(Position position, int offset, int length) {
-               return (offset + length <= position.getOffset())
-                               || (position.getOffset() + position.getLength() <= offset);
-       }
+//     public static boolean excludes(Position position, int offset, int length) {
+//             return (offset + length <= position.getOffset())
+//                             || (position.getOffset() + position.getLength() <= offset);
+//     }
 
        /*
         * Collides if spacing if positions intersect each other or are adjacent.