Examples of loadFrom()


Examples of aQute.bnd.build.model.BndEditModel.loadFrom()

                projectDocument = new Document(new String(bytes, projectFile.getCharset()));
            } else {
                projectDocument = new Document("");
            }
            projectModel = new BndEditModel();
            projectModel.loadFrom(projectDocument);
        } catch (IOException e) {
            throw new CoreException(new Status(IStatus.ERROR, Plugin.PLUGIN_ID, 0, e.getMessage(), e));
        }

        // Check if we need to enable sub-bundles on the project file
View Full Code Here

Examples of aQute.bnd.build.model.BndEditModel.loadFrom()

        if (editor instanceof BndEditor) {
            editModel = ((BndEditor) editor).getEditModel();
        } else {
            editModel = new BndEditModel();
            doc = FileUtils.readFully(bndFile);
            editModel.loadFrom(new IDocumentWrapper(doc));
        }

        String blueprintrelativePath = blueprintFile.getProjectRelativePath().toString();

        updateBundleBlueprintIfNecessary(editModel, blueprintrelativePath);
View Full Code Here

Examples of aQute.bnd.build.model.BndEditModel.loadFrom()

            } else {
                document = new Document(""); //$NON-NLS-1$
            }

            final BndEditModel model = new BndEditModel();
            model.loadFrom(document);

            String currentVersion = model.getBundleVersionString();
            String templateVersion = updateTemplateVersion(currentVersion, bundleVersion);
            model.setBundleVersion(templateVersion);
            properties.setProperty(Constants.BUNDLE_VERSION, templateVersion);
View Full Code Here

Examples of aQute.bnd.build.model.BndEditModel.loadFrom()

      } else {
        document = new Document(""); //$NON-NLS-1$
      }

      final BndEditModel model = new BndEditModel();
      model.loadFrom(document);

      String currentVersion = model.getBundleVersionString();
      String templateVersion = updateTemplateVersion(currentVersion, bundleVersion);
      model.setBundleVersion(templateVersion);
      properties.setProperty(Constants.BUNDLE_VERSION, templateVersion);
View Full Code Here

Examples of com.wakaleo.gameoflife.domain.GridReader.loadFrom()

        String gridContents = "";

        Cell[][] expectedCells = {{}};

        GridReader gridReader = new GridReader();
        Cell[][] loadedCells = gridReader.loadFrom(gridContents);

        assertThat(loadedCells, is(expectedCells));
    }

    @Test
View Full Code Here

Examples of com.wakaleo.gameoflife.domain.GridReader.loadFrom()

        String gridContents = "*";

        Cell[][] expectedCells = {{LIVE_CELL}};

        GridReader gridReader = new GridReader();
        Cell[][] loadedCells = gridReader.loadFrom(gridContents);

        assertThat(loadedCells, is(expectedCells));
    }

    @Test
View Full Code Here

Examples of com.wakaleo.gameoflife.domain.GridReader.loadFrom()

                {DEAD_CELL, DEAD_CELL, DEAD_CELL},
                {DEAD_CELL, DEAD_CELL, DEAD_CELL}
        };

        GridReader gridReader = new GridReader();
        Cell[][] loadedCells = gridReader.loadFrom(gridContents);

        assertThat(loadedCells, is(expectedCells));
    }

    @Test(expected = IllegalArgumentException.class)
View Full Code Here

Examples of com.wakaleo.gameoflife.domain.GridReader.loadFrom()

                {DEAD_CELL, DEAD_CELL, DEAD_CELL},
                {DEAD_CELL, DEAD_CELL, DEAD_CELL}
        };

        GridReader gridReader = new GridReader();
        Cell[][] loadedCells = gridReader.loadFrom(gridContents);

        assertThat(loadedCells, is(expectedCells));
    }

    @Test
View Full Code Here

Examples of com.wakaleo.gameoflife.domain.GridReader.loadFrom()

                {DEAD_CELL, LIVE_CELL, DEAD_CELL},
                {DEAD_CELL, DEAD_CELL, LIVE_CELL}
        };

        GridReader gridReader = new GridReader();
        Cell[][] loadedCells = gridReader.loadFrom(gridContents);

        assertThat(loadedCells, is(expectedCells));
    }

    @Test
View Full Code Here

Examples of com.wakaleo.gameoflife.domain.GridReader.loadFrom()

                {LIVE_CELL, LIVE_CELL, DEAD_CELL, DEAD_CELL},
                {DEAD_CELL, DEAD_CELL, LIVE_CELL, DEAD_CELL}
        };

        GridReader gridReader = new GridReader();
        Cell[][] loadedCells = gridReader.loadFrom(gridContents);

        assertThat(loadedCells, is(expectedCells));
    }

    @Test
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.