Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-patch] Warning Removal: ASM editor

This removes the deprecated function warnings on the ASM
text editor.  I don't know that this class is actually used,
but I've updated the text tools and the ParserScanner to use
the non-deprecated function behaviour of the new IPartitionTokenScanner.

Thomas
-------------------------------------------------------------
Thomas (toe-mah) Fletcher       QNX Software Systems
thomasf@xxxxxxx                 Core OS Technology Developer
(613)-591-0931                  http://www.qnx.com/
Index: AsmPartitionScanner.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/asm/AsmPartitionScanner.java,v
retrieving revision 1.1
diff -u -r1.1 AsmPartitionScanner.java
--- AsmPartitionScanner.java	26 Jun 2002 20:55:44 -0000	1.1
+++ AsmPartitionScanner.java	17 Aug 2002 13:38:02 -0000
@@ -12,6 +12,7 @@
 import org.eclipse.jface.text.rules.IToken;
 import org.eclipse.jface.text.rules.IWordDetector;
 import org.eclipse.jface.text.rules.MultiLineRule;
+import org.eclipse.jface.text.rules.RuleBasedPartitionScanner;
 import org.eclipse.jface.text.rules.RuleBasedScanner;
 import org.eclipse.jface.text.rules.Token;
 import org.eclipse.jface.text.rules.WordRule;
@@ -20,7 +21,7 @@
 /**
  * This scanner recognizes comments
  */
-public class AsmPartitionScanner extends RuleBasedScanner {
+public class AsmPartitionScanner extends RuleBasedPartitionScanner {
 
 
 	private final static String SKIP= "__skip";
Index: AsmTextTools.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/asm/AsmTextTools.java,v
retrieving revision 1.1
diff -u -r1.1 AsmTextTools.java
--- AsmTextTools.java	26 Jun 2002 20:55:44 -0000	1.1
+++ AsmTextTools.java	17 Aug 2002 13:38:02 -0000
@@ -10,6 +10,8 @@
 
 import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.jface.text.IDocumentPartitioner;
+import org.eclipse.jface.text.rules.DefaultPartitioner;
+import org.eclipse.jface.text.rules.IPartitionTokenScanner;
 import org.eclipse.jface.text.rules.RuleBasedPartitioner;
 import org.eclipse.jface.text.rules.RuleBasedScanner;
 import org.eclipse.jface.util.IPropertyChangeListener;
@@ -88,7 +90,7 @@
 	/**
 	 * Gets the partition scanner used.
 	 */
-	public RuleBasedScanner getPartitionScanner() {
+	public IPartitionTokenScanner getPartitionScanner() {
 		return fPartitionScanner;
 	}
 	
@@ -101,7 +103,8 @@
 			AsmPartitionScanner.C_MULTILINE_COMMENT
 		};
 		
-		return new RuleBasedPartitioner(getPartitionScanner(), types);
+		//return new RuleBasedPartitioner(getPartitionScanner(), types);
+		return new DefaultPartitioner(getPartitionScanner(), types);
 	}
 	
 		

Back to the top