summaryrefslogtreecommitdiffstats
path: root/ajdoc/src/org/aspectj/tools
diff options
context:
space:
mode:
authoraclement <aclement>2008-07-18 21:56:28 +0000
committeraclement <aclement>2008-07-18 21:56:28 +0000
commitd2ffd516f8c75144ab877e72b285de6197642341 (patch)
tree3ea9294c8022674a72859e93f0a43c2cb1ed3f52 /ajdoc/src/org/aspectj/tools
parent41f9314f6b9b29cf5a47ce32b37257834549b112 (diff)
downloadaspectj-d2ffd516f8c75144ab877e72b285de6197642341.tar.gz
aspectj-d2ffd516f8c75144ab877e72b285de6197642341.zip
230234 comment 10 - ajdoc modifications and tests
Diffstat (limited to 'ajdoc/src/org/aspectj/tools')
-rw-r--r--ajdoc/src/org/aspectj/tools/ajdoc/StubFileGenerator.java13
1 files changed, 7 insertions, 6 deletions
diff --git a/ajdoc/src/org/aspectj/tools/ajdoc/StubFileGenerator.java b/ajdoc/src/org/aspectj/tools/ajdoc/StubFileGenerator.java
index a0b073a67..c0f154f1b 100644
--- a/ajdoc/src/org/aspectj/tools/ajdoc/StubFileGenerator.java
+++ b/ajdoc/src/org/aspectj/tools/ajdoc/StubFileGenerator.java
@@ -76,9 +76,7 @@ class StubFileGenerator{
List imports = node.getChildren();
for (Iterator i = imports.iterator(); i.hasNext();) {
IProgramElement importNode = (IProgramElement) i.next();
- writer.print("import ");
- writer.print(importNode.getName());
- writer.println(';');
+ writer.println(importNode.getSourceSignature());
}
}
@@ -94,7 +92,7 @@ class StubFileGenerator{
// System.err.println("######" + signature + ", " + classNode.getName());
if (!StructureUtil.isAnonymous(classNode) && !classNode.getName().equals("<undefined>")) {
- writer.println(signature + " {" );
+ writer.println(signature + " { " );
processMembers(classNode.getChildren(), writer, classNode.getKind().equals(IProgramElement.Kind.INTERFACE));
writer.println();
writer.println("}");
@@ -192,6 +190,9 @@ class StubFileGenerator{
* replaced.
*/
static String addToFormal(String formalComment, String string) {
+ if(string == null || string.equals("")) {
+ return formalComment;
+ }
//boolean appendPeriod = true;
if ( (formalComment == null) || formalComment.equals("")) {
//formalComment = "/**\n * . \n */\n";
@@ -202,11 +203,11 @@ class StubFileGenerator{
int atsignPos = formalComment.indexOf('@');
int endPos = formalComment.indexOf("*/");
- int periodPos = formalComment.indexOf("/**")+2;
+ int periodPos = formalComment.indexOf("/**");
int position = 0;
String periodPlaceHolder = "";
if ( periodPos != -1 ) {
- position = periodPos+1;
+ position = periodPos + 3;// length of "/**"
}
else if ( atsignPos != -1 ) {
string = string + "\n * ";