Package org.eclipse.xtext.validation

Examples of org.eclipse.xtext.validation.FeatureBasedDiagnostic


      Iterable<Diagnostic> _allDiagnostics = _diagnose.getAllDiagnostics();
      Iterable<FeatureBasedDiagnostic> _filter = Iterables.<FeatureBasedDiagnostic>filter(_allDiagnostics, FeatureBasedDiagnostic.class);
      final List<FeatureBasedDiagnostic> diagnostics = IterableExtensions.<FeatureBasedDiagnostic>toList(_filter);
      int _size = diagnostics.size();
      Assert.assertEquals(1, _size);
      FeatureBasedDiagnostic _head = IterableExtensions.<FeatureBasedDiagnostic>head(diagnostics);
      String _issueCode = _head.getIssueCode();
      Assert.assertEquals(TargetPlatformValidator.CHECK__NO_DUPLICATED_IU, _issueCode);
      EList<Location> _locations = tpa.getLocations();
      Location _head_1 = IterableExtensions.<Location>head(_locations);
      EList<IU> _ius = _head_1.getIus();
      IU _head_2 = IterableExtensions.<IU>head(_ius);
      FeatureBasedDiagnostic _get = diagnostics.get(0);
      EObject _sourceEObject = _get.getSourceEObject();
      FeatureBasedDiagnostic _get_1 = diagnostics.get(0);
      EStructuralFeature _feature = _get_1.getFeature();
      Object _eGet = _sourceEObject.eGet(_feature);
      Object _get_2 = ((List<?>) _eGet).get(0);
      Assert.assertEquals(_head_2, _get_2);
      FeatureBasedDiagnostic _get_3 = diagnostics.get(0);
      int _severity = _get_3.getSeverity();
      Assert.assertEquals(Diagnostic.WARNING, _severity);
    } catch (Throwable _e) {
      throw Exceptions.sneakyThrow(_e);
    }
  }
View Full Code Here


      Iterable<Diagnostic> _allDiagnostics = _diagnose.getAllDiagnostics();
      Iterable<FeatureBasedDiagnostic> _filter = Iterables.<FeatureBasedDiagnostic>filter(_allDiagnostics, FeatureBasedDiagnostic.class);
      final List<FeatureBasedDiagnostic> diagnostics = IterableExtensions.<FeatureBasedDiagnostic>toList(_filter);
      int _size = diagnostics.size();
      Assert.assertEquals(1, _size);
      FeatureBasedDiagnostic _head = IterableExtensions.<FeatureBasedDiagnostic>head(diagnostics);
      String _issueCode = _head.getIssueCode();
      Assert.assertEquals(TargetPlatformValidator.CHECK__NO_DUPLICATED_IU, _issueCode);
      EList<Location> _locations = tpa.getLocations();
      Location _head_1 = IterableExtensions.<Location>head(_locations);
      EList<IU> _ius = _head_1.getIus();
      IU _head_2 = IterableExtensions.<IU>head(_ius);
      FeatureBasedDiagnostic _get = diagnostics.get(0);
      EObject _sourceEObject = _get.getSourceEObject();
      FeatureBasedDiagnostic _get_1 = diagnostics.get(0);
      EStructuralFeature _feature = _get_1.getFeature();
      Object _eGet = _sourceEObject.eGet(_feature);
      Object _get_2 = ((List<?>) _eGet).get(0);
      Assert.assertEquals(_head_2, _get_2);
      FeatureBasedDiagnostic _get_3 = diagnostics.get(0);
      int _severity = _get_3.getSeverity();
      Assert.assertEquals(Diagnostic.WARNING, _severity);
    } catch (Throwable _e) {
      throw Exceptions.sneakyThrow(_e);
    }
  }
View Full Code Here

      Iterable<FeatureBasedDiagnostic> _filter = Iterables.<FeatureBasedDiagnostic>filter(_allDiagnostics, FeatureBasedDiagnostic.class);
      final List<FeatureBasedDiagnostic> diagnostics = IterableExtensions.<FeatureBasedDiagnostic>toList(_filter);
      String _join = IterableExtensions.join(diagnostics, ", ");
      int _size = diagnostics.size();
      Assert.assertEquals(_join, 2, _size);
      FeatureBasedDiagnostic _get = diagnostics.get(0);
      EObject _sourceEObject = _get.getSourceEObject();
      FeatureBasedDiagnostic _get_1 = diagnostics.get(0);
      EStructuralFeature _feature = _get_1.getFeature();
      Object _eGet = _sourceEObject.eGet(_feature);
      FeatureBasedDiagnostic _get_2 = diagnostics.get(0);
      int _index = _get_2.getIndex();
      Object _get_3 = ((List<?>) _eGet).get(_index);
      Assert.assertEquals(Option.INCLUDE_SOURCE, _get_3);
      FeatureBasedDiagnostic _get_4 = diagnostics.get(1);
      EObject _sourceEObject_1 = _get_4.getSourceEObject();
      FeatureBasedDiagnostic _get_5 = diagnostics.get(1);
      EStructuralFeature _feature_1 = _get_5.getFeature();
      Object _eGet_1 = _sourceEObject_1.eGet(_feature_1);
      FeatureBasedDiagnostic _get_6 = diagnostics.get(1);
      int _index_1 = _get_6.getIndex();
      Object _get_7 = ((List<?>) _eGet_1).get(_index_1);
      Assert.assertEquals(Option.INCLUDE_SOURCE, _get_7);
    } catch (Throwable _e) {
      throw Exceptions.sneakyThrow(_e);
    }
View Full Code Here

TOP

Related Classes of org.eclipse.xtext.validation.FeatureBasedDiagnostic

Copyright © 2018 www.massapicom. 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.