Menu

Legacy SVN Repository Commit Log


Commit Date  
[r4043] by rcartwright

Revised the unit tests so that they work for the new document
repository (introduced in commits 4038-4042). Some unit tests require
canonical file paths which "new File(...)" does NOT create. The new
methods FileOps.newFile(...) create File objects with canonical names.
Some of the other file updates involve cleaning up field and variable
names (e.g., getting rid of p0 and p1 for the start and end of
highlight ranges). The following files were modified:

M src/edu/rice/cs/drjava/model/debug/DebugTestCase.java
M src/edu/rice/cs/drjava/model/debug/JPDADebugger.java
M src/edu/rice/cs/drjava/model/debug/DebugContextTest.java
M src/edu/rice/cs/drjava/model/GlobalModelIOTest.java
M src/edu/rice/cs/drjava/model/GlobalModelTestCase.java
M src/edu/rice/cs/drjava/model/DefaultGlobalModel.java
M src/edu/rice/cs/drjava/model/definitions/ColoringGlyphPainter.java
M src/edu/rice/cs/drjava/model/definitions/ColoringView.java
M src/edu/rice/cs/drjava/model/definitions/reducedmodel/ReducedModelComment.java
M src/edu/rice/cs/drjava/model/definitions/reducedmodel/BraceReduction.java
M src/edu/rice/cs/drjava/model/DefaultJavadocModel.java
M src/edu/rice/cs/drjava/model/repl/InteractionsEditorKit.java
M src/edu/rice/cs/drjava/model/SingleDisplayModelTest.java
M src/edu/rice/cs/drjava/model/GlobalModelJUnitTest.java
M src/edu/rice/cs/drjava/model/SimpleDocumentRegion.java
M src/edu/rice/cs/drjava/model/DummyOpenDefDoc.java
M src/edu/rice/cs/drjava/model/compiler/CompilerErrorModel.java
M src/edu/rice/cs/drjava/model/DummyGlobalModel.java
M src/edu/rice/cs/drjava/model/GlobalModelOtherTest.java
M src/edu/rice/cs/drjava/ui/DefinitionsPane.java
M src/edu/rice/cs/drjava/ui/ErrorPanel.java
M src/edu/rice/cs/drjava/ui/JUnitPanel.java
M src/edu/rice/cs/drjava/ui/ReverseHighlighter.java

2006-11-22 23:04:59 Tree
[r4042] by rcartwright

More updates that missed in commit 4038. I have downloaded the latest revision and tried to rebuild. Based on the compilation errors, I discovered that the following files were not properly committed.

M cs/drjava/model/debug/Breakpoint.java
M cs/drjava/model/cache/DDReconstructor.java
M cs/drjava/model/cache/DCacheAdapter.java
M cs/drjava/ui/ErrorPanel.java
M cs/drjava/ui/FindReplacePanel.java
M cs/drjava/ui/ReverseHighlighter.java

2006-11-22 17:36:03 Tree
[r4041] by rcartwright

Yet another glitch in commit 4038

M HighlightManager.java

2006-11-22 17:21:14 Tree
[r4040] by rcartwright

Another glitch in commit 4038. I am definitely worried.

M AbstractDJDocument.java

2006-11-22 17:05:10 Tree
[r4039] by rcartwright

This file did not commit properly in the most recent commit which has me very worried.

2006-11-22 16:52:24 Tree
[r4038] by rcartwright

This revision fixes a bug in the updating of document highlights and
improves the implementation of the "jump to line" function in
MainFrame.java. My recent string of commits focused on making DrJava
more responsive contained a troublesome bug that is proving
time-consuming to track down. FindAll result highlights are not
updated properly when a document is edited; the highlights do not move
with the document. When I backed out the refactoring to minimize the
creation of WrappedPositions and the refactoring to defer
reconstructing document positions when a kicked out document is remade
(waiting until the document becomes active), the highlighting bug went
away but when I only backed either of these two refactorings alone,
the bug persisted. This revision backs out both of these
refactorings. In the long term, I would like to see the
reconstruction of wrapped positions deferred until a document becomes
active. This optimization should work! I don't understand it can
affect the highlight updating process since non-active documents are
never edited. On the other hand, the minimization of WrappedPositions
may be an inherently flawed idea. If (and I do not yet know the
answer) the Swing library internally creates Positions that are
critical to updating highlights as a document is edited, then failing
to wrap these Positions could sabotage highlight updating. My
minimization strategy assumes that no Position internally created by
Swing needs to be wrapped.

The good news is that this revsion still appears to improve
responsiveness despite backing out these two refactorings. The key is
a minor change to _jumpToLine in MainFrame.java, which performs the
guts of the "go to line" action (CNTL-G). It makes jumping to a line
near the end of a large document MUCH faster than it has been in
recent builds. The following files were modified or added:

M src/edu/rice/cs/drjava/model/cache/DocumentCache.java
M src/edu/rice/cs/drjava/model/cache/DocumentCacheTest.java
M src/edu/rice/cs/drjava/model/DummyOpenDefDoc.java
M src/edu/rice/cs/drjava/model/AbstractGlobalModel.java
M src/edu/rice/cs/drjava/model/OpenDefinitionsDocument.java
M src/edu/rice/cs/drjava/ui/MainFrame.java
M src/edu/rice/cs/drjava/ui/JUnitPanel.java
M src/edu/rice/cs/util/FileOps.java
M src/edu/rice/cs/util/text/AbstractDocumentInterface.java
M src/edu/rice/cs/util/text/SwingDocument.java
A src/edu/rice/cs/util/text/SwingDocumentInterface.java
A src/edu/rice/cs/util/NullFile.java

