Package com._1c.g5.v8.dt.bsl.compare
Class BslCompareUtils
- java.lang.Object
- 
- com._1c.g5.v8.dt.bsl.compare.BslCompareUtils
 
- 
 public class BslCompareUtils extends Object Utility methods used for comparison and merge Bsl module.
- 
- 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static InputStreamgetBslModuleContentStream(BslModuleComparisonNode node, IComparisonSession session, ComparisonSide side, IQualifiedNameFilePathConverter filePathConverter)Returns the Bsl module content stream on the specified comparison side.static InputStreamgetBslModuleContentStreamOnMerge(BslModuleComparisonNode node, IMergeSession mergeSession, ComparisonSide side, IQualifiedNameFilePathConverter filePathConverter)Returns the Bsl module content stream on the specified comparison side on merge.static StringgetLocalizedBslModuleName(String symlink, String comparisonSideName, ISymbolicLinkLocalizer symbolicLinkLocalizer)Returns the localized Bsl module node name.static StringgetTrimmedLocalizedModuleSymlink(String symlink, ISymbolicLinkLocalizer symbolicLinkLocalizer)Returns the trimmed localized Bsl module symlink.static ExternalMergeToolExecutionStatusmergeModuleUsingExternalTool(BslModuleComparisonNode node, IComparisonSession session, ExternalMergeToolConfiguration externalMergeToolConfiguration, int timeout, boolean runAutoMergeByDefault, String mainComparisonSideName, String otherComparisonSideName, File mergeResultFile, IQualifiedNameFilePathConverter filePathConverter, ISymbolicLinkLocalizer symbolicLinkLocalizer)Merges the Bsl module using an external tool for the specified node.static org.eclipse.xtext.parser.IParseResultparseBslModuleContent(BslModuleComparisonNode node, IComparisonSession session, ComparisonSide side, IQualifiedNameFilePathConverter filePathConverter)Parses the Bsl module content stream on the specified comparison side.static org.eclipse.xtext.parser.IParseResultparseBslModuleContent(InputStream inputStream)Parses the Bsl module content stream.static BslModuleContentInforeadBslModuleContent(BslModuleComparisonNode node, IComparisonSession session, ComparisonSide side, boolean detectIsBinary, IQualifiedNameFilePathConverter filePathConverter)Reads the Bsl module content on the specified comparison side.static StringreadBslModuleContent(BslModuleSectionComparisonNode node, IComparisonSession session, ComparisonSide side, IQualifiedNameFilePathConverter filePathConverter)Reads the Bsl module content on the specified comparison side.static StringreadBslModuleContentOnMerge(BslModuleComparisonNode node, IMergeSession mergeSession, ComparisonSide side, IQualifiedNameFilePathConverter filePathConverter)Reads the Bsl module content on the specified comparison side on merge.
 
- 
- 
- 
Method Detail- 
readBslModuleContentpublic static BslModuleContentInfo readBslModuleContent(BslModuleComparisonNode node, IComparisonSession session, ComparisonSide side, boolean detectIsBinary, IQualifiedNameFilePathConverter filePathConverter) Reads the Bsl module content on the specified comparison side.- Parameters:
- node- the Bsl module comparison node to get content for, cannot be- null
- session- the comparison session, cannot be- null
- side- the comparison side to get content on, cannot be- null
- detectIsBinary- tells whether to detect is Bsl module content is binary
- filePathConverter- the qualified name file path converted, cannot be- null
- Returns:
- the Bsl module content info, never null
 
 - 
readBslModuleContentpublic static String readBslModuleContent(BslModuleSectionComparisonNode node, IComparisonSession session, ComparisonSide side, IQualifiedNameFilePathConverter filePathConverter) Reads the Bsl module content on the specified comparison side.- Parameters:
- node- the Bsl module section comparison node to get content for, cannot be- null
- session- the comparison session, cannot be- null
- side- the comparison side to get content on, cannot be- null
- filePathConverter- the qualified name file path converted, cannot be- null
- Returns:
- the Bsl module content, may be null
 
 - 
readBslModuleContentOnMergepublic static String readBslModuleContentOnMerge(BslModuleComparisonNode node, IMergeSession mergeSession, ComparisonSide side, IQualifiedNameFilePathConverter filePathConverter) Reads the Bsl module content on the specified comparison side on merge.- Parameters:
- node- the Bsl module comparison node to get content for, cannot be- null
- mergeSession- the merge session, cannot be- null
- side- the comparison side to get content on, cannot be- null
- filePathConverter- the qualified name file path converted, cannot be- null
- Returns:
- the Bsl module content on merge, may be null
 
 - 
