Package org.eclipse.emf.ecore

Examples of org.eclipse.emf.ecore.EObject


      final List<AbstractValidationDiagnostic> diagnotics = IterableExtensions.<AbstractValidationDiagnostic>toList(_filter);
      int _size = diagnotics.size();
      Assert.assertEquals(2, _size);
      final Function1<AbstractValidationDiagnostic, Boolean> _function = new Function1<AbstractValidationDiagnostic, Boolean>() {
        public Boolean apply(final AbstractValidationDiagnostic it) {
          EObject _sourceEObject = it.getSourceEObject();
          return Boolean.valueOf((_sourceEObject instanceof Location));
        }
      };
      boolean _forall = IterableExtensions.<AbstractValidationDiagnostic>forall(diagnotics, _function);
      Assert.assertTrue(_forall);
      final Procedure1<AbstractValidationDiagnostic> _function_1 = new Procedure1<AbstractValidationDiagnostic>() {
        public void apply(final AbstractValidationDiagnostic it) {
          String _issueCode = it.getIssueCode();
          Assert.assertEquals(TargetPlatformValidator.CHECK__LOCATION_ID_UNIQNESS, _issueCode);
        }
      };
      IterableExtensions.<AbstractValidationDiagnostic>forEach(diagnotics, _function_1);
      AbstractValidationDiagnostic _get = diagnotics.get(0);
      EObject _sourceEObject = _get.getSourceEObject();
      String _uri = ((Location) _sourceEObject).getUri();
      Assert.assertEquals("mylocationURI2", _uri);
      AbstractValidationDiagnostic _get_1 = diagnotics.get(1);
      EObject _sourceEObject_1 = _get_1.getSourceEObject();
      String _uri_1 = ((Location) _sourceEObject_1).getUri();
      Assert.assertEquals("mylocationURI", _uri_1);
    } catch (Throwable _e) {
      throw Exceptions.sneakyThrow(_e);
    }
View Full Code Here


      Iterable<AbstractValidationDiagnostic> _filter = Iterables.<AbstractValidationDiagnostic>filter(_allDiagnostics, AbstractValidationDiagnostic.class);
      List<AbstractValidationDiagnostic> diagnotics = IterableExtensions.<AbstractValidationDiagnostic>toList(_filter);
      int _size = diagnotics.size();
      Assert.assertEquals(2, _size);
      AbstractValidationDiagnostic _get = diagnotics.get(0);
      EObject _sourceEObject = _get.getSourceEObject();
      Assert.assertTrue((_sourceEObject instanceof Location));
      AbstractValidationDiagnostic _get_1 = diagnotics.get(0);
      String _issueCode = _get_1.getIssueCode();
      Assert.assertEquals(TargetPlatformValidator.CHECK__LOCATION_ID_UNIQNESS, _issueCode);
      AbstractValidationDiagnostic _get_2 = diagnotics.get(0);
      EObject _sourceEObject_1 = _get_2.getSourceEObject();
      String _uri = ((Location) _sourceEObject_1).getUri();
      Assert.assertEquals("locationURI1", _uri);
      AbstractValidationDiagnostic _get_3 = diagnotics.get(1);
      EObject _sourceEObject_2 = _get_3.getSourceEObject();
      Assert.assertTrue((_sourceEObject_2 instanceof IncludeDeclaration));
      AbstractValidationDiagnostic _get_4 = diagnotics.get(1);
      String _issueCode_1 = _get_4.getIssueCode();
      Assert.assertEquals(TargetPlatformValidator.CHECK__LOCATION_ID_UNIQNESS, _issueCode_1);
      AbstractValidationDiagnostic _get_5 = diagnotics.get(1);
      EObject _sourceEObject_3 = _get_5.getSourceEObject();
      String _importURI = ((IncludeDeclaration) _sourceEObject_3).getImportURI();
      Assert.assertEquals("b.tpd", _importURI);
      Resource _eResource_1 = tpb.eResource();
      EList<Resource.Diagnostic> _errors_1 = _eResource_1.getErrors();
      boolean _isEmpty_1 = _errors_1.isEmpty();
