Package net.sourceforge.squirrel_sql.fw.xml

Examples of net.sourceforge.squirrel_sql.fw.xml.XMLBeanReader.load()


  private void loadOldPrefs(File oldPrefsFile) throws XMLException
  {
    try
    {
      XMLBeanReader doc = new XMLBeanReader();
      doc.load(oldPrefsFile, getClass().getClassLoader());
      Iterator<?> it = doc.iterator();
      if (it.hasNext())
      {
        _lafPrefs = (LAFPreferences) it.next();
      }
View Full Code Here


      {
         XMLBeanReader xmlin = new XMLBeanReader();

         if (bookmarkFile.exists())
         {
            xmlin.load(bookmarkFile, getClass().getClassLoader());
            for (Iterator<?> i = xmlin.iterator(); i.hasNext();)
            {
               Object bean = i.next();
               if (bean instanceof Bookmark)
               {
View Full Code Here

    try
    {
      if(getScriptPropertiesFile().exists())
      {
        XMLBeanReader br = new XMLBeanReader();
        br.load(getScriptPropertiesFile(), this.getClass().getClassLoader());
        return (ScriptProps) br.iterator().next();
      }
      else
      {
        return null;
View Full Code Here

      if (false == xmlFile.exists())
      {
         return null;
      }

      reader.load(xmlFile, plugin.getClass().getClassLoader());
      return reader;
   }

   private static File getXmlFile(File pluginUserSettingsFolder)
   {
View Full Code Here

         File f = new File(userSettingsFolder + File.separator + FORMAT_XML_FILE_NAME);

         if(f.exists())
         {
            XMLBeanReader br = new XMLBeanReader();
            br.load(userSettingsFolder + File.separator + FORMAT_XML_FILE_NAME, this.getClass().getClassLoader());

            Vector<FormatXmlBean> buf = new Vector<FormatXmlBean>();

            for(Iterator<?> i=br.iterator(); i.hasNext();)
            {
View Full Code Here

        try {
            XMLBeanReader doc = new XMLBeanReader();
           
            prefFile = PreferenceUtil.getPreferenceFileToReadFrom(plugin);
           
            doc.load(prefFile, DBCopyPreferenceBean.class.getClassLoader());
           
            Iterator<Object> it = doc.iterator();
            if (it.hasNext()) {
                _prefs = (DBCopyPreferenceBean)it.next();
            }
View Full Code Here

      _newSessionPrefs = new CodeCompletionPreferences();
      File prefsFile = new File(getPluginUserSettingsFolder(), PREFS_FILE_NAME);
      if(prefsFile.exists())
      {
        XMLBeanReader reader = new XMLBeanReader();
        reader.load(prefsFile, getClass().getClassLoader());

        Iterator<?> it = reader.iterator();

        if (it.hasNext())
        {
View Full Code Here

   public GraphControllerXmlBean read()
   {
      try
      {
         XMLBeanReader br = new XMLBeanReader();
         br.load(_graphFile, this.getClass().getClassLoader());
         return (GraphControllerXmlBean) br.iterator().next();
      }
      catch (Exception e)
      {
         throw new RuntimeException(e);
View Full Code Here

        try {
            XMLBeanReader doc = new XMLBeanReader();
           
            File prefFile = PreferenceUtil.getPreferenceFileToReadFrom(plugin);
           
            doc.load(prefFile, SQLScriptPreferenceBean.class.getClassLoader());           

            Iterator<?> it = doc.iterator();
            if (it.hasNext()) {
                _prefs = (SQLScriptPreferenceBean)it.next();
            }
View Full Code Here

  private void loadPrefs()
  {
    try
    {
      XMLBeanReader doc = new XMLBeanReader();
      doc.load(new File(_userSettingsFolder, USER_PREFS_FILE_NAME),
                getClass().getClassLoader());
      Iterator<?> it = doc.iterator();
      if (it.hasNext())
      {
        _prefs = (WebServicePreferences)it.next();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.