Menu

Legacy SVN Repository Commit Log


Commit Date  
[r4531] by rcartwright

This commit moves all Swing pack operations inside the event thread.
Is this necessary? Without a detailed analysis of the Swing library,
we don't know for certain. Sun recommends that all GUI code run in
the event thread (with a very short list of exceptions), but we have
found this practice produces unacceptable startup overhead. An
earlier discpline promulgated by Sun stated that GUI components could
be manipulated outside the event thread until they were "realized" but
this guidance is rather vague. If it means before any GUI component
is realized (which starts the event thread), then it clearly looks OK
but how can a programmer designing a specific GUI class know if any
other GUI component has been realized?. This is a global property of
a program. On the other hand, the more liberal interpretation that
each individual GUI component can be manipulated before it is realized
is clearly too liberal because the manipulation might link this
component into an existing GUI component that has already been
realized and is being accessed by the event thread potentially
traversing the unrealized component in the process. So I think Sun
really intended to mean that a GUI component can be safely manipulated
outside the event thread until it becomes accessible to the event
thread. The tricky issue is determining when a GUI component becomes
accessible to the event thread. The pack() operation is particularly
problematic because it may operate on the component after making it
accessible to the event thread. In contrast, setVisible(true) seems
less threatening because it intuitively involves creating a single
reference to the GUI component (in a data structure recording what is
visible) and nothing more.

