Adds list of packages in the index table. Generate link to each package.

@param packages Packages to which link is to be generated
@param tbody the documentation tree to which the list will be added
430236
protected void addPackagesList(Collection<PackageDoc> packages, Content tbody) {
        boolean altColor = true;
        for (PackageDoc pkg : packages) {
            if (pkg != null && !pkg.name().isEmpty()) {
                if (!(configuration.nodeprecated && utils.isDeprecated(pkg))) {
                    Content packageLinkContent = getPackageLink(pkg, getPackageName(pkg));
                    Content tdPackage = HtmlTree.TD(HtmlStyle.colFirst, packageLinkContent);
                    HtmlTree tdSummary = new HtmlTree(HtmlTag.TD);
                    tdSummary.addStyle(HtmlStyle.colLast);
                    addSummaryComment(pkg, tdSummary);
                    HtmlTree tr = HtmlTree.TR(tdPackage);
                    tr.addContent(tdSummary);
                    tr.addStyle(altColor ? HtmlStyle.altColor : HtmlStyle.rowColor);
                    tbody.addContent(tr);
                }
            }
            altColor = !altColor;
        }
    }
248456
protected void addPackageTreeLinks(Content contentTree) {
        //Do nothing if only unnamed package is used
        if (packages.length == 1 && packages[0].name().length() == 0) {
            return;
        }
        if (!classesonly) {
            Content span = HtmlTree.SPAN(HtmlStyle.packageHierarchyLabel,
                    getResource("doclet.Package_Hierarchies"));
            contentTree.addContent(span);
            HtmlTree ul = new HtmlTree(HtmlTag.UL);
            ul.addStyle(HtmlStyle.horizontal);
            for (int i = 0; i < packages.length; i++) {
                // If the package name length is 0 or if -nodeprecated option
                // is set and the package is marked as deprecated, do not include
                // the page in the list of package hierarchies.
                if (packages[i].name().length() == 0 ||
                        (configuration.nodeprecated && Util.isDeprecated(packages[i]))) {
                    continue;
                }
                DocPath link = pathString(packages[i], DocPaths.PACKAGE_TREE);
                Content li = HtmlTree.LI(getHyperLink(
                        link, new StringContent(packages[i].name())));
                if (i < packages.length - 1) {
                    li.addContent(", ");
                }
                ul.addContent(li);
            }
            contentTree.addContent(ul);
        }
    }
707460
private Set<PackageResourceReferenceWrapper> addFoundPackageResourceReferences(
		Set<PackageResourceReferenceWrapper> packageResourceReferences, final Class<?> iface)
	{
		final Set<PackageResourceReferenceWrapper> prr = PackageResourceReferences.getInstance()
			.getPackageResourceReferenceMap().get(iface);
		if ((packageResourceReferences != null) && !packageResourceReferences.isEmpty())
		{
			if ((prr != null) && !prr.isEmpty())
			{
				packageResourceReferences.addAll(prr);
			}
			else
			{

			}
		}
		else
		{
			if ((prr != null) && !prr.isEmpty())
			{
				packageResourceReferences = prr;
			}
		}
		return packageResourceReferences;
	}
1272546
public List<String> findPackages() {
    List<String>	result;
    Iterator<String> packages;

    result   = new ArrayList<>();
    packages = m_Cache.packages();
    while (packages.hasNext())
      result.add(packages.next());
    Collections.sort(result, new StringCompare());

    return result;
  }
317999
public void addPackage(String packageName) throws IOException {
    if (this.packagePrefix != null) {
      throw new IllegalStateException();
    }
    out.write("package ");
    out.write(packageName);
    out.write(";\n");
    this.packagePrefix = packageName + ".";
  }
274946
protected void addClassList(Content contentTree) {
        List<String> classTableHeader = Arrays.asList(
                resources.getText("doclet.Class"), resources.getText("doclet.Description"));
        for (String packageName : usingPackageToUsedClasses.keySet()) {
            PackageElement usingPackage = utils.elementUtils.getPackageElement(packageName);
            HtmlTree li = new HtmlTree(HtmlTag.LI);
            li.addStyle(HtmlStyle.blockList);
            if (usingPackage != null) {
                li.addContent(getMarkerAnchor(utils.getPackageName(usingPackage)));
            }
            String tableSummary = configuration.getText("doclet.Use_Table_Summary",
                                                        configuration.getText("doclet.classes"));
            Content caption = getTableCaption(configuration.getContent(
                    "doclet.ClassUse_Classes.in.0.used.by.1",
                    getPackageLink(packageElement, utils.getPackageName(packageElement)),
                    getPackageLink(usingPackage, utils.getPackageName(usingPackage))));
            Content table = (configuration.isOutputHtml5())
                    ? HtmlTree.TABLE(HtmlStyle.useSummary, caption)
                    : HtmlTree.TABLE(HtmlStyle.useSummary, tableSummary, caption);
            table.addContent(getSummaryTableHeader(classTableHeader, "col"));
            Content tbody = new HtmlTree(HtmlTag.TBODY);
            boolean altColor = true;
            for (TypeElement te : usingPackageToUsedClasses.get(packageName)) {
                HtmlTree tr = new HtmlTree(HtmlTag.TR);
                tr.addStyle(altColor ? HtmlStyle.altColor : HtmlStyle.rowColor);
                altColor = !altColor;
                addClassRow(te, usingPackage, tr);
                tbody.addContent(tr);
            }
            table.addContent(tbody);
            li.addContent(table);
            contentTree.addContent(li);
        }
    }
