Package org.eclipse.ui

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


   */
  public void save() throws IOException {
    XMLMemento memento = XMLMemento.createWriteRoot(Messages.IssuesListPersister_xmlRootElement);
    for (IIssue issue : this.list) {
      try {
        IMemento child = memento.createChild(MEMENTO_CHILD_TYPE, issue
            .getId());

        child.putString(GROUP_ID, issue.getGroupId());
        child.putString(EXTENSION_ID, issue.getExtensionID());
        child.putString(DESCRIPTION, issue.getDescription());
View Full Code Here


        for ( Schema schema : schemaList )
        {
            if ( ( schema.type == Schema.SchemaType.userSchema ) && ( schema.getURL() != null ) )
            {
                IMemento child = memento.createChild( SCHEMA_TAG );
                child.putString( PATH_TAG, schema.getURL().getPath() );
            }
        }

        try
View Full Code Here

                .createWriteRoot(IWorkbenchConstants.TAG_EDITORS);
        memento.putString(IWorkbenchConstants.TAG_VERSION, "3.1"); //$NON-NLS-1$
        FileEditorMapping maps[] = typeEditorMappings.userMappings();
        for (int mapsIndex = 0; mapsIndex < maps.length; mapsIndex++) {
            FileEditorMapping type = maps[mapsIndex];
            IMemento editorMemento = memento
                    .createChild(IWorkbenchConstants.TAG_INFO);
            editorMemento.putString(IWorkbenchConstants.TAG_NAME, type
                    .getName());
            editorMemento.putString(IWorkbenchConstants.TAG_EXTENSION, type
                    .getExtension());
View Full Code Here

        memento = XMLMemento.createWriteRoot(IWorkbenchConstants.TAG_EDITORS);
        Iterator itr = editors.iterator();
        while (itr.hasNext()) {
            EditorDescriptor editor = (EditorDescriptor) itr.next();
            IMemento editorMemento = memento
                    .createChild(IWorkbenchConstants.TAG_DESCRIPTOR);
            editor.saveValues(editorMemento);
        }
        writer = null;
        try {
View Full Code Here

  @Override
  public synchronized void saveState() throws CoreException {
    XMLMemento rootElem = XMLMemento.createWriteRoot(ELEM_ROOT);
    rootElem.putInteger(ATTRIB_COMPAT, COMPAT_VERSION);
    for (ILogResource log : logSet) {
      IMemento logElem = rootElem.createChild(ELEM_LOG_RESOURCE);
      logElem.createChild(ELEM_NAME).putTextData(log.getName());
      IMemento dialectElem = logElem.createChild(ELEM_DIALECT);
      dialectElem.putString(ATTRIB_FACTORY,
          log.getDialect().getFactory().getId());
      // Save config options of dialect
View Full Code Here

  private void save() throws CoreException {
    XMLMemento rootElem = XMLMemento.createWriteRoot(ELEM_ROOT);
    int i = 0;
    for (ALogEntryField<?, ?> fld : fields) {
      IMemento colElem = rootElem.createChild(ELEM_COLUMN);
      colElem.putInteger(ATTRIB_WIDTH, widths[i++]);
      colElem.putTextData(fld.getKey());
    }
    try {
      StringWriter w = new StringWriter();
View Full Code Here

  }

  private void save() throws CoreException {
    XMLMemento rootElem = XMLMemento.createWriteRoot(ELEM_ROOT);
    for (ARestriction<?> rest : restrictions) {
      final IMemento clauseElem = rootElem.createChild(ELEM_CLAUSE);
      clauseElem.putString(ATTRIB_FIELD, rest.getField().getKey());
      clauseElem.putInteger(ATTRIB_OPERATOR, rest.getOperator().getId());
      rest.visit(new IRestrictionVisitor() {
        /* (non-Javadoc)
         * @see net.sf.logsaw.core.query.IRestrictionVisitor#visit(net.sf.logsaw.core.query.LevelRestriction)
View Full Code Here

  }

  private void save() throws CoreException {
    XMLMemento rootElem = XMLMemento.createWriteRoot(ELEM_ROOT);
    for (NamedFilter flt : namedFilters) {
      final IMemento filterElem = rootElem.createChild(ELEM_FILTER);
      filterElem.putString(ATTRIB_NAME, flt.getName());
      for (ARestriction<?> rest : flt.getRestrictions()) {
        final IMemento clauseElem = filterElem.createChild(ELEM_CLAUSE);
        clauseElem.putString(ATTRIB_FIELD, rest.getField().getKey());
        clauseElem.putInteger(ATTRIB_OPERATOR, rest.getOperator().getId());
View Full Code Here

    int size = getCommitHistorySize();
    if (size < 1)
      return;

    XMLMemento memento = XMLMemento.createWriteRoot(KEY_MESSAGES);
    memento.createChild(KEY_MESSAGE).putTextData(message);

    int count = 1;
    if (count < size) {
      Set<String> history = getCommitHistory();
      history.remove(message);
View Full Code Here

    int count = 1;
    if (count < size) {
      Set<String> history = getCommitHistory();
      history.remove(message);
      for (String previous : history) {
        memento.createChild(KEY_MESSAGE).putTextData(previous);
        count++;
        if (count == size)
          break;
      }
    }
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.