If we subsequent study the Swing library (which of course can change
from one release to the next) and determine these concerns are
misplaced (because, for example, the pack method is very carefully
coded not to perform any operations on the packed component after it
has been made known to the GUI, then all of these pack operations can
be moved back to their "parent" threads.

The following files were modified:

M src/edu/rice/cs/drjava/DrJavaTestCase.java
M src/edu/rice/cs/drjava/model/MultiThreadedTestCase.java
M src/edu/rice/cs/drjava/ui/config/KeyStrokeOptionComponent.java
M src/edu/rice/cs/drjava/ui/ProjectMenuTest.java
M src/edu/rice/cs/drjava/ui/MainFrameTest.java

2008-06-26 20:20:59 Tree
[r4530] by rcartwright

This commit is an attempt to fix an occasional
ArrayOutOfBoundsException bug in the setUp method for ProjectMenuTest.
This attempted fix probably does not address the real problem since the
exception was thrown in the bowels of Swing library code invoked from
MainFrame.<init> and this fix simply moves the subsequent frame.pack()
operation to the event thread. Why not move MainFrame <init> to the event
thread? It slows down unit testing considerably.

I don't know what the event thread is doing between tests in a unit
testing suite. Is is already running when the test starts?

The following file was updated:

M src/edu/rice/cs/drjava/ui/ProjectMenuTest.java

2008-06-26 00:20:03 Tree
[r4529] by rcartwright

This revision fixing the indenting performance bug that was introduced
in revision 4521. A small change in ReducedModelBrace caused the
problem and I still don't see how it could create a performance
problem due to low CPU utlization. Weird. But I laboriously checked
the impact of each change in the r4521 until I found the code change
that caused the problem.

The following files were modified in this commit:

M src/edu/rice/cs/drjava/model/definitions/DefinitionsDocument.java
M src/edu/rice/cs/drjava/model/definitions/reducedmodel/ReducedModelComment.java
M src/edu/rice/cs/drjava/model/definitions/reducedmodel/ReducedModelBrace.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/AbstractGlobalModel.java
M src/edu/rice/cs/drjava/model/DJDocument.java
M src/edu/rice/cs/drjava/ui/MainFrame.java
M src/edu/rice/cs/drjava/ui/InteractionsPane.java
M src/edu/rice/cs/drjava/ui/DefinitionsPane.java
M src/edu/rice/cs/drjava/ui/AbstractDJPane.java

2008-06-25 19:24:16 Tree
[r4528] by mgricken

Many small changes:
Changed keyboard mnemonics (e.g. Alt-F to open File menu) so
they work on non-Mac platforms but are ignored on Macs; they
did not work as expected on Macs.

Fixed a bug in "Open Javadoc API" for Java 6 classes. Since
the URLs in Java 6 Javadocs are absolute, the fully-qualified
class names were incorrect.

Changed the extension of external process files from
*.drjavaxml and *.drjavajar to *.djapp. The distinction
between XML and JAR file is made by examining the content.

To avoid confusion between the properties ${drjava.file}
(which contains the file name of the currently used DrJava
executable) and ${drjavajar.file} (which contains the name
of the *.drjavajar file that might enclose the *.drjavaxml
file), the latter was renamed to ${enclosing.djapp.file}.

Fixed a bug that made action properties eager, causing
the actions to be executed (!) when the values were
previewed. Now they are lazy again.

Fixed a bug in PredictiveInputFrame that didn't deactivate
the hourglass pane when the frame was closed using the [X]
or the red button, instead of using the "Cancel" button.
Removed the MainFrame.installModalWindowAdapter(Window w)
method that did not require to-front and close actions
because the use of that method lead to this dangerous
situation.

Gave buttons in PredictiveInputFrames the ability to have
tooltips. Now the tooltip for the "Fully Qualified" button
on the "Auto-Complete Word" dialog explains that it will
insert the fully-qualified class name of the selected class.

Fixed a bug in the External Process panel that didn't
display the command line to execute correctly after it
was evaluated.

Fixed a bug that did not let the DrJava survey window
pop up, even when there was no New Version popup (previously,
the decision was made to ever only display *one* popup
window on DrJava startup to avoid clutter).

Decided to write the timestamp of the last DrJava survey
window popup into the configuration even when the user
pressed "No, do not send information". That way, the user
isn't consistently bothered with the same question at every
start.

2008-06-25 04:01:59 Tree
[r4527] by dlsmith

PLT Utilities: Renamed HashRelation, etc., IndexedRelation, etc., with support for different map/set factories (LinkedHashMaps, TreeMaps, etc.). Added IterUtil.filterInstances().

2008-06-25 02:43:28 Tree
[r4526] by mgricken

This change to the MacPlatform class allows special treatment for
keyboard mnemonics, which do not work correctly on Mac OS.
Currently, they are just being ignored, which seems to agree
with the Mac OS user interface standard not to provide mnemonics
such as Alt-F for opening the file menu.

M platform/src-mac/edu/rice/cs/drjava/platform/MacPlatform.java
M platform/classes/base-windows/edu/rice/cs/drjava/platform/WindowsPlatform.class
M platform/classes/base-mac/edu/rice/cs/drjava/platform/MacPlatform$1$1.class
M platform/classes/base-mac/edu/rice/cs/drjava/platform/MacPlatform.class
M platform/classes/base-mac/edu/rice/cs/drjava/platform/MacPlatform$1.class

2008-06-25 02:35:56 Tree
[r4525] by mgricken

"Insert Variable" dialog displays values (lazily) again.
Small improvement over event thread hang on Windows when
process is aborted.

2008-06-24 16:55:52 Tree
[r4524] by dlsmith

Major update with some backwards-incompatible changes. Major changes include:

- Changed the signature of Predicate, etc., to return a primitive boolean and changed its method name to "contains". (The previous relationship to Lambda<T, Boolean> was rarely useful and forced inefficient boxing.) Added methods for converting from a Predicate to a Lambda.

- Added isStatic() and isEmpty() methods to SizedIterable. Renamed isFixed->hasFixedSize.

- Standardized "asFoo" vs. "makeFoo"/"toFoo" methods in IterUtil and CollectUtil. "as" methods should always cast or create a lazy wrapper; "make"/"to" methods create a separate object. The IterUtil.asList, etc., methods were cleaned up based on this rationale and moved to CollectUtil.

- Major improvements to Relation. Some interface changes; also added Relation3 and Relation4 interfaces. Implemented AbstractRelation to simplify custom implementations. Defined FunctionalRelation, InjectiveRelation, and OneToOneRelation interfaces, with Abstract... and Hash... implementations for each. Added a variety of basic relations: SingletonRelation, CartesianRelation, ComposedRelation, FilteredRelation, DelegatingRelation, ImmutableRelation. Extracted indexing code in HashRelation into a RelationIndex interface and two concrete RelationIndex implementations.

- Misc collect package improvements. Defined PredicateSet and LambdaMap interfaces, so that all implementations here support both interfaces (and PredicateSets are also SizedIterables). Provided simple abstract parent classes for both of these interfaces (AbstractPredicateSet and AbstractKeyBasedMap). Added empty and singleton sets, collections, and maps. Added support for converting iterables to Collections or Sets.

- Modified JavaVersion to support Java 7 and to provide special treatment for unknown future versions.

- Added FilePredicate, which merges the Predicate and FileFilter interfaces. Added support for and/or/negation of FilePredicates in IOUtil. Added FilePredicates used to uniquely identify a file.

- Added EventSequence to help in testing of effects.

Note the following renamings (or similar re-implementations) for backwards compatibility:

- Predicate.value() -> Predicate.contains()
- ComposedMap -> UnionMap; CollectUtil.compose -> CollectUtil.union (ComposedMap still exists, but is something different)
- OneToOneMap -> OneToOneRelation; OneToOneHashMap -> OneToOneHashRelation
- KeyDrivenEntrySet -> AbstractKeBasedMap.entrySet()
- DelegatedSet -> DelegatingSet
- IterUtil.asOption, asPair, etc. -> IterUtil.makeOption, makePair, etc.
- IterUtil.asList, asArrayList, asLinkedList -> CollectUtil.makeArrayList, makeLinkedList
- CollectUtil.asSet -> CollectUtil.makeSet (asSet still exists, doesn't make a copy)
- IterUtil.make(T[]) -> IterUtil.asIterable(T[])
- SizedIterable.isFixed() -> SizedIterable.hasFixedSize()

2008-06-23 23:26:14 Tree
[r4523] by mgricken

Forgot to add a file.

A src/edu/rice/cs/drjava/config/EagerProperty.java
M src/edu/rice/cs/util/GeneralProcessCreator.java

2008-06-22 20:27:12 Tree
[r4522] by mgricken

Added ${drjavajar.file}, ${drjava.file} and ${java.file}
properties. Removed mutation in properties. Removed
separate JVM process creator.

2008-06-22 20:25:34 Tree
Older >
MongoDB Logo MongoDB