1145011
private Set<PackageRef> collectPackageDependencies() {
		Set<PackageRef> referencedPackages = new HashSet<PackageRef> ();
		for (TypeRef newReferencedType:importedReferencedTypes) {
			PackageRef packageRef = newReferencedType.getPackageRef();
			if (referencedPackages.contains(packageRef))			// package already known
				continue;
			referencedPackages.add(packageRef);
			System.out.println("Add package: " + packageRef.getFQN());
		}
		return referencedPackages;
	}
1304547
def add_scripts_to_package():
    
    global setup_arguments

    if os.path.isdir('scripts'):
        setup_arguments['scripts'] = [
            os.path.join('scripts', f) for f in os.listdir('scripts')
        ]
327428
public void addIncludedPackageNames(String _packageName) {
        if (_packageName.endsWith(".")) {
            includePackageNames.add(_packageName);
            ComponentRegistry.getInstance().addPackageToIncludeList(_packageName);
        }
    }
719463
public function add(Package $package)
    {
        $name = $package->getName();
        if (isset($this->packages[$name])) {
            return;
        }

        $this->packages[$name] = $package;
    }
508341
private void setPackages(DocEnv env, List<String> packages) {
        ListBuffer<PackageDocImpl> packlist = new ListBuffer<PackageDocImpl>();
        for (String name : packages) {
            PackageDocImpl pkg = env.lookupPackage(name);
            if (pkg != null) {
                pkg.isIncluded = true;
                packlist.append(pkg);
            } else {
                env.warning(null, "main.no_source_files_for_package", name);
            }
        }
        cmdLinePackages = packlist.toList();
    }
512896
@Override
    public T addPackages(boolean recursive, Package... packages) throws IllegalArgumentException {
        Validate.notNull(packages, "Packages must be specified");

        return addPackages(recursive, Filters.includeAll(), packages);
    }
1177968
@Override
    public void addPackages( Collection<? extends KiePackage> newPkgs ) {
        final List<InternalKnowledgePackage> clonedPkgs = new ArrayList<>();
        for (KiePackage newPkg : newPkgs) {
            clonedPkgs.add(((InternalKnowledgePackage)newPkg).deepCloneIfAlreadyInUse(rootClassLoader));
        }

        clonedPkgs.sort(Comparator.comparing( (InternalKnowledgePackage p) -> p.getRules().size() ).reversed().thenComparing( InternalKnowledgePackage::getName ));
        enqueueModification( () -> internalAddPackages( clonedPkgs ) );
    }
463931
public void addAndRegisterAddOns(List<AddOnModel> addOns) {
        this.addOns.addAll(addOns);
        registerAllAddOns(this.addOns);
        initialized();
    }
1006819
protected void addPackageUse(Content contentTree) throws IOException {
        HtmlTree ul = new HtmlTree(HtmlTag.UL);
        ul.addStyle(HtmlStyle.blockList);
        if (configuration.packages.length > 1) {
            addPackageList(ul);
        }
        addClassList(ul);
        contentTree.addContent(ul);
    }
1284426
private void renderBundleDependenciesLinks(String requestedPath, BundleRendererContext ctx, Writer out,
			boolean debugOn, List<JoinableResourceBundle> dependencies) throws IOException {

		if (dependencies != null && !dependencies.isEmpty()) {
			for (JoinableResourceBundle dependencyBundle : dependencies) {
				if (debugOn) {
					addComment("Start adding dependency '" + dependencyBundle.getId() + "'", out);
				}
				renderBundleLinks(dependencyBundle, requestedPath, ctx, out, debugOn, false);
				if (debugOn) {
					addComment("Finished adding dependency '" + dependencyBundle.getId() + "'", out);
				}
			}
		}
	}
251263
def add(self, pkgs):
        
        blacklist = self.get_black()
        pkgs = set(pkgs)
        print("\nAdd packages in the blacklist:\n")
        with open(self.blackfile, "a") as black_conf:
            for pkg in pkgs:
                if pkg not in blacklist:
                    print("{0}{1}{2}".format(self.meta.color["GREEN"], pkg,
                                             self.meta.color["ENDC"]))
                    black_conf.write(pkg + "\n")
                    self.quit = True
            black_conf.close()
        if self.quit:
            print("")