/**
 * Copyright 2017 Craig A. Stockton
 * <p/>
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * <p/>
 * http://www.apache.org/licenses/LICENSE-2.0
 * <p/>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.softwareonpurpose.uinavigator;

import org.slf4j.LoggerFactory;

public abstract class UiRegion {

    private static boolean suppressLogging;
    private final UiElement regionElement;

    protected UiRegion(UiElement regionElement) {
        this.regionElement = regionElement;
        if (!suppressLogging)
            LoggerFactory.getLogger("").info(String.format("In %s...", getDescription()));
    }

    public static void suppressConstructionLogging(boolean suppress) {
        suppressLogging = suppress;
    }

    public boolean isVisible() {
        return regionElement.waitUntilVisible();
    }

    @SuppressWarnings("WeakerAccess")
    protected UiElement getElement() {
        return regionElement;
    }

    @SuppressWarnings("WeakerAccess")
    protected String getDescription() {
        return getElement().getDescription();
    }
}

@@ -18,9 +18,9 @@
  201
-7
+8
  Cra
@@ -702,16 +702,45 @@
 ory;%0D%0A%0D%0A
+@SuppressWarnings(%22unused%22)%0D%0A
 public a
@@ -854,24 +854,156 @@
 Element;%0D%0A%0D%0A
+    /***%0D%0A     * Super constructor of UiRegion classes%0D%0A     * @param regionElement UiElement fully containing the region%0D%0A     */%0D%0A
     protecte
@@ -1226,213 +1226,630 @@
     
-public static void suppressConstructionLogging(boolean suppress) %7B%0D%0A        suppressLogging = suppress;%0D%0A    %7D%0D%0A%0D%0A    public boolean isVisible() %7B%0D%0A        return regionElement.waitUntilVisible();%0D%0A    %7D%0D%0A
+/***%0D%0A     * Used to suppress construction logging when it would be out of context%0D%0A     * @param suppress boolean True = log construction of the region (i.e. %22In %5Bregion%5D...%22); False = suppress logging%0D%0A     */%0D%0A    public static void suppressConstructionLogging(boolean suppress) %7B%0D%0A        suppressLogging = suppress;%0D%0A    %7D%0D%0A%0D%0A    /***%0D%0A     * Is the region visible within the parent UiElement%0D%0A     * @return boolean%0D%0A     */%0D%0A    public boolean isVisible() %7B%0D%0A        return regionElement.waitUntilVisible();%0D%0A    %7D%0D%0A%0D%0A    /***%0D%0A     * UiElement fully containing the defined region%0D%0A     * @return UiElement%0D%0A     */
 %0D%0A  
@@ -1961,24 +1961,100 @@
 ;%0D%0A    %7D%0D%0A%0D%0A
+    /***%0D%0A     * Description of the region%0D%0A     * @return String%0D%0A     */%0D%0A
     @Suppres

Add javadocs