Package com._1c.g5.v8.dt.bsl.compare
Class BslCompareUtils
java.lang.Object
com._1c.g5.v8.dt.bsl.compare.BslCompareUtils
Utility methods used for comparison and merge Bsl module.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionexecuteExternalMergeToolForBslModuleSection(BslModuleSectionComparisonNode node, IComparisonSession session, IComparedObjects<org.eclipse.jface.text.IDocument> comparingDocuments, boolean isMerge, File mergeResultFile, IExternalMergeToolProvider externalMergeToolProvider) Executes external merge tool for bsl module section.static StringgetSectionContent(BslModuleSectionComparisonNode node, IComparedObjects<org.eclipse.jface.text.IDocument> comparingDocuments, ComparisonSide side) Returns the Bsl module section content on the specified size.static booleanTells is bsl module binary or not.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 StringreadBslModuleContentBySectionNode(BslModuleSectionComparisonNode node, IComparisonSession session, ComparisonSide side, IQualifiedNameFilePathConverter filePathConverter) Reads the Bsl module content on the specified comparison side.static BslModuleContentInforeadBslModuleContentInfo(BslModuleComparisonNode node, IComparisonSession session, ComparisonSide side, boolean detectIsBinary, IQualifiedNameFilePathConverter filePathConverter) Reads the Bsl module content info on the specified comparison side.
-
Field Details
-
BSL_MODULE_SYMLINK_POSTFIX
Bsl module symlink postfix- See Also:
-
-
Method Details
-
isBinaryModule
Tells is bsl module binary or not.- Parameters:
node- the bsl module comparison node, cannot benull- Returns:
trueif bsl module is binary andfalseif not
-
executeExternalMergeToolForBslModuleSection
public static ExternalMergeToolExecutionStatus executeExternalMergeToolForBslModuleSection(BslModuleSectionComparisonNode node, IComparisonSession session, IComparedObjects<org.eclipse.jface.text.IDocument> comparingDocuments, boolean isMerge, File mergeResultFile, IExternalMergeToolProvider externalMergeToolProvider) throws IOException, org.eclipse.jface.text.BadLocationException Executes external merge tool for bsl module section. Runs compare or merge, depends on parameters.- Parameters:
node- the bsl module section comparison node, should not be one side, cannot benullsession- the comparison session, cannot benullcomparingDocuments- the bsl module comparing document to get content from, cannot benullisMerge-trueif run merge using external tool, andfalseif start comparisonmergeResultFile- the file to store merge result, can benullonly if isMerge isfalseexternalMergeToolProvider- the external merge tool provider, cannot benull- Returns:
- the external merge tool execution status, never
null - Throws:
IOException- if failed to read the section contentorg.eclipse.jface.text.BadLocationException- if it fails to read the section content
-
readBslModuleContentInfo
public static BslModuleContentInfo readBslModuleContentInfo(BslModuleComparisonNode node, IComparisonSession session, ComparisonSide side, boolean detectIsBinary, IQualifiedNameFilePathConverter filePathConverter) Reads the Bsl module content info on the specified comparison side.- Parameters:
node- the Bsl module comparison node to get content for, cannot benullsession- the comparison session, cannot benullside- the comparison side to get content on, cannot benulldetectIsBinary- tells whether to detect is Bsl module content is binaryfilePathConverter- the qualified name file path converted, cannot benull- Returns:
- the Bsl module content info, never
null
-
readBslModuleContentBySectionNode
public static String readBslModuleContentBySectionNode(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 benullsession- the comparison session, cannot benullside- the comparison side to get content on, cannot benullfilePathConverter- the qualified name file path converted, cannot benull- Returns:
- the Bsl module content, may be
null
-
getSectionContent
public static String getSectionContent(BslModuleSectionComparisonNode node, IComparedObjects<org.eclipse.jface.text.IDocument> comparingDocuments, ComparisonSide side) throws org.eclipse.jface.text.BadLocationException Returns the Bsl module section content on the specified size.- Parameters:
node- the Bsl module section node, cannot benullcomparingDocuments- the Bsl module comparing document to get content from, cannot benullside- the comparison side to get section content on, cannot benull- Returns:
- the Bsl module section content on the specified size, may be
null - Throws:
org.eclipse.jface.text.BadLocationException- if it fails to read the section content
-
parseBslModuleContent
public 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 benullsession- the comparison session, cannot benullside- the comparison side to parse content on, cannot benullfilePathConverter- the qualified name file path converted, cannot benull- Returns:
- the result of the parsing or
nullif nothing to parse or it failed
-
parseBslModuleContent
Parses the Bsl module content stream.- Parameters:
inputStream- the Bsl module input stream to parse, cannot benull- Returns:
- the result of the parsing or
nullif it failed
-