mirror of https://github.com/dspinellis/UMLGraph
Add -hideprivateinner option
This commit is contained in:
parent
0ba1798ac5
commit
0967a91289
|
|
@ -16,6 +16,7 @@ the default is off, and it will not inherit from <code>-qualify</code>.</li>
|
||||||
<li>Use <i> tags for italic, because the old font naming approach does not work with SVG anymore.
|
<li>Use <i> tags for italic, because the old font naming approach does not work with SVG anymore.
|
||||||
Replace <code>-nodefontabstractname</code> and <code>-nodefontclassabstractname</code>
|
Replace <code>-nodefontabstractname</code> and <code>-nodefontclassabstractname</code>
|
||||||
with a simple flag <code>-nodefontabstractitalic</code> instead.</li>
|
with a simple flag <code>-nodefontabstractitalic</code> instead.</li>
|
||||||
|
<li>Added <code>-hideprivateinner</code> to hide all private inner classes.</li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -326,9 +326,11 @@ class ClassGraph {
|
||||||
|
|
||||||
/** Return true if c has a @hidden tag associated with it */
|
/** Return true if c has a @hidden tag associated with it */
|
||||||
private boolean hidden(ProgramElementDoc c) {
|
private boolean hidden(ProgramElementDoc c) {
|
||||||
return c.tags("hidden").length > 0 || c.tags("view").length > 0 || //
|
if (c.tags("hidden").length > 0 || c.tags("view").length > 0)
|
||||||
optionProvider.getOptionsFor(c instanceof ClassDoc ? (ClassDoc) c : c.containingClass()) //
|
return true;
|
||||||
.matchesHideExpression(c.toString());
|
Options opt = optionProvider.getOptionsFor(c instanceof ClassDoc ? (ClassDoc) c : c.containingClass());
|
||||||
|
return opt.matchesHideExpression(c.toString()) //
|
||||||
|
|| (opt.hidePrivateInner && c instanceof ClassDoc && c.isPrivate() && ((ClassDoc) c).containingClass() != null);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected ClassInfo getClassInfo(ClassDoc cd, boolean create) {
|
protected ClassInfo getClassInfo(ClassDoc cd, boolean create) {
|
||||||
|
|
|
||||||
|
|
@ -115,6 +115,7 @@ public class Options implements Cloneable, OptionProvider {
|
||||||
RelationType inferRelationshipType = RelationType.NAVASSOC;
|
RelationType inferRelationshipType = RelationType.NAVASSOC;
|
||||||
private List<Pattern> collPackages = new ArrayList<Pattern>();
|
private List<Pattern> collPackages = new ArrayList<Pattern>();
|
||||||
boolean compact = false;
|
boolean compact = false;
|
||||||
|
boolean hidePrivateInner = false;
|
||||||
// internal option, used by UMLDoc to generate relative links between classes
|
// internal option, used by UMLDoc to generate relative links between classes
|
||||||
boolean relativeLinksForSourcePackages = false;
|
boolean relativeLinksForSourcePackages = false;
|
||||||
// internal option, used by UMLDoc to force strict matching on the class names
|
// internal option, used by UMLDoc to force strict matching on the class names
|
||||||
|
|
@ -193,6 +194,7 @@ public class Options implements Cloneable, OptionProvider {
|
||||||
matchOption(option, "qualifyGenerics", true) ||
|
matchOption(option, "qualifyGenerics", true) ||
|
||||||
matchOption(option, "hideGenerics", true) ||
|
matchOption(option, "hideGenerics", true) ||
|
||||||
matchOption(option, "horizontal", true) ||
|
matchOption(option, "horizontal", true) ||
|
||||||
|
matchOption(option, "all") ||
|
||||||
matchOption(option, "attributes", true) ||
|
matchOption(option, "attributes", true) ||
|
||||||
matchOption(option, "enumconstants", true) ||
|
matchOption(option, "enumconstants", true) ||
|
||||||
matchOption(option, "operations", true) ||
|
matchOption(option, "operations", true) ||
|
||||||
|
|
@ -203,16 +205,16 @@ public class Options implements Cloneable, OptionProvider {
|
||||||
matchOption(option, "autosize", true) ||
|
matchOption(option, "autosize", true) ||
|
||||||
matchOption(option, "commentname", true) ||
|
matchOption(option, "commentname", true) ||
|
||||||
matchOption(option, "nodefontabstractitalic", true) ||
|
matchOption(option, "nodefontabstractitalic", true) ||
|
||||||
matchOption(option, "all") ||
|
matchOption(option, "postfixpackage", true) ||
|
||||||
matchOption(option, "postfixpackage") ||
|
matchOption(option, "noguillemot", true) ||
|
||||||
matchOption(option, "noguillemot") ||
|
matchOption(option, "views", true) ||
|
||||||
matchOption(option, "views") ||
|
matchOption(option, "inferrel", true) ||
|
||||||
matchOption(option, "inferrel") ||
|
matchOption(option, "useimports", true) ||
|
||||||
matchOption(option, "useimports") ||
|
matchOption(option, "collapsible", true) ||
|
||||||
matchOption(option, "collapsible") ||
|
matchOption(option, "inferdep", true) ||
|
||||||
matchOption(option, "inferdep") ||
|
matchOption(option, "inferdepinpackage", true) ||
|
||||||
matchOption(option, "inferdepinpackage") ||
|
matchOption(option, "hideprivateinner", true) ||
|
||||||
matchOption(option, "compact"))
|
matchOption(option, "compact", true))
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
else if(matchOption(option, "nodefillcolor") ||
|
else if(matchOption(option, "nodefillcolor") ||
|
||||||
|
|
@ -396,6 +398,8 @@ public class Options implements Cloneable, OptionProvider {
|
||||||
inferDependencies = positive;
|
inferDependencies = positive;
|
||||||
} else if(matchOption(opt[0], "inferdepinpackage", true)) {
|
} else if(matchOption(opt[0], "inferdepinpackage", true)) {
|
||||||
inferDepInPackage = positive;
|
inferDepInPackage = positive;
|
||||||
|
} else if (matchOption(opt[0], "hideprivateinner", true)) {
|
||||||
|
hidePrivateInner = positive;
|
||||||
} else if(matchOption(opt[0], "useimports", true)) {
|
} else if(matchOption(opt[0], "useimports", true)) {
|
||||||
useImports = positive;
|
useImports = positive;
|
||||||
} else if (matchOption(opt[0], "collpackages", true)) {
|
} else if (matchOption(opt[0], "collpackages", true)) {
|
||||||
|
|
|
||||||
|
|
@ -63,8 +63,8 @@ public class PackageView implements OptionProvider {
|
||||||
boolean inPackage = matcher.matches(cd);
|
boolean inPackage = matcher.matches(cd);
|
||||||
if (inPackage)
|
if (inPackage)
|
||||||
opt.showQualified = false;
|
opt.showQualified = false;
|
||||||
if (!(inPackage || this.opt.matchesIncludeExpression(cd.qualifiedName()))
|
boolean included = inPackage || this.opt.matchesIncludeExpression(cd.qualifiedName());
|
||||||
|| this.opt.matchesHideExpression(cd.qualifiedName()))
|
if (!included || this.opt.matchesHideExpression(cd.qualifiedName()))
|
||||||
opt.setOption(HIDE);
|
opt.setOption(HIDE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -73,8 +73,8 @@ public class PackageView implements OptionProvider {
|
||||||
boolean inPackage = matcher.matches(className);
|
boolean inPackage = matcher.matches(className);
|
||||||
if (inPackage)
|
if (inPackage)
|
||||||
opt.showQualified = false;
|
opt.showQualified = false;
|
||||||
if (!(inPackage || this.opt.matchesIncludeExpression(className))
|
boolean included = inPackage || this.opt.matchesIncludeExpression(className);
|
||||||
|| this.opt.matchesHideExpression(className))
|
if (!included || this.opt.matchesHideExpression(className))
|
||||||
opt.setOption(HIDE);
|
opt.setOption(HIDE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue