Eliminated unnecessary allocations in ParserRuleSet#getRules(), which
was a CPU hot spot shown in jProfiler while reading a large file.


git-svn-id: svn://svn.code.sf.net/p/jedit/svn/jEdit/trunk@13861 6b1eeb88-9816-0410-afa2-b43733a0f04e
Fix conditional in TokenMarker's LineContext class.
Thanks to ksatoda for pointing it out; the "getName() != null" conditional was probably wrong, since that method always returns non-null. Other code in that class seems to imply "getModeName() != null" is the right choice. My tests didn't show any different in the highlighting of several modes, so I can't really tell what the side effects are.



git-svn-id: svn://svn.code.sf.net/p/jedit/svn/jEdit/trunk@13862 6b1eeb88-9816-0410-afa2-b43733a0f04e
Changed the way the screen bounds are calculated for showing the context menu of the text area the first time. The previous calculation created a large delay for several users (e.g. 10 seconds or more to show the context menu the first time!).

git-svn-id: svn://svn.code.sf.net/p/jedit/svn/jEdit/trunk@13867 6b1eeb88-9816-0410-afa2-b43733a0f04e
Fixed a long delay experienced mostly by Windows users when showing the context menu of the text area or the drop down of a history text field the first time. The long delay was caused by the call to GraphicsDevice.getConfigurations, which was used in order to calculate the screen bounds. Now using a much faster alternative.

git-svn-id: svn://svn.code.sf.net/p/jedit/svn/jEdit/trunk@13868 6b1eeb88-9816-0410-afa2-b43733a0f04e
Removed the startup script that was meant to workaround the slow call to GraphicsDevice.getConfigurations() for the context menu, since this call has been replaced by an alternative method which is fast.

git-svn-id: svn://svn.code.sf.net/p/jedit/svn/jEdit/trunk@13869 6b1eeb88-9816-0410-afa2-b43733a0f04e
Patch from Kevin Hunter. This should reduce the number of memory copies
that are needed to do an MD5sum of the buffer.



git-svn-id: svn://svn.code.sf.net/p/jedit/svn/jEdit/trunk@13871 6b1eeb88-9816-0410-afa2-b43733a0f04e
updated credits for MD5sum feature.


git-svn-id: svn://svn.code.sf.net/p/jedit/svn/jEdit/trunk@13872 6b1eeb88-9816-0410-afa2-b43733a0f04e
added a check for properties for the buffer mode.  Auto-indent is now only done when the mode supports any of the various auto-indent properties, specifically these properties:

"indentOpenBrackets", "indentOpenBrackets", "unalignedOpenBrackets", "unalignedCloseBrackets", "indentNextLine", "unindentThisLine", "electricKeys", "doubleBracketIndent", "lineUpClosingBracket"

If any of these properties are supported by the mode, then auto-indent will be performed.


git-svn-id: svn://svn.code.sf.net/p/jedit/svn/jEdit/trunk@13875 6b1eeb88-9816-0410-afa2-b43733a0f04e
fixed backwards logic, logic backwards fixed

git-svn-id: svn://svn.code.sf.net/p/jedit/svn/jEdit/trunk@13876 6b1eeb88-9816-0410-afa2-b43733a0f04e
fixed coding style

git-svn-id: svn://svn.code.sf.net/p/jedit/svn/jEdit/trunk@13879 6b1eeb88-9816-0410-afa2-b43733a0f04e
the regex can match empty string in search and replace but to avoid infinite loop it stops if the next occurence is at the same offset

git-svn-id: svn://svn.code.sf.net/p/jedit/svn/jEdit/trunk@13881 6b1eeb88-9816-0410-afa2-b43733a0f04e
Fixed bug #2169354: replace with empty $1 inserts 'null'.

git-svn-id: svn://svn.code.sf.net/p/jedit/svn/jEdit/trunk@13882 6b1eeb88-9816-0410-afa2-b43733a0f04e
Fixed bug #2173112: Search within selection of regexp '$' does not match the last line. This was caused by an exception - if the last selection line is empty, buffer.getSegment() was called with a negative length of -1.
Also removed an unused variable.

git-svn-id: svn://svn.code.sf.net/p/jedit/svn/jEdit/trunk@13898 6b1eeb88-9816-0410-afa2-b43733a0f04e
Fixed bug #2173091: regex hypersearch '^' only matches the first line.
This was caused by '^' matching the empty string at the beginning of the buffer, causing the next match to begin at the same offset, without increasing it first.

git-svn-id: svn://svn.code.sf.net/p/jedit/svn/jEdit/trunk@13899 6b1eeb88-9816-0410-afa2-b43733a0f04e
Fixed bug #2173087: regex '$' does not replace an empty last line.
The problem was with the matching of the last line, it doesn't really exist and should not match.
The fix: Stop matching when we've reached the end offset.

git-svn-id: svn://svn.code.sf.net/p/jedit/svn/jEdit/trunk@13900 6b1eeb88-9816-0410-afa2-b43733a0f04e
Reverted my change for bug fix #2173091, since it allows again matching of an empty string.

git-svn-id: svn://svn.code.sf.net/p/jedit/svn/jEdit/trunk@13901 6b1eeb88-9816-0410-afa2-b43733a0f04e
Added a comment about an unclear intent of the call of
removeListDataListener().


git-svn-id: svn://svn.code.sf.net/p/jedit/svn/jEdit/trunk@13903 6b1eeb88-9816-0410-afa2-b43733a0f04e
Some minor fixes for MemoryStatusWidget in statusbar.
- Avoided early precision lost.
- Replaced some shift operations by division to express the correct
  intent.
- Avoid "new Integer(...)" in favor of auto-boxing which can be more
  efficient.


git-svn-id: svn://svn.code.sf.net/p/jedit/svn/jEdit/trunk@13904 6b1eeb88-9816-0410-afa2-b43733a0f04e
Fixed the care for match of '$' at the end of text but not at the end of
line in PatternSearchMatcher#nextMatch().


git-svn-id: svn://svn.code.sf.net/p/jedit/svn/jEdit/trunk@13906 6b1eeb88-9816-0410-afa2-b43733a0f04e
Implemented the care for firstTime flag in
PatternSearchMatcher#nextMatch() as defined in javadoc.

The lack of this care had caused many problems; SF.net bugs #1541009,
#1671312, #2069249, #2173091, and some infinite loops caused by zero
width regex replace.

This replaces some previous fixes for above bugs, including addition of
SearchMatcher#isMatchingEOL().


git-svn-id: svn://svn.code.sf.net/p/jedit/svn/jEdit/trunk@13907 6b1eeb88-9816-0410-afa2-b43733a0f04e