Package org.eclipse.ui

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


            return;
        }
        final IMemento aMemento2 = aMemento.createChild("LiveExpressions");
        final Iterator<LiveExpr> iter = exprs.iterator();
        while (iter.hasNext()) {
            aMemento2.createChild("expression").putTextData(iter.next().toString());
        }
    }

    private boolean restoreState() {
        if (memento != null) {
View Full Code Here


        IMemento editorsMem = memento
                .createChild(IWorkbenchConstants.TAG_EDITORS);
        for (Iterator iter = editors.iterator(); iter.hasNext();) {
            NavigationHistoryEditorInfo info = (NavigationHistoryEditorInfo) iter
                    .next();
            info.saveState(editorsMem
                    .createChild(IWorkbenchConstants.TAG_EDITOR));
        }

        ArrayList list = new ArrayList(history.size());
        int size = history.size();
View Full Code Here

      Set activatedViewIds = (Set) entry.getValue();
      IMemento perspectiveState = stickyState.createChild(
          IWorkbenchConstants.TAG_PERSPECTIVE, perspectiveId);
      for (Iterator i = activatedViewIds.iterator(); i.hasNext();) {
        String viewId = (String) i.next();
        perspectiveState.createChild(IWorkbenchConstants.TAG_VIEW,
            viewId);
      }
    }
  }
View Full Code Here

    memento.createChild("documentSink", documentSink.getText());
    memento.createChild("typeSystem", typeSystem.getText());

    for (String each : selectedTypes) {
      IMemento currentMemento = memento.createChild("selectedTypes", "type");
      currentMemento.createChild("type", each);
    }

  }

  public TreeViewer getTreeViewer() {
View Full Code Here

        child.putString(MIN_Y, Double.toString(bounds.getMinY()));
        child.putString(MAX_Y, Double.toString(bounds.getMaxY()));
        child.putString(CRS, bounds.getCoordinateReferenceSystem()
            .toWKT());

        issue.getViewMemento(child.createChild(MEMENTO_VIEW_DATA));
        issue.save(child.createChild(MEMENTO_ISSUE_DATA));
      } catch (Throwable e) {
        IssuesActivator.log("error when daving issue", e); //$NON-NLS-1$
      }
    }
View Full Code Here

        child.putString(MAX_Y, Double.toString(bounds.getMaxY()));
        child.putString(CRS, bounds.getCoordinateReferenceSystem()
            .toWKT());

        issue.getViewMemento(child.createChild(MEMENTO_VIEW_DATA));
        issue.save(child.createChild(MEMENTO_ISSUE_DATA));
      } catch (Throwable e) {
        IssuesActivator.log("error when daving issue", e); //$NON-NLS-1$
      }
    }
    FileWriter fileWriter = new FileWriter(getLocalIssuesFile());
View Full Code Here

    memento.createChild("documents");
    for (DocumentData documentData : documentList) {
      String docPath = documentData.getDocument().getAbsolutePath();
      String docName = "document";
      IMemento documentMemento = memento.getChild("documents");
      documentMemento.createChild(docName, docPath);
    }
  }

  public void restoreState(IMemento memento) {
    if (memento == null) {
View Full Code Here

    for (ConstraintData constraintData : constraintList) {
      if (constraintData.getConstraint() instanceof SimpleRutaRuleConstraint) {
        IMemento currentMemento = memento.createChild("constraint", "SimpleRutaConstraint");
        SimpleRutaRuleConstraint constraint = (SimpleRutaRuleConstraint) constraintData
                .getConstraint();
        currentMemento.createChild("Data", constraint.getData());
        currentMemento.createChild("Description", constraint.getDescription());
        currentMemento.createChild("Weight", "" + constraintData.getWeight());
      }

      if (constraintData.getConstraint() instanceof RutaRuleListConstraint) {
View Full Code Here

      if (constraintData.getConstraint() instanceof SimpleRutaRuleConstraint) {
        IMemento currentMemento = memento.createChild("constraint", "SimpleRutaConstraint");
        SimpleRutaRuleConstraint constraint = (SimpleRutaRuleConstraint) constraintData
                .getConstraint();
        currentMemento.createChild("Data", constraint.getData());
        currentMemento.createChild("Description", constraint.getDescription());
        currentMemento.createChild("Weight", "" + constraintData.getWeight());
      }

      if (constraintData.getConstraint() instanceof RutaRuleListConstraint) {
        IMemento currentMemento = memento.createChild("constraint", "ListRutaConstraint");
View Full Code Here

        IMemento currentMemento = memento.createChild("constraint", "SimpleRutaConstraint");
        SimpleRutaRuleConstraint constraint = (SimpleRutaRuleConstraint) constraintData
                .getConstraint();
        currentMemento.createChild("Data", constraint.getData());
        currentMemento.createChild("Description", constraint.getDescription());
        currentMemento.createChild("Weight", "" + constraintData.getWeight());
      }

      if (constraintData.getConstraint() instanceof RutaRuleListConstraint) {
        IMemento currentMemento = memento.createChild("constraint", "ListRutaConstraint");
        RutaRuleListConstraint constraint = (RutaRuleListConstraint) constraintData.getConstraint();
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.