tag: release33

- accessibility
	Term now implements Accessible and returns an accessible context.
	The "accessible description" is set.
	The "accessible name" is set from OW to be the same as the tab name.

- performance
	- Added Term.setKeyStrokeSet() in order to allow sharing of,
	  sometimes large, sets.
	  Added code to OW to take advantage of this.
	  See 'updateKeyStrokeSet()' and 'getCommonKeyStrokeSet()'.
	  This code also tracks changes to the global keymap so that Term will
	  now pass through newly added keyboard accelerators.

================================================================================
back to main 3.3. trunk

- bug: <noid> Missing ANSI escape sequence handling:
	- ESC [ 4 h     set insert/overstrike mode
	- ESC [ 4 l	reset insert/overstrike mode
	- ESC [ 4; 17 r	margin control (used by vim for sub-windows)
	- ESC c		full reset
	- ESC [ ! p	soft reset
	- ESC [ <n> n	status report. (used by unix command 'resize')
			This also required cursor positioning ('H') to clip
			as opposed to ignore out of bounds row and
			column settings.

- bug: <noid> Exception when running "xemacs -nw" under pty-based Term
	xemacs has a propensity to send cursor motion directives with
	rows that exceed the boundaries and the checks in Ops.op_cm()
	were inadequate.

- issue 16010 (Autoscrolling behavior of terminal not ideal)
	Added a new properties
		boolean scrollOnOutput
		boolean trackCursor
	to complement the existing scrollOnInput.
	When 'scrollOnOutput' is set to 'false', you can use the
	scrollbar to look at some text higher up w/o it moving from
	underneath you as more output is produced.

	This feasture is "smart" in the sense that if the cursor is visible
	(i.e. the user hasn't scrolled away from the cursor) Term will
	scroll to track the cursor even if scrollOnOutput is set to false.

	However the smarts only kick in if 'trackCursor' is set to true.

	Adjsuted in netbeans/core/output/OutputTabTerm.java as well by adding
	term.setScrollOnOutput( false ) etc.

- new: added the following under CVS control:
	ReleaseNotes.ivan.txt
			This file.
	build.xml	For localized builds
	properties.html	Used by func_spec.html
	interpreter.html
			Used by func_spec.html
	func_spec.html	Evolution from proposal.3.html
	proposal.3.html	Original proposal as it appeared on the NB site.

================================================================================
tag: term_aug2001_ivan_12

- optimization
  Text with attributes (fg color, bg color, underline, active, etc) used
  to be rendered one character at a time and rather slowly.
  Switched to run-length based rendering where runs of characters
  with identical attributes are rendered together.
  Depending on the density of attributed text this has produced a *2 to
  *10 speedup in view painting.

  The function implementing this is Term.paint_line_new(). paint_line_old()
  has been kept around just in case.

================================================================================
tag: term_aug2001_ivan_11

- bug http://openide.netbeans.org/issues/show_bug.cgi?id=16027:
  Missing/awkward selection access functionality
    + public void paste()
    + public void copy()
    + property selectionExtent is now bound and fireProprtyChanged() is issued
      when selection changes.

- bug http://openide.netbeans.org/issues/show_bug.cgi?id=15953
  Exceptions when resized on selection.
  Fixed by adjusting selection in Term.adjust_lines.
  This is a stop-gap fix. All the selection adjustment code that uses
  Sel.intersection should be moved into Buffer methods.

- BG line stripe support (Term.setGlyph())
	- Eliminated interference between BG line strips and selection.
	  Did this by drawing the BG stripes before the selection in
	  Term.do_paint().
	- The stripes were being drawn in the gutters which made it look
	  funny. Now they're being draw only in the text area.

- bug <noid>
  BG color of characters would override Swing style selection.
  Fixed by having paint_line() not bother with BG rectangles if 
  the character falls into a selection and always set the character FG 
  color to the default fg.
  Added Extent.intersects(int, int) to help with this.

- bug <noid>
  From Ales and NB testers:
	> 1. When you run following simple program:
	>   public class Out {
	>       public static void main (String args[]) {        
	>           System.out.println("123");        
	>       }
	>   }
	> 
	>   and then you try to select more lines in OW, it looks strange. 
	>   - selection area ended somewhere in the middle of OW width
	>   - when you go (by selecting) behind OW right bound, squares will
	>     displayed in start of line (see squares.gif)
	>   - when you run this program second time, everything looks fine
	> 

	Reproduced and fixed.
	There are two parts to the problem:
	1) The selection is halfway through. 
	2) When you select and drag _out_ of the window you get the funny view.
	In both cases it had to do with (different) variables going below 0.
	Now, after a resize, line selection should extend all the way 
	and the drag right should work right.

- bug <noid>
  From Ales and NB testers:
	> 2. Sometimes (when playing with selection) we got NPE in 
	>   Term$Scroller.extend method, on 1125 line
	>   I found out, that sel.sel_extent is null from some reason
	> 

	This will happen if the selection "vanishes" while auto-scrolling
	is on. The way I reproduced it was by having a program trickle
	out a line of junk , once per second, then while it's running
	and scrolling select some test and drag up and out of the OW
	thereby starting the auto-scroller thread. Eventually the selection
	will go out of buffer history (If you have a short history or no
	anchors) and I got the same exception.

	I fixed it in Term.Scroller.extend() by checking for a null selection
	extent. That whole block of code is synchronized with Term.this
	which is the main lock for everything.

- Eliminated lots of OLD code.

================================================================================
tag: term_aug2001_ivan_10

+ Term.columnLeft(int n)
+ Term.columnRight(int n)
  These are analogs of lineUp/lineDown() for horizontal scrolling.

- auto-scrolling of dragged selections now works for both directions.
- auto-horizontal-scrolling to keep cursor in view. Only on input.
  This is tricky since because of non-local echoing the cursor position
  is not known on a keystroke. See comment above hscrollReset() for a
  detailed explanation of the design.

- bug <noid>
  Attributed text would not get rendered correctly on horizontal scroll.
  Fixed.

================================================================================
tag: term_aug2001_ivan_9

+ Horizontal scrollbars. Use
  	Term.setHorizontallyScrollable(boolean)
  to enable/disable it.
  Still needs auto scrolling and probably some other smarts.

================================================================================
tag: term_aug2001_ivan_8

- Sprinkled NOI18N's all over.
- Commented out debugging println's

================================================================================
tag: term_aug2001_ivan_7

- bug 15365 (View does't folow cursor - when writing)
  Fixed by adding a boolean property scrollOnInput() which by default is set
  to true.

- Added boolean property readOnly. When true, keystroke events and paste's
  are ignored.

================================================================================
tag: term_aug2001_ivan_6

+ Term.pageUp(int n)
+ Term.pageDown(int n)
+ Term.lineUp(int n)
+ Term.lineDown(int n)
	Scroll the view 'n' pages/lines up/down.
	Doing key bindings for these is up to the Term client.

- Implemented selection auto-scrolling for when mouse pointer moves out of
  the view. This is based on feedback from Chris Ledantec on nbui.

- Implemented SHIFT-left-click as a selection extension mechanism, per JLF.
  Actually it is slightly off in that it implements extension (what 
  you get when you drag) not addition semantics.

- bug: Term.possiblyNormalize() would occasionally cause a null Line exception.
  Fixed.

- bug: Tab expansion add's a '\0' into the buffer. On Windows this shows up 
  as as the Microsoft "unprintable character" square.
  Easily fixed in Term.OpsImpl.op_tab() by switching the ' ' character
  addition and the st.cursor.col++;

================================================================================
tag: term_aug2001_ivan_5

- bug: The common "null Line" bug fixed. Turns out I was using
  "synchronized(this)" in an inner class of Term.

- bug: minor bugs having to do with null'ed selections fixed. I think
  these only surfaced when I implemented absolute coordinates.

- Absolute Coordinates are in.
  What this means is that you no longer need to anchor text in order for
  Regions to work.

  The way this is accomplished is by having each line get an ever growing
  number and have Coord and ActiveRegions use these numbers for rows.

  implementation details:
  ----------------------
  To separate such "absolute" coordinates from the original buffer coordinates,
  instroduced package private class BCoord. Coord and BCoord can can be
  converted to each other. The conversion is based on 'Term.firsta' which
  is the absolute line number of the first line in thebufer. Just like
  Term.st.firstx is the buffer coordinate of the first line visible in
  the view.

  Similarly a BExtent was provided in parallel with Extent.

  Serious attention was payed to the possibility of 'firsta' wrapping around
  it's 32bit range. Ideally this could be dealt with by using unsigned numbers
  and modulo arithmetic, but Java doesn't have unsigned. Instead the variable
  is explicitly checked against Term.modulo = Integer.MAX_VALUE/2.
  The 2 is for good measure. Term.modulo can be artificially reduced to a
  small number in order to verify that selection and ActiveRegion relocation
  works correctly.

  ActiveRegions that go out of history periodically get culled.
  This is controlled using Term.cull_frequency.

- debugging aids:
  - Added a "debug gutter" Which can be used to print out view, buffer
    or absolute row coordinates.
  - Added Buffer.lock and Buffer.ck_lock() which helped me find race
    conditions. The code is commented out.

================================================================================
tag: term_aug2001_ivan_4

- preparatory work for processing of ANSI escape sequence
	ESC [ <m> ; <n> r

================================================================================
tag: term_aug2001_ivan_3

- bug: ActiveRegion.setSelectable(boolean) always set property to true. Fixed.
- bug: After the flush cleanup in term_aug2001_ivan_2 LineDispcipline's 
  eches of characters wouldn't show up until after a newline if
  the refreshEnabled property was off. Fixed by adding additional flushes.

+ Term.requestFocus() ... was missing. Added.

+ ActiveTerm.cancelRegion().
  This is supposed to help with hiliting regions that are detected only after
  the fact .. that is you aggressively call beginRegion(), like at the 
  beginning of a line, and if at the end of the line it turns out not to
  be useful you can cancel it.

================================================================================
tag: term_aug2001_ivan_2

- Fixed a bug where the Sun Copy key wouldn't copy things.

+ Term.flush(), TermStream.flush()
  See JavaDoc for Term.flush() for more info.

- Internal change to repaint(). 
  Term.repaint() used to always check the refreshEnabled attribute, which
  would cause things like scrolling or attribute changes not take
  immediate effect. So now we have possibly_repaint() which checks the 
  attribute and repaint() which doesn't.
  Only putChar() and putChars() use possibly_repaint().
  Made repaint() and possibly_repaint() be protected.


================================================================================
tag: term_aug2001_ivan_1

- AbstractInterp, InterpDumb, InterpANSI made public

- class ActiveTerm now inherits from class StreamTerm instead of class Term

+ ActiveRegion ActiveRegion.firstChild()
+ ActiveRegion ActiveRegion.getNextSibling()
+ ActiveRegion ActiveRegion.getPreviousSibling()

  To be used as follows:
	ActiveTerm at;
	r = at.regionManager().root().firstChild();
	r = r.getNextSibling()
	...
  You should be able to use Regions instead of Coords to index actions (see
  OutputTabTerm.<init>, new ActiveTermListener.

+ int Ops.op_get_width()
+ int Ops.op_get_column()

  To help with formatting and wrapping text in a Term

- The OutputStream 'pin'  parameter to StreamTerm.connect() is now optional.
  This makes sense for output only situations.

+ void Term.setTabSize(int tab_size)
+ int Term.getTabSize()
  Per NB folks' request.
  You should be able to get rid of expandTabs() in
  org/netbeans/core/output/OutputTabTerm.java.
