<commit_before>/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.openmole.ide.core.implementation.dialog

import scala.swing._
import org.openmole.ide.misc.widget.MigPanel
import org.openmole.ide.core.implementation.panel.ConceptMenu
import java.awt.BorderLayout
import org.openmole.ide.core.implementation.execution.PasswordListner
import org.openide.DialogDescriptor
import org.openide.DialogDescriptor._
import org.openide.DialogDisplayer
import org.openide.NotifyDescriptor
import org.openide.NotifyDescriptor._
import org.openmole.ide.core.implementation.execution.ScenesManager
import org.openmole.ide.core.implementation.preference.PreferenceContent
import org.openmole.ide.core.implementation.execution.ScenesManager
import org.openmole.ide.core.implementation.action.LoadXML
import org.openmole.ide.core.implementation.action.SaveXML
import org.openmole.ide.core.implementation.dataproxy.Proxys

class GUIPanel extends MainFrame { mainframe =>
  title = "OpenMOLE"
  
  menuBar = new MenuBar{ 
    contents += new Menu("File") {
      contents += new MenuItem(new Action("New Mole"){
          override def apply = DialogFactory.newTabName})
      
      contents += new MenuItem(new Action("Load"){
          override def apply = {
            Proxys.clearAll
            mainframe.title = "OpenMOLE - " + LoadXML.show
          }})
      
      contents += new MenuItem(new Action("Save"){
          override def apply = {
            ScenesManager.saveCurrentPropertyWidget
            SaveXML.save(mainframe)
          }})
      
      contents += new MenuItem(new Action("Save as"){
          override def apply = SaveXML.save(mainframe,SaveXML.show)})
      
      contents += new MenuItem(new Action("Reset all"){
          override def apply = {
            ScenesManager.closeAll
            Proxys.clearAll
          }})
    }
    
    contents += new Menu("Tools") {
      contents += new MenuItem(new Action("Preferences"){
          override def apply = {
            val pc = new PreferenceContent
            val dd = new DialogDescriptor(pc.peer, "Preferences")
            dd.setOptions(List(OK_OPTION).toArray)
            if (DialogDisplayer.getDefault.notify(dd).equals(OK_OPTION)) pc.save
          }})
    }
  }
  <commit_msg>Erase frame title<commit_after>/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.openmole.ide.core.implementation.dialog

import scala.swing._
import org.openmole.ide.misc.widget.MigPanel
import org.openmole.ide.core.implementation.panel.ConceptMenu
import java.awt.BorderLayout
import org.openmole.ide.core.implementation.execution.PasswordListner
import org.openide.DialogDescriptor
import org.openide.DialogDescriptor._
import org.openide.DialogDisplayer
import org.openide.NotifyDescriptor
import org.openide.NotifyDescriptor._
import org.openmole.ide.core.implementation.execution.ScenesManager
import org.openmole.ide.core.implementation.preference.PreferenceContent
import org.openmole.ide.core.implementation.execution.ScenesManager
import org.openmole.ide.core.implementation.action.LoadXML
import org.openmole.ide.core.implementation.action.SaveXML
import org.openmole.ide.core.implementation.dataproxy.Proxys

class GUIPanel extends MainFrame { mainframe =>
  title = "OpenMOLE"
  
  menuBar = new MenuBar{ 
    contents += new Menu("File") {
      contents += new MenuItem(new Action("New Mole"){
          override def apply = DialogFactory.newTabName})
      
      contents += new MenuItem(new Action("Load"){
          override def apply = {
            Proxys.clearAll
            mainframe.title = "OpenMOLE - " + LoadXML.show
          }})
      
      contents += new MenuItem(new Action("Save"){
          override def apply = {
            ScenesManager.saveCurrentPropertyWidget
            SaveXML.save(mainframe)
          }})
      
      contents += new MenuItem(new Action("Save as"){
          override def apply = SaveXML.save(mainframe,SaveXML.show)})
      
      contents += new MenuItem(new Action("Reset all"){
          override def apply = {
            ScenesManager.closeAll
            Proxys.clearAll
            mainframe.title = "OpenMOLE"
          }})
    }
    
    contents += new Menu("Tools") {
      contents += new MenuItem(new Action("Preferences"){
          override def apply = {
            val pc = new PreferenceContent
            val dd = new DialogDescriptor(pc.peer, "Preferences")
            dd.setOptions(List(OK_OPTION).toArray)
            if (DialogDisplayer.getDefault.notify(dd).equals(OK_OPTION)) pc.save
          }})
    }
  }
  
{'fraction_non_alphanumeric': 0.09861259338313767, 'fraction_numerical': 0.0, 'mean_word_length': 2.8952618453865338, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2899265', 'n_tokens_mistral': 1350, 'n_tokens_neox': 1301, 'n_words': 270}