Examples of apply()


Examples of org.eclipse.orion.server.cf.manifest.v2.utils.ManifestTransformator.apply()

    InputStream inputStream = new FileInputStream(manifestFile);
    ManifestParseTree manifest = parse(inputStream);

    ManifestTransformator transformator = new ManifestTransformator();
    transformator.apply(manifest);

    ManifestParseTree applications = manifest.get("applications"); //$NON-NLS-1$
    for (ManifestParseTree application : applications.getChildren())
      assertTrue(application.get("propertyA").getValue().equals("valueA") && application.get("propertyB").getValue().equals("valueB")); //$NON-NLS-1$ //$NON-NLS-2$//$NON-NLS-3$//$NON-NLS-4$
View Full Code Here

Examples of org.eclipse.orion.server.cf.manifest.v2.utils.SymbolResolver.apply()

    File manifestFile = new File(FileLocator.toFileURL(entry).getPath().concat(manifestName));

    InputStream inputStream = new FileInputStream(manifestFile);
    ManifestParseTree manifest = parse(inputStream);
    SymbolResolver resolver = new SymbolResolver("api.sauron.mordor.com"); //$NON-NLS-1$
    resolver.apply(manifest);

    assertEquals("api.sauron.mordor.com", manifest.get("applications").get(0).get("domain").getValue()); //$NON-NLS-1$ //$NON-NLS-2$//$NON-NLS-3$
    assertTrue(manifest.get("applications").get(0).get("url").getValue().endsWith(".api.sauron.mordor.com")); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
  }
View Full Code Here

Examples of org.eclipse.pde.core.project.IBundleProjectDescription.apply()

        IPackageImportDescription importDesc = bpService.newPackageImport("javafx.scene", null, false);
       
        BundleHelper.addRequiredBundleDescriptions(bundleDesc, requireDesc);
        BundleHelper.addPackageImportDescriptions(bundleDesc, importDesc);
       
        bundleDesc.apply(new NullProgressMonitor());
        return super.performFinish();
      } else {
        // TODO Show error that project is not a plugin
        return false;
      }
View Full Code Here

Examples of org.eclipse.text.edits.DeleteEdit.apply()

  protected UndoEdit  DeleteText(IDocument doc2Alter, int offset, int length)
  {
    DeleteEdit charRemoval = new DeleteEdit(offset, length);
    UndoEdit removal = null;
    try {
      removal = charRemoval.apply(doc2Alter);
    } catch (BadLocationException e) {
      // Doing nowt right now. The Java editor doesn't, so should we?
    }
    return removal;
  }
View Full Code Here

Examples of org.eclipse.text.edits.InsertEdit.apply()

   
    int insertPosition = getInsertPosition(doc, isXml);
    String insertText = createImportDeclaration(doc, isXml);
    InsertEdit insert = new InsertEdit(insertPosition, insertText);
    try {
      insert.apply(doc);
    }
    catch (MalformedTreeException e) {
      Logger.logException(e);
    }
    catch (BadLocationException e) {
View Full Code Here

Examples of org.eclipse.text.edits.MultiTextEdit.apply()

        // in the document before the first TextEdit, not after each
        // child TextEdit. Therefore, do not need to advance the
        // index.
        // index += nameAndDefaultValue.length();
      }
      multiTextEdit.apply(viewer.getDocument());
    }
    catch (BadLocationException e) {
      // log, for now, unless we find there's reasons why we get some
      // here.
      Logger.log(Logger.INFO, e.getMessage());
View Full Code Here

Examples of org.eclipse.text.edits.TextEdit.apply()

        markers[i]= new RangeMarker(this.positions[i], 0);
        insert(edits, markers[i]);
      }
    }
    try {
      edits.apply(document, TextEdit.UPDATE_REGIONS);
      if (this.positions != null) {
        for (int i= 0, max = markers.length; i < max; i++) {
          this.positions[i]= markers[i].getOffset();
        }
      }
View Full Code Here

Examples of org.eclipse.text.edits.UndoEdit.apply()

    // undo the java edit
    // (so the underlying Java document still represents what's in the
    // editor)
    if (undo != null) {
      try {
        undo.apply(getJavaDocument());
      }
      catch (MalformedTreeException e) {
        Logger.logException(e);
      }
      catch (BadLocationException e) {
View Full Code Here

Examples of org.eclipse.uml2.Property.apply()

                if (stereotype == null)
                {
                    throw new MetafacadeException("Could not apply '" + UMLProfile.STEREOTYPE_IDENTIFIER + "' to " +
                        property + ", the stereotype could not be found");
                }
                property.apply(stereotype);
            }
        }
    }

    /**
 
View Full Code Here

Examples of org.eclipse.wb.internal.core.model.clipboard.JavaInfoMemento.apply()

          @Override
          public void execute(JavaInfo javaInfo) throws Exception {
            LayoutContainerInfo composite = (LayoutContainerInfo) javaInfo;
            LayoutInfo newLayout = (LayoutInfo) layoutMemento.create(javaInfo);
            composite.setLayout(newLayout);
            layoutMemento.apply();
          }
        });
      }
    }
  }
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.