Skip to content

Commit

Permalink
chore: Sync eclipse formatting file with Flow (#7010) (#7014)
Browse files Browse the repository at this point in the history
Co-authored-by: Artur <[email protected]>
  • Loading branch information
vaadin-bot and Artur- authored Jan 8, 2025
1 parent 52ef13e commit ce1b925
Show file tree
Hide file tree
Showing 25 changed files with 879 additions and 90 deletions.
8 changes: 4 additions & 4 deletions eclipse/VaadinJavaConventions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_binary_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_package" value="0"/>
<setting id="org.eclipse.jdt.core.compiler.source" value="1.5"/>
<setting id="org.eclipse.jdt.core.compiler.source" value="17"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_line_comments" value="true"/>
Expand Down Expand Up @@ -167,7 +167,7 @@
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter" value="insert"/>
<setting id="org.eclipse.jdt.core.compiler.compliance" value="1.5"/>
<setting id="org.eclipse.jdt.core.compiler.compliance" value="17"/>
<setting id="org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer" value="2"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value="insert"/>
Expand Down Expand Up @@ -242,13 +242,13 @@
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="insert"/>
<setting id="org.eclipse.jdt.core.compiler.codegen.targetPlatform" value="1.5"/>
<setting id="org.eclipse.jdt.core.compiler.codegen.targetPlatform" value="17"/>
<setting id="org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_header" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_block_comments" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants" value="48"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="do not insert"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@
* Set of theme variants applicable for {@code vaadin-chart} component.
*/
public enum ChartVariant {
LUMO_GRADIENT("gradient"), LUMO_MONOTONE("monotone"), LUMO_CLASSIC(
"classic"), MATERIAL_GRADIENT("gradient"), MATERIAL_MONOTONE(
"monotone"), MATERIAL_CLASSIC("classic");
LUMO_GRADIENT("gradient"),
LUMO_MONOTONE("monotone"),
LUMO_CLASSIC("classic"),
MATERIAL_GRADIENT("gradient"),
MATERIAL_MONOTONE("monotone"),
MATERIAL_CLASSIC("classic");

private final String variant;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ public interface HasItem extends HasSeries {
* String id = this.getItemId();
* NodeSeries series = (NodeSeries) this.getSeries();
* Optional&lt;Node&gt; nodeForId = series.getNodes().stream()
* .filter(node -> node.getId().equals(id))
* .findFirst();
* .filter(node -> node.getId().equals(id)).findFirst();
* </pre>
* <p>
* Only {@link AbstractSeriesItem} and {@link Node} support setting an ID.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
* {@link Axis#setCategories(String...)}.
*/
public enum AxisType implements ChartEnum {
LINEAR("linear"), LOGARITHMIC("logarithmic"),
LINEAR("linear"),
LOGARITHMIC("logarithmic"),
/**
* In axis mode, the numbers are given in milliseconds (or as {@link Date}
* s), and tick marks are placed on appropriate values like full hours or
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,17 @@
*/
public enum DashStyle implements ChartEnum {

SOLID("Solid"), SHORTDASH("ShortDash"), SHORTDOT("ShortDot"), SHORTDASHDOT(
"ShortDashDot"), SHORTDASHDOTDOT("ShortDashDotDot"), DOT(
"Dot"), DASH("Dash"), LONGDASH("LongDash"), DASHDOT(
"DashDot"), LONGDASHDOT(
"LongDashDot"), LONGDASHDOTDOT(
"LongDashDotDot");
SOLID("Solid"),
SHORTDASH("ShortDash"),
SHORTDOT("ShortDot"),
SHORTDASHDOT("ShortDashDot"),
SHORTDASHDOTDOT("ShortDashDotDot"),
DOT("Dot"),
DASH("Dash"),
LONGDASH("LongDash"),
DASHDOT("DashDot"),
LONGDASHDOT("LongDashDot"),
LONGDASHDOTDOT("LongDashDotDot");

private final String type;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@
*/
public enum ExportFileType implements ChartEnum {

IMAGE_PNG("image/png"), IMAGE_JPEG("image/jpeg"), APPLICATION_PDF(
"application/pdf"), IMAGE_SVG_XML("image/svg+xml");
IMAGE_PNG("image/png"),
IMAGE_JPEG("image/jpeg"),
APPLICATION_PDF("application/pdf"),
IMAGE_SVG_XML("image/svg+xml");

private final String type;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@
*/
public enum FlagShape implements ChartEnum {

CALLOUT("callout"), FLAG("flag"), CIRCLEPIN("circlepin"), SQUAREPIN(
"squarepin");
CALLOUT("callout"),
FLAG("flag"),
CIRCLEPIN("circlepin"),
SQUAREPIN("squarepin");

FlagShape(String type) {
this.type = type;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@
*
*/
public enum MarkerSymbolEnum implements MarkerSymbol, ChartEnum {
CIRCLE("circle"), SQUARE("square"), DIAMOND("diamond"), TRIANGLE(
"triangle"), TRIANGLE_DOWN("triangle-down");
CIRCLE("circle"),
SQUARE("square"),
DIAMOND("diamond"),
TRIANGLE("triangle"),
TRIANGLE_DOWN("triangle-down");

private String symbol;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,15 @@
* Possible timespan values for range selector buttons
*/
public enum RangeSelectorTimespan implements ChartEnum {
MILLISECOND("millisecond"), SECOND("second"), MINUTE("minute"), DAY(
"day"), WEEK("week"), MONTH(
"month"), YEAR_TO_DATE("ytd"), YEAR("year"), ALL("all");
MILLISECOND("millisecond"),
SECOND("second"),
MINUTE("minute"),
DAY("day"),
WEEK("week"),
MONTH("month"),
YEAR_TO_DATE("ytd"),
YEAR("year"),
ALL("all");

private String name;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,12 @@
*/
public enum Shape implements ChartEnum {

CALLOUT("callout"), CIRCLE("circle"), DIAMOND("diamond"), SQUARE(
"square"), TRIANGLE("triangle"), TRIANGLE_DOWN("triangle-down");
CALLOUT("callout"),
CIRCLE("circle"),
DIAMOND("diamond"),
SQUARE("square"),
TRIANGLE("triangle"),
TRIANGLE_DOWN("triangle-down");

Shape(String type) {
this.type = type;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,14 @@
package com.vaadin.flow.component.charts.model;

public enum TimeUnit implements ChartEnum {
MILLISECOND("millisecond"), SECOND("second"), MINUTE("minute"), HOUR(
"hour"), DAY("day"), WEEK("week"), MONTH("month"), YEAR("year");
MILLISECOND("millisecond"),
SECOND("second"),
MINUTE("minute"),
HOUR("hour"),
DAY("day"),
WEEK("week"),
MONTH("month"),
YEAR("year");

private String name;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@
*/
public enum TreeMapLayoutAlgorithm implements ChartEnum {

SLICEANDDICE("sliceAndDice"), STRIPES("stripes"), SQUARIFIED(
"squarified"), STRIP("strip");
SLICEANDDICE("sliceAndDice"),
STRIPES("stripes"),
SQUARIFIED("squarified"),
STRIP("strip");

private String type;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@
*/
public enum CustomFieldVariant {

LUMO_SMALL("small"), LUMO_HELPER_ABOVE_FIELD(
"helper-above-field"), LUMO_WHITESPACE("whitespace");
LUMO_SMALL("small"),
LUMO_HELPER_ABOVE_FIELD("helper-above-field"),
LUMO_WHITESPACE("whitespace");

private final String variant;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,12 @@

public enum Country {

FINLAND("Finland"), SWEDEN("Sweden"), USA("USA"), RUSSIA(
"Russia"), NETHERLANDS("Netherlands"), SOUTH_AFRICA("South Africa");
FINLAND("Finland"),
SWEDEN("Sweden"),
USA("USA"),
RUSSIA("Russia"),
NETHERLANDS("Netherlands"),
SOUTH_AFRICA("South Africa");

private String name;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,54 @@
package com.vaadin.flow.data.bean;

public enum UsaState {
Alabama, Alaska, Arizona, Arkansas, California, Colorado, Connecticut, Delaware, Florida, Georgia, Hawaii, Idaho, Illinois, Indiana, Iowa, Kansas, Kentucky, Louisiana, Maine, Maryland, Massachusetts, Michigan, Minnesota, Mississippi, Missouri, Montana, Nebraska, Nevada, NewHampshire, NewJersey, NewMexico, NewYork, NorthCarolina, NorthDakota, Ohio, Oklahoma, Oregon, Pennsylvania, RhodeIsland, SouthCarolina, SouthDakota, Tennessee, Texas, Utah, Vermont, Virginia, Washington, WestVirginia, Wisconsin, Wyoming;
Alabama,
Alaska,
Arizona,
Arkansas,
California,
Colorado,
Connecticut,
Delaware,
Florida,
Georgia,
Hawaii,
Idaho,
Illinois,
Indiana,
Iowa,
Kansas,
Kentucky,
Louisiana,
Maine,
Maryland,
Massachusetts,
Michigan,
Minnesota,
Mississippi,
Missouri,
Montana,
Nebraska,
Nevada,
NewHampshire,
NewJersey,
NewMexico,
NewYork,
NorthCarolina,
NorthDakota,
Ohio,
Oklahoma,
Oregon,
Pennsylvania,
RhodeIsland,
SouthCarolina,
SouthDakota,
Tennessee,
Texas,
Utah,
Vermont,
Virginia,
Washington,
WestVirginia,
Wisconsin,
Wyoming;
}
Loading

0 comments on commit ce1b925

Please sign in to comment.