X-Git-Url: http://secure.phpeclipse.com
diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/link/LinkedPositionManager.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/link/LinkedPositionManager.java
index fe1c763..6f1157d 100644
--- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/link/LinkedPositionManager.java
+++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/link/LinkedPositionManager.java
@@ -18,7 +18,9 @@ import java.util.Map;
import net.sourceforge.phpeclipse.PHPeclipsePlugin;
-import org.eclipse.jface.text.Assert;
+//incastrix
+//import org.eclipse.jface.text.Assert;
+import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.BadPositionCategoryException;
import org.eclipse.jface.text.DocumentCommand;
@@ -30,7 +32,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
@@ -264,12 +266,12 @@ public class LinkedPositionManager implements IDocumentListener,
* a number of additional choices to be displayed when selecting
* a position of this type
.
*/
- 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.
@@ -297,41 +299,41 @@ public class LinkedPositionManager implements IDocumentListener,
* a number of additional choices to be displayed when selecting
* a position of this type
.
*/
- 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) {
- PHPeclipsePlugin.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) {
+// PHPeclipsePlugin.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) {
@@ -544,10 +546,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.