Examples of ISemanticModification


Examples of org.eclipse.xtext.ui.editor.model.edit.ISemanticModification

    return link;
  }

  private void changeValue(final FieldOption option, final Value newValue, Object proposedValue, Issue issue,
      IssueResolutionAcceptor acceptor) {
    ISemanticModification modification = new ISemanticModification() {
      @Override public void apply(EObject element, IModificationContext context) throws Exception {
        option.setValue(newValue);
      }
    };
    String name = nameResolver.nameOf(option);
View Full Code Here

Examples of org.eclipse.xtext.ui.editor.model.edit.ISemanticModification

    if(issue.getData().length>0){
      final String linkText = issue.getData()[0];
      if (prefixes.isKnownPrefix(linkText)){
        final List<String> uris=prefixes.getUris(linkText);
        for (final String uri : uris) {
          acceptor.accept(issue, "add prefix "+linkText, "adds prefix "+linkText+"with namespace URI\n"+uri, null, new ISemanticModification() {
           
            public void apply(EObject element, IModificationContext context)
                throws Exception {
              DirectiveBlock block = (DirectiveBlock)EcoreUtil2.getRootContainer(element);
              PrefixId id = XturtleFactory.eINSTANCE.createPrefixId();
View Full Code Here

Examples of org.eclipse.xtext.ui.editor.model.edit.ISemanticModification

        if(project.exists()){
          acceptor.accept(issue,
              "add project reference to "+projectName,
              "adds project reference to projectName,\nmaking the subjects defined there referrable",
              null,
              new ISemanticModification() {
           
            public void apply(EObject element, IModificationContext context)
                throws Exception {
              IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
              IProject from = root.getProject(element.eResource().getURI().segment(1));
View Full Code Here

Examples of org.eclipse.xtext.ui.editor.model.edit.ISemanticModification

  @Fix(IPPDiagnostics.ISSUE__ENSURE_NOT_FIRST)
  public void ensureNotFirst(final Issue issue, final IssueResolutionAcceptor acceptor) {

    acceptor.accept(
      issue, "Move ensure first.", "Moves the ensure first among the set attributes", null,
      new ISemanticModification() {

        @Override
        public void apply(EObject element, IModificationContext context) throws Exception {
          AttributeOperations aos = (AttributeOperations) element.eContainer();
          aos.getAttributes().move(0, (AttributeOperation) element);
View Full Code Here

Examples of org.eclipse.xtext.ui.editor.model.edit.ISemanticModification

      acceptor.accept(
        issue, // issue reference, includes issue data
        "Add all missing fields", // label text
        "Add all missing fields", // description text
        null, // quick fix icon
        new ISemanticModification() {
          public void apply(EObject element, IModificationContext context) {
            ContainerType parentContainer = (ContainerType)element;
            List<String> fieldsToBeAdded = Arrays.asList(issue.getData());
            deepCloneUtils.addFields(parentContainer, fieldsToBeAdded);
          }
View Full Code Here

Examples of org.eclipse.xtext.ui.editor.model.edit.ISemanticModification

      acceptor.accept(
        issue, // issue reference, includes issue data
        "Remove all surplus fields", // label text
        "Remove all surplus fields", // description text
        null, // quick fix icon
        new ISemanticModification() {
          public void apply(EObject element, IModificationContext context) {
            ContainerType parentContainer = (ContainerType)element.eContainer();
            List<String> fieldsToBeRemoved = Arrays.asList(issue.getData());
            deepCloneUtils.removeFields(parentContainer, fieldsToBeRemoved);
          }
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.