Commit 98f9e47d authored by Rene Saarsoo's avatar Rene Saarsoo
Browse files

Remove --show-private-classes option.

Private classes are now always exported. UI decides whether to show
the or not.  At the moment the PackageLogic class has a config option
showPrivateClasses - in spe it will be connected to some button in UI.
parent 6a41d143
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -122,7 +122,7 @@ module JsDuck
      classes = []
      docs.each do |d|
        if d[:tagname] == :class
          classes << Class.new(d) if !d[:private] || @opts.show_private_classes
          classes << Class.new(d)
        else
          type = d[:tagname].to_s
          name = d[:name]
+1 −0
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@ module JsDuck
        {
          :name => cls[:name],
          :extends => cls[:extends],
          :private => cls[:private],
          :icon => icon(cls),
        }
      end
+0 −6
Original line number Diff line number Diff line
@@ -8,7 +8,6 @@ module JsDuck

    attr_accessor :output_dir
    attr_accessor :ignore_global
    attr_accessor :show_private_classes
    attr_accessor :external_classes
    attr_accessor :warnings
    attr_accessor :verbose
@@ -40,7 +39,6 @@ module JsDuck

      @output_dir = nil
      @ignore_global = false
      @show_private_classes = false
      @external_classes = []
      @warnings = true
      @verbose = false
@@ -89,10 +87,6 @@ module JsDuck
          @ignore_global = true
        end

        opts.on('--private-classes', "Include private classes to docs.", " ") do
          @show_private_classes = true
        end

        opts.on('--external=CLASSNAME',
          "Declares an external class.  When declared as",
          "external, inheriting from this class will not",
+10 −0
Original line number Diff line number Diff line
@@ -7,8 +7,15 @@ Ext.define('Docs.view.cls.PackageLogic', {
     * @cfg {String} classes.name
     * @cfg {String} classes.extends
     * @cfg {String} classes.icon
     * @cfg {Boolean} classes.private
     */

    /**
     * @cfg
     * True to include private classes to tree.
     */
    showPrivateClasses: false,

    /**
     * Initializes tree creator.
     * @param {Object} cfg
@@ -55,6 +62,9 @@ Ext.define('Docs.view.cls.PackageLogic', {
    // When package for the class exists, add class node to that
    // package; otherwise create the package first.
    addClass: function(cls) {
        if (cls["private"] && !this.showPrivateClasses) {
            return;
        }
        var parentName = this.packageName(cls.name);
        var parent = this.packages[parentName] || this.addPackage(parentName);
        parent.children.push(this.classNode(cls));