Examples of ISemanticModification


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

    acceptor.accept(issue, "Remove quotes.", "Remove quotes.", null, _function);
  }
 
  @Fix(TargetPlatformValidator.CHECK__OPTIONS_EQUALS_ALL_LOCATIONS)
  public void equalizeOptions(final Issue issue, final IssueResolutionAcceptor acceptor) {
    final ISemanticModification _function = new ISemanticModification() {
      public void apply(final EObject element, final IModificationContext context) throws Exception {
        final Location location = ((Location) element);
        TargetPlatform _targetPlatform = location.getTargetPlatform();
        EList<Location> _locations = _targetPlatform.getLocations();
        final Procedure1<Location> _function = new Procedure1<Location>() {
View Full Code Here

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

      "Set all options equals to this one.", "Set all options equals to this one.", null, _function);
  }
 
  @Fix(TargetPlatformValidator.CHECK__OPTIONS_SELF_EXCLUDING_ALL_ENV_REQUIRED)
  public void removeRemoveRequirements(final Issue issue, final IssueResolutionAcceptor acceptor) {
    final ISemanticModification _function = new ISemanticModification() {
      public void apply(final EObject element, final IModificationContext context) throws Exception {
        if ((element instanceof TargetPlatform)) {
          EList<Option> _options = ((TargetPlatform) element).getOptions();
          _options.remove(Option.INCLUDE_REQUIRED);
        } else {
View Full Code Here

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

      "Remove \'with requirements\' option.", "Remove \'with requirements\' option.", null, _function);
  }
 
  @Fix(TargetPlatformValidator.CHECK__OPTIONS_SELF_EXCLUDING_ALL_ENV_REQUIRED)
  public void removeRemoveAllEnvironment(final Issue issue, final IssueResolutionAcceptor acceptor) {
    final ISemanticModification _function = new ISemanticModification() {
      public void apply(final EObject element, final IModificationContext context) throws Exception {
        if ((element instanceof TargetPlatform)) {
          EList<Option> _options = ((TargetPlatform) element).getOptions();
          _options.remove(Option.INCLUDE_ALL_ENVIRONMENTS);
        } else {
View Full Code Here

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

      "Remove \'with allEnvironments\' option.", "Remove \'with allEnvironments\' option.", null, _function);
  }
 
  @Fix(TargetPlatformValidator.DEPRECATE__OPTIONS_ON_LOCATIONS)
  public void moveOptionsToTargetLevel(final Issue issue, final IssueResolutionAcceptor acceptor) {
    final ISemanticModification _function = new ISemanticModification() {
      public void apply(final EObject element, final IModificationContext context) throws Exception {
        final Location location = ((Location) element);
        TargetPlatform _targetPlatform = location.getTargetPlatform();
        EList<Option> _options = _targetPlatform.getOptions();
        _options.clear();
View Full Code Here

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

      "Move options to the target level and remove all location specific options.", null, _function);
  }
 
  @Fix(TargetPlatformValidator.CHECK__NO_OPTIONS_ON_LOCATIONS_IF_GLOBAL_OPTIONS)
  public void removeAllLocationSpecificOptions(final Issue issue, final IssueResolutionAcceptor acceptor) {
    final ISemanticModification _function = new ISemanticModification() {
      public void apply(final EObject element, final IModificationContext context) throws Exception {
        final Location location = ((Location) element);
        TargetPlatform _targetPlatform = location.getTargetPlatform();
        EList<Location> _locations = _targetPlatform.getLocations();
        final Procedure1<Location> _function = new Procedure1<Location>() {
View Full Code Here

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

      "Remove all location specific options.", null, _function);
  }
 
  @Fix(TargetPlatformValidator.CHECK__LOCATION_CONFLICTUAL_ID)
  public void setOtherLocationWithSameURIToTheSameID(final Issue issue, final IssueResolutionAcceptor acceptor) {
    final ISemanticModification _function = new ISemanticModification() {
      public void apply(final EObject element, final IModificationContext context) throws Exception {
        final String id = ((Location) element).getID();
        final String uri = ((Location) element).getUri();
        boolean _notEquals = (!Objects.equal(uri, null));
        if (_notEquals) {
View Full Code Here

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

      "Set other locations with the same URI to the same ID.", null, _function);
  }
 
  @Fix(TargetPlatformValidator.CHECK__INCLUDED_LOCATION_CONFLICTUAL_ID)
  public void setIDSameValueAsIncludedLocation(final Issue issue, final IssueResolutionAcceptor acceptor) {
    final ISemanticModification _function = new ISemanticModification() {
      public void apply(final EObject element, final IModificationContext context) throws Exception {
        String[] _data = issue.getData();
        final String id = _data[0];
        String[] _data_1 = issue.getData();
        final String uri = _data_1[1];
View Full Code Here

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

  @Inject private NameResolver nameResolver;
  @Inject private INodes nodes;

  @Fix(SYNTAX_IS_NOT_PROTO2_ERROR)
  public void changeSyntaxToProto2(Issue issue, IssueResolutionAcceptor acceptor) {
    ISemanticModification modification = new ISemanticModification() {
      @Override public void apply(EObject element, IModificationContext context) throws Exception {
        Syntax syntax = (Syntax) element;
        syntax.setName(proto2());
      }
    };
View Full Code Here

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

    acceptor.accept(issue, label, description, ICON_FOR_CHANGE, modification);
  }

  @Fix(INVALID_FIELD_TAG_NUMBER_ERROR)
  public void regenerateTagNumber(Issue issue, IssueResolutionAcceptor acceptor) {
    ISemanticModification modification = new ISemanticModification() {
      @Override public void apply(EObject element, IModificationContext context) throws Exception {
        IndexedElement e = (IndexedElement) element;
        long tagNumber = indexedElements.calculateNewIndexFor(e);
        indexedElements.setIndexTo(e, tagNumber);
      }
View Full Code Here

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

  public void removeDuplicatePackage(Issue issue, IssueResolutionAcceptor acceptor) {
    final Package aPackage = element(issue, Package.class);
    if (aPackage == null) {
      return;
    }
    ISemanticModification modification = new ISemanticModification() {
      @Override public void apply(EObject element, IModificationContext context) throws Exception {
        if (element == aPackage) {
          remove(aPackage);
        }
      }
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.