Examples of IMemento


Examples of org.eclipse.ui.IMemento

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

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

  }
View Full Code Here

Examples of org.eclipse.ui.IMemento

        }
        return list;
    }

    public IMemento createChild( String type, String id ) {
        IMemento found = findChild(type, id);
        if (found == null) {
            found = createChild(type);
            found.putString(TAG_ID, id);
        }
        return found;
    }
View Full Code Here

Examples of org.eclipse.ui.IMemento

        return found;
    }

    public IMemento findChild( String type, String id ) {
        IMemento[] children = getChildren(type);
        IMemento found = null;
        for( IMemento memento : children ) {
            if( id==null){
                if(memento.getID()==null){
                    found = memento;
                    break;
View Full Code Here

Examples of org.eclipse.ui.IMemento

            boolean isValid = true;
            //check the required keys
            IConfigurationElement[] requiredKeys = element.getChildren(ATT_REQKEY);
            for (IConfigurationElement key : requiredKeys) {
                String expectedKey = key.getAttribute(ATT_KEY);
                IMemento value = fixerMemento.getChild(expectedKey);
                String value2 = fixerMemento.getString(expectedKey);
                Integer value3 = fixerMemento.getInteger(expectedKey);
                if (value == null && value2 == null && value3 == null) { //failure!
                    isValid = false;
                    break;
View Full Code Here

Examples of org.eclipse.ui.IMemento

                Browser browser = (Browser)control;
                if(!browser.isDisposed()) {
                    CTabItem item = this.tabMap.get(browser);
                    String listener = this.listenerMap.get(browser);
                    if(item != null && !item.isDisposed() ) {
                        IMemento child = memento.createChild(BROWSER_TYPE);
                        child.putString(BROWSER_NAME, item.getText());
                        child.putString(BROWSER_URL, browser.getUrl());
                        child.putString(BROWSER_LISTENER, listener);
                    }
                }
            }
        }
    }
View Full Code Here

Examples of org.eclipse.ui.IMemento

    private void assertMementoEquals( UdigMemento memento, UdigMemento readIn, boolean textValNotNull ) {
        assertEquals(2, readIn.getChildren(TYPE).length);
        assertEquals(1, readIn.getChildren(null).length);
        assertEquals(0, readIn.getChildren("boog").length);
       
        IMemento childNoId = readIn.findChild(TYPE, null);
        IMemento childID = readIn.findChild(TYPE, ID1);
        IMemento childNullType = readIn.findChild(null,null);
       
        assertNotNull(childNoId);
        assertNotNull(childID);
        assertNotNull(childNullType);
View Full Code Here

Examples of org.eclipse.ui.IMemento

   */
  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());
        child.putString(PRIORITY, issue.getPriority().name());
        child.putString(RESOLUTION, issue.getResolution().name());

        // persist bounds
        ReferencedEnvelope bounds = issue.getBounds();
        child.putString(MIN_X, Double.toString(bounds.getMinX()));
        child.putString(MAX_X, Double.toString(bounds.getMaxX()));
        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$
      }
    }
    FileWriter fileWriter = new FileWriter(getLocalIssuesFile());
View Full Code Here

Examples of org.eclipse.ui.IMemento

          IIssue issue = IssuesListUtil.createIssue(issueMemento
              .getString(EXTENSION_ID));
          if (issue == null) {
            continue;
          }
          IMemento dataMemento = issueMemento
              .getChild(MEMENTO_ISSUE_DATA);
          IMemento viewMemento = issueMemento
              .getChild(MEMENTO_VIEW_DATA);
          String issueId = issueMemento.getID();
          String groupId = issueMemento.getString(GROUP_ID);

          double minX = Double.parseDouble(issueMemento
View Full Code Here

Examples of org.eclipse.ui.IMemento

                StructuredSelection structuredSelection = (StructuredSelection) paletteTable.getSelection();
                BrewerPalette pal = (BrewerPalette) structuredSelection.getFirstElement();
                if (pal == null) {
                    // get it from the last memento used
                    StyleBlackboard bb = getSelectedLayer().getStyleBlackboard();
                    IMemento memento = (IMemento) bb.get(DialogSettingsStyleContent.EXTENSION_ID);
                    String paletteName = memento.getString(PALETTE_KEY);
                    pal = getBrewer().getPalette(paletteName);
                }
                String paletteName = pal.getName();
                Combo combo = getCombo(COMBO_CLASSES);
                int numClasses = new Integer(combo.getText()).intValue();
View Full Code Here

Examples of org.eclipse.ui.IMemento

        return ovrIcon.createImage();
    }

    public void gotFocus() {
        StyleBlackboard bb = getSelectedLayer().getStyleBlackboard();
        IMemento memento = (IMemento) bb
                .get(DialogSettingsStyleContent.EXTENSION_ID);
        if (memento != null) {
            setComboSelectionInt(memento, COMBO_OPACITY, OPACITY_KEY);
            setComboSelectionString(memento, COMBO_ATTRIBUTES, ATTRIBUTE_KEY);
            setComboSelectionInt(memento, COMBO_CLASSES, CLASSES_KEY);
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.