Functie: ObjectsNotInVCS

Lasă un comentariu

5 Ianuarie 2014 de liviustoica55


static void ObjectsNotInVCS(Args _args)

{

#SysVersionControl

 

SysVersionControlSystem vcsSys = versionControl.parmSysVersionControlSystem();

SysVersionControllable controlable;

 

UtilEntryLevel curLayer = currentAOLayer();

modelId curModelId = xInfo::getCurrentModelId();

str modelName = SysModelStore::modelId2Name(curModelId);

 

SysModelElementData elemData, parentData;

SysModelElement parent, child;

TreeNode pNode, cNode;

 

//Set options to skip cache lookup of file names

infolog.globalCache().set(#VCSCache, #NoPrompt,true);

 

while select RootModelElement from child

group by child.RootModelElement, elemData.ModelId

join ModelId from elemData

where elemData.ModelElement == child.RecId

//Layer numbers in SysModel* views are offset by +1

&& elemData.Layer == (curLayer + 1)

//Remove the following line to include all models

&& elemData.ModelId == curModelId

{

//Get lowest layer copy of parent

select firstOnly parent

order by parentData.Layer

where parent.RecId == child.RootModelElement

join parentData

where parentData.ModelElement == parent.RecId;

 

pNode = SysTreeNode::findNodeInLayer(

parent.ElementType, parent.name, 0, parentData.Layer – 1);

 

if(!pNode)

continue;

 

controlable = SysTreeNode::newTreeNode(pNode);

if(!controlable)

continue;

 

if(vcsSys.allowCreate(controlable))

{

//do something if it isn’t in version control

info(strfmt(„%1 %2”,pNode.treeNodePath(), modelName));

}

}

}

Lasă un răspuns

Completează mai jos detaliile despre tine sau dă clic pe un icon pentru autentificare:

Logo WordPress.com

Comentezi folosind contul tău WordPress.com. Dezautentificare / Schimbă )

Poză Twitter

Comentezi folosind contul tău Twitter. Dezautentificare / Schimbă )

Fotografie Facebook

Comentezi folosind contul tău Facebook. Dezautentificare / Schimbă )

Fotografie Google+

Comentezi folosind contul tău Google+. Dezautentificare / Schimbă )

Conectare la %s

%d blogeri au apreciat asta: