[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jedit-cvs
Subject:    [ jEdit-CVS ] jEdit/org/gjt/sp/jedit/textarea JEditTextArea.java,1.362,1.363
From:       Alan Ezust <ezust () users ! sourceforge ! net>
Date:       2005-12-31 21:34:23
Message-ID: E1EsoMu-00086F-M0 () mail ! sourceforge ! net
[Download RAW message or body]

Update of /cvsroot/jedit/jEdit/org/gjt/sp/jedit/textarea
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8011/org/gjt/sp/jedit/textarea

Modified Files:
	JEditTextArea.java 
Log Message:
Added a toString() method which prints out information about the state of the JEditTextArea.
This is used by the TextAreaDebugger plugin.

Index: JEditTextArea.java
===================================================================
RCS file: /cvsroot/jedit/jEdit/org/gjt/sp/jedit/textarea/JEditTextArea.java,v
retrieving revision 1.362
retrieving revision 1.363
diff -u -d -r1.362 -r1.363
--- JEditTextArea.java	16 Dec 2005 07:26:16 -0000	1.362
+++ JEditTextArea.java	31 Dec 2005 21:34:21 -0000	1.363
@@ -26,6 +26,7 @@
 //{{{ Imports
 import java.awt.*;
 import java.awt.event.*;
+import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.List;
@@ -46,6 +47,8 @@
 import org.gjt.sp.jedit.gui.InputHandler;
 import org.gjt.sp.jedit.syntax.*;
 import org.gjt.sp.util.Log;
+
+
 //}}}
 
 /**
@@ -151,6 +154,25 @@
 		popupEnabled = true;
 	} //}}}
 
+	public String toString() {
+		ArrayList sl = new ArrayList();
+		sl .add("caret: " + caret);
+		sl.add("caretLine: " + caretLine );
+		sl.add("caretScreenLine: " + caretScreenLine);
+		sl.add("electricScroll: " + electricScroll);
+		sl.add("horizontalOffset: " + horizontalOffset);
+		sl.add("magicCaret: " + magicCaret);
+		sl.add("offsetXY" + offsetXY.toString());
+		sl.add("oldCaretLine: " + oldCaretLine);
+		sl.add("physLastLine: " + physLastLine);
+		sl.add("screenLastLine: " + screenLastLine);
+		sl.add("visibleLines: " + visibleLines);
+		sl.add("firstPhysicalLine: " + getFirstPhysicalLine());
+		sl.add("lastPhysicalLine=" + getLastPhysicalLine());
+		return TextUtilities.join(sl, "\n");
+	}
+	
+	
 	//{{{ dispose() method
 	/**
 	 * Plugins and macros should not call this method.
@@ -759,7 +781,10 @@
 
 		Point point = offsetToXY(line,offset,offsetXY);
 		if(point == null)
+		// FIXME - we need to reset the state of this window so that it has the right
+		// dimensions again. 
 		{
+			
 			Log.log(Log.ERROR,this,"BUG: screenLine=" + screenLine
 				+ ",visibleLines=" + visibleLines
 				+ ",physicalLine=" + line



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
jEdit-CVS mailing list
jEdit-CVS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jedit-cvs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic