Package org.eclipse.ui

Examples of org.eclipse.ui.XMLMemento.save()


        IssuesActivator.log("error when daving issue", e); //$NON-NLS-1$
      }
    }
    FileWriter fileWriter = new FileWriter(getLocalIssuesFile());
    try {
      memento.save(fileWriter);
    } finally {
      fileWriter.close();
    }
  }
View Full Code Here


            return null;
           
        XMLMemento memento=XMLMemento.createWriteRoot("configuration"); //$NON-NLS-1$
        issuesList.configurator.getConfiguration(memento);
        StringWriter stringWriter=new StringWriter();
        memento.save(stringWriter);
        String configuration = stringWriter.toString();
        stringWriter.close();
        return configuration;
    }
View Full Code Here

        // XXX see https://bugs.eclipse.org/bugs/show_bug.cgi?id=223068
        XMLMemento memento = XMLMemento.createWriteRoot("bugExplorer"); //$NON-NLS-1$
        saveState(memento);
        StringWriter writer = new StringWriter();
        try {
            memento.save(writer);
            IDialogSettings dialogSettings = FindbugsPlugin.getDefault().getDialogSettings();
            dialogSettings.put(TAG_MEMENTO, writer.getBuffer().toString());
        } catch (IOException e) {
            // don't do anything. Simply don't store the settings
        }
View Full Code Here

        }

        try
        {
            FileWriter writer = new FileWriter( getSchemaPoolFile() );
            memento.save( writer );
            writer.close();
        }
        catch ( IOException e )
        {
            logger.debug( "Error when saving opened schemas.", e ); //$NON-NLS-1$
View Full Code Here

            }
        }
        Writer writer = null;
        try {
            writer = new StringWriter();
            memento.save(writer);
            writer.close();
            store.setValue(IPreferenceConstants.RESOURCES, writer.toString());
        } catch (IOException e) {
            try {
                if (writer != null) {
View Full Code Here

            editor.saveValues(editorMemento);
        }
        writer = null;
        try {
            writer = new StringWriter();
            memento.save(writer);
            writer.close();
            store.setValue(IPreferenceConstants.EDITORS, writer.toString());
        } catch (IOException e) {
            try {
                if (writer != null) {
View Full Code Here

          .createWriteRoot(IWorkbenchConstants.TAG_WORKBENCH);
      IStatus status = saveSettings(memento);
      if (status.getSeverity() != IStatus.OK)
        return status;

      memento.save(writer);
      writer.close();

    } catch (IOException e) {
      return new Status(IStatus.ERROR, WorkbenchPlugin.PI_WORKBENCH,
          WorkbenchMessages.Workbench_problemsSavingMsg, e);
View Full Code Here

      // Save config options of resource
      saveConfigOptions(logElem, (IConfigurableObject) log.getAdapter(IConfigurableObject.class));
    }
    try {
      // Save to state file
      rootElem.save(new BufferedWriter(new OutputStreamWriter(
          FileUtils.openOutputStream(stateFile.toFile()), "UTF-8"))); //$NON-NLS-1$
    } catch (IOException e) {
      // Unexpected exception; wrap with CoreException
      throw new CoreException(new Status(IStatus.ERROR, UIPlugin.PLUGIN_ID,
          NLS.bind(Messages.LogResourceManager_error_failedToUpdateState,
View Full Code Here

      colElem.putTextData(fld.getKey());
    }
    try {
      StringWriter w = new StringWriter();
      // Save to byte buffer first
      rootElem.save(w);
      // Update log resource
      log.configure(OPTION_COLUMNS, w.toString());
    } catch (IOException e) {
      // Unexpected exception; wrap with CoreException
      throw new CoreException(new Status(IStatus.ERROR, UIPlugin.PLUGIN_ID,
View Full Code Here

      });
    }
    try {
      StringWriter w = new StringWriter();
      // Save to byte buffer first
      rootElem.save(w);
      // Update log resource
      log.configure(OPTION_FILTER, w.toString());
    } catch (IOException e) {
      // Unexpected exception; wrap with CoreException
      throw new CoreException(new Status(IStatus.ERROR, UIPlugin.PLUGIN_ID,
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.