diff dwtx/jface/text/AbstractDocument.d @ 136:6dcb0baaa031

Regex removal of throws decls, some instanceof
author Frank Benoit <benoit@tionex.de>
date Sun, 24 Aug 2008 02:20:40 +0200
parents 51e6e63f930e
children b6bad70d540a
line wrap: on
line diff
--- a/dwtx/jface/text/AbstractDocument.d	Sun Aug 24 01:52:31 2008 +0200
+++ b/dwtx/jface/text/AbstractDocument.d	Sun Aug 24 02:20:40 2008 +0200
@@ -515,7 +515,7 @@
     /*
      * @see dwtx.jface.text.IDocument#addPosition(dwtx.jface.text.Position)
      */
-    public void addPosition(Position position) throws BadLocationException {
+    public void addPosition(Position position)  {
         try {
             addPosition(DEFAULT_CATEGORY, position);
         } catch (BadPositionCategoryException e) {
@@ -913,7 +913,7 @@
     /*
      * @see dwtx.jface.text.IDocument#getChar(int)
      */
-    public char getChar(int pos) throws BadLocationException {
+    public char getChar(int pos)  {
         if ((0 > pos) || (pos >= getLength()))
             throw new BadLocationException();
         return getStore().get(pos);
@@ -922,7 +922,7 @@
     /*
      * @see dwtx.jface.text.IDocument#getContentType(int)
      */
-    public String getContentType(int offset) throws BadLocationException {
+    public String getContentType(int offset)  {
         String contentType= null;
         try {
             contentType= getContentType(DEFAULT_PARTITIONING, offset, false);
@@ -957,7 +957,7 @@
     /*
      * @see dwtx.jface.text.IDocument#getLineDelimiter(int)
      */
-    public String getLineDelimiter(int line) throws BadLocationException {
+    public String getLineDelimiter(int line)  {
         return getTracker().getLineDelimiter(line);
     }
 
@@ -1016,35 +1016,35 @@
     /*
      * @see dwtx.jface.text.IDocument#getLineLength(int)
      */
-    public int getLineLength(int line) throws BadLocationException {
+    public int getLineLength(int line)  {
         return getTracker().getLineLength(line);
     }
 
     /*
      * @see dwtx.jface.text.IDocument#getLineOfOffset(int)
      */
-    public int getLineOfOffset(int pos) throws BadLocationException {
+    public int getLineOfOffset(int pos)  {
         return getTracker().getLineNumberOfOffset(pos);
     }
 
     /*
      * @see dwtx.jface.text.IDocument#getLineOffset(int)
      */
-    public int getLineOffset(int line) throws BadLocationException {
+    public int getLineOffset(int line)  {
         return getTracker().getLineOffset(line);
     }
 
     /*
      * @see dwtx.jface.text.IDocument#getLineInformation(int)
      */
-    public IRegion getLineInformation(int line) throws BadLocationException {
+    public IRegion getLineInformation(int line)  {
         return getTracker().getLineInformation(line);
     }
 
     /*
      * @see dwtx.jface.text.IDocument#getLineInformationOfOffset(int)
      */
-    public IRegion getLineInformationOfOffset(int offset) throws BadLocationException {
+    public IRegion getLineInformationOfOffset(int offset)  {
         return getTracker().getLineInformationOfOffset(offset);
     }
 
@@ -1058,7 +1058,7 @@
     /*
      * @see dwtx.jface.text.IDocument#getNumberOfLines(int, int)
      */
-    public int getNumberOfLines(int offset, int length) throws BadLocationException {
+    public int getNumberOfLines(int offset, int length)  {
         return getTracker().getNumberOfLines(offset, length);
     }
 
@@ -1072,7 +1072,7 @@
     /*
      * @see dwtx.jface.text.IDocument#getPartition(int)
      */
-    public ITypedRegion getPartition(int offset) throws BadLocationException {
+    public ITypedRegion getPartition(int offset)  {
         ITypedRegion partition= null;
         try {
             partition= getPartition(DEFAULT_PARTITIONING, offset, false);
@@ -1086,7 +1086,7 @@
     /*
      * @see dwtx.jface.text.IDocument#computePartitioning(int, int)
      */
-    public ITypedRegion[] computePartitioning(int offset, int length) throws BadLocationException {
+    public ITypedRegion[] computePartitioning(int offset, int length)  {
         ITypedRegion[] partitioning= null;
         try {
             partitioning= computePartitioning(DEFAULT_PARTITIONING, offset, length, false);
@@ -1100,7 +1100,7 @@
     /*
      * @see dwtx.jface.text.IDocument#getPositions(java.lang.String)
      */
-    public Position[] getPositions(String category) throws BadPositionCategoryException {
+    public Position[] getPositions(String category)  {
 
         if (category is null)
             throw new BadPositionCategoryException();
@@ -1144,7 +1144,7 @@
     /*
      * @see dwtx.jface.text.IDocument#get(int, int)
      */
-    public String get(int pos, int length) throws BadLocationException {
+    public String get(int pos, int length)  {
         int myLength= getLength();
         if ((0 > pos) || (0 > length) || (pos + length > myLength))
             throw new BadLocationException();
@@ -1170,7 +1170,7 @@
     /*
      * @see dwtx.jface.text.IDocument#removePosition(java.lang.String, dwtx.jface.text.Position)
      */
-    public void removePosition(String category, Position position) throws BadPositionCategoryException {
+    public void removePosition(String category, Position position)  {
 
         if (position is null)
             return;
@@ -1241,7 +1241,7 @@
     /*
      * @see dwtx.jface.text.IDocument#removePositionCategory(java.lang.String)
      */
-    public void removePositionCategory(String category) throws BadPositionCategoryException {
+    public void removePositionCategory(String category)  {
 
         if (category is null)
             return;
@@ -1286,7 +1286,7 @@
      * @see dwtx.jface.text.IDocument#replace(int, int, java.lang.String)
      * @since 3.1
      */
-    public void replace(int pos, int length, String text, long modificationStamp) throws BadLocationException {
+    public void replace(int pos, int length, String text, long modificationStamp)  {
         if ((0 > pos) || (0 > length) || (pos + length > getLength()))
             throw new BadLocationException();
 
@@ -1308,14 +1308,14 @@
      * 
      * @since 3.4
      */
-    public bool isLineInformationRepairNeeded(int offset, int length, String text) throws BadLocationException {
+    public bool isLineInformationRepairNeeded(int offset, int length, String text)  {
         return false;
     }
 
     /*
      * @see dwtx.jface.text.IDocument#replace(int, int, java.lang.String)
      */
-    public void replace(int pos, int length, String text) throws BadLocationException {
+    public void replace(int pos, int length, String text)  {
         if (length is 0 && (text is null || text.length() is 0))
             replace(pos, length, text, getModificationStamp());
         else
@@ -1369,7 +1369,7 @@
     /*
      * @see dwtx.jface.text.IDocument#search(int, java.lang.String, bool, bool, bool)
      */
-    public int search(int startPosition, String findString, bool forwardSearch, bool caseSensitive, bool wholeWord) throws BadLocationException {
+    public int search(int startPosition, String findString, bool forwardSearch, bool caseSensitive, bool wholeWord)  {
         try {
             IRegion region= getFindReplaceDocumentAdapter().find(startPosition, findString, forwardSearch, caseSensitive, wholeWord, false);
             return region is null ?  -1 : region.getOffset();
@@ -1575,7 +1575,7 @@
      * @see dwtx.jface.text.IDocumentExtension3#getLegalContentTypes(java.lang.String)
      * @since 3.0
      */
-    public String[] getLegalContentTypes(String partitioning) throws BadPartitioningException {
+    public String[] getLegalContentTypes(String partitioning)  {
         IDocumentPartitioner partitioner= getDocumentPartitioner(partitioning);
         if (partitioner !is null)
             return partitioner.getLegalContentTypes();
@@ -1832,7 +1832,7 @@
      * @throws BadPositionCategoryException if category is undefined in this document
      * @since 3.4
      */
-    public Position[] getPositions(String category, int offset, int length, bool canStartBefore, bool canEndAfter) throws BadPositionCategoryException {
+    public Position[] getPositions(String category, int offset, int length, bool canStartBefore, bool canEndAfter)  {
         if (canStartBefore && canEndAfter || (!canStartBefore && !canEndAfter)) {
             List documentPositions;
             if (canStartBefore && canEndAfter) {
@@ -1901,7 +1901,7 @@
      * @throws BadPositionCategoryException if category is undefined in this document
      * @since 3.4
      */
-    private List getStartingPositions(String category, int offset, int length) throws BadPositionCategoryException {
+    private List getStartingPositions(String category, int offset, int length)  {
         List positions= cast(List) fPositions.get(category);
         if (positions is null)
             throw new BadPositionCategoryException();
@@ -1923,7 +1923,7 @@
      * @throws BadPositionCategoryException if category is undefined in this document
      * @since 3.4
      */
-    private List getEndingPositions(String category, int offset, int length) throws BadPositionCategoryException {
+    private List getEndingPositions(String category, int offset, int length)  {
         List positions= cast(List) fEndPositions.get(category);
         if (positions is null)
             throw new BadPositionCategoryException();