本文整理汇总了C#中Generated.getComment方法的典型用法代码示例。如果您正苦于以下问题:C# Generated.getComment方法的具体用法?C# Generated.getComment怎么用?C# Generated.getComment使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Generated
的用法示例。
在下文中一共展示了Generated.getComment方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: visit
/// <summary>
/// Cleans all text fields in this element
/// </summary>
/// <param name="obj"></param>
/// <param name="visitSubNodes"></param>
public override void visit(Generated.ReferencesParagraph obj, bool visitSubNodes)
{
if ( obj.getComment() != null )
{
obj.setComment(obj.getComment().Trim());
}
base.visit(obj, visitSubNodes);
}
示例2: compareAction
/// <summary>
/// Compares two Action and annotates the differences on the first one
/// </summary>
/// <param name="obj"></param>
/// <param name="other"></param>
public static void compareAction(Generated.Action obj, Generated.Action other, VersionDiff diff)
{
if ( other == null )
{
diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aAdd, "", "", obj.Name ) );
return;
}
if ( !CompareUtil.canonicalStringEquality(obj.getExpression(), other.getExpression()) )
{
diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aChange, "Expression", other.getExpression(), obj.getExpression()) );
}
if ( !CompareUtil.canonicalStringEquality(obj.getComment(), other.getComment()) )
{
diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aChange, "Comment", other.getComment(), obj.getComment()) );
}
}
示例3: DuplicatePreCondition
/// <summary>
/// Duplicates a source PreCondition into its target
/// </summary>
/// <param name="source"></param>
/// <param name="target"></param>
public static void DuplicatePreCondition(Generated.PreCondition source, Generated.PreCondition target)
{
if ( source != null && target != null )
{
target.setCondition(source.getCondition());
target.setComment(source.getComment());
}
}
示例4: searchNameSpace
/// <summary>
/// Searches a specific string in NameSpace and updates the list
/// of model element with all the elements in which that string is found
/// </summary>
/// <param name="obj"></param>
/// <param name="obj">The string to search for</param>
/// <param name="occurences">The list of model elements which hold the searched string</param>
public static void searchNameSpace(Generated.NameSpace obj, string searchString, List<ModelElement> occurences)
{
searchNamable (obj, searchString, occurences);
if ( obj.allNameSpaces() != null )
{
foreach ( Generated.NameSpace subElement in obj.allNameSpaces() )
{
searchNameSpace ( subElement, searchString, occurences );
}
}
if ( obj.allNameSpaceRefs() != null )
{
foreach ( Generated.NameSpaceRef subElement in obj.allNameSpaceRefs() )
{
searchNameSpaceRef ( subElement, searchString, occurences );
}
}
if ( obj.allRanges() != null )
{
foreach ( Generated.Range subElement in obj.allRanges() )
{
searchRange ( subElement, searchString, occurences );
}
}
if ( obj.allEnumerations() != null )
{
foreach ( Generated.Enum subElement in obj.allEnumerations() )
{
searchEnum ( subElement, searchString, occurences );
}
}
if ( obj.allStructures() != null )
{
foreach ( Generated.Structure subElement in obj.allStructures() )
{
searchStructure ( subElement, searchString, occurences );
}
}
if ( obj.allCollections() != null )
{
foreach ( Generated.Collection subElement in obj.allCollections() )
{
searchCollection ( subElement, searchString, occurences );
}
}
if ( obj.allStateMachines() != null )
{
foreach ( Generated.StateMachine subElement in obj.allStateMachines() )
{
searchStateMachine ( subElement, searchString, occurences );
}
}
if ( obj.allFunctions() != null )
{
foreach ( Generated.Function subElement in obj.allFunctions() )
{
searchFunction ( subElement, searchString, occurences );
}
}
if ( obj.allProcedures() != null )
{
foreach ( Generated.Procedure subElement in obj.allProcedures() )
{
searchProcedure ( subElement, searchString, occurences );
}
}
if ( obj.allVariables() != null )
{
foreach ( Generated.Variable subElement in obj.allVariables() )
{
searchVariable ( subElement, searchString, occurences );
}
}
if ( obj.allRules() != null )
{
foreach ( Generated.Rule subElement in obj.allRules() )
{
searchRule ( subElement, searchString, occurences );
}
}
if ( obj.getComment() != null && obj.getComment().Contains (searchString) )
{
occurences.Add ( obj );
}
}
示例5: DuplicateNameSpace
/// <summary>
/// Duplicates a source NameSpace into its target
/// </summary>
/// <param name="source"></param>
/// <param name="target"></param>
public static void DuplicateNameSpace(Generated.NameSpace source, Generated.NameSpace target)
{
if ( source != null && target != null )
{
DuplicateNamable (source, target);
target.setComment(source.getComment());
}
}
示例6: DuplicateSubStep
/// <summary>
/// Duplicates a source SubStep into its target
/// </summary>
/// <param name="source"></param>
/// <param name="target"></param>
public static void DuplicateSubStep(Generated.SubStep source, Generated.SubStep target)
{
if ( source != null && target != null )
{
DuplicateNamable (source, target);
target.setSkipEngine(source.getSkipEngine());
target.setTimeDelay(source.getTimeDelay());
target.setTimer(source.getTimer());
target.setComment(source.getComment());
}
}
示例7: DuplicateReferencesParagraph
/// <summary>
/// Duplicates a source ReferencesParagraph into its target
/// </summary>
/// <param name="source"></param>
/// <param name="target"></param>
public static void DuplicateReferencesParagraph(Generated.ReferencesParagraph source, Generated.ReferencesParagraph target)
{
if ( source != null && target != null )
{
DuplicateNamable (source, target);
target.setComment(source.getComment());
}
}
示例8: compareCase
/// <summary>
/// Compares two Case and annotates the differences on the first one
/// </summary>
/// <param name="obj"></param>
/// <param name="other"></param>
public static void compareCase(Generated.Case obj, Generated.Case other, VersionDiff diff)
{
if ( other == null )
{
diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aAdd, "", "", obj.Name ) );
return;
}
compareNamable (obj, other, diff);
if ( obj.allPreConditions() != null )
{
if ( other.allPreConditions() != null )
{
int i = 0;
while ( i < obj.countPreConditions() && i < other.countPreConditions() )
{
Generated.PreCondition element = obj.getPreConditions( i );
Generated.PreCondition otherElement = other.getPreConditions( i );
comparePreCondition ( element, otherElement, diff );
i += 1;
}
while ( i < obj.countPreConditions() )
{
diff.appendChanges ( new Diff(obj.getPreConditions(i), HistoricalData.Generated.acceptor.ChangeOperationEnum.aAdd, "PreConditions", "", obj.getPreConditions( i ).Name ) );
i += 1;
}
while ( i < other.countPreConditions() )
{
diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aRemove, "PreConditions", other.getPreConditions( i ).Name) );
i += 1;
}
}
else
{
foreach ( Generated.PreCondition subElement in obj.allPreConditions() )
{
diff.appendChanges ( new Diff(subElement, HistoricalData.Generated.acceptor.ChangeOperationEnum.aAdd, "PreConditions", "", subElement.Name ) );
}
}
}
else
{
if ( other.allPreConditions() != null )
{
foreach ( Generated.PreCondition otherElement in other.allPreConditions() )
{
diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aRemove , "PreConditions", otherElement.Name) );
}
}
}
if ( !CompareUtil.canonicalStringEquality(obj.getExpression(), other.getExpression()) )
{
diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aChange, "Expression", other.getExpression(), obj.getExpression()) );
}
if ( !CompareUtil.canonicalStringEquality(obj.getComment(), other.getComment()) )
{
diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aChange, "Comment", other.getComment(), obj.getComment()) );
}
}
示例9: compareNameSpace
//.........这里部分代码省略.........
foreach ( Generated.Variable otherElement in other.allVariables() )
{
bool found = false;
foreach ( Generated.Variable subElement in obj.allVariables() )
{
if ( subElement.Guid == otherElement.Guid )
{
found = true;
break;
}
}
if ( !found )
{
diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aRemove , "Variables", otherElement.Name) );
}
}
}
else
{
foreach ( Generated.Variable subElement in obj.allVariables() )
{
diff.appendChanges ( new Diff(subElement, HistoricalData.Generated.acceptor.ChangeOperationEnum.aAdd, "Variables", "", subElement.Name ) );
}
}
}
else
{
if ( other.allVariables() != null )
{
foreach ( Generated.Variable otherElement in other.allVariables() )
{
diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aRemove , "Variables", otherElement.Name) );
}
}
}
if ( obj.allRules() != null )
{
if ( other.allRules() != null )
{
foreach ( Generated.Rule subElement in obj.allRules() )
{
bool compared = false;
foreach ( Generated.Rule otherElement in other.allRules() )
{
if ( subElement.Guid == otherElement.Guid )
{
compareRule ( subElement, otherElement, diff );
compared = true;
break;
}
}
if ( !compared )
{
diff.appendChanges ( new Diff(subElement, HistoricalData.Generated.acceptor.ChangeOperationEnum.aAdd, "Rules", "", subElement.Name ) );
}
}
foreach ( Generated.Rule otherElement in other.allRules() )
{
bool found = false;
foreach ( Generated.Rule subElement in obj.allRules() )
{
if ( subElement.Guid == otherElement.Guid )
{
found = true;
break;
}
}
if ( !found )
{
diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aRemove , "Rules", otherElement.Name) );
}
}
}
else
{
foreach ( Generated.Rule subElement in obj.allRules() )
{
diff.appendChanges ( new Diff(subElement, HistoricalData.Generated.acceptor.ChangeOperationEnum.aAdd, "Rules", "", subElement.Name ) );
}
}
}
else
{
if ( other.allRules() != null )
{
foreach ( Generated.Rule otherElement in other.allRules() )
{
diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aRemove , "Rules", otherElement.Name) );
}
}
}
if ( !CompareUtil.canonicalStringEquality(obj.getComment(), other.getComment()) )
{
diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aChange, "Comment", other.getComment(), obj.getComment()) );
}
}
示例10: compareReferencesParagraph
/// <summary>
/// Compares two ReferencesParagraph and annotates the differences on the first one
/// </summary>
/// <param name="obj"></param>
/// <param name="other"></param>
public static void compareReferencesParagraph(Generated.ReferencesParagraph obj, Generated.ReferencesParagraph other, VersionDiff diff)
{
if ( other == null )
{
diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aAdd, "", "", obj.Name ) );
return;
}
compareNamable (obj, other, diff);
if ( obj.allRequirements() != null )
{
if ( other.allRequirements() != null )
{
foreach ( Generated.ReqRef subElement in obj.allRequirements() )
{
bool compared = false;
foreach ( Generated.ReqRef otherElement in other.allRequirements() )
{
if ( subElement.Guid == otherElement.Guid )
{
compareReqRef ( subElement, otherElement, diff );
compared = true;
break;
}
}
if ( !compared )
{
diff.appendChanges ( new Diff(subElement, HistoricalData.Generated.acceptor.ChangeOperationEnum.aAdd, "Requirements", "", subElement.Name ) );
}
}
foreach ( Generated.ReqRef otherElement in other.allRequirements() )
{
bool found = false;
foreach ( Generated.ReqRef subElement in obj.allRequirements() )
{
if ( subElement.Guid == otherElement.Guid )
{
found = true;
break;
}
}
if ( !found )
{
diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aRemove , "Requirements", otherElement.Name) );
}
}
}
else
{
foreach ( Generated.ReqRef subElement in obj.allRequirements() )
{
diff.appendChanges ( new Diff(subElement, HistoricalData.Generated.acceptor.ChangeOperationEnum.aAdd, "Requirements", "", subElement.Name ) );
}
}
}
else
{
if ( other.allRequirements() != null )
{
foreach ( Generated.ReqRef otherElement in other.allRequirements() )
{
diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aRemove , "Requirements", otherElement.Name) );
}
}
}
if ( !CompareUtil.canonicalStringEquality(obj.getComment(), other.getComment()) )
{
diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aChange, "Comment", other.getComment(), obj.getComment()) );
}
}
示例11: searchSubStep
/// <summary>
/// Searches a specific string in SubStep and updates the list
/// of model element with all the elements in which that string is found
/// </summary>
/// <param name="obj"></param>
/// <param name="obj">The string to search for</param>
/// <param name="occurences">The list of model elements which hold the searched string</param>
public static void searchSubStep(Generated.SubStep obj, string searchString, List<ModelElement> occurences)
{
searchNamable (obj, searchString, occurences);
if ( obj.allActions() != null )
{
foreach ( Generated.Action subElement in obj.allActions() )
{
searchAction ( subElement, searchString, occurences );
}
}
if ( obj.allExpectations() != null )
{
foreach ( Generated.Expectation subElement in obj.allExpectations() )
{
searchExpectation ( subElement, searchString, occurences );
}
}
if ( obj.getComment() != null && obj.getComment().Contains (searchString) )
{
occurences.Add ( obj );
}
}
示例12: searchSubSequence
/// <summary>
/// Searches a specific string in SubSequence and updates the list
/// of model element with all the elements in which that string is found
/// </summary>
/// <param name="obj"></param>
/// <param name="obj">The string to search for</param>
/// <param name="occurences">The list of model elements which hold the searched string</param>
public static void searchSubSequence(Generated.SubSequence obj, string searchString, List<ModelElement> occurences)
{
searchNamable (obj, searchString, occurences);
if ( obj.getD_LRBG() != null && obj.getD_LRBG().Contains (searchString) )
{
occurences.Add ( obj );
}
if ( obj.getLevel() != null && obj.getLevel().Contains (searchString) )
{
occurences.Add ( obj );
}
if ( obj.getMode() != null && obj.getMode().Contains (searchString) )
{
occurences.Add ( obj );
}
if ( obj.getNID_LRBG() != null && obj.getNID_LRBG().Contains (searchString) )
{
occurences.Add ( obj );
}
if ( obj.getQ_DIRLRBG() != null && obj.getQ_DIRLRBG().Contains (searchString) )
{
occurences.Add ( obj );
}
if ( obj.getQ_DIRTRAIN() != null && obj.getQ_DIRTRAIN().Contains (searchString) )
{
occurences.Add ( obj );
}
if ( obj.getQ_DLRBG() != null && obj.getQ_DLRBG().Contains (searchString) )
{
occurences.Add ( obj );
}
if ( obj.getRBC_ID() != null && obj.getRBC_ID().Contains (searchString) )
{
occurences.Add ( obj );
}
if ( obj.getRBCPhone() != null && obj.getRBCPhone().Contains (searchString) )
{
occurences.Add ( obj );
}
if ( obj.allTestCases() != null )
{
foreach ( Generated.TestCase subElement in obj.allTestCases() )
{
searchTestCase ( subElement, searchString, occurences );
}
}
if ( obj.getComment() != null && obj.getComment().Contains (searchString) )
{
occurences.Add ( obj );
}
}
示例13: searchReqRef
/// <summary>
/// Searches a specific string in ReqRef and updates the list
/// of model element with all the elements in which that string is found
/// </summary>
/// <param name="obj"></param>
/// <param name="obj">The string to search for</param>
/// <param name="occurences">The list of model elements which hold the searched string</param>
public static void searchReqRef(Generated.ReqRef obj, string searchString, List<ModelElement> occurences)
{
if ( obj.getId() != null && obj.getId().Contains (searchString) )
{
occurences.Add ( obj );
}
if ( obj.getSpecId() != null && obj.getSpecId().Contains (searchString) )
{
occurences.Add ( obj );
}
if ( obj.getComment() != null && obj.getComment().Contains (searchString) )
{
occurences.Add ( obj );
}
}
示例14: searchReferencesParagraph
/// <summary>
/// Searches a specific string in ReferencesParagraph and updates the list
/// of model element with all the elements in which that string is found
/// </summary>
/// <param name="obj"></param>
/// <param name="obj">The string to search for</param>
/// <param name="occurences">The list of model elements which hold the searched string</param>
public static void searchReferencesParagraph(Generated.ReferencesParagraph obj, string searchString, List<ModelElement> occurences)
{
searchNamable (obj, searchString, occurences);
if ( obj.allRequirements() != null )
{
foreach ( Generated.ReqRef subElement in obj.allRequirements() )
{
searchReqRef ( subElement, searchString, occurences );
}
}
if ( obj.getComment() != null && obj.getComment().Contains (searchString) )
{
occurences.Add ( obj );
}
}
示例15: searchPreCondition
/// <summary>
/// Searches a specific string in PreCondition and updates the list
/// of model element with all the elements in which that string is found
/// </summary>
/// <param name="obj"></param>
/// <param name="obj">The string to search for</param>
/// <param name="occurences">The list of model elements which hold the searched string</param>
public static void searchPreCondition(Generated.PreCondition obj, string searchString, List<ModelElement> occurences)
{
if ( obj.getCondition() != null && obj.getCondition().Contains (searchString) )
{
occurences.Add ( obj );
}
if ( obj.getComment() != null && obj.getComment().Contains (searchString) )
{
occurences.Add ( obj );
}
}