Search in sources :

Example 1 with IFormPageFactory

use of org.bndtools.core.ui.IFormPageFactory in project bndtools by bndtools.

the class BndEditor method getPagesBnd.

private List<String> getPagesBnd(String fileName) {
    List<String> pages = new ArrayList<String>(5);
    boolean isProjectFile = Project.BNDFILE.equals(fileName);
    List<String> subBndFiles = model.getSubBndFiles();
    boolean isSubBundles = subBndFiles != null && !subBndFiles.isEmpty();
    for (Entry<String, IFormPageFactory> pageEntry : pageFactories.entrySet()) {
        String pageId = pageEntry.getKey();
        IFormPageFactory page = pageEntry.getValue();
        if (!isSubBundles && page.supportsMode(IFormPageFactory.Mode.bundle))
            pages.add(pageId);
        else if (isProjectFile && page.supportsMode(IFormPageFactory.Mode.project))
            pages.add(pageId);
    }
    return pages;
}
Also used : IFormPageFactory(org.bndtools.core.ui.IFormPageFactory) ArrayList(java.util.ArrayList)

Aggregations

ArrayList (java.util.ArrayList)1 IFormPageFactory (org.bndtools.core.ui.IFormPageFactory)1