mirror of https://github.com/dspinellis/UMLGraph
Added support for options tags in ContextView and PackageView using the UmlGraphDoc docklet for javadoc generation with integrated Uml.
This commit is contained in:
parent
bd246d364f
commit
0435986b92
|
|
@ -74,27 +74,36 @@ public class ContextView implements OptionProvider {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Options getOptionsFor(ClassDoc cd) {
|
public Options getOptionsFor(ClassDoc cd) {
|
||||||
|
Options opt;
|
||||||
if (globalOptions.matchesHideExpression(cd.toString()) || !matcher.matches(cd)) {
|
if (globalOptions.matchesHideExpression(cd.toString()) || !matcher.matches(cd)) {
|
||||||
return hideOptions;
|
opt = hideOptions;
|
||||||
} else if (cd.equals(this.cd)) {
|
} else if (cd.equals(this.cd)) {
|
||||||
return centerOptions;
|
opt = centerOptions;
|
||||||
} else if(cd.containingPackage().equals(this.cd.containingPackage())){
|
} else if(cd.containingPackage().equals(this.cd.containingPackage())){
|
||||||
return packageOptions;
|
opt = packageOptions;
|
||||||
} else {
|
} else {
|
||||||
return globalOptions;
|
opt = globalOptions;
|
||||||
}
|
}
|
||||||
|
Options optionClone = (Options) opt.clone();
|
||||||
|
overrideForClass(optionClone, cd);
|
||||||
|
return optionClone;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Options getOptionsFor(String name) {
|
public Options getOptionsFor(String name) {
|
||||||
|
Options opt;
|
||||||
if (!matcher.matches(name))
|
if (!matcher.matches(name))
|
||||||
return hideOptions;
|
opt = hideOptions;
|
||||||
else if (name.equals(cd.name()))
|
else if (name.equals(cd.name()))
|
||||||
return centerOptions;
|
opt = centerOptions;
|
||||||
else
|
else
|
||||||
return globalOptions;
|
opt = globalOptions;
|
||||||
|
Options optionClone = (Options) opt.clone();
|
||||||
|
overrideForClass(optionClone, name);
|
||||||
|
return optionClone;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void overrideForClass(Options opt, ClassDoc cd) {
|
public void overrideForClass(Options opt, ClassDoc cd) {
|
||||||
|
opt.setOptions(cd);
|
||||||
if (opt.matchesHideExpression(cd.toString()) || !matcher.matches(cd))
|
if (opt.matchesHideExpression(cd.toString()) || !matcher.matches(cd))
|
||||||
opt.setOption(HIDE_OPTIONS);
|
opt.setOption(HIDE_OPTIONS);
|
||||||
if (cd.equals(this.cd))
|
if (cd.equals(this.cd))
|
||||||
|
|
|
||||||
|
|
@ -55,6 +55,7 @@ public class PackageView implements OptionProvider {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void overrideForClass(Options opt, ClassDoc cd) {
|
public void overrideForClass(Options opt, ClassDoc cd) {
|
||||||
|
opt.setOptions(cd);
|
||||||
opt.showQualified = false;
|
opt.showQualified = false;
|
||||||
if (!matcher.matches(cd) || parent.getGlobalOptions().matchesHideExpression(cd.name()))
|
if (!matcher.matches(cd) || parent.getGlobalOptions().matchesHideExpression(cd.name()))
|
||||||
opt.setOption(new String[] { "-hide" });
|
opt.setOption(new String[] { "-hide" });
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue