public static void syncSample(EA.Repository Repository, EA.Diagram diagram, DiagramCache diagramCache)
        {
            logger.log("Sync Sample");

            RepositoryHelper.createDiagramCache(Repository, diagram, diagramCache);
            IList <EA.Element> diagramElements = diagramCache.elementsList;

            IList <EA.Element> samples = MetaDataManager.diagramSamples(Repository, diagramElements);

            EA.Element container             = container = findContainer(Repository, diagram, diagramElements);
            EA.Element containerClassifierEl = Repository.GetElementByID(container.ClassfierID);
            string     containerName         = container.Name;
            string     containerClassifier   = containerClassifierEl.Name;


            //logger.log("Sample Root:" + container.Name);

            EA.Package samplePkg      = Repository.GetPackageByID(diagram.PackageID);
            EA.Package samplesPackage = Repository.GetPackageByID(samplePkg.ParentID);
            EA.Package apiPackage     = Repository.GetPackageByID(samplesPackage.ParentID);
            if (fileManager != null)
            {
                fileManager.initializeAPI(apiPackage.Name);
                fileManager.setup(RoundTripAddInClass.RAML_0_8);
                if (!fileManager.sampleExists(container.Name, containerClassifier))
                {
                    MessageBox.Show("No file exists at:" + fileManager.samplePath(container.Name, containerClassifier));
                    return;
                }
                else
                {
                    string  fullpath = fileManager.samplePath(containerName, containerClassifier);
                    JObject jo       = JObject.Parse(File.ReadAllText(fullpath));
                    sync_sample(Repository, container, jo);
                }
            }
        }