コード例 #1
0
ファイル: TestUtil.java プロジェクト: eclipse/osee
 /** Creates a simple artifact and adds it to the root artifact default hierarchical relation */
 public static Artifact createSimpleArtifact(
     IArtifactType artifactType, String name, IOseeBranch branch) throws OseeCoreException {
   Artifact softArt = ArtifactTypeManager.addArtifact(artifactType, branch);
   softArt.setName(name);
   if (softArt.isAttributeTypeValid(CoreAttributeTypes.Subsystem)) {
     softArt.setSoleAttributeFromString(CoreAttributeTypes.Subsystem, "Electrical");
   }
   Artifact rootArtifact = OseeSystemArtifacts.getDefaultHierarchyRootArtifact(branch);
   rootArtifact.addRelation(CoreRelationTypes.Default_Hierarchical__Child, softArt);
   return softArt;
 }