View Full Code Here

      Iterable<Diagnostic> _allDiagnostics = _diagnose.getAllDiagnostics();
      Iterable<AbstractValidationDiagnostic> _filter = Iterables.<AbstractValidationDiagnostic>filter(_allDiagnostics, AbstractValidationDiagnostic.class);
      final List<AbstractValidationDiagnostic> diagnotics = IterableExtensions.<AbstractValidationDiagnostic>toList(_filter);
      final Function1<AbstractValidationDiagnostic, Boolean> _function = new Function1<AbstractValidationDiagnostic, Boolean>() {
        public Boolean apply(final AbstractValidationDiagnostic it) {
          EObject _sourceEObject = it.getSourceEObject();
          return Boolean.valueOf((_sourceEObject instanceof Location));
        }
      };
      boolean _forall = IterableExtensions.<AbstractValidationDiagnostic>forall(diagnotics, _function);
      Assert.assertTrue(_forall);
      final Procedure1<AbstractValidationDiagnostic> _function_1 = new Procedure1<AbstractValidationDiagnostic>() {
        public void apply(final AbstractValidationDiagnostic it) {
          String _issueCode = it.getIssueCode();
          Assert.assertEquals(TargetPlatformValidator.CHECK__NO_OPTIONS_ON_LOCATIONS_IF_GLOBAL_OPTIONS, _issueCode);
        }
      };
      IterableExtensions.<AbstractValidationDiagnostic>forEach(diagnotics, _function_1);
      AbstractValidationDiagnostic _get = diagnotics.get(0);
      EObject _sourceEObject = _get.getSourceEObject();
      String _uri = ((Location) _sourceEObject).getUri();
      Assert.assertEquals("mylocationURI1", _uri);
    } catch (Throwable _e) {
      throw Exceptions.sneakyThrow(_e);
    }
View Full Code Here

      Iterable<Diagnostic> _allDiagnostics = _diagnose.getAllDiagnostics();
      Iterable<AbstractValidationDiagnostic> _filter = Iterables.<AbstractValidationDiagnostic>filter(_allDiagnostics, AbstractValidationDiagnostic.class);
      final List<AbstractValidationDiagnostic> diagnotics = IterableExtensions.<AbstractValidationDiagnostic>toList(_filter);
      final Function1<AbstractValidationDiagnostic, Boolean> _function = new Function1<AbstractValidationDiagnostic, Boolean>() {
        public Boolean apply(final AbstractValidationDiagnostic it) {
          EObject _sourceEObject = it.getSourceEObject();
          return Boolean.valueOf((_sourceEObject instanceof Location));
        }
      };
      boolean _forall = IterableExtensions.<AbstractValidationDiagnostic>forall(diagnotics, _function);
      Assert.assertTrue(_forall);
      final Procedure1<AbstractValidationDiagnostic> _function_1 = new Procedure1<AbstractValidationDiagnostic>() {
        public void apply(final AbstractValidationDiagnostic it) {
          String _issueCode = it.getIssueCode();
          Assert.assertEquals(TargetPlatformValidator.CHECK__NO_OPTIONS_ON_LOCATIONS_IF_GLOBAL_OPTIONS, _issueCode);
        }
      };
      IterableExtensions.<AbstractValidationDiagnostic>forEach(diagnotics, _function_1);
      AbstractValidationDiagnostic _head_1 = IterableExtensions.<AbstractValidationDiagnostic>head(diagnotics);
      EObject _sourceEObject = _head_1.getSourceEObject();
      String _uri = ((Location) _sourceEObject).getUri();
      Assert.assertEquals("mylocationURI1", _uri);
    } catch (Throwable _e) {
      throw Exceptions.sneakyThrow(_e);
    }
View Full Code Here

      final List<AbstractValidationDiagnostic> diagnotics = IterableExtensions.<AbstractValidationDiagnostic>toList(_filter);
      int _size = diagnotics.size();
      Assert.assertEquals(2, _size);
      final Function1<AbstractValidationDiagnostic, Boolean> _function = new Function1<AbstractValidationDiagnostic, Boolean>() {
        public Boolean apply(final AbstractValidationDiagnostic it) {
          EObject _sourceEObject = it.getSourceEObject();
          return Boolean.valueOf((_sourceEObject instanceof Location));
        }
      };
      boolean _forall = IterableExtensions.<AbstractValidationDiagnostic>forall(diagnotics, _function);
      Assert.assertTrue(_forall);
      final Procedure1<AbstractValidationDiagnostic> _function_1 = new Procedure1<AbstractValidationDiagnostic>() {
        public void apply(final AbstractValidationDiagnostic it) {
          String _issueCode = it.getIssueCode();
          Assert.assertEquals(TargetPlatformValidator.CHECK__OPTIONS_EQUALS_ALL_LOCATIONS, _issueCode);
        }
      };
      IterableExtensions.<AbstractValidationDiagnostic>forEach(diagnotics, _function_1);
      AbstractValidationDiagnostic _get = diagnotics.get(0);
      EObject _sourceEObject = _get.getSourceEObject();
      String _uri = ((Location) _sourceEObject).getUri();
      Assert.assertEquals("mylocationURI1", _uri);
      AbstractValidationDiagnostic _get_1 = diagnotics.get(1);
      EObject _sourceEObject_1 = _get_1.getSourceEObject();
      String _uri_1 = ((Location) _sourceEObject_1).getUri();
      Assert.assertEquals("mylocationURI2", _uri_1);
    } catch (Throwable _e) {
      throw Exceptions.sneakyThrow(_e);
    }
View Full Code Here

      final List<AbstractValidationDiagnostic> diagnotics = IterableExtensions.<AbstractValidationDiagnostic>toList(_filter);
      int _size = diagnotics.size();
      Assert.assertEquals(1, _size);
      final Function1<AbstractValidationDiagnostic, Boolean> _function = new Function1<AbstractValidationDiagnostic, Boolean>() {
        public Boolean apply(final AbstractValidationDiagnostic it) {
          EObject _sourceEObject = it.getSourceEObject();
          return Boolean.valueOf((_sourceEObject instanceof Location));
        }
      };
      boolean _forall = IterableExtensions.<AbstractValidationDiagnostic>forall(diagnotics, _function);
      Assert.assertTrue(_forall);
      final Procedure1<AbstractValidationDiagnostic> _function_1 = new Procedure1<AbstractValidationDiagnostic>() {
        public void apply(final AbstractValidationDiagnostic it) {
          String _issueCode = it.getIssueCode();
          Assert.assertEquals(TargetPlatformValidator.DEPRECATE__OPTIONS_ON_LOCATIONS, _issueCode);
        }
      };
      IterableExtensions.<AbstractValidationDiagnostic>forEach(diagnotics, _function_1);
      AbstractValidationDiagnostic _get = diagnotics.get(0);
      EObject _sourceEObject = _get.getSourceEObject();
      String _uri = ((Location) _sourceEObject).getUri();
      Assert.assertEquals("mylocationURI1", _uri);
    } catch (Throwable _e) {
      throw Exceptions.sneakyThrow(_e);
    }
View Full Code Here

      final List<AbstractValidationDiagnostic> diagnotics = IterableExtensions.<AbstractValidationDiagnostic>toList(_filter);
      int _size = diagnotics.size();
      Assert.assertEquals(1, _size);
      final Function1<AbstractValidationDiagnostic, Boolean> _function = new Function1<AbstractValidationDiagnostic, Boolean>() {
        public Boolean apply(final AbstractValidationDiagnostic it) {
          EObject _sourceEObject = it.getSourceEObject();
          return Boolean.valueOf((_sourceEObject instanceof Location));
        }
      };
      boolean _forall = IterableExtensions.<AbstractValidationDiagnostic>forall(diagnotics, _function);
      Assert.assertTrue(_forall);
      final Procedure1<AbstractValidationDiagnostic> _function_1 = new Procedure1<AbstractValidationDiagnostic>() {
        public void apply(final AbstractValidationDiagnostic it) {
          String _issueCode = it.getIssueCode();
          Assert.assertEquals(TargetPlatformValidator.DEPRECATE__OPTIONS_ON_LOCATIONS, _issueCode);
        }
      };
      IterableExtensions.<AbstractValidationDiagnostic>forEach(diagnotics, _function_1);
      AbstractValidationDiagnostic _get = diagnotics.get(0);
      EObject _sourceEObject = _get.getSourceEObject();
      String _uri = ((Location) _sourceEObject).getUri();
      Assert.assertEquals("mylocationURI1", _uri);
    } catch (Throwable _e) {
      throw Exceptions.sneakyThrow(_e);
    }
