Package org.eclipse.emf.ecore.resource

Examples of org.eclipse.emf.ecore.resource.Resource


      _builder.append("location A \"mylocationURI2\"");
      _builder.newLine();
      _builder.append("location \"mylocationURI3\"");
      _builder.newLine();
      final TargetPlatform targetPlatform = this.parser.parse(_builder);
      Resource _eResource = targetPlatform.eResource();
      EList<Resource.Diagnostic> _errors = _eResource.getErrors();
      boolean _isEmpty = _errors.isEmpty();
      Assert.assertTrue(_isEmpty);
      TargetPlatformValidator _validator = tester.validator();
      _validator.checkIDUniqueOnAllLocations(targetPlatform);
      AssertableDiagnostics _diagnose = tester.diagnose();
View Full Code Here


      _builder.append("location A \"mylocationURI\"");
      _builder.newLine();
      _builder.append("location B \"mylocationURI\"");
      _builder.newLine();
      final TargetPlatform targetPlatform = this.parser.parse(_builder);
      Resource _eResource = targetPlatform.eResource();
      EList<Resource.Diagnostic> _errors = _eResource.getErrors();
      boolean _isEmpty = _errors.isEmpty();
      Assert.assertTrue(_isEmpty);
      TargetPlatformValidator _validator = tester.validator();
      _validator.checkIDUniqueOnAllLocations(targetPlatform);
      AssertableDiagnostics _diagnose = tester.diagnose();
View Full Code Here

      _builder.append("location A \"mylocationURI\"");
      _builder.newLine();
      _builder.append("location \"mylocationURI\"");
      _builder.newLine();
      final TargetPlatform targetPlatform = this.parser.parse(_builder);
      Resource _eResource = targetPlatform.eResource();
      EList<Resource.Diagnostic> _errors = _eResource.getErrors();
      boolean _isEmpty = _errors.isEmpty();
      Assert.assertTrue(_isEmpty);
      TargetPlatformValidator _validator = tester.validator();
      _validator.checkIDUniqueOnAllLocations(targetPlatform);
      AssertableDiagnostics _diagnose = tester.diagnose();
View Full Code Here

      _builder.append("location \"mylocationURI\"");
      _builder.newLine();
      _builder.append("location \"mylocationURI\"");
      _builder.newLine();
      final TargetPlatform targetPlatform = this.parser.parse(_builder);
      Resource _eResource = targetPlatform.eResource();
      EList<Resource.Diagnostic> _errors = _eResource.getErrors();
      boolean _isEmpty = _errors.isEmpty();
      Assert.assertTrue(_isEmpty);
      TargetPlatformValidator _validator = tester.validator();
      _validator.checkIDUniqueOnAllLocations(targetPlatform);
      AssertableDiagnostics _diagnose = tester.diagnose();
View Full Code Here

      _builder_1.newLine();
      _builder_1.append("location \"locationURI1\"");
      _builder_1.newLine();
      URI _createURI_1 = URI.createURI("tmp:/b.tpd");
      this.parser.parse(_builder_1, _createURI_1, resourceSet);
      Resource _eResource = tpa.eResource();
      EList<Resource.Diagnostic> _errors = _eResource.getErrors();
      boolean _isEmpty = _errors.isEmpty();
      Assert.assertTrue(_isEmpty);
      TargetPlatformValidator _validator = tester.validator();
      _validator.checkIDUniqueOnAllLocations(tpa);
      AssertableDiagnostics _diagnose = tester.diagnose();
View Full Code Here

      _builder_1.newLine();
      _builder_1.append("location A \"locationURI2\"");
      _builder_1.newLine();
      URI _createURI_1 = URI.createURI("tmp:/b.tpd");
      final TargetPlatform tpb = this.parser.parse(_builder_1, _createURI_1, resourceSet);
      Resource _eResource = tpa.eResource();
      EList<Resource.Diagnostic> _errors = _eResource.getErrors();
      boolean _isEmpty = _errors.isEmpty();
      Assert.assertTrue(_isEmpty);
      TargetPlatformValidator _validator = tester.validator();
      _validator.checkIDUniqueOnAllLocations(tpa);
      AssertableDiagnostics _diagnose = tester.diagnose();
      Iterable<Diagnostic> _allDiagnostics = _diagnose.getAllDiagnostics();
      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();
      Assert.assertTrue(_isEmpty_1);
      TargetPlatformValidator _validator_1 = tester.validator();
      _validator_1.checkIDUniqueOnAllLocations(tpb);
      AssertableDiagnostics _diagnose_1 = tester.diagnose();
