Feature Requests item #981571, was opened at 2004-06-28 14:13
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=438938&aid=981571&group_id=44253
Category: Definitions (source editor)
Group: None
Status: Open
Priority: 2
Submitted By: Neal Horowitz (nrhorowitz)
Assigned to: Nobody/Anonymous (nobody)
Summary: public top-level classname inference
Initial Comment:
Consider the following file:
class MyPackageClass { ... }
public class MyPublicClass { ... }
DrJava's automatic filename logic merely finds the
first top-level class declaration, so this file would
have its filename suggested as MyPackageClass, even
though javac would require it to be named
MyPublicClass. Ideally, we should determine the
correct public top-level classname if one exists,
defaulting to a package-private class only if no public
class exists.
That said, this is an extremely silly case. Anyone who
writes a public class _after_ a package-private class
in a file can deal with typing the filename in
manually, I think, so it only really matters for a
sense of consistency with Java's rules.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=438938&aid=981571&group_id=44253
|