View Full Code Here

      final List<AbstractValidationDiagnostic> diagnotics = IterableExtensions.<AbstractValidationDiagnostic>toList(_filter);
      int _size = diagnotics.size();
      Assert.assertEquals(1, _size);
      final Function1<AbstractValidationDiagnostic, Boolean> _function = new Function1<AbstractValidationDiagnostic, Boolean>() {
        public Boolean apply(final AbstractValidationDiagnostic it) {
          EObject _sourceEObject = it.getSourceEObject();
          return Boolean.valueOf((_sourceEObject instanceof IU));
        }
      };
      boolean _forall = IterableExtensions.<AbstractValidationDiagnostic>forall(diagnotics, _function);
      Assert.assertTrue(_forall);
      final Procedure1<AbstractValidationDiagnostic> _function_1 = new Procedure1<AbstractValidationDiagnostic>() {
        public void apply(final AbstractValidationDiagnostic it) {
          String _issueCode = it.getIssueCode();
          Assert.assertEquals(TargetPlatformValidator.DEPRECATE__STRINGS_ON_IU_VERSION, _issueCode);
        }
      };
      IterableExtensions.<AbstractValidationDiagnostic>forEach(diagnotics, _function_1);
      AbstractValidationDiagnostic _get = diagnotics.get(0);
      EObject _sourceEObject = _get.getSourceEObject();
      String _iD = ((IU) _sourceEObject).getID();
      Assert.assertEquals("my.iu", _iD);
    } catch (Throwable _e) {
      throw Exceptions.sneakyThrow(_e);
    }
View Full Code Here

      final List<AbstractValidationDiagnostic> diagnotics = IterableExtensions.<AbstractValidationDiagnostic>toList(_filter);
      int _size = diagnotics.size();
      Assert.assertEquals(2, _size);
      final Function1<AbstractValidationDiagnostic, Boolean> _function = new Function1<AbstractValidationDiagnostic, Boolean>() {
        public Boolean apply(final AbstractValidationDiagnostic it) {
          EObject _sourceEObject = it.getSourceEObject();
          return Boolean.valueOf((_sourceEObject instanceof Location));
        }
      };
      boolean _forall = IterableExtensions.<AbstractValidationDiagnostic>forall(diagnotics, _function);
      Assert.assertTrue(_forall);
      final Procedure1<AbstractValidationDiagnostic> _function_1 = new Procedure1<AbstractValidationDiagnostic>() {
        public void apply(final AbstractValidationDiagnostic it) {
          String _issueCode = it.getIssueCode();
          Assert.assertEquals(TargetPlatformValidator.CHECK__LOCATION_CONFLICTUAL_ID, _issueCode);
          EObject _sourceEObject = it.getSourceEObject();
          String _uri = ((Location) _sourceEObject).getUri();
          Assert.assertEquals("mylocationURI1", _uri);
        }
      };
      IterableExtensions.<AbstractValidationDiagnostic>forEach(diagnotics, _function_1);
View Full Code Here

      final List<AbstractValidationDiagnostic> diagnotics = IterableExtensions.<AbstractValidationDiagnostic>toList(_filter);
      int _size = diagnotics.size();
      Assert.assertEquals(2, _size);
      final Function1<AbstractValidationDiagnostic, Boolean> _function = new Function1<AbstractValidationDiagnostic, Boolean>() {
        public Boolean apply(final AbstractValidationDiagnostic it) {
          EObject _sourceEObject = it.getSourceEObject();
          return Boolean.valueOf((_sourceEObject instanceof Location));
        }
      };
      boolean _forall = IterableExtensions.<AbstractValidationDiagnostic>forall(diagnotics, _function);
      Assert.assertTrue(_forall);
      final Procedure1<AbstractValidationDiagnostic> _function_1 = new Procedure1<AbstractValidationDiagnostic>() {
        public void apply(final AbstractValidationDiagnostic it) {
          String _issueCode = it.getIssueCode();
          Assert.assertEquals(TargetPlatformValidator.CHECK__LOCATION_CONFLICTUAL_ID, _issueCode);
          EObject _sourceEObject = it.getSourceEObject();
          String _uri = ((Location) _sourceEObject).getUri();
          Assert.assertEquals("mylocationURI1", _uri);
        }
      };
      IterableExtensions.<AbstractValidationDiagnostic>forEach(diagnotics, _function_1);
View Full Code Here

TOP

Related Classes of org.eclipse.emf.ecore.EObject

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.