Story:
User opens a class Foo. He then opens another file in
another location, also with a class Foo (perhaps a
different version of the same class, or one produced by
a student for an assignment). DrJava displays a
warning dialog informing the user that only the
earliest-opened copy of Foo will be visible in the
Interactions Pane, unless that copy is closed and the
Interactions Pane is reset.
Reasoning:
Each open file's directory is added to the classpath of
the Interactions Pane sequentially, so an earlier
opened file will "shadow" a later-opened file,
regardless of which one is currently displayed. This
is not intuitively obvious to the user (nor would
reordering the classpath when viewing a different
file), so this extra dialog will help resolve
ambiguities in behavior.
Notes:
We might want to check fully-qualified class names for
equality, rather than filename or just class name.
(Classes of the same name in different packages won't
really shadow each other, though they could still lead
to slightly unexpected behavior.)