public void newJavaSource()
        {
            JavaSource java = new JavaSource("Untitled.java", this);

            java.GetVM().OnLoaded();
            var firstDocumentPane = View.dockingManager.Layout.Descendents().OfType <LayoutDocumentPane>().FirstOrDefault();

            if (firstDocumentPane != null)
            {
                firstDocumentPane.Children.Add(java);
                java.IsSelected = true;
            }
        }
 public void DocumentClosed(JavaSource newDoc)
 {
     if (newDoc == null)
     {
         throw new ArgumentNullException();
     }
     if (ActiveDocuments.Contains(newDoc))
     {
         ActiveDocuments.Remove(newDoc);
     }
     if (ActiveDocument != null)
     {
         this.TitlePre = ActiveDocument.GetVM().TitleName;
     }
     else
     {
         this.TitlePre = "";
     }
 }
        public void DisplayFile(string p)
        {
            string fileName = p.Substring(p.LastIndexOf("\\")).Remove(0, 1);
            string fileExt  = fileName.Substring(fileName.LastIndexOf("."));

            switch (fileExt)
            {
            case ".java":
            {
                JavaSource java = new JavaSource(p, fileName, this);
                java.GetVM().OnLoaded();
                var firstDocumentPane = View.dockingManager.Layout.Descendents().OfType <LayoutDocumentPane>().FirstOrDefault();
                if (firstDocumentPane != null)
                {
                    firstDocumentPane.Children.Add(java);
                    java.IsSelected = true;
                }
                break;
            }
            }
        }
Пример #4
0
 /**
  * Call back method that must be called as soon as the given <code>
  * JavaSource</code> object has been traversed.
  *
  * @param pJavaSource  The <code>JavaSource</code> object that has just been
  *                     traversed.
  */
 public void actionPerformed(
      JavaSource pJavaSource)
 {
     // Nothing to do.
 }
Пример #5
0
 /**
  * Call back method that must be called when the given <code>JavaSource
  * </code> will become the next <i>traverse candidate</i>.
  *
  * @param pJavaSource  The <code>JavaSource</code> object that will become
  *                     the next <i>traverse candidate</i>.
  */
 public void performAction(
      JavaSource pJavaSource)
 {
     // Nothing to do.
 }