View Full Code Here

      _builder_1.newLine();
      _builder_1.append("location A \"locationURI1\"");
      _builder_1.newLine();
      URI _createURI_1 = URI.createURI("tmp:/b.tpd");
      final TargetPlatform tpb = this.parser.parse(_builder_1, _createURI_1, resourceSet);
      Resource _eResource = tpa.eResource();
      EList<Resource.Diagnostic> _errors = _eResource.getErrors();
      boolean _isEmpty = _errors.isEmpty();
      Assert.assertTrue(_isEmpty);
      TargetPlatformValidator _validator = tester.validator();
      _validator.checkIDUniqueOnAllLocations(tpa);
      AssertableDiagnostics _diagnose = tester.diagnose();
      Iterable<Diagnostic> _allDiagnostics = _diagnose.getAllDiagnostics();
      Iterable<AbstractValidationDiagnostic> _filter = Iterables.<AbstractValidationDiagnostic>filter(_allDiagnostics, AbstractValidationDiagnostic.class);
      List<AbstractValidationDiagnostic> diagnotics = IterableExtensions.<AbstractValidationDiagnostic>toList(_filter);
      int _size = diagnotics.size();
      Assert.assertEquals(0, _size);
      Resource _eResource_1 = tpb.eResource();
      EList<Resource.Diagnostic> _errors_1 = _eResource_1.getErrors();
      boolean _isEmpty_1 = _errors_1.isEmpty();
      Assert.assertTrue(_isEmpty_1);
      TargetPlatformValidator _validator_1 = tester.validator();
      _validator_1.checkIDUniqueOnAllLocations(tpb);
      AssertableDiagnostics _diagnose_1 = tester.diagnose();
View Full Code Here

      _builder.append("location A \"mylocationURI\"");
      _builder.newLine();
      _builder.append("location A \"mylocationURI\"");
      _builder.newLine();
      final TargetPlatform targetPlatform = this.parser.parse(_builder);
      Resource _eResource = targetPlatform.eResource();
      EList<Resource.Diagnostic> _errors = _eResource.getErrors();
      boolean _isEmpty = _errors.isEmpty();
      Assert.assertTrue(_isEmpty);
      TargetPlatformValidator _validator = tester.validator();
      _validator.checkIDUniqueOnAllLocations(targetPlatform);
      AssertableDiagnostics _diagnose = tester.diagnose();
View Full Code Here

      _builder.append("with source");
      _builder.newLine();
      _builder.append("location \"mylocationURI1\" {with source}");
      _builder.newLine();
      final TargetPlatform targetPlatform = this.parser.parse(_builder);
      Resource _eResource = targetPlatform.eResource();
      EList<Resource.Diagnostic> _errors = _eResource.getErrors();
      boolean _isEmpty = _errors.isEmpty();
      Assert.assertTrue(_isEmpty);
      TargetPlatformValidator _validator = tester.validator();
      EList<Location> _locations = targetPlatform.getLocations();
      Location _head = IterableExtensions.<Location>head(_locations);
View Full Code Here

      _builder.append("with source");
      _builder.newLine();
      _builder.append("location \"mylocationURI1\"");
      _builder.newLine();
      final TargetPlatform targetPlatform = this.parser.parse(_builder);
      Resource _eResource = targetPlatform.eResource();
      EList<Resource.Diagnostic> _errors = _eResource.getErrors();
      boolean _isEmpty = _errors.isEmpty();
      Assert.assertTrue(_isEmpty);
      TargetPlatformValidator _validator = tester.validator();
      EList<Location> _locations = targetPlatform.getLocations();
      Location _head = IterableExtensions.<Location>head(_locations);
View Full Code Here

TOP

Related Classes of org.eclipse.emf.ecore.resource.Resource

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.