-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from proDOOMman/develop
v2.0
- Loading branch information
Showing
202 changed files
with
12,529 additions
and
1,050 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,3 +24,4 @@ gradle-app.setting | |
/bin/ | ||
/choco/*.nupkg | ||
.scannerwork | ||
.metadata |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
src/main/java/com/clouds42/CommandLineOptions/ConnectionOptions.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
package com.clouds42.CommandLineOptions; | ||
|
||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
import picocli.CommandLine.Command; | ||
import picocli.CommandLine.Option; | ||
|
||
import java.io.IOException; | ||
import java.lang.invoke.MethodHandles; | ||
import java.nio.file.Files; | ||
import java.nio.file.Path; | ||
|
||
@Command | ||
public class ConnectionOptions { | ||
|
||
private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); | ||
|
||
@Option(names = {"-i", "--infobase"}, description = "InfoBase name. File infobase uses 'DefAlias' name." + | ||
" Default - ${DEFAULT-VALUE}", defaultValue = "DefAlias") | ||
private String infobaseAlias; | ||
|
||
@Option(names = {"-u", "--debugger"}, description = "Debugger url. Default - ${DEFAULT-VALUE}", defaultValue = "http://127.0.0.1:1550/") | ||
private String debugServerUrl; | ||
|
||
@Option(names = {"-u:file", "--debugger:file"}, description = "Debugger url file name", defaultValue = "") | ||
private String debugServerUrlFileName; | ||
|
||
public String getInfobaseAlias() { | ||
return infobaseAlias; | ||
} | ||
|
||
public void setInfobaseAlias(String infobaseAlias) { | ||
this.infobaseAlias = infobaseAlias; | ||
} | ||
|
||
public String getDebugServerUrl() { | ||
|
||
if (!debugServerUrlFileName.isEmpty()) { | ||
try { | ||
debugServerUrl = | ||
"http://" + Files.lines(Path.of(debugServerUrlFileName)).findFirst().get().trim(); | ||
debugServerUrlFileName = ""; | ||
} catch (IOException e) { | ||
logger.info(e.getLocalizedMessage()); | ||
} | ||
} | ||
|
||
return debugServerUrl; | ||
} | ||
|
||
public void setDebugServerUrl(String debugServerUrl) { | ||
this.debugServerUrl = debugServerUrl; | ||
} | ||
|
||
} |
24 changes: 24 additions & 0 deletions
24
src/main/java/com/clouds42/CommandLineOptions/ConvertOptions.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.clouds42.CommandLineOptions; | ||
|
||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
import picocli.CommandLine.Option; | ||
|
||
import java.io.File; | ||
import java.lang.invoke.MethodHandles; | ||
|
||
public class ConvertOptions { | ||
|
||
private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); | ||
|
||
@Option(names = {"-c", "--convertFile"}, description = "Input file name with RAW xml coverage data", required = true) | ||
private File inputRawXmlFile; | ||
|
||
public File getInputRawXmlFile() { | ||
return inputRawXmlFile; | ||
} | ||
|
||
public void setInputRawXmlFile(File inputRawXmlFile) { | ||
this.inputRawXmlFile = inputRawXmlFile; | ||
} | ||
} |
62 changes: 62 additions & 0 deletions
62
src/main/java/com/clouds42/CommandLineOptions/DebuggerOptions.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
package com.clouds42.CommandLineOptions; | ||
|
||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
import picocli.CommandLine.Option; | ||
|
||
import java.lang.invoke.MethodHandles; | ||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
public class DebuggerOptions { | ||
|
||
private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); | ||
|
||
@Option(names = {"-p", "--password"}, description = "Dbgs password", interactive = true) | ||
private String password; | ||
|
||
@Option(names = {"-p:env", "--password:env"}, description = "Password environment variable name", defaultValue = "") | ||
private String passwordEnv; | ||
|
||
@Option(names = {"-n", "--areanames"}, description = "Debug area names (not for general use!)") | ||
private List<String> debugAreaNames; | ||
|
||
@Option(names = {"-t", "--timeout"}, description = "Ping timeout. Default - ${DEFAULT-VALUE}", defaultValue = "1000") | ||
private Integer pingTimeout; | ||
|
||
public String getPassword() { | ||
if (password != null) { | ||
if (password.trim().isEmpty()) { | ||
if (!passwordEnv.isEmpty()) { | ||
password = System.getenv(passwordEnv); | ||
passwordEnv = ""; | ||
} | ||
} | ||
} | ||
return password; | ||
} | ||
|
||
public void setPassword(String password) { | ||
this.password = password; | ||
} | ||
|
||
public List<String> getDebugAreaNames() { | ||
if (debugAreaNames == null) { | ||
return new ArrayList<>(); | ||
} else { | ||
return debugAreaNames; | ||
} | ||
} | ||
|
||
public void setDebugAreaNames(List<String> debugAreaNames) { | ||
this.debugAreaNames = debugAreaNames; | ||
} | ||
|
||
public Integer getPingTimeout() { | ||
return pingTimeout; | ||
} | ||
|
||
public void setPingTimeout(Integer pingTimeout) { | ||
this.pingTimeout = pingTimeout; | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
src/main/java/com/clouds42/CommandLineOptions/FilterOptions.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package com.clouds42.CommandLineOptions; | ||
|
||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
import picocli.CommandLine.Option; | ||
|
||
import java.lang.invoke.MethodHandles; | ||
|
||
public class FilterOptions { | ||
|
||
private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); | ||
|
||
@Option(names = {"-e", "--extensionName"}, description = "Extension name", defaultValue = "") | ||
private String extensionName; | ||
|
||
@Option(names = {"-x", "--externalDataProcessor"}, description = "External data processor (or external report) url", | ||
defaultValue = "") | ||
private String externalDataProcessorUrl; | ||
|
||
public String getExtensionName() { | ||
return extensionName; | ||
} | ||
|
||
public void setExtensionName(String extensionName) { | ||
this.extensionName = extensionName; | ||
} | ||
|
||
public String getExternalDataProcessorUrl() { | ||
return externalDataProcessorUrl; | ||
} | ||
|
||
public void setExternalDataProcessorUrl(String externalDataProcessorUrl) { | ||
this.externalDataProcessorUrl = externalDataProcessorUrl; | ||
} | ||
|
||
} |
23 changes: 23 additions & 0 deletions
23
src/main/java/com/clouds42/CommandLineOptions/LoggingOptions.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package com.clouds42.CommandLineOptions; | ||
|
||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
import picocli.CommandLine.Option; | ||
|
||
import java.lang.invoke.MethodHandles; | ||
|
||
public class LoggingOptions { | ||
|
||
private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); | ||
|
||
@Option(names = "--verbose", description = "If you need more logs. Default - ${DEFAULT-VALUE}", defaultValue = "false") | ||
private Boolean verbose; | ||
|
||
public Boolean isVerbose() { | ||
return verbose.booleanValue(); | ||
} | ||
|
||
public void setVerbose(Boolean verbose) { | ||
this.verbose = verbose; | ||
} | ||
} |
61 changes: 61 additions & 0 deletions
61
src/main/java/com/clouds42/CommandLineOptions/MetadataOptions.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
package com.clouds42.CommandLineOptions; | ||
|
||
import com.github._1c_syntax.mdclasses.metadata.additional.SupportVariant; | ||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
import picocli.CommandLine.Option; | ||
|
||
import java.lang.invoke.MethodHandles; | ||
|
||
public class MetadataOptions { | ||
|
||
private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); | ||
|
||
@Option(names = {"-s", "--srcDir"}, description = "Directory with sources exported to xml", defaultValue = "") | ||
private String srcDirName; | ||
|
||
@Option(names = {"-P", "--projectDir"}, description = "Directory with project", defaultValue = "") | ||
private String projectDirName; | ||
|
||
@Option(names = {"-r", "--removeSupport"}, description = "Remove support values: ${COMPLETION-CANDIDATES}. Default - ${DEFAULT-VALUE}", defaultValue = "NONE") | ||
private SupportVariant removeSupport; | ||
|
||
private void updatePaths() { | ||
if (projectDirName.isEmpty() && !srcDirName.isEmpty()) { | ||
// for backward compatibility | ||
projectDirName = srcDirName; | ||
srcDirName = ""; | ||
} | ||
} | ||
|
||
public String getSrcDirName() { | ||
updatePaths(); | ||
return srcDirName; | ||
} | ||
|
||
public void setSrcDirName(String srcDirName) { | ||
this.srcDirName = srcDirName; | ||
} | ||
|
||
public String getProjectDirName() { | ||
updatePaths(); | ||
return projectDirName; | ||
} | ||
|
||
public void setProjectDirName(String projectDirName) { | ||
this.projectDirName = projectDirName; | ||
} | ||
|
||
public SupportVariant getRemoveSupport() { | ||
return removeSupport; | ||
} | ||
|
||
public void setRemoveSupport(SupportVariant removeSupport) { | ||
this.removeSupport = removeSupport; | ||
} | ||
|
||
public boolean isRawMode() { | ||
return getSrcDirName().isEmpty() | ||
&& getProjectDirName().isEmpty(); | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
src/main/java/com/clouds42/CommandLineOptions/OutputOptions.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package com.clouds42.CommandLineOptions; | ||
|
||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
import picocli.CommandLine.Option; | ||
|
||
import java.io.File; | ||
import java.lang.invoke.MethodHandles; | ||
|
||
public class OutputOptions { | ||
|
||
private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); | ||
|
||
@Option(names = {"-o", "--out"}, description = "Output file name") | ||
private File outputFile; | ||
|
||
public File getOutputFile() { | ||
return outputFile; | ||
} | ||
|
||
public void setOutputFile(File outputFile) { | ||
this.outputFile = outputFile; | ||
} | ||
|
||
} |
Oops, something went wrong.