Skip to content

Other color for wrong edges #77

Description

@opensource21

A lot of people have problems to see the color red. At the moment I replace #FF0000 with #0101FF in the graphml. Now I find the error much quicker even in a difficult diagram. Would be nice to have it configurable.

Workaround

    /**
     * Define the name of errorfile with Junit-Name-Rule.
     */
    @Before
    public void setUp() {
        errorFilename = name.getMethodName() + "Error.graphml";
        final Package runtimePackage = Runtime.class.getPackage();
        final boolean oracleJDK = runtimePackage.getImplementationVendor().contains("Oracle");
        final boolean java7 = runtimePackage.getImplementationVersion().startsWith("1.7.0");
        // Oracle JDK 1.7 ends with OutOfMemory at travis-ci..
        Assume.assumeFalse(oracleJDK && java7);
    }

    /**
     * Change color from RED to BLUE.
     * @throws IOException .
     */
    @After
    public void fixForRedBlindPeople() throws IOException {
        final Path errorFile = Paths.get(errorFilename);
        if (Files.exists(errorFile)) {
            final Charset charset = StandardCharsets.UTF_8;
            String content = new String(Files.readAllBytes(errorFile), charset);
            content = content.replaceAll("#FF0000", "#0101FF");
            Files.write(errorFile, content.getBytes(charset));
        }
    }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions