From a62fe11961a14a3fec0efcd348dc2463f73563d9 Mon Sep 17 00:00:00 2001 From: Harald Pehl Date: Wed, 18 Oct 2023 15:04:17 +0200 Subject: [PATCH] Code format --- .../subsystem/elytron/RoleMapListItem.java | 11 ++++--- .../infinispan/CacheContainerPresenter.java | 11 +++---- .../infinispan/CacheContainerView.java | 3 +- .../RemoteCacheContainerPresenter.java | 11 +++---- .../infinispan/RemoteCacheContainerView.java | 9 ++++-- .../subsystem/infinispan/ThreadPool.java | 2 +- .../jboss/hal/client/skeleton/FooterView.java | 3 +- .../jboss/hal/client/skeleton/HeaderView.java | 29 ++++++++++--------- 8 files changed, 46 insertions(+), 33 deletions(-) diff --git a/app/src/main/java/org/jboss/hal/client/configuration/subsystem/elytron/RoleMapListItem.java b/app/src/main/java/org/jboss/hal/client/configuration/subsystem/elytron/RoleMapListItem.java index 0f25ea23cd..23ba98e105 100644 --- a/app/src/main/java/org/jboss/hal/client/configuration/subsystem/elytron/RoleMapListItem.java +++ b/app/src/main/java/org/jboss/hal/client/configuration/subsystem/elytron/RoleMapListItem.java @@ -19,9 +19,6 @@ import java.util.EnumSet; import java.util.List; -import com.google.gwt.core.client.GWT; -import com.google.gwt.regexp.shared.RegExp; -import elemental2.dom.HTMLElement; import org.jboss.hal.ballroom.form.ModelNodeItem; import org.jboss.hal.ballroom.form.TagsItem; import org.jboss.hal.ballroom.form.TagsManager; @@ -29,10 +26,16 @@ import org.jboss.hal.dmr.ModelNode; import org.jboss.hal.resources.Messages; -import static elemental2.dom.DomGlobal.document; +import com.google.gwt.core.client.GWT; +import com.google.gwt.regexp.shared.RegExp; + +import elemental2.dom.HTMLElement; + import static java.util.Collections.emptyList; import static java.util.stream.Collectors.joining; import static java.util.stream.Collectors.toList; + +import static elemental2.dom.DomGlobal.document; import static org.jboss.hal.ballroom.form.Decoration.DEFAULT; import static org.jboss.hal.ballroom.form.Decoration.DEPRECATED; import static org.jboss.hal.ballroom.form.Decoration.ENABLED; diff --git a/app/src/main/java/org/jboss/hal/client/configuration/subsystem/infinispan/CacheContainerPresenter.java b/app/src/main/java/org/jboss/hal/client/configuration/subsystem/infinispan/CacheContainerPresenter.java index 6ed2f4c669..4d86eeefc3 100644 --- a/app/src/main/java/org/jboss/hal/client/configuration/subsystem/infinispan/CacheContainerPresenter.java +++ b/app/src/main/java/org/jboss/hal/client/configuration/subsystem/infinispan/CacheContainerPresenter.java @@ -19,11 +19,6 @@ import javax.inject.Inject; -import com.google.web.bindery.event.shared.EventBus; -import com.gwtplatform.mvp.client.annotations.NameToken; -import com.gwtplatform.mvp.client.annotations.ProxyCodeSplit; -import com.gwtplatform.mvp.client.proxy.ProxyPlace; -import com.gwtplatform.mvp.shared.proxy.PlaceRequest; import org.jboss.hal.ballroom.form.Form; import org.jboss.hal.ballroom.form.Form.FinishRemove; import org.jboss.hal.ballroom.form.Form.FinishReset; @@ -50,6 +45,12 @@ import org.jboss.hal.resources.Names; import org.jboss.hal.spi.Requires; +import com.google.web.bindery.event.shared.EventBus; +import com.gwtplatform.mvp.client.annotations.NameToken; +import com.gwtplatform.mvp.client.annotations.ProxyCodeSplit; +import com.gwtplatform.mvp.client.proxy.ProxyPlace; +import com.gwtplatform.mvp.shared.proxy.PlaceRequest; + import static org.jboss.hal.client.configuration.subsystem.infinispan.AddressTemplates.CACHE_CONTAINER_ADDRESS; import static org.jboss.hal.client.configuration.subsystem.infinispan.AddressTemplates.CACHE_CONTAINER_TEMPLATE; import static org.jboss.hal.client.configuration.subsystem.infinispan.AddressTemplates.SELECTED_CACHE_CONTAINER_TEMPLATE; diff --git a/app/src/main/java/org/jboss/hal/client/configuration/subsystem/infinispan/CacheContainerView.java b/app/src/main/java/org/jboss/hal/client/configuration/subsystem/infinispan/CacheContainerView.java index cbfe2d26b2..40c9bca0b6 100644 --- a/app/src/main/java/org/jboss/hal/client/configuration/subsystem/infinispan/CacheContainerView.java +++ b/app/src/main/java/org/jboss/hal/client/configuration/subsystem/infinispan/CacheContainerView.java @@ -21,7 +21,6 @@ import javax.inject.Inject; -import elemental2.dom.HTMLElement; import org.jboss.hal.ballroom.VerticalNavigation; import org.jboss.hal.ballroom.form.Form; import org.jboss.hal.core.mbui.form.ModelNodeForm; @@ -34,6 +33,8 @@ import org.jboss.hal.resources.Names; import org.jboss.hal.resources.Resources; +import elemental2.dom.HTMLElement; + import static org.jboss.elemento.Elements.h; import static org.jboss.elemento.Elements.p; import static org.jboss.elemento.Elements.section; diff --git a/app/src/main/java/org/jboss/hal/client/configuration/subsystem/infinispan/RemoteCacheContainerPresenter.java b/app/src/main/java/org/jboss/hal/client/configuration/subsystem/infinispan/RemoteCacheContainerPresenter.java index 49863984a8..d1352a7c99 100644 --- a/app/src/main/java/org/jboss/hal/client/configuration/subsystem/infinispan/RemoteCacheContainerPresenter.java +++ b/app/src/main/java/org/jboss/hal/client/configuration/subsystem/infinispan/RemoteCacheContainerPresenter.java @@ -19,11 +19,6 @@ import javax.inject.Inject; -import com.google.web.bindery.event.shared.EventBus; -import com.gwtplatform.mvp.client.annotations.NameToken; -import com.gwtplatform.mvp.client.annotations.ProxyCodeSplit; -import com.gwtplatform.mvp.client.proxy.ProxyPlace; -import com.gwtplatform.mvp.shared.proxy.PlaceRequest; import org.jboss.hal.ballroom.form.Form; import org.jboss.hal.ballroom.form.Form.FinishReset; import org.jboss.hal.core.CrudOperations; @@ -49,6 +44,12 @@ import org.jboss.hal.resources.Resources; import org.jboss.hal.spi.Requires; +import com.google.web.bindery.event.shared.EventBus; +import com.gwtplatform.mvp.client.annotations.NameToken; +import com.gwtplatform.mvp.client.annotations.ProxyCodeSplit; +import com.gwtplatform.mvp.client.proxy.ProxyPlace; +import com.gwtplatform.mvp.shared.proxy.PlaceRequest; + import static org.jboss.hal.client.configuration.subsystem.infinispan.AddressTemplates.COMPONENT_CONNECTION_POOL_TEMPLATE; import static org.jboss.hal.client.configuration.subsystem.infinispan.AddressTemplates.COMPONENT_SECURITY_TEMPLATE; import static org.jboss.hal.client.configuration.subsystem.infinispan.AddressTemplates.REMOTE_CACHE_CONTAINER_ADDRESS; diff --git a/app/src/main/java/org/jboss/hal/client/configuration/subsystem/infinispan/RemoteCacheContainerView.java b/app/src/main/java/org/jboss/hal/client/configuration/subsystem/infinispan/RemoteCacheContainerView.java index ab57896a9a..12519aed39 100644 --- a/app/src/main/java/org/jboss/hal/client/configuration/subsystem/infinispan/RemoteCacheContainerView.java +++ b/app/src/main/java/org/jboss/hal/client/configuration/subsystem/infinispan/RemoteCacheContainerView.java @@ -17,8 +17,6 @@ import javax.inject.Inject; -import com.google.gwt.safehtml.shared.SafeHtmlUtils; -import elemental2.dom.HTMLElement; import org.jboss.hal.ballroom.VerticalNavigation; import org.jboss.hal.ballroom.form.Form; import org.jboss.hal.ballroom.table.Table; @@ -34,7 +32,12 @@ import org.jboss.hal.resources.Names; import org.jboss.hal.resources.Resources; +import com.google.gwt.safehtml.shared.SafeHtmlUtils; + +import elemental2.dom.HTMLElement; + import static java.util.stream.Collectors.joining; + import static org.jboss.elemento.Elements.h; import static org.jboss.elemento.Elements.p; import static org.jboss.elemento.Elements.section; @@ -87,7 +90,7 @@ public RemoteCacheContainerView(MetadataRegistry metadataRegistry, TableButtonFa ModelNode socketBindings = row.get(SOCKET_BINDINGS); if (socketBindings.isDefined()) { return SafeHtmlUtils.fromString( - socketBindings.asList().stream().map(ModelNode::asString).collect(joining(", "))) + socketBindings.asList().stream().map(ModelNode::asString).collect(joining(", "))) .asString(); } return ""; diff --git a/app/src/main/java/org/jboss/hal/client/configuration/subsystem/infinispan/ThreadPool.java b/app/src/main/java/org/jboss/hal/client/configuration/subsystem/infinispan/ThreadPool.java index 633526e0e3..12f0b3f49a 100644 --- a/app/src/main/java/org/jboss/hal/client/configuration/subsystem/infinispan/ThreadPool.java +++ b/app/src/main/java/org/jboss/hal/client/configuration/subsystem/infinispan/ThreadPool.java @@ -42,7 +42,7 @@ enum ThreadPool { NON_BLOCKING(Ids.CACHE_CONTAINER_THREAD_POOL_NON_BLOCKING, Names.NON_BLOCKING, ModelDescriptionConstants.NON_BLOCKING, false), - ; + ; final String baseId; final String type; diff --git a/app/src/main/java/org/jboss/hal/client/skeleton/FooterView.java b/app/src/main/java/org/jboss/hal/client/skeleton/FooterView.java index e181c7d839..444bc16628 100644 --- a/app/src/main/java/org/jboss/hal/client/skeleton/FooterView.java +++ b/app/src/main/java/org/jboss/hal/client/skeleton/FooterView.java @@ -17,7 +17,6 @@ import javax.inject.Inject; -import elemental2.dom.HTMLElement; import org.jboss.elemento.Elements; import org.jboss.hal.ballroom.ProgressElement; import org.jboss.hal.ballroom.Tooltip; @@ -32,6 +31,8 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import elemental2.dom.HTMLElement; + import static org.jboss.elemento.Elements.a; import static org.jboss.elemento.Elements.b; import static org.jboss.elemento.Elements.div; diff --git a/app/src/main/java/org/jboss/hal/client/skeleton/HeaderView.java b/app/src/main/java/org/jboss/hal/client/skeleton/HeaderView.java index b79d0b3433..57b4b3ef57 100644 --- a/app/src/main/java/org/jboss/hal/client/skeleton/HeaderView.java +++ b/app/src/main/java/org/jboss/hal/client/skeleton/HeaderView.java @@ -24,13 +24,6 @@ import javax.inject.Inject; -import com.google.common.base.Strings; -import com.google.gwt.safehtml.shared.SafeHtmlUtils; -import com.google.web.bindery.event.shared.HandlerRegistration; -import com.gwtplatform.mvp.shared.proxy.PlaceRequest; -import elemental2.dom.Element; -import elemental2.dom.HTMLElement; -import elemental2.dom.HTMLLIElement; import org.jboss.elemento.Elements; import org.jboss.elemento.HtmlContentBuilder; import org.jboss.hal.ballroom.Tooltip; @@ -61,9 +54,19 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import com.google.common.base.Strings; +import com.google.gwt.safehtml.shared.SafeHtmlUtils; +import com.google.web.bindery.event.shared.HandlerRegistration; +import com.gwtplatform.mvp.shared.proxy.PlaceRequest; + +import elemental2.dom.Element; +import elemental2.dom.HTMLElement; +import elemental2.dom.HTMLLIElement; + import static java.util.Arrays.asList; import static java.util.stream.Collectors.joining; import static java.util.stream.StreamSupport.stream; + import static org.jboss.elemento.Elements.a; import static org.jboss.elemento.Elements.b; import static org.jboss.elemento.Elements.button; @@ -352,7 +355,7 @@ public HeaderView(Environment environment, Places places, AccessControl ac, Reso tlc = new HashMap<>(); initTlc(root, - new String[]{ + new String[] { NameTokens.HOMEPAGE, NameTokens.DEPLOYMENTS, NameTokens.CONFIGURATION, @@ -360,7 +363,7 @@ public HeaderView(Environment environment, Places places, AccessControl ac, Reso NameTokens.UPDATE_MANAGER, NameTokens.ACCESS_CONTROL, }, - new String[]{ + new String[] { Ids.TLC_HOMEPAGE, Ids.TLC_DEPLOYMENTS, Ids.TLC_CONFIGURATION, @@ -433,7 +436,7 @@ public void init(Environment environment, Endpoints endpoints, Settings settings @Override public void updateRoles(Environment environment, Settings settings, User user) { - for (Iterator iterator = Elements.iterator(userDropdown); iterator.hasNext(); ) { + for (Iterator iterator = Elements.iterator(userDropdown); iterator.hasNext();) { HTMLElement element = iterator.next(); if (element == logoutItem) { continue; @@ -619,7 +622,7 @@ public void updateBreadcrumb(FinderContext finderContext) { } breadcrumbHandlers.clear(); - for (Iterator> iterator = finderContext.getPath().iterator(); iterator.hasNext(); ) { + for (Iterator> iterator = finderContext.getPath().iterator(); iterator.hasNext();) { FinderSegment segment = iterator.next(); if (segment.getColumnId() == null || segment.getItemId() == null) { // we need to ignore half filled segments which occur when removing items from a column @@ -722,7 +725,7 @@ public void updateBreadcrumb(ModelBrowserPath path) { } else { ModelBrowser modelBrowser = path.getModelBrowser(); - for (Iterator iterator = path.iterator(); iterator.hasNext(); ) { + for (Iterator iterator = path.iterator(); iterator.hasNext();) { Segment[] segments = iterator.next(); Segment key = segments[0]; Segment value = segments[1]; @@ -749,7 +752,7 @@ public void updateBreadcrumb(ModelBrowserPath path) { } private void clearBreadcrumb() { - for (Iterator iterator = Elements.iterator(breadcrumb); iterator.hasNext(); ) { + for (Iterator iterator = Elements.iterator(breadcrumb); iterator.hasNext();) { HTMLElement element = iterator.next(); if (element == backItem || element == breadcrumbToolsItem) { continue;