예제 #1
0
            private ChapterRef referenceChapter(ModelElement enclosing, Chapter chapter)
            {
                ChapterRef retVal = chapter.ChapterRef;

                if (retVal == null)
                {
                    retVal = (ChapterRef)acceptor.getFactory().createChapterRef();
                }

                retVal.Name = chapter.Name;
                retVal.setFather(enclosing);
                retVal.SaveChapter(chapter);

                return(retVal);
            }
        /// <summary>
        ///     Saves the chapter provided associated to this chapter ref
        /// </summary>
        /// <param name="chapter"></param>
        public void SaveChapter(Chapter chapter)
        {
            Directory.CreateDirectory(Path.GetDirectoryName(FileName));

            VersionedWriter writer = new VersionedWriter(FileName);
            chapter.unParse(writer, false);
            writer.Close();
        }
            private ChapterRef referenceChapter(ModelElement enclosing, Chapter chapter)
            {
                ChapterRef retVal = chapter.ChapterRef;

                if (retVal == null)
                {
                    retVal = (ChapterRef) acceptor.getFactory().createChapterRef();
                }

                retVal.Name = chapter.Name;
                retVal.setFather(enclosing);
                retVal.SaveChapter(chapter);

                return retVal;
            }