Menu

Legacy SVN Repository Commit Log


Commit Date  
[r4505] by rcartwright

This revisison systematizes the defintion of hashCode in the main
DrJava code base. The generic hash function is the method hash in the
HashUtilities class in the util package. The new hash function is a
compromise between computational simplicity and hashing efficicacy; it
is purportedly based on a hash function suggested by Knuth, but I have
not confirmed this attribution by going back to the original sources
(The Art of Programming, vol. 3, Sorting and Searching). The key idea
is to combine 32 bit hash keys (where a typical class has multiple
hash keys) using exclusive OR after multiplying the existing accumulated
result by a large prime number that is approximately 2^32 divided
by the golden ratio. Since this quantity is an unsiged number bigger
than 2^31, it corresponds to a negative int. But this negative int
behaves just like Knuth's unsigned magic number when used in 32 bit
multiplications (which appear to compute an unsigned 32 bit result
modulo 2^32). It has been years since I looked at the details of
32 bit 2's complement arithmetic so I am accepting this notion based
on a limited set of experiments that I conducted in DrJava. It should
be investigated more thoroughly.

The new hash function appears slightly slower than the hash functions
it replaces, but that does not appear to have a perceptible effect on
performance (e.g. indenting MainFrame, which performs an enormous
number of hash table lookups).

The following files were modified or added:

M src/edu/rice/cs/drjava/model/debug/jpda/JPDABreakpoint.java
M src/edu/rice/cs/drjava/model/Query.java
M src/edu/rice/cs/drjava/model/DocumentRegion.java
M src/edu/rice/cs/drjava/config/UnaryOpProperty.java
M src/edu/rice/cs/drjava/config/DrJavaProperty.java
M src/edu/rice/cs/drjava/config/BinaryOpProperty.java
M src/edu/rice/cs/drjava/ui/MainFrame.java
M src/edu/rice/cs/drjava/ui/BrowserHistoryPanel.java
M src/edu/rice/cs/drjava/ui/BreakpointsPanel.java
M src/edu/rice/cs/drjava/ui/RegionsTreePanel.java
M src/edu/rice/cs/drjava/ui/RegionsListPanel.java
M src/edu/rice/cs/drjava/ui/FindResultsPanel.java
M src/edu/rice/cs/util/OrderedHashSet.java
M src/edu/rice/cs/util/docnavigation/JTreeSortNavigator.java
M src/edu/rice/cs/util/swing/HighlightManager.java
A src/edu/rice/cs/util/HashUtilities.java

2008-06-04 07:41:27 Tree
[r4504] by rcartwright

This update includes many small revisions to fix "bugs" identified by FindBugs.

The following files were modified:

