use of net.sourceforge.usbdm.deviceEditor.information.DeviceInfo in project usbdm-eclipse-plugins by podonoghue.
the class TestCreateCpp method main.
public static void main(String[] args) throws Exception {
Path directory = Paths.get("BulkTesting");
Path dataDirectory = Paths.get("data");
// Locate header output directory
Path headerDirectory = directory.resolve("Project_Headers");
// Locate source output directory
Path sourcesDirectory = directory.resolve("Sources");
// Create output directories if needed
if (!directory.toFile().exists()) {
Files.createDirectory(directory);
}
if (!headerDirectory.toFile().exists()) {
Files.createDirectory(headerDirectory);
}
if (!sourcesDirectory.toFile().exists()) {
Files.createDirectory(sourcesDirectory);
}
DirectoryStream<Path> folderStream = Files.newDirectoryStream(dataDirectory.toAbsolutePath(), csvFilter);
for (Path filePath : folderStream) {
if (!Files.isRegularFile(filePath)) {
continue;
}
/*
* Process each input file
*/
System.err.println("Processing " + filePath.getFileName() + " ======================== ");
DeviceInfo deviceInfo = DeviceInfo.create(filePath);
WriteFamilyCpp writer = new WriteFamilyCpp();
writer.writeCppFiles(directory, deviceInfo);
}
}
use of net.sourceforge.usbdm.deviceEditor.information.DeviceInfo in project usbdm-eclipse-plugins by podonoghue.
the class DevicePackageModel method modelElementChanged.
@Override
public void modelElementChanged(ObservableModel model) {
if (model instanceof DeviceInfo) {
DeviceInfo deviceInfo = (DeviceInfo) model;
String packageName = deviceInfo.getVariant().getPackage().getName();
if (getValueAsString() != packageName) {
setValue(deviceInfo.getVariant().getPackage().getName());
}
}
}
Aggregations