2006-11-22 16:20:42 Tree
[r4037] by rcartwright

Fixed a bug introduced in the refactoring of the treatment of wrapped
document positions. The bug was a "rogue tile" left when I undid an
aborted change in the definitions of the various Swing/DrJava document
interfaces. The following files were changed:

M src/edu/rice/cs/drjava/ui/JUnitPanel.java
M src/edu/rice/cs/util/text/ConsoleDocument.java

2006-11-20 20:04:32 Tree
[r4036] by rcartwright

Separated the reconstruction of Positions with a document from the reconstruction of its DefinitionsDocument. The former was done on document reconstruction; now, it is done only when a document becomes active (and has not already been done).

M src/edu/rice/cs/drjava/model/debug/JPDADebugger.java
M src/edu/rice/cs/drjava/model/cache/DocumentCache.java
M src/edu/rice/cs/drjava/model/cache/DocumentCacheTest.java
M src/edu/rice/cs/drjava/model/cache/DDReconstructor.java
M src/edu/rice/cs/drjava/model/cache/DCacheAdapter.java
M src/edu/rice/cs/drjava/model/DummyOpenDefDoc.java
M src/edu/rice/cs/drjava/model/AbstractGlobalModel.java
M src/edu/rice/cs/drjava/model/GlobalModelOtherTest.java
M src/edu/rice/cs/drjava/model/OpenDefinitionsDocument.java
M src/edu/rice/cs/util/text/AbstractDocumentInterface.java

2006-11-20 01:19:50 Tree
[r4035] by rcartwright

This revision partially addresses the overhead of maintaining
WrappedPositions in OpenDefinitionsDocuments. The overriding of
createPosition in DefinitionsDocument apparently generates a large
number of WrappedPositions derived from calls on createPosition that
are internal to Swing. It is not clear when if ever these
WrappedPositions are reclaimed by garbage collection. As a result,
the process of kicking out from the cache and remaking them becomes very
expensive. Ultimately, we need to recreated WrappedPositions only on
demand--when a DefinitionsDocument becomes active.

This revision introduces the method createDJPosition to the interface
AbstractDefinitionsDocument. As a result, all DrJava classes that
implement the Swing Document interface implement the method
createDJPosition (because all DrJava Swing Document classes implement
AbstractDocumentInterface). The method createDJPosition only creates
a WrappedPosition if the receiver is a DefinitionsDocument. The revised
code has some ugly features in HighlightManager and ReverseHighlighter
because these classes were written to use arbitary Swing Documents (which
do not necessarily implement our AbstractDocumentInterface). There is
a hack in DrJava where the Document associated with a DefinitionsPane is
briefly a PlainDocument. Evidently the code in HighlightManager and
ReverseHighligher is run on such documents (at least in our unit tests)
because unit tests failed prior to the insertion of instanceof tests
in these classes to recognize Documents that do not implement
AbstractDocumentInterface.

This revision handles document switching in the context of
WrappedPositions more responsively that recent versions, but it still
has an unexplained pause when switching to a large document like
MainFrame. My conjecture is that building the DefinitionsDocument for
MainFrame takes a long time (many seconds). Why? Is this an inherent
inefficient of Swing DefaultStyledDocuments or are we doing something
that generates this inefficiency?

The following files were modified:

M src/edu/rice/cs/drjava/model/debug/Breakpoint.java
M src/edu/rice/cs/drjava/model/GlobalModel.java
M src/edu/rice/cs/drjava/model/definitions/ColoringView.java
M src/edu/rice/cs/drjava/model/definitions/DefinitionsDocument.java
M src/edu/rice/cs/drjava/model/definitions/DefinitionsEditorKit.java
M src/edu/rice/cs/drjava/model/repl/InteractionsEditorKit.java
M src/edu/rice/cs/drjava/model/AbstractDJDocument.java
M src/edu/rice/cs/drjava/model/DummyOpenDefDoc.java
M src/edu/rice/cs/drjava/model/DummyGlobalModel.java
M src/edu/rice/cs/drjava/model/FindReplaceMachine.java
M src/edu/rice/cs/drjava/model/AbstractGlobalModel.java
M src/edu/rice/cs/drjava/model/OpenDefinitionsDocument.java
M src/edu/rice/cs/drjava/model/DJDocument.java
M src/edu/rice/cs/drjava/config/OptionConstants.java
M src/edu/rice/cs/drjava/ui/MainFrame.java
M src/edu/rice/cs/drjava/ui/DefinitionsPane.java
M src/edu/rice/cs/drjava/ui/ErrorPanel.java
M src/edu/rice/cs/drjava/ui/FindReplacePanel.java
M src/edu/rice/cs/drjava/ui/JUnitPanel.java
M src/edu/rice/cs/drjava/ui/ReverseHighlighter.java
M src/edu/rice/cs/util/text/AbstractDocumentInterface.java
M src/edu/rice/cs/util/text/EditDocumentInterface.java
M src/edu/rice/cs/util/text/SwingDocument.java
A src/edu/rice/cs/util/text/SwingDocumentInterface.java
M src/edu/rice/cs/util/swing/HighlightManager.java

2006-11-17 15:19:13 Tree
[r4034] by dlsmith

Built Java 6 compiler adapter using updated compiler interface

2006-11-16 20:36:26 Tree
Older >
MongoDB Logo MongoDB