

If ( info=null|| info.getName().equals("trunk")) ProjectDescriptor descriptorForBranchBrett = EsiUtils.getDescriptorForBranch(descriptor, branch) ĮsiUtils.createBranch(descriptor, EsiUtils.getLastVersion(descriptorForBranchBrett), branch2, "inner branch") ĮsiBranchInfo branchInner = EsiUtils.getBranches(descriptor).stream().filter(info -> info.getName().equals(branch2)).findFirst().orElse(null) įor(EsiBranchInfo info = branchInner info=getBranchedFrom(descriptor, info)) Private void branchAPICheck(ProjectDescriptor descriptor)ĮsiUtils.createBranch(descriptor, EsiUtils.getLastVersion(descriptor), branch, "branch Description") Ĭollection branches = EsiUtils.getBranches(descriptor) ĮsiBranchInfo branchBrett = branches.stream().filter(info -> info.getName().equals(branch)).findFirst().orElse(null)

I've been looking at ProjectDescriptorsFactory and EsiUtils to attempt do do this, but haven't found a solution.


To put simply, if I had a projectDescriptor object that was the 'inner' branch retrieved by doing EsiUtils.getDescriptorForBranch(projectDescriptor, 'inner'), how can I get:ġ) The fully qualified path ('MyProjectName#brett#inner')Ģ) A projectDescriptor of the branch it was branched from ('brett'), to be used to open the 'brett' branch.
#Magicdraw teamwork server how to
The EsiUtils.EsiBranchInfo also had a getBranchedFrom() which was correctly returning integer 9 for both 'inner' and 'inner2', but I can't figure out how to create a ProjectDescriptor by knowing this branched from long.
#Magicdraw teamwork server full
Each EsiUtils.EsiBranchInfo had a getName() method that gave me the name of the branch ('inner'), but I couldn't find a way to get the full qualified path from that either. I did figure out that I can do EsiUtils.getBranches(projectDescriptor) to return a static. Every function I attempted only ever gave me the root project name 'MyProjectName' and not the branch name. When I do myProjectDescriptor.getUri().getQuery() it returns nil. I also couldn't figure out a way to get the full qualified path (a.k.a something that looked similar to 'MyProjectName#brett#inner'). Knowing the branch name of 'inner', I was able to do EsiUtils.getDescriptorForBranch(projectDescriptor, 'inner') to get a ProjectDescriptor, however, this ProjectDescriptor didn't appear to have in any way the ability to tell me the name of the branch 'inner'. With TeamworkCloud I am struggling to get similar functionality. From this fully qualified name, I could easily see the inner was branched from 'brett' and could do TeamworkUtils.getRemoteProjectDescriptorByQualifiedName('MyProjectName#brett') to get a projectDescriptor so I could open branch 'brett'. From this ProjectDescriptor object I was able to do myProjectDescriptor.getUri().getQuery() and this would return 'MyProjectName#brett#inner'. With the MagicDraw Teamwork Server, I could use TeamworkUtils.getRemoteProjectDescriptorByQualifiedName('MyProjectName#brett#inner') to get a ProjectDescriptor. I have attached a screenshot of my Teamwork cloud server (see teamwork_cloud_project_tree).
#Magicdraw teamwork server code
I am attempting to port over some plugin code that interacts with Teamwork to interact with Teamwork cloud and am attempting to write similar functionality. I am in the process of migrating from MagicDraw Teamwork Server to instead use Teamwork Cloud.
