Compare commits

...

8 Commits

  1. 3
      pom.xml
  2. 26
      src/main/java/de/kreth/property2java/Configuration.java
  3. 35
      src/main/java/de/kreth/property2java/Entry.java
  4. 36
      src/main/java/de/kreth/property2java/Generator.java
  5. 8
      src/main/java/de/kreth/property2java/GeneratorException.java
  6. 22
      src/main/java/de/kreth/property2java/cli/ArgumentConfiguration.java
  7. 2
      src/main/java/de/kreth/property2java/cli/CliConfig.java
  8. 21
      src/main/java/de/kreth/property2java/config/FreemarkerConfig.java
  9. 24
      src/main/java/de/kreth/property2java/config/FreemarkerConfigImpl.java
  10. 152
      src/main/java/de/kreth/property2java/replace/Replacement.java
  11. 14
      src/main/java/de/kreth/property2java/replace/Replacements.java
  12. 1
      src/test/java/de/kreth/property2java/ConfigurationTest.java
  13. 23
      src/test/java/de/kreth/property2java/GeneratorTests.java
  14. 55
      src/test/java/de/kreth/property2java/cli/ArgumentConfigurationTest.java
  15. 163
      src/test/java/de/kreth/property2java/replace/ReplacementTest.java

@ -1,9 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>de.kreth.property2java</groupId> <groupId>de.kreth.property2java</groupId>
<artifactId>PropertyToJavaGenerator</artifactId> <artifactId>PropertyToJavaGenerator</artifactId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.3</version>
<properties> <properties>

@ -1,16 +1,21 @@
package de.kreth.property2java; package de.kreth.property2java;
import java.io.File; import java.io.File;
import java.io.FileReader;
import java.io.FileWriter; import java.io.FileWriter;
import java.io.IOException; import java.io.IOException;
import java.io.Reader; import java.io.Reader;
import java.io.StringReader;
import java.io.Writer; import java.io.Writer;
import java.nio.charset.Charset;
import java.nio.file.Path; import java.nio.file.Path;
import java.util.Map; import java.util.Map;
import org.apache.commons.text.WordUtils; import org.apache.commons.text.WordUtils;
import de.kreth.property2java.config.FreemarkerConfigImpl;
import de.kreth.property2java.config.Regex; import de.kreth.property2java.config.Regex;
import freemarker.template.Template;
public interface Configuration { public interface Configuration {
@ -32,8 +37,23 @@ public interface Configuration {
*/ */
Path getRootPath(); Path getRootPath();
default Reader previousGenerated(String fileName) throws IOException {
File file = new File(getRootPath().toFile(), mapFilenameToClassName(fileName) + ".java");
if (file.exists()) {
return new FileReader(file);
}
else {
return new StringReader("");
}
}
default Writer outWriter(String fileName) throws IOException { default Writer outWriter(String fileName) throws IOException {
return new FileWriter(new File(getRootPath().toFile(), mapFilenameToClassName(fileName) + ".java")); return new FileWriter(new File(getRootPath().toFile(), mapFilenameToClassName(fileName) + ".java"),
outputCharset());
}
default Charset outputCharset() {
return Charset.defaultCharset();
} }
default String mapFilenameToClassName(String fileName) { default String mapFilenameToClassName(String fileName) {
@ -43,4 +63,8 @@ public interface Configuration {
return path; return path;
} }
default Template getTemplate() throws IOException {
return FreemarkerConfigImpl.INSTANCE.getTemplate();
}
} }

@ -0,0 +1,35 @@
package de.kreth.property2java;
public class Entry {
public final String constant;
public final String key;
public final String value;
public Entry(String constant, String key, String value) {
super();
this.constant = constant;
this.key = key;
this.value = value;
}
public String getConstant() {
return constant;
}
public String getKey() {
return key;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return "Entry [constant=" + constant + ", key=" + key + ", value=" + value + "]";
}
}

@ -13,7 +13,6 @@ import java.util.Map;
import java.util.Properties; import java.util.Properties;
import de.kreth.property2java.cli.ArgumentConfiguration; import de.kreth.property2java.cli.ArgumentConfiguration;
import de.kreth.property2java.config.FreemarkerConfig;
import freemarker.template.Template; import freemarker.template.Template;
import freemarker.template.TemplateException; import freemarker.template.TemplateException;
@ -28,7 +27,7 @@ public class Generator {
public Generator(Configuration config) { public Generator(Configuration config) {
this.config = config; this.config = config;
try { try {
template = FreemarkerConfig.INSTANCE.getTemplate(); template = config.getTemplate();
} }
catch (IOException e) { catch (IOException e) {
throw new IllegalStateException("Unable to load freemarker template", e); throw new IllegalStateException("Unable to load freemarker template", e);
@ -85,37 +84,4 @@ public class Generator {
generator.start(); generator.start();
} }
public class Entry {
public final String constant;
public final String key;
public final String value;
public Entry(String constant, String key, String value) {
super();
this.constant = constant;
this.key = key;
this.value = value;
}
public String getConstant() {
return constant;
}
public String getKey() {
return key;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return "Entry [constant=" + constant + ", key=" + key + ", value=" + value + "]";
}
}
} }

@ -8,12 +8,4 @@ public class GeneratorException extends Exception {
super(message, cause); super(message, cause);
} }
public GeneratorException(String message) {
super(message);
}
public GeneratorException(Throwable cause) {
super(cause);
}
} }

@ -75,6 +75,13 @@ public class ArgumentConfiguration implements Configuration {
String packageName; String packageName;
boolean replaceUsages;
/**
* Target Directory Path.
* @param target
* @return
*/
public Builder setTarget(String target) { public Builder setTarget(String target) {
this.target = target; this.target = target;
return this; return this;
@ -85,11 +92,26 @@ public class ArgumentConfiguration implements Configuration {
return this; return this;
} }
/**
* Package to be used in generated Sources
* @param packageName
* @return
*/
public Builder setPackageName(String packageName) { public Builder setPackageName(String packageName) {
this.packageName = packageName; this.packageName = packageName;
return this; return this;
} }
/**
* Search and replace usages of generated sources.
* @param replaceUsages
* @return
*/
public Builder setReplaceUsages(boolean replaceUsages) {
this.replaceUsages = replaceUsages;
return this;
}
public Configuration build() throws IOException { public Configuration build() throws IOException {
return new ArgumentConfiguration(this); return new ArgumentConfiguration(this);
} }

@ -22,6 +22,7 @@ public class CliConfig {
retVal.addOption(Option.builder("t").longOpt("targetSourcePath").hasArg().required().build()); retVal.addOption(Option.builder("t").longOpt("targetSourcePath").hasArg().required().build());
retVal.addOption(Option.builder("f").longOpt("files").hasArgs().required().valueSeparator(',').build()); retVal.addOption(Option.builder("f").longOpt("files").hasArgs().required().valueSeparator(',').build());
retVal.addOption(Option.builder("p").longOpt("package").hasArg().required(false).build()); retVal.addOption(Option.builder("p").longOpt("package").hasArg().required(false).build());
retVal.addOption(Option.builder("u").longOpt("replaceUsages").hasArg(false).required(false).build());
return retVal; return retVal;
} }
@ -32,6 +33,7 @@ public class CliConfig {
CommandLine cmd = parser.parse(options, args); CommandLine cmd = parser.parse(options, args);
builder.setTarget(cmd.getOptionValue("t", ".")); builder.setTarget(cmd.getOptionValue("t", "."));
builder.setPackageName(cmd.getOptionValue("p")); builder.setPackageName(cmd.getOptionValue("p"));
builder.setReplaceUsages(cmd.hasOption("u"));
for (String value : cmd.getOptionValues("f")) { for (String value : cmd.getOptionValues("f")) {
builder.addPropFile(value); builder.addPropFile(value);
} }

@ -1,24 +1,5 @@
package de.kreth.property2java.config; package de.kreth.property2java.config;
import java.io.IOException; public interface FreemarkerConfig {
import freemarker.template.Configuration;
import freemarker.template.Template;
public enum FreemarkerConfig {
INSTANCE;
private final Configuration cfg;
public Template getTemplate() throws IOException {
return cfg.getTemplate("enum_template.tpl");
}
private FreemarkerConfig() {
cfg = new Configuration(Configuration.VERSION_2_3_28);
cfg.setClassForTemplateLoading(this.getClass(), "/template/");
cfg.setDefaultEncoding("UTF-8");
}
} }

@ -0,0 +1,24 @@
package de.kreth.property2java.config;
import java.io.IOException;
import freemarker.template.Configuration;
import freemarker.template.Template;
public enum FreemarkerConfigImpl implements FreemarkerConfig {
INSTANCE;
private final Configuration cfg;
public Template getTemplate() throws IOException {
return cfg.getTemplate("enum_template.tpl");
}
private FreemarkerConfigImpl() {
cfg = new Configuration(Configuration.VERSION_2_3_28);
cfg.setClassForTemplateLoading(this.getClass(), "/template/");
cfg.setDefaultEncoding("UTF-8");
}
}

@ -0,0 +1,152 @@
package de.kreth.property2java.replace;
import java.util.Arrays;
import java.util.List;
public class Replacement {
private static final List<Character> CHARS_NOT_ALLOWED_BEFORE_PROPERTY = Arrays.asList('.');
private final String packageName;
private final String simpleClassName;
private final String oldPropertyName;
private final String newPropertyName;
private String qualifiedClassName;
private String qualifiedOldProperty;
public Replacement(String packageName, String simpleClassName, String oldPropertyName, String newPropertyName) {
super();
this.packageName = packageName;
this.simpleClassName = simpleClassName;
this.oldPropertyName = oldPropertyName;
this.newPropertyName = newPropertyName;
this.qualifiedClassName = packageName + "." + simpleClassName;
this.qualifiedOldProperty = qualifiedClassName + "." + oldPropertyName;
}
public String getOldPropertyName() {
return oldPropertyName;
}
public String getNewPropertyName() {
return newPropertyName;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((newPropertyName == null) ? 0 : newPropertyName.hashCode());
result = prime * result + ((oldPropertyName == null) ? 0 : oldPropertyName.hashCode());
result = prime * result + ((packageName == null) ? 0 : packageName.hashCode());
result = prime * result + ((simpleClassName == null) ? 0 : simpleClassName.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
Replacement other = (Replacement) obj;
if (newPropertyName == null) {
if (other.newPropertyName != null) {
return false;
}
}
else if (!newPropertyName.equals(other.newPropertyName)) {
return false;
}
if (oldPropertyName == null) {
if (other.oldPropertyName != null) {
return false;
}
}
else if (!oldPropertyName.equals(other.oldPropertyName)) {
return false;
}
if (packageName == null) {
if (other.packageName != null) {
return false;
}
}
else if (!packageName.equals(other.packageName)) {
return false;
}
if (simpleClassName == null) {
if (other.simpleClassName != null) {
return false;
}
}
else if (!simpleClassName.equals(other.simpleClassName)) {
return false;
}
return true;
}
@Override
public String toString() {
return "Replacement [packageName=" + packageName + ", simpleClassName=" + simpleClassName + ", oldPropertyName="
+ oldPropertyName + ", newPropertyName=" + newPropertyName + "]";
}
public String replaceOccurrences(String sourceCode) {
if (sourceCode.contains("import static " + qualifiedOldProperty)) {
sourceCode = replaceStaticImportedUsages(sourceCode);
}
if (sourceCode.contains(qualifiedOldProperty)) {
sourceCode = replaceFullQualifiedUnimported(sourceCode);
}
if (sourceCode.contains("import " + qualifiedClassName)) {
sourceCode = replaceClassUsages(sourceCode);
}
return sourceCode;
}
private String replaceClassUsages(String sourceCode) {
String search = this.simpleClassName + "." + oldPropertyName;
String replacement = this.simpleClassName + "." + newPropertyName;
int index = sourceCode.indexOf(search);
while (index > 0) {
if (!CHARS_NOT_ALLOWED_BEFORE_PROPERTY.contains(sourceCode.charAt(index - 1))) {
StringBuilder source = new StringBuilder(sourceCode);
source.replace(index, index + search.length(), replacement);
sourceCode = source.toString();
}
index = sourceCode.indexOf(search, index + 1);
}
return sourceCode;
}
private String replaceStaticImportedUsages(String sourceCode) {
int index = sourceCode.indexOf(oldPropertyName);
while (index > 0) {
if (!CHARS_NOT_ALLOWED_BEFORE_PROPERTY.contains(sourceCode.charAt(index - 1))) {
StringBuilder source = new StringBuilder(sourceCode);
source.replace(index, index + oldPropertyName.length(), newPropertyName);
sourceCode = source.toString();
}
index = sourceCode.indexOf(oldPropertyName, index + 1);
}
return sourceCode;
}
private String replaceFullQualifiedUnimported(String sourceCode) {
return sourceCode.replace(qualifiedOldProperty,
qualifiedClassName + "." + newPropertyName);
}
}

@ -0,0 +1,14 @@
package de.kreth.property2java.replace;
import java.util.ArrayList;
import java.util.List;
public class Replacements {
private final List<Replacement> replacementList = new ArrayList<>();
public boolean add(Replacement e) {
return replacementList.add(e);
}
}

@ -29,6 +29,7 @@ class ConfigurationTest {
when(config.outWriter(anyString())).thenCallRealMethod(); when(config.outWriter(anyString())).thenCallRealMethod();
when(config.getRootPath()).thenReturn(new File(".").toPath()); when(config.getRootPath()).thenReturn(new File(".").toPath());
when(config.mapFilenameToClassName(anyString())).thenCallRealMethod(); when(config.mapFilenameToClassName(anyString())).thenCallRealMethod();
when(config.outputCharset()).thenCallRealMethod();
Writer outWriter = config.outWriter("application.properties"); Writer outWriter = config.outWriter("application.properties");
assertTrue(outWriter instanceof FileWriter); assertTrue(outWriter instanceof FileWriter);

@ -3,8 +3,11 @@ package de.kreth.property2java;
import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue; import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.Mockito.doThrow;
import static org.mockito.Mockito.mock; import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never; import static org.mockito.Mockito.never;
import static org.mockito.Mockito.verify; import static org.mockito.Mockito.verify;
@ -27,6 +30,9 @@ import org.hamcrest.Matchers;
import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import freemarker.template.Template;
import freemarker.template.TemplateException;
class GeneratorTests { class GeneratorTests {
private String path = "application.properties"; private String path = "application.properties";
@ -43,6 +49,7 @@ class GeneratorTests {
config = mock(Configuration.class); config = mock(Configuration.class);
when(config.getInput()).thenReturn(input); when(config.getInput()).thenReturn(input);
when(config.mapFilenameToClassName(anyString())).thenCallRealMethod(); when(config.mapFilenameToClassName(anyString())).thenCallRealMethod();
when(config.getTemplate()).thenCallRealMethod();
generator = new Generator(config); generator = new Generator(config);
} }
@ -94,6 +101,22 @@ class GeneratorTests {
} }
@Test()
void testTemplateException() throws IOException, GeneratorException, TemplateException {
Writer out = mock(Writer.class);
when(config.outWriter(anyString())).thenReturn(out);
Template template = mock(Template.class);
when(config.getTemplate()).thenReturn(template);
doThrow(TemplateException.class).when(template).process(any(), any());
generator = new Generator(config);
assertThrows(GeneratorException.class, () -> generator.start());
}
@Test @Test
void testOneInputGeneratesOneOutput() throws IOException, GeneratorException { void testOneInputGeneratesOneOutput() throws IOException, GeneratorException {

@ -0,0 +1,55 @@
package de.kreth.property2java.cli;
import static org.junit.jupiter.api.Assertions.assertEquals;
import java.io.File;
import java.io.IOException;
import java.io.Reader;
import java.util.Map;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import de.kreth.property2java.Configuration;
class ArgumentConfigurationTest {
private static File target;
private static File input;
private static File input2;
@BeforeAll
static void createTargetDir() throws IOException {
target = new File("testTargetDir");
target.mkdir();
input = new File(target, "application.properties");
input.createNewFile();
input2 = new File(target, "application2.properties");
input2.createNewFile();
}
@AfterAll
static void deleteTestfiles() {
target.delete();
input.delete();
input2.delete();
}
@Test
void testArgumentParser() throws IOException {
String[] args = { "-t", target.getAbsolutePath(),
"-f",
input.getAbsolutePath() + "," + input2.getAbsolutePath(),
"-p", "de.kreth.clubinvoice" };
Configuration config = ArgumentConfiguration.parse(args);
assertEquals("de.kreth.clubinvoice", config.getPackage());
assertEquals(target.getAbsolutePath(), config.getRootPath().toFile().getAbsolutePath());
Map<String, Reader> inputMap = config.getInput();
assertEquals(2, inputMap.size());
}
}

@ -0,0 +1,163 @@
package de.kreth.property2java.replace;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertTrue;
import java.util.List;
import java.util.Optional;
import java.util.stream.Collectors;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import de.kreth.property2java.replace.Replacement;
class ReplacementTest {
private Replacement captionArticles;
private Replacement labelLogout;
private Replacement captionUserDetails;
@BeforeEach
void initTestItem() {
captionArticles = new Replacement("de.kreth.clubinvoice", "Application_Properties", "CAPTION_ARTICLES",
"CAPTION1_ARTICLES");
captionUserDetails = new Replacement("de.kreth.clubinvoice", "Application_Properties",
"CAPTION_USER_DETAILS",
"CAPTION1_USER_DETAILS");
labelLogout = new Replacement("de.kreth.clubinvoice", "Application_Properties", "LABEL_LOGOUT",
"LABEL1_LOGOUT");
}
@Test
void testReplaceStaticImported() {
String exampleSourceCode = getExampleSourceCode();
String result = captionArticles.replaceOccurrences(exampleSourceCode);
assertNotNull(result);
Optional<String> firstLine = result.lines()
.filter(line -> line.contains("de.kreth.clubinvoice.Application_Properties")).findFirst();
assertTrue(firstLine.isPresent());
String captionArticlesLine = firstLine.get();
assertEquals("import static de.kreth.clubinvoice.Application_Properties.CAPTION1_ARTICLES;",
captionArticlesLine.trim());
firstLine = result.lines().filter(l -> l.contains("new Button(CAPTION1_ARTICLES.getString(")).findFirst();
assertTrue(firstLine.isPresent(), "CAPTION1_ARTICLES usage not found");
}
@Test
void testReplaceClassImport() {
String exampleSourceCode = getExampleSourceCode();
String result = labelLogout.replaceOccurrences(exampleSourceCode);
Optional<String> line = result.lines()
.filter(l -> l.contains(".getString(Application_Properties.LABEL1_LOGOUT"))
.findFirst();
assertTrue(line.isPresent());
}
@Test
void testReplaceUnimportedOccurrence() {
String exampleSourceCode = getExampleSourceCode();
String result = captionUserDetails.replaceOccurrences(exampleSourceCode);
Optional<String> line = result.lines()
.filter(l -> l.contains("new Button(de.kreth.clubinvoice.Application_Properties")
&& l.contains("_USER_DETAILS"))
.findFirst();
assertTrue(line.isPresent());
assertTrue(line.get().contains("de.kreth.clubinvoice.Application_Properties.CAPTION1_USER_DETAILS"),
"absoulute class field CAPTION1_USER_DETAILS not found in : " + line.get());
}
@Test
void testReplaceUnimportedOccurrenceWithLinebreak() {
String exampleSourceCode = getExampleSourceCode();
String result = captionUserDetails.replaceOccurrences(exampleSourceCode);
List<String> lines = result.lines()
.filter(l -> l.contains(".Application_Properties")
&& l.contains("_USER_DETAILS"))
.collect(Collectors.toList());
assertEquals(2, lines.size());
//
// assertTrue(line.get().contains("de.kreth.clubinvoice.Application_Properties.CAPTION1_USER_DETAILS"),
// "absoulute class field CAPTION1_USER_DETAILS not found in : " + line.get());
}
String getExampleSourceCode() {
return "package de.kreth.clubinvoice.ui;\r\n" +
"\r\n" +
"import static de.kreth.clubinvoice.Application_Properties.CAPTION_ARTICLES;\r\n" +
"import static de.kreth.clubinvoice.Application_Properties.CAPTION_INVOICEITEM_ADD;\r\n" +
"" +
"import static de.kreth.clubinvoice.Application_Properties.CAPTION_INVOICE_PATTERN;\r\n" +
"\r\n" +
"import org.slf4j.Logger;\r\n" +
"import org.slf4j.LoggerFactory;\r\n" +
"\r\n" +
"\r\n" +
"import de.kreth.clubinvoice.Application_Properties;\r\n" +
"\r\n" +
"public class OverviewUi extends VerticalLayout implements InvoiceUi {\r\n" +
"\r\n" +
" public void setContent(UI ui, VaadinRequest vaadinRequest) {\r\n" +
"\r\n" +
" }\r\n" +
"\r\n" +
" public VerticalLayout createInvoicesView(final UI ui) {\r\n" +
"\r\n" +
" createInvoice = new Button(CAPTION_INVOICE_CREATE.getString(resBundle::getString));\r\n" +
" return right;\r\n" +
" }\r\n" +
"\r\n" +
" public VerticalLayout createItemsView(final UI ui) {\r\n" +
"\r\n" +
" addItem = new Button(de.kreth.clubinvoice.Application_Properties.CAPTION_INVOICE_CREATE.getString(resBundle::getString));\r\n"
+
"\r\n" +
" VerticalLayout left = new VerticalLayout();\r\n" +
" addItem = new Button(de.kreth.clubinvoice"
+ " \t.Application_Properties.CAPTION_INVOICE_CREATE.getString(resBundle::getString));\r\n" +
" left.addComponents(addItem, gridItems);\r\n" +
" left.setStyleName(STYLE_BORDERED);\r\n" +
" return left;\r\n" +
" }\r\n" +
"\r\n" +
" public HorizontalLayout createHeadView(final UI ui, VaadinRequest vaadinRequest) {\r\n" +
" Label l2 = new Label(String.format(\"%s %s\", user.getPrename(), user.getSurname()));\r\n" +
"\r\n" +
" Button addArticle = new Button(CAPTION_ARTICLES.getString(resBundle::getString));\r\n" +
" Button logoutButton = new Button(resBundle.getString(Application_Properties.LABEL_LOGOUT.getValue()));\r\n"
+
" logoutButton.addClickListener(ev -> {\r\n" +
" LOGGER.warn(\"Logging out.\");\r\n" +
" logout(ui, vaadinRequest);\r\n" +
" });\r\n" +
"\r\n" +
" Button userDetail = new Button(de.kreth.clubinvoice.Application_Properties.CAPTION_USER_DETAILS.getString(resBundle::getString), ev -> {\r\n"
+
" Button userDetail2 = new Button(de.kreth.clubinvoice"
+ " \t.Application_Properties.CAPTION_USER_DETAILS.getString(resBundle::getString), ev -> {\r\n"
+
" showUserDetailDialog(ui);\r\n" +
" });\r\n" +
"\r\n" +
" return head;\r\n" +
" }\r\n" +
"\r\n" +
"}\r\n" +
"";
}
}
Loading…
Cancel
Save