summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcremet <cremet@epfl.ch>2004-01-13 09:54:04 +0000
committercremet <cremet@epfl.ch>2004-01-13 09:54:04 +0000
commit3ce17039386c6f18fe9680d3d92b55e407ade1c2 (patch)
tree560c69bf76c3ef955fdb5c310465d6cbda0bc91a
parent21dfb196b229c429bfdc9203335cb593001bc36a (diff)
downloadscala-3ce17039386c6f18fe9680d3d92b55e407ade1c2.tar.gz
scala-3ce17039386c6f18fe9680d3d92b55e407ade1c2.tar.bz2
scala-3ce17039386c6f18fe9680d3d92b55e407ade1c2.zip
- removed from the documentation some modifiers...
- removed from the documentation some modifiers that are added by the analyzer.
-rw-r--r--sources/scala/tools/scaladoc/HTMLGenerator.java36
-rw-r--r--sources/scala/tools/scaladoc/Tag.java1
2 files changed, 32 insertions, 5 deletions
diff --git a/sources/scala/tools/scaladoc/HTMLGenerator.java b/sources/scala/tools/scaladoc/HTMLGenerator.java
index c9010160ab..72eccb052f 100644
--- a/sources/scala/tools/scaladoc/HTMLGenerator.java
+++ b/sources/scala/tools/scaladoc/HTMLGenerator.java
@@ -395,6 +395,29 @@ public class HTMLGenerator {
}
/**
+ * Filters modifiers so that modifiers added by the analyzer are
+ * not printed.
+ */
+ protected String filterModifiers(Symbol sym) {
+ int flags = sym.flags;
+ if (sym.isPackage()) {
+ if ((flags & Modifiers.FINAL) != 0)
+ flags = flags - Modifiers.FINAL;
+ }
+ if (sym.isModule()) {
+ if ((flags & Modifiers.FINAL) != 0)
+ flags = flags - Modifiers.FINAL;
+ }
+ if (sym.isTrait()) {
+ if ((flags & Modifiers.ABSTRACT) != 0)
+ flags = flags - Modifiers.ABSTRACT;
+ if ((flags & Modifiers.INTERFACE) != 0)
+ flags = flags - Modifiers.INTERFACE;
+ }
+ return Modifiers.Helper.toString(flags);
+ }
+
+ /**
* Generates a HTML page for a class or object definition.
*/
protected void createPages(Symbol sym) {
@@ -647,7 +670,8 @@ public class HTMLGenerator {
page.printlnOTag("tr").indent();
// modifiers
- String mods = Modifiers.Helper.toString(sym.flags);
+ String mods = filterModifiers(sym);
+ // String mods = Modifiers.Helper.toString(sym.flags);
page.printlnOTag("td", ATTRS_MODIFIERS).indent();
if (mods.length() > 0)
page.printlnTag("code", mods);
@@ -711,7 +735,8 @@ public class HTMLGenerator {
// signature
page.printlnOTag("pre");
- String mods = Modifiers.Helper.toString(sym.flags);
+ String mods = filterModifiers(sym);
+ // String mods = Modifiers.Helper.toString(sym.flags);
if (mods.length() > 0) page.print(mods + " ");
symtab.printSignature(sym, false /*addLink*/);
page.printlnCTag("pre");
@@ -771,7 +796,8 @@ public class HTMLGenerator {
*/
public void printTemplateHtmlSignature(Symbol symbol, boolean addLink) {
// modifiers
- String mods = Modifiers.Helper.toString(symbol.flags);
+ String mods = filterModifiers(symbol);
+ // String mods = Modifiers.Helper.toString(symbol.flags);
page.printlnOTag("dl");
page.printlnOTag("dt");
symtab.print(mods).space();
@@ -1274,11 +1300,11 @@ public class HTMLGenerator {
case Scala(String container, String member, String label):
Symbol sym = findSymbolFromString(tag.holder, container, member);
if (sym == Symbol.NONE) {
- System.err.println("Warning: Scaladoc: not found: " + tag);
+ System.err.println("Warning: not found " + tag);
return tag.text;
}
else if (!isDocumented.apply(sym)) {
- System.err.println("Warning: Scaladoc: not referenced: " + tag);
+ System.err.println("Warning: not referenced " + tag);
return tag.text;
}
else {
diff --git a/sources/scala/tools/scaladoc/Tag.java b/sources/scala/tools/scaladoc/Tag.java
index a659707601..4e71031001 100644
--- a/sources/scala/tools/scaladoc/Tag.java
+++ b/sources/scala/tools/scaladoc/Tag.java
@@ -109,6 +109,7 @@ public class Tag {
* Kind of a reference tag.
*/
public static class RefKind {
+
/** Bad reference. */
public case Bad(String ref);