Search in sources :

Example 1 with Import

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

the class PanelModel method importFile.

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

Aggregations

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