Menu

Legacy SVN Repository Commit Log


Commit Date  
[r4498] by rcartwright

This revision is yet another chapter in the continued refactoring of
the synchronization protocol for the interactions pane. Some
intermittent unit testing failures on Windows promppted me to rexamine
the code for upating the caret. I realized that the documentation
mutation forcing the caret update needs to be performed in the event
thread (not jut the caret update portion of the operation), to make
the document revision + caret updating into a single atomic operation.
After I made this change, I discovered that the caret was being
advanced double the distance that my code explicitly directed. When
I tracked down the reason, I was humbled because the AbstractDocument
framework already includes code that moves the cursor when text is
inserted in front fo it. The cursor is bound to a Position, not an
offset. This caret update was invisible/garbled in earlier editions of the code
because the corresponding document update was not properly synchronized
(it must execute in the event thread because the caret position determines
the meaning of other asynchronous events (e.g. keyboard input) being handled
by the event thread.

This commit also attempts to address some other problems that showed up
during extensive Windows testing. Since the tests perform many operations
outside the event thread that are performed in the event thread in normal
DrJav execution, additional synchronization is required between these
operations and subsequent operations that inspect their effects. In particular,
Utilities.clearEventQueue() has to be inserted after such operations to make
sure that event thread tasks spawned by the externally executed operations
complete before other operation query their effects. In some cases, mutliple
consecutive calls to Utilities.clearEventQueue may be required because a
spawned event thread task can spawn its own even thread tasks (using
SwingUtilities.invokeLater).

In Windows testing, here is still an intermittent problem with what I believe
is JVM bug 6612928. The bug spews repeated instances of
java.util.concurrent.RejectedExecutionException during JVM shutdown. Since
the problem occurs during shutdown after testing has finished JUnit does not
classify the exceptions as test failures but prints the tracebacks, which are
nearly useless because they do not reach back to DrJava code.

The following files were modified:

M testFiles/drjava.basic.config
M src/edu/rice/cs/drjava/DrJavaTestCase.java
M src/edu/rice/cs/drjava/DrJava.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/indent/Indenter.java
M src/edu/rice/cs/drjava/model/definitions/indent/IndentRulesTestCase.java
M src/edu/rice/cs/drjava/model/definitions/ColoringGlyphPainter.java
M src/edu/rice/cs/drjava/model/definitions/IndentHelperTest.java
M src/edu/rice/cs/drjava/model/repl/InteractionsScriptModel.java
M src/edu/rice/cs/drjava/model/repl/InteractionsDJDocumentTest.java
M src/edu/rice/cs/drjava/model/repl/InteractionsModelTest.java
M src/edu/rice/cs/drjava/model/repl/InteractionsModel.java
M src/edu/rice/cs/drjava/model/repl/newjvm/MainJVM.java
M src/edu/rice/cs/drjava/model/repl/RMIInteractionsModel.java
M src/edu/rice/cs/drjava/model/repl/SimpleInteractionsModel.java
M src/edu/rice/cs/drjava/model/AbstractGlobalModel.java
M src/edu/rice/cs/drjava/config/Configuration.java
M src/edu/rice/cs/drjava/config/FileConfiguration.java
M src/edu/rice/cs/drjava/config/ConfigOptionListeners.java
M src/edu/rice/cs/drjava/config/OptionMapLoader.java
M src/edu/rice/cs/drjava/ui/InteractionsPane.java
M src/edu/rice/cs/drjava/ui/KeyBindingManager.java
M src/edu/rice/cs/drjava/ui/NewVersionPopup.java
M src/edu/rice/cs/drjava/ui/config/LabelComponent.java
M src/edu/rice/cs/drjava/ui/config/IntegerOptionComponent.java
M src/edu/rice/cs/drjava/ui/config/IntegerOptionComponentTest.java
M src/edu/rice/cs/drjava/ui/config/VectorOptionComponent.java
M src/edu/rice/cs/drjava/ui/config/VectorFileOptionComponentTest.java
M src/edu/rice/cs/drjava/ui/config/ToolbarOptionComponent.java
M src/edu/rice/cs/drjava/ui/config/ConfigFrame.java
M src/edu/rice/cs/drjava/ui/config/DirectoryOptionComponent.java
M src/edu/rice/cs/drjava/ui/config/StringOptionComponent.java
M src/edu/rice/cs/drjava/ui/config/FontOptionComponent.java
M src/edu/rice/cs/drjava/ui/config/FontOptionComponentTest.java
M src/edu/rice/cs/drjava/ui/config/ConfigPanel.java
M src/edu/rice/cs/drjava/ui/config/ForcedChoiceOptionComponentTest.java
M src/edu/rice/cs/drjava/ui/config/ForcedChoiceOptionComponent.java
M src/edu/rice/cs/drjava/ui/config/ColorOptionComponentTest.java
M src/edu/rice/cs/drjava/ui/config/ColorOptionComponent.java
M src/edu/rice/cs/drjava/ui/config/FileOptionComponentTest.java
M src/edu/rice/cs/drjava/ui/config/FileOptionComponent.java
M src/edu/rice/cs/drjava/ui/config/BooleanOptionComponentTest.java
M src/edu/rice/cs/drjava/ui/config/BooleanOptionComponent.java
M src/edu/rice/cs/drjava/ui/config/OptionComponent.java
M src/edu/rice/cs/drjava/ui/config/KeyStrokeOptionComponent.java
M src/edu/rice/cs/drjava/ui/config/KeyStrokeOptionComponentTest.java
M src/edu/rice/cs/drjava/ui/config/ButtonComponent.java
M src/edu/rice/cs/drjava/ui/AbstractDJPane.java
M src/edu/rice/cs/drjava/ui/ProjectMenuTest.java
M src/edu/rice/cs/drjava/ui/InteractionsPaneTest.java
M src/edu/rice/cs/drjava/ui/InteractionsScriptController.java
M src/edu/rice/cs/drjava/ui/InteractionsController.java
M src/edu/rice/cs/util/text/ConsoleDocument.java
M src/edu/rice/cs/util/swing/FileSelectorComponent.java

2008-05-29 05:23:30 Tree
[r4497] by mgricken

Added possibility to split ${config.*} properties into
lists.
Added ${project.excluded.files}, ${project.extra.class.path},
and ${project.auto.refresh} properties.
Fixed bug in list properties if separator.length()!=1.
Started refactoring of highlight manager/highlights to
use DocumentRegions (still far from complete; uses old
system).

2008-05-28 02:38:08 Tree
[r4496] by mgricken

Changed RegionsTreePanel to use state pattern for delaying display until
changes are finished. Moved code to read from external thread out of
event thread.

2008-05-24 00:21:15 Tree
[r4495] by rcartwright

This revision cleans up the synchronizaton in InteractionsDJDocumentTest. I have been seeing intermittent NullPointerExceptions and RejectExecutionExceptions deep inside Swing when running InteractionsDJDocumentTest on Windows. Time will tell if better synchronization eliminates these testing glitches.

The following file was modified:

M src/edu/rice/cs/drjava/model/repl/InteractionsDJDocumentTest.java

2008-05-23 18:31:15 Tree
[r4494] by rcartwright

This revision cleans up region containment so that the containing region does not have to start on the same line as the selection. As a result, bookmark toggling now behaves uniformly; bookmarks can be toggled by identifying any selection within the bookmark.

The following files were modified:

M src/edu/rice/cs/drjava/model/ConcreteRegionManager.java

2008-05-23 06:11:09 Tree
[r4493] by dlsmith

PLT Utilities: Fixed typo.

2008-05-22 19:54:10 Tree
[r4492] by dlsmith

PLT Utilities: Added ComposedListeners to the Swing package.

2008-05-22 19:51:48 Tree
[r4491] by mgricken

Adding calls to setChanging back to improve speed of turning "Find All"
results into bookmarks, of removing results and closing "Find All"
panes.

M src/edu/rice/cs/drjava/ui/MainFrame.java
M src/edu/rice/cs/drjava/ui/FindResultsPanel.java

2008-05-22 07:55:53 Tree
[r4490] by rcartwright

This revision fixes assorted bugs in the recent refactoring of regions
and a lingering bug in the implementation of FindResults table of
highlight managers. The table was implemented as a Hashtable mapping
document regions to HighlightInfo records. But document regions are
mutable because they can move within a document (just like Positions), so
table lookups failed if the coordinates of the region changed due to
document mutation.

This revision conflicts with the last two updates because it fixes
many of the same problems without sacrificing the efficiency of new
region implementation. This revision reverts the bookmark tests (in
GlobalModelOtherTest.java) back to their former state. We need to add
some unit tests that address the movement of regions when documents
are modified.

The following files were modified, primarily ConcreteRegionManager and
MainFrame:

M src/edu/rice/cs/drjava/model/debug/jpda/JPDADebugger.java
M src/edu/rice/cs/drjava/model/DefaultGlobalModel.java
M src/edu/rice/cs/drjava/model/definitions/indent/Indenter.java
M src/edu/rice/cs/drjava/model/RegionManager.java
M src/edu/rice/cs/drjava/model/ConcreteRegionManager.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/ui/MainFrame.java
M src/edu/rice/cs/drjava/ui/DefinitionsPane.java
M src/edu/rice/cs/drjava/ui/TabbedPanel.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/ReverseHighlighter.java
M src/edu/rice/cs/util/swing/HighlightManager.java
M src/edu/rice/cs/util/CompletionMonitor.java

2008-05-22 03:37:57 Tree
[r4489] by mgricken

Fixes a problem with the optimized "Find All"; now the file
nodes are expanded after the search has finished.

2008-05-22 00:57:35 Tree
Older >
MongoDB Logo MongoDB