Examples of apply()


Examples of org.eclipse.e4.xwt.core.Style.apply()

  public void setValue(Object target, Object value) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException, SecurityException, NoSuchFieldException {
    if (!(value instanceof Style)) {
      throw new XWTException("Style is expected.");
    }
    Style style = (Style) value;
    style.apply(target);
  }
}
View Full Code Here

Examples of org.eclipse.emf.ecore.change.ChangeDescription.apply()

            Object o2 = eFeature.eGet(eAttribute);
            System.out.println("2: " + o2);
            eFeature.eSet(eAttribute, v);
            ChangeDescription c = r.endRecording();
            c.applyAndReverse();
            c.apply();
        } catch (Exception e) {
            LOGGER.log(Level.SEVERE, e.getMessage(), e);
            fail(e);
        }
       
View Full Code Here

Examples of org.eclipse.emf.ecore.change.FeatureChange.apply()

      return dataObject;
    EObject oldDataObject = EcoreUtil.copy((EObject)dataObject);
    for (Iterator fIter = changes.iterator(); fIter.hasNext(); )
    {
      FeatureChange featureChange = (FeatureChange)fIter.next();
      featureChange.apply(oldDataObject);
      EStructuralFeature feature = featureChange.getFeature();
      if (FeatureMapUtil.isFeatureMap(feature))
      {
        FeatureMap featureMap = (FeatureMap) oldDataObject.eGet(feature);
        for (int index = featureMap.size(); index != 0;)
View Full Code Here

Examples of org.eclipse.emf.ecore.sdo.EChangeSummary.apply()

        EDataGraph dataGraph = (EDataGraph) graph.getDataGraph();
        EChangeSummary changeSummary = (EChangeSummary) dataGraph
                .getChangeSummary();
        changeSummary.endLogging();
        // throw away any local changes
        changeSummary.apply();

        Resource res = changeSummary.eResource();
        res.unload();

        // apply changes from the event
View Full Code Here

Examples of org.eclipse.jface.text.contentassist.CompletionProposal.apply()

    fUpdateLengthOnValidate = updateReplacementLengthOnValidate;
  }

  public void apply(IDocument document) {
    CompletionProposal proposal = new CompletionProposal(getReplacementString(), getReplacementOffset(), getReplacementLength(), getCursorPosition(), getImage(), getDisplayString(), getContextInformation(), getAdditionalProposalInfo());
    proposal.apply(document);
  }

  /*
   * (non-Javadoc)
   *
 
View Full Code Here

Examples of org.eclipse.jface.text.contentassist.ICompletionProposal.apply()

        IContentProposal[] proposals = new IContentProposal[oldProposals.length];
        for ( int i = 0; i < oldProposals.length; i++ )
        {
            final ICompletionProposal oldProposal = oldProposals[i];
            final Document document = new Document( contents );
            oldProposal.apply( document );

            proposals[i] = new IContentProposal()
            {
                public String getContent()
                {
View Full Code Here

Examples of org.eclipse.jface.text.contentassist.ICompletionProposalExtension.apply()

      if (p instanceof ICompletionProposalExtension2) {
        ICompletionProposalExtension2 e= (ICompletionProposalExtension2) p;
        e.apply(fViewer, trigger, stateMask, offset);
      } else if (p instanceof ICompletionProposalExtension) {
        ICompletionProposalExtension e= (ICompletionProposalExtension) p;
        e.apply(document, trigger, offset);
      } else {
        p.apply(document);
      }

      Point selection= p.getSelection(document);
View Full Code Here

Examples of org.eclipse.jface.text.contentassist.ICompletionProposalExtension2.apply()

        registry.register(fModificationEditingSupport);
      }

      if (p instanceof ICompletionProposalExtension2) {
        ICompletionProposalExtension2 e= (ICompletionProposalExtension2) p;
        e.apply(fViewer, trigger, stateMask, offset);
      } else if (p instanceof ICompletionProposalExtension) {
        ICompletionProposalExtension e= (ICompletionProposalExtension) p;
        e.apply(document, trigger, offset);
      } else {
        p.apply(document);
View Full Code Here

Examples of org.eclipse.jface.text.templates.TemplateProposal.apply()

        Region region = new Region(0, 0);
        PyDocumentTemplateContext context = PyTemplateCompletionProcessor.createContext(new PyContextType(),
                pyEdit.getPySourceViewer(), region);

        TemplateProposal templateProposal = new TemplateProposal(template, context, region, null);
        templateProposal.apply(pyEdit.getPySourceViewer(), '\n', 0, 0);
    }

}
View Full Code Here

Examples of org.eclipse.jgit.api.Git.apply()

  private boolean applyPatch(HttpServletRequest request, HttpServletResponse response, Repository db, String contentType) throws ServletException {
    try {
      String patch = readPatch(request.getInputStream(), contentType);
      Git git = new Git(db);
      ApplyCommand applyCommand = git.apply();
      applyCommand.setPatch(IOUtilities.toInputStream(patch));
      // TODO: ignore all errors for now, see bug 366008
      try {
        ApplyResult applyResult = applyCommand.call();
        JSONObject resp = new JSONObject();
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.