Search in sources :

Example 1 with Importer

use of gov.sandia.n2a.plugins.extpoints.Importer in project n2a by frothga.

the class PanelEquationTree method importFile.

public static void importFile(File path) {
    Importer bestImporter = null;
    float bestP = 0;
    for (ExtensionPoint exp : PluginManager.getExtensionsForPoint(Importer.class)) {
        float P = ((Importer) exp).isIn(path);
        if (P > bestP) {
            bestP = P;
            bestImporter = (Importer) exp;
        }
    }
    if (bestImporter != null)
        bestImporter.process(path);
}
Also used : ExtensionPoint(gov.sandia.n2a.plugins.ExtensionPoint) Importer(gov.sandia.n2a.plugins.extpoints.Importer)

Aggregations

ExtensionPoint (gov.sandia.n2a.plugins.ExtensionPoint)1 Importer (gov.sandia.n2a.plugins.extpoints.Importer)1