M src/edu/rice/cs/drjava/DrJava.java
M src/edu/rice/cs/drjava/DrJavaRoot.java
M src/edu/rice/cs/drjava/model/debug/DebugWatchDataTest.java
M src/edu/rice/cs/drjava/model/debug/jpda/JPDADebugger.java
M src/edu/rice/cs/drjava/model/debug/jpda/JPDABreakpoint.java
M src/edu/rice/cs/drjava/model/cache/DocumentCache.java
M src/edu/rice/cs/drjava/model/definitions/indent/QuestionStartAfterOpenBrace.java
M src/edu/rice/cs/drjava/model/definitions/indent/Indenter.java
M src/edu/rice/cs/drjava/model/definitions/CommentTest.java
M src/edu/rice/cs/drjava/model/definitions/CompoundUndoManager.java
M src/edu/rice/cs/drjava/model/definitions/DefinitionsDocument.java
M src/edu/rice/cs/drjava/model/definitions/DefinitionsDocumentTest.java
M src/edu/rice/cs/drjava/model/definitions/reducedmodel/AbstractReducedModel.java
M src/edu/rice/cs/drjava/model/definitions/reducedmodel/ModelListTest.java
M src/edu/rice/cs/drjava/model/definitions/reducedmodel/ReducedModelBrace.java
M src/edu/rice/cs/drjava/model/definitions/IndentTest.java
M src/edu/rice/cs/drjava/model/MovingDocumentRegion.java
M src/edu/rice/cs/drjava/model/GlobalEventNotifier.java
M src/edu/rice/cs/drjava/model/repl/History.java
M src/edu/rice/cs/drjava/model/repl/HistoryTest.java
M src/edu/rice/cs/drjava/model/repl/InteractionsScriptModel.java
M src/edu/rice/cs/drjava/model/repl/InteractionsDJDocument.java
M src/edu/rice/cs/drjava/model/repl/InteractionsModel.java
M src/edu/rice/cs/drjava/model/repl/RMIInteractionsModel.java
M src/edu/rice/cs/drjava/model/AbstractDJDocument.java
M src/edu/rice/cs/drjava/model/DocumentRegion.java
M src/edu/rice/cs/drjava/model/compiler/DefaultCompilerModel.java
M src/edu/rice/cs/drjava/model/compiler/CompilerError.java
M src/edu/rice/cs/drjava/model/AbstractGlobalModel.java
M src/edu/rice/cs/drjava/model/DefaultLightWeightParsingControl.java
M src/edu/rice/cs/drjava/model/print/DrJavaBookTest.java
M src/edu/rice/cs/drjava/model/BrowserDocumentRegion.java
M src/edu/rice/cs/drjava/model/OrderedDocumentRegion.java
M src/edu/rice/cs/drjava/RemoteControlServer.java
M src/edu/rice/cs/drjava/config/UnaryOpProperty.java
M src/edu/rice/cs/drjava/config/OptionConstants.java
M src/edu/rice/cs/drjava/config/KeyStrokeOptionTest.java
M src/edu/rice/cs/drjava/config/KeyStrokeOption.java
M src/edu/rice/cs/drjava/config/DrJavaProperty.java
M src/edu/rice/cs/drjava/config/NonNegativeIntegerOption.java
M src/edu/rice/cs/drjava/config/NonNegativeIntegerOptionTest.java
M src/edu/rice/cs/drjava/config/ConfigOptionListeners.java
M src/edu/rice/cs/drjava/config/BinaryOpProperty.java
M src/edu/rice/cs/drjava/config/JavaSystemProperty.java
M src/edu/rice/cs/drjava/config/RecursiveFileListProperty.java
M src/edu/rice/cs/drjava/config/ConfigProperty.java
M src/edu/rice/cs/drjava/config/DrJavaActionProperty.java
M src/edu/rice/cs/drjava/config/LazyFileListProperty.java
M src/edu/rice/cs/drjava/config/EagerFileListProperty.java
M src/edu/rice/cs/drjava/config/IntegerOptionTest.java
M src/edu/rice/cs/drjava/config/IntegerOption.java
M src/edu/rice/cs/drjava/config/EagerFileProperty.java
M src/edu/rice/cs/drjava/config/EagerProperty.java
M src/edu/rice/cs/drjava/config/LongOption.java
M src/edu/rice/cs/drjava/config/VectorOption.java
M src/edu/rice/cs/drjava/config/OptionMapLoaderTest.java
M src/edu/rice/cs/drjava/config/ConstantProperty.java
M src/edu/rice/cs/drjava/project/ProjectFileParser.java
M src/edu/rice/cs/drjava/project/XMLProjectFileParser.java
M src/edu/rice/cs/drjava/project/DocFile.java
M src/edu/rice/cs/drjava/project/ProjectTest.java
M src/edu/rice/cs/drjava/project/ProjectProfile.java
M src/edu/rice/cs/drjava/ui/MainFrame.java
M src/edu/rice/cs/drjava/ui/DrJavaErrorPopup.java
M src/edu/rice/cs/drjava/ui/DefinitionsPane.java
M src/edu/rice/cs/drjava/ui/DebugPanel.java
M src/edu/rice/cs/drjava/ui/ConsoleController.java
M src/edu/rice/cs/drjava/ui/JarOptionsDialog.java
M src/edu/rice/cs/drjava/ui/ErrorPanel.java
M src/edu/rice/cs/drjava/ui/predictive/PredictiveInputFrame.java
M src/edu/rice/cs/drjava/ui/NewVersionPopup.java
M src/edu/rice/cs/drjava/ui/config/IntegerOptionComponentTest.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/HistorySaveDialog.java
M src/edu/rice/cs/drjava/ui/RegionsListPanel.java
M src/edu/rice/cs/drjava/ui/ExecuteExternalDialog.java
M src/edu/rice/cs/drjava/ui/InteractionsScriptController.java
M src/edu/rice/cs/drjava/ui/DrJavaErrorWindow.java
M src/edu/rice/cs/drjava/ui/JUnitPanel.java
M src/edu/rice/cs/drjava/ui/AbstractConsoleController.java
M src/edu/rice/cs/drjava/ui/ClipboardHistoryFrame.java
M src/edu/rice/cs/drjava/ui/ProjectPropertiesFrame.java
M src/edu/rice/cs/util/text/ConsoleDocumentInterface.java
M src/edu/rice/cs/util/text/EditDocumentInterface.java
M src/edu/rice/cs/util/OrderedHashSetTest.java
M src/edu/rice/cs/util/docnavigation/JTreeSortNavigator.java
M src/edu/rice/cs/util/swing/ScrollableDialog.java
M src/edu/rice/cs/util/swing/CheckBoxJList.java
M src/edu/rice/cs/util/ReaderWriterLock.java
M src/edu/rice/cs/util/BidirectionalHashMapTest.java
M src/edu/rice/cs/util/XMLConfig.java
M src/edu/rice/cs/util/StringOpsTest.java
M src/edu/rice/cs/util/StringOps.java
M src/edu/rice/cs/util/OrderedBidirectionalHashMapTest.java

