Skip to content

Commit

Permalink
Added support for options tags in ContextView and PackageView using t…
Browse files Browse the repository at this point in the history
…he UmlGraphDoc docklet for javadoc generation with integrated Uml.
  • Loading branch information
p-r-o-m-e-t-h-e-u-s authored and jurjevic committed Aug 23, 2013
1 parent bd246d3 commit 0435986
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
23 changes: 16 additions & 7 deletions src/main/java/org/umlgraph/doclet/ContextView.java
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -74,27 +74,36 @@ public Options getGlobalOptions() {
}

public Options getOptionsFor(ClassDoc cd) {
Options opt;
if (globalOptions.matchesHideExpression(cd.toString()) || !matcher.matches(cd)) {
return hideOptions;
opt = hideOptions;
} else if (cd.equals(this.cd)) {
return centerOptions;
opt = centerOptions;
} else if(cd.containingPackage().equals(this.cd.containingPackage())){
return packageOptions;
opt = packageOptions;
} else {
return globalOptions;
opt = globalOptions;
}
Options optionClone = (Options) opt.clone();
overrideForClass(optionClone, cd);
return optionClone;
}

public Options getOptionsFor(String name) {
Options opt;
if (!matcher.matches(name))
return hideOptions;
opt = hideOptions;
else if (name.equals(cd.name()))
return centerOptions;
opt = centerOptions;
else
return globalOptions;
opt = globalOptions;
Options optionClone = (Options) opt.clone();
overrideForClass(optionClone, name);
return optionClone;
}

public void overrideForClass(Options opt, ClassDoc cd) {
opt.setOptions(cd);
if (opt.matchesHideExpression(cd.toString()) || !matcher.matches(cd))
opt.setOption(HIDE_OPTIONS);
if (cd.equals(this.cd))
Expand Down
1 change: 1 addition & 0 deletions src/main/java/org/umlgraph/doclet/PackageView.java
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ public Options getOptionsFor(String name) {
}

public void overrideForClass(Options opt, ClassDoc cd) {
opt.setOptions(cd);
opt.showQualified = false;
if (!matcher.matches(cd) || parent.getGlobalOptions().matchesHideExpression(cd.name()))
opt.setOption(new String[] { "-hide" });
Expand Down

0 comments on commit 0435986

Please sign in to comment.