Menu

Legacy SVN Repository Commit Log


Commit Date  
[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
[r4033] by rcartwright

This revision include some small changes in the use of invokeAndWait and synchronized that appear to produce some modest gains in responsiveness. The following files were modified.

M src/edu/rice/cs/drjava/DrJavaRoot.java
M src/edu/rice/cs/drjava/model/cache/DocumentCache.java
M src/edu/rice/cs/drjava/model/definitions/CompoundUndoManager.java
M src/edu/rice/cs/drjava/model/definitions/reducedmodel/ReducedModelBrace.java
M src/edu/rice/cs/drjava/model/junit/DefaultJUnitModel.java
M src/edu/rice/cs/drjava/model/repl/newjvm/InterpreterJVM.java
M src/edu/rice/cs/drjava/model/AbstractDJDocument.java
M src/edu/rice/cs/drjava/model/compiler/DefaultCompilerModel.java
M src/edu/rice/cs/drjava/model/compiler/CompilerModel.java
M src/edu/rice/cs/drjava/model/AbstractGlobalModel.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/JarOptionsDialog.java
M src/edu/rice/cs/drjava/ui/PreviewFrame.java
M src/edu/rice/cs/drjava/ui/MainFrameTest.java
M src/edu/rice/cs/drjava/ui/RegionsTreePanel.java
M src/edu/rice/cs/drjava/ui/FindResultsPanel.java
M src/edu/rice/cs/drjava/ui/FindReplacePanel.java
M src/edu/rice/cs/drjava/ui/InteractionsController.java
M src/edu/rice/cs/drjava/ui/ClipboardHistoryFrame.java
M src/edu/rice/cs/util/swing/HighlightManager.java
M src/edu/rice/cs/util/swing/SwingWorker.java
M src/edu/rice/cs/util/CompletionMonitor.java

2006-11-16 20:16:51 Tree
[r4032] by dlsmith

Updated compiler interface to support bootclasspath and eliminate needless state

2006-11-16 20:10:45 Tree
[r4031] by rcartwright

This revision reverses some of the changes made to the overriding of createPostion in DefinitionsDocument. Some of the highlighting support works with arbitrary Documents yet requres Wrapped Postions in DefinitionsDocuments. The definition of createPosition is once again overridden in DefinitionsDocument. A new createUnwrappedPosition method has been added to provide a more efficient alternative to createPostion within DefinitionsDocument. Many minor changes to synchronization are also included in this revision.

2006-11-15 22:09:06 Tree
[r4030] by mgricken

Anonymizes user.name, user.dir and user.home in the output
that users submit in bug reports.
M src/edu/rice/cs/drjava/ui/DrJavaErrorWindow.java

2006-11-13 19:36:25 Tree
[r4029] by rcartwright

Revised the core search method in FindReplaceMachine to use indexOf
and lastIndexOf with offsets instead of repeatedly taking substrings
of the document segment begin searched. This change appears to speed
up searching for strings that have lots of "rejected matches" (not
a whole word, inside a comment, etc.).

Streamlined the locking in JTreeSortNavigator.java and marked all of
its shared fields as final or volatile.l

The following files were revised, much of it cosmetic:

M src/edu/rice/cs/drjava/model/MovingDocumentRegion.java
M src/edu/rice/cs/drjava/model/repl/History.java
M src/edu/rice/cs/drjava/model/repl/InteractionsModelTest.java
M src/edu/rice/cs/drjava/model/SimpleDocumentRegion.java
M src/edu/rice/cs/drjava/model/DocumentRegion.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/ui/MainFrame.java
M src/edu/rice/cs/util/docnavigation/JListNavigator.java
M src/edu/rice/cs/util/docnavigation/JListSortNavigator.java
M src/edu/rice/cs/util/docnavigation/JTreeSortNavigator.java

2006-11-09 08:09:43 Tree
Older >
MongoDB Logo MongoDB