mirror of https://github.com/dspinellis/UMLGraph
Merge pull request #14 from real-prometheus/master
Added support for options tags in ContextView and PackageView using the ...
This commit is contained in:
commit
6202d34fa6
|
|
@ -74,27 +74,36 @@ public class ContextView implements OptionProvider {
|
|||
}
|
||||
|
||||
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))
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@ public class PackageView implements OptionProvider {
|
|||
}
|
||||
|
||||
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" });
|
||||
|
|
|
|||
Loading…
Reference in New Issue