2008-06-03 06:19:20 Tree
[r4503] by dlsmith

Downgraded the junit.jar used for testing to 3.8 in order to better support test-14. Modified Retroweaver's handling of libraries so that the org.junit.* classes, which are inherently Java 5 dependent, are not Retrowoven.

2008-06-02 18:39:08 Tree
[r4502] by mgricken

This commit adds many properties for file/directory operations
in the External Process command lines (see the "File" category
in the "Insert Variable" dialog).
It also adds user-defined variables with nested scopes (but
no closures). A variable can be defined using ${var;name="x";
val="123";cmd="...command line using variable x goes here..."}.
A variable is mutated using ${var.set;name="x";val="456"} and
dereferenced using ${x}.
Now that variables are included, I also implemented a
${for} loop that can automatically split a command line into
shorter pieces.
Executing several processes and piping from one process to
another hasn't been implemented yet, though.

M src/edu/rice/cs/drjava/config/DrJavaProperty.java
A src/edu/rice/cs/drjava/config/VariableProperty.java
M src/edu/rice/cs/drjava/config/DrJavaPropertySetup.java
M src/edu/rice/cs/drjava/config/PropertyMaps.java
M src/edu/rice/cs/drjava/config/RecursiveFileListProperty.java
M src/edu/rice/cs/drjava/config/ConstantProperty.java
M src/edu/rice/cs/drjava/ui/ExternalProcessPanel.java
M src/edu/rice/cs/drjava/ui/ExecuteExternalDialog.java
M src/edu/rice/cs/util/FileOps.java
M src/edu/rice/cs/util/StringOps.java
M src/edu/rice/cs/util/ProcessCreator.java

2008-06-02 13:29:12 Tree
[r4501] by dlsmith

PLT Utilities: Implemented file hashing with supporting OutputStreams in the io package.

2008-05-30 19:00:33 Tree
[r4500] by rcartwright

This revision includes minor adjustments in unit testing code (adding a Utilities.clearEventQueue call) and the cleanup code in DrJava that supports unit testing. These adjustment appear to eliminate occasional exception reports (which do not produce test failures) on Mac OS X during unit testing.

The following files were modifed:

M src/edu/rice/cs/drjava/DrJava.java
M src/edu/rice/cs/drjava/ui/config/KeyStrokeOptionComponentTest.java

2008-05-30 00:15:39 Tree
[r4499] by mgricken

Made OpProperties more configurable, added ${sublist} property.

2008-05-29 22:54:45 Tree
[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
Older >
MongoDB Logo MongoDB