Skip to content

Commit

Permalink
Code format
Browse files Browse the repository at this point in the history
  • Loading branch information
hpehl committed Oct 18, 2023
1 parent a7457f3 commit a62fe11
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,23 @@
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;
import org.jboss.hal.ballroom.form.TagsMapping;
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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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 "";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
29 changes: 16 additions & 13 deletions app/src/main/java/org/jboss/hal/client/skeleton/HeaderView.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -352,15 +355,15 @@ public HeaderView(Environment environment, Places places, AccessControl ac, Reso

tlc = new HashMap<>();
initTlc(root,
new String[]{
new String[] {
NameTokens.HOMEPAGE,
NameTokens.DEPLOYMENTS,
NameTokens.CONFIGURATION,
NameTokens.RUNTIME,
NameTokens.UPDATE_MANAGER,
NameTokens.ACCESS_CONTROL,
},
new String[]{
new String[] {
Ids.TLC_HOMEPAGE,
Ids.TLC_DEPLOYMENTS,
Ids.TLC_CONFIGURATION,
Expand Down Expand Up @@ -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<HTMLElement> iterator = Elements.iterator(userDropdown); iterator.hasNext(); ) {
for (Iterator<HTMLElement> iterator = Elements.iterator(userDropdown); iterator.hasNext();) {
HTMLElement element = iterator.next();
if (element == logoutItem) {
continue;
Expand Down Expand Up @@ -619,7 +622,7 @@ public void updateBreadcrumb(FinderContext finderContext) {
}
breadcrumbHandlers.clear();

for (Iterator<FinderSegment<?>> iterator = finderContext.getPath().iterator(); iterator.hasNext(); ) {
for (Iterator<FinderSegment<?>> 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
Expand Down Expand Up @@ -722,7 +725,7 @@ public void updateBreadcrumb(ModelBrowserPath path) {

} else {
ModelBrowser modelBrowser = path.getModelBrowser();
for (Iterator<Segment[]> iterator = path.iterator(); iterator.hasNext(); ) {
for (Iterator<Segment[]> iterator = path.iterator(); iterator.hasNext();) {
Segment[] segments = iterator.next();
Segment key = segments[0];
Segment value = segments[1];
Expand All @@ -749,7 +752,7 @@ public void updateBreadcrumb(ModelBrowserPath path) {
}

private void clearBreadcrumb() {
for (Iterator<HTMLElement> iterator = Elements.iterator(breadcrumb); iterator.hasNext(); ) {
for (Iterator<HTMLElement> iterator = Elements.iterator(breadcrumb); iterator.hasNext();) {
HTMLElement element = iterator.next();
if (element == backItem || element == breadcrumbToolsItem) {
continue;
Expand Down

0 comments on commit a62fe11

Please sign in to comment.