Package net.sourceforge.squirrel_sql.fw.xml

Examples of net.sourceforge.squirrel_sql.fw.xml.XMLBeanReader


    /**
     * Load from preferences file.
     */
    private static void loadPrefs() {
        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();
            }
        } catch (FileNotFoundException ignore) {
            s_log.info(USER_PREFS_FILE_NAME + " not found - will be created");
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

      String filename = getSessionPreferencesFilename(beanType);
      if (filename.length() == 0) {
        return getEmptyPreferencesBean(beanType);
      }
        try {
            XMLBeanReader reader = new XMLBeanReader();
            File file = new File(userSettingsFolder, filename);
            reader.load(file, getSessionPreferencesClassloader(beanType));
           
            Iterator<Object> it = reader.iterator();
            if (it.hasNext()) {
              prefBean = (IFirebirdManagerSessionPreferencesBean)it.next();
            }
        } catch (FileNotFoundException eNotFound) {
            log.info(filename + " not found. It will be created!");
View Full Code Here

   */
  private void loadPrefs()
  {
    try
    {
      final XMLBeanReader doc = new XMLBeanReader();
      final File file = new File(_userSettingsFolder,
          IConstants.USER_PREFS_FILE_NAME);
      doc.load(file, getClass().getClassLoader());

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

      if (it.hasNext())
      {
        _newSessionPrefs = (SyntaxPreferences)it.next();
      }
View Full Code Here

    /**
     * Load from preferences file.
     */
    private static void loadPrefs() {
        try {
            XMLBeanReader doc = new XMLBeanReader();
           
            File prefFile = PreferenceUtil.getPreferenceFileToReadFrom(plugin);
           
            doc.load(prefFile, MSSQLPreferenceBean.class.getClassLoader());
                       
            Iterator<?> it = doc.iterator();
            if (it.hasNext()) {
                _prefs = (MSSQLPreferenceBean)it.next();
            }
        } catch (FileNotFoundException ignore) {
            s_log.info(USER_PREFS_FILE_NAME + " not found - will be created");
View Full Code Here

   {
      try
      {
         if(null == _autoCorrectData)
         {
            XMLBeanReader br = new XMLBeanReader();

            File path = new File(_pluginUserSettingsFolder.getPath() + File.separator + AUTO_CORRECT_DATA_FILE_NAME);

            if(path.exists())
            {
               br.load(_pluginUserSettingsFolder.getPath() + File.separator + AUTO_CORRECT_DATA_FILE_NAME, this.getClass().getClassLoader());
               _autoCorrectData = (AutoCorrectData) br.iterator().next();
            }
            else
            {
               _autoCorrectData = getDefaultAutoCorrectData();
            }
View Full Code Here

    /**
     * Load from preferences file.
     */
    private static void loadPrefs() {
        try {
            XMLBeanReader doc = new XMLBeanReader();
           
            File prefFile = PreferenceUtil.getPreferenceFileToReadFrom(plugin);
           
            doc.load(prefFile, RefactoringPreferenceBean.class.getClassLoader());           

            Iterator<?> it = doc.iterator();
            if (it.hasNext()) {
                _prefs = (RefactoringPreferenceBean)it.next();
            }
        } catch (FileNotFoundException ignore) {
            s_log.info(USER_PREFS_FILE_NAME + " not found - will be created");
View Full Code Here

    /**
     * Load from preferences file.
     */
    private static void loadPrefs() {
        try {
            XMLBeanReader doc = new XMLBeanReader();
           
            File prefFile = PreferenceUtil.getPreferenceFileToReadFrom(plugin);
           
            doc.load(prefFile, DataImportPreferenceBean.class.getClassLoader());
           
            Iterator<?> it = doc.iterator();
            if (it.hasNext()) {
                _prefs = (DataImportPreferenceBean)it.next();
            }
        } catch (FileNotFoundException ignore) {
            s_log.info(USER_PREFS_FILE_NAME + " not found - will be created");
View Full Code Here

TOP

Related Classes of net.sourceforge.squirrel_sql.fw.xml.XMLBeanReader

Copyright © 2018 www.massapicom. 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.