bundles/org.eclipse.packagedrone.repo.channel/src/org/eclipse/packagedrone/repo/channel/util/RepositoryLinks.java
public static void fillRepoLinks ( final ChannelInformation channel, final List<MenuEntry> links, final String baseName, final int basePriority, final String prefix, final int priorityOffset, final Function<String, LinkTarget> targetFunction )
    {
        Objects.requireNonNull ( channel, "'channel' must not be null" );
        Objects.requireNonNull ( links, "'links' must not be null" );
        Objects.requireNonNull ( baseName, "'baseName' must not be null" );
        Objects.requireNonNull ( prefix, "'prefix' must not be null" );
        Objects.requireNonNull ( targetFunction, "'targetFunction' must not be null" );

        links.add ( new MenuEntry ( baseName, basePriority, prefix + " (by ID)", priorityOffset, targetFunction.apply ( channel.getId () ), Modifier.LINK, null ) );

        int i = 1;
        for ( final String name : channel.getNames () )
        {
            final LinkTarget target = targetFunction.apply ( name );
            if ( target != null )
            {
                links.add ( new MenuEntry ( baseName, basePriority, String.format ( "%s (name: %s)", prefix, name ), priorityOffset + i, target, Modifier.LINK, null ) );
            }
            i++;
        }
    }
public static void fillRepoLinks ( final ChannelInformation channel, final List<MenuEntry> links, final String baseName, final int basePriority, final String prefix, final int priorityOffset, final Function<String, LinkTarget> targetFunction )
    {
        Objects.requireNonNull ( channel, "'channel' must not be null" );
        Objects.requireNonNull ( links, "'links' must not be null" );
        Objects.requireNonNull ( baseName, "'baseName' must not be null" );
        Objects.requireNonNull ( prefix, "'prefix' must not be null" );
        Objects.requireNonNull ( targetFunction, "'targetFunction' must not be null" );

        links.add ( new MenuEntry ( baseName, basePriority, prefix + " (by ID)", priorityOffset, targetFunction.apply ( channel.getId () ), Modifier.LINK, null ) );

        int i = 1;
        for ( final String name : channel.getNames () )
        {
            final LinkTarget target = targetFunction.apply ( name );
            if ( target != null )
            {
                links.add ( new MenuEntry ( baseName, basePriority, String.format ( "%s (name: %s)", prefix, name ), priorityOffset + i, target, Modifier.LINK, null ) );
            }
            i++;
        }
    }
Create a set of default repository links

@param channel
the channel to generate for
@param links
the receiver of the links
@param baseName
the name of the top level menu entry
@param basePriority
the priority of the top level menu entry
@param prefix
the prefix of the child menu entries
@param priorityOffset
the base priority of the child menu entries
@param targetFunction
the function which provides a link target based on the id or
name of the channel. Returning a {@code null} target will skip
this id or name from the list