parseBslModuleContentpublic static org.eclipse.xtext.parser.IParseResult parseBslModuleContent(BslModuleComparisonNode node, IComparisonSession session, ComparisonSide side, IQualifiedNameFilePathConverter filePathConverter) Parses the Bsl module content stream on the specified comparison side.- Parameters:
- node- the Bsl module comparison node to parse content for, cannot be- null
- session- the comparison session, cannot be- null
- side- the comparison side to parse content on, cannot be- null
- filePathConverter- the qualified name file path converted, cannot be- null
- Returns:
- the result of the parsing or nullif nothing to parse or it failed
 
 - 
parseBslModuleContentpublic static org.eclipse.xtext.parser.IParseResult parseBslModuleContent(InputStream inputStream) Parses the Bsl module content stream.- Parameters:
- inputStream- the Bsl module input stream to parse, cannot be- null
- Returns:
- the result of the parsing or nullif it failed
 
 - 
getBslModuleContentStreampublic static InputStream getBslModuleContentStream(BslModuleComparisonNode node, IComparisonSession session, ComparisonSide side, IQualifiedNameFilePathConverter filePathConverter) Returns the Bsl module content stream on the specified comparison side.- Parameters:
- node- the Bsl module comparison node to get content stream for, cannot be- null
- session- the comparison session, cannot be- null
- side- the comparison side to get content stream on, cannot be- null
- filePathConverter- the qualified name file path converted, cannot be- null
- Returns:
- the Bsl module content stream or nullif there is no module on the specified comparison side
 
 - 
getBslModuleContentStreamOnMergepublic static InputStream getBslModuleContentStreamOnMerge(BslModuleComparisonNode node, IMergeSession mergeSession, ComparisonSide side, IQualifiedNameFilePathConverter filePathConverter) Returns the Bsl module content stream on the specified comparison side on merge.- Parameters:
- node- the Bsl module comparison node to get content stream for, cannot be- null
- mergeSession- the merge session, cannot be- null
- side- the comparison side to get content stream on, cannot be- null
- filePathConverter- the qualified name file path converted, cannot be- null
- Returns:
- the Bsl module content stream or nullif there is no module on the specified comparison side
 
 - 
getTrimmedLocalizedModuleSymlinkpublic static String getTrimmedLocalizedModuleSymlink(String symlink, ISymbolicLinkLocalizer symbolicLinkLocalizer) Returns the trimmed localized Bsl module symlink.- Parameters:
- symlink- the Bsl module symlink to localize, cannot be- null
- symbolicLinkLocalizer- the symbolic link localizer, cannot be- null
- Returns:
- the trimmed localized Bsl module symlink, never null
 
 - 
getLocalizedBslModuleNamepublic static String getLocalizedBslModuleName(String symlink, String comparisonSideName, ISymbolicLinkLocalizer symbolicLinkLocalizer) Returns the localized Bsl module node name.- Parameters:
- symlink- the Bsl module node symlink, cannot be- null
- comparisonSideName- the comparison side name, cannot be- null
- symbolicLinkLocalizer- the symbolic link localizer, cannot be- null
- Returns:
- the localized Bsl module node name, never null
 
 - 
mergeModuleUsingExternalToolpublic static ExternalMergeToolExecutionStatus mergeModuleUsingExternalTool(BslModuleComparisonNode node, IComparisonSession session, ExternalMergeToolConfiguration externalMergeToolConfiguration, int timeout, boolean runAutoMergeByDefault, String mainComparisonSideName, String otherComparisonSideName, File mergeResultFile, IQualifiedNameFilePathConverter filePathConverter, ISymbolicLinkLocalizer symbolicLinkLocalizer) throws IOException Merges the Bsl module using an external tool for the specified node.- Parameters:
- node- the Bsl module node, should not be one side, cannot be- null
- session- the comparison session, cannot be- null
- externalMergeToolConfiguration- the external merge tool configuration, cannot be- null
- timeout- session timeout for exteral tool execution
- runAutoMergeByDefault-- trueif needed to run automatic merge by default if possible,- falseotherwise
- mainComparisonSideName- the main comparison side name, cannot be- null
- otherComparisonSideName- the other comparison side name, cannot be- null
- mergeResultFile- the file to store merge result, cannot be- null
- filePathConverter- the file path converter, cannot be- null
- symbolicLinkLocalizer- the symbolic link localizer, cannot be- null
- Returns:
- the external merge tool execution status, never null
- Throws:
- IOException- if failed to read Bsl module content
 
 
- 
 
-