Examples of BasicDiagnostic


Examples of org.eclipse.emf.common.util.BasicDiagnostic

   * <!-- end-user-doc -->
   * @generated
   */
  protected void updateProblemIndication() {
    if (updateProblemIndication) {
      BasicDiagnostic diagnostic =
        new BasicDiagnostic
          (Diagnostic.OK,
           "OntoUML.editor",
           0,
           null,
           new Object [] { editingDomain.getResourceSet() });
      for (Diagnostic childDiagnostic : resourceToDiagnosticMap.values()) {
        if (childDiagnostic.getSeverity() != Diagnostic.OK) {
          diagnostic.add(childDiagnostic);
        }
      }

      int lastEditorPage = getPageCount() - 1;
      if (lastEditorPage >= 0 && getEditor(lastEditorPage) instanceof ProblemEditorPart) {
        ((ProblemEditorPart)getEditor(lastEditorPage)).setDiagnostic(diagnostic);
        if (diagnostic.getSeverity() != Diagnostic.OK) {
          setActivePage(lastEditorPage);
        }
      }
      else if (diagnostic.getSeverity() != Diagnostic.OK) {
        ProblemEditorPart problemEditorPart = new ProblemEditorPart();
        problemEditorPart.setDiagnostic(diagnostic);
        try {
          addPage(++lastEditorPage, problemEditorPart, getEditorInput());
          setPageText(lastEditorPage, problemEditorPart.getPartName());
View Full Code Here

Examples of org.eclipse.emf.common.util.BasicDiagnostic

   * <!-- end-user-doc -->
   * @generated
   */
  public Diagnostic analyzeResourceProblems(Resource resource, Exception exception) {
    if (!resource.getErrors().isEmpty() || !resource.getWarnings().isEmpty()) {
      BasicDiagnostic basicDiagnostic =
        new BasicDiagnostic
          (Diagnostic.ERROR,
           "OntoUML.editor",
           0,
           getString("_UI_CreateModelError_message", resource.getURI()),
           new Object [] { exception == null ? (Object)resource : exception });
      basicDiagnostic.merge(EcoreUtil.computeDiagnostic(resource, true));
      return basicDiagnostic;
    }
    else if (exception != null) {
      return
        new BasicDiagnostic
          (Diagnostic.ERROR,
           "OntoUML.editor",
           0,
           getString("_UI_CreateModelError_message", resource.getURI()),
           new Object[] { exception });
View Full Code Here

Examples of org.eclipse.emf.common.util.BasicDiagnostic

  //    option (.test.common_options) = {
  //      intValue: 3
  //    };
  //  }
  @Test public void should_allow_curly_and_angle_brackets_in_complex_value() {
    boolean isValid = validator.validate(xtext.root(), new BasicDiagnostic(), null);
    assertTrue(isValid);
  }
View Full Code Here

Examples of org.eclipse.emf.common.util.BasicDiagnostic

  //
  // message TestMessage {
  //   option (value) = """test""";
  // }
  @Test public void should_allow_template_quotes() {
    boolean isValid = validator.validate(xtext.root(), new BasicDiagnostic(), null);
    assertTrue(isValid);
  }
View Full Code Here

Examples of org.eclipse.emf.common.util.BasicDiagnostic

  //
  // package abc;
  //
  // message abc {}
  @Test public void should_allow_elements_of_different_types_have_same_name() {
    boolean isValid = validator.validate(xtext.root(), new BasicDiagnostic(), null);
    assertTrue(isValid);
  }
View Full Code Here

Examples of org.eclipse.emf.common.util.BasicDiagnostic

  //     value1: "Value 1";
  //     value2: "Value 2"
  //   };
  // }
  @Test public void should_allow_semicolon_in_complex_value() {
    boolean isValid = validator.validate(xtext.root(), new BasicDiagnostic(), null);
    assertTrue(isValid);
  }
View Full Code Here

Examples of org.eclipse.emf.common.util.BasicDiagnostic

     
      for (IStatus element : children) {
        appendDiagnostics(element, diagnostics);
      }
    } else if (status instanceof IConstraintStatus) {
      diagnostics.add(new BasicDiagnostic(
        status.getSeverity(),
        status.getPlugin(),
        status.getCode(),
        status.getMessage(),
        ((IConstraintStatus) status).getResultLocus().toArray()));
View Full Code Here

Examples of org.eclipse.emf.common.util.BasicDiagnostic

   * <!-- end-user-doc -->
   * @generated
   */
  protected void updateProblemIndication() {
    if (updateProblemIndication) {
      BasicDiagnostic diagnostic =
        new BasicDiagnostic
          (Diagnostic.OK,
           "org.openiaml.simplegmf.editor",
           0,
           null,
           new Object [] { editingDomain.getResourceSet() });
      for (Diagnostic childDiagnostic : resourceToDiagnosticMap.values()) {
        if (childDiagnostic.getSeverity() != Diagnostic.OK) {
          diagnostic.add(childDiagnostic);
        }
      }

      int lastEditorPage = getPageCount() - 1;
      if (lastEditorPage >= 0 && getEditor(lastEditorPage) instanceof ProblemEditorPart) {
        ((ProblemEditorPart)getEditor(lastEditorPage)).setDiagnostic(diagnostic);
        if (diagnostic.getSeverity() != Diagnostic.OK) {
          setActivePage(lastEditorPage);
        }
      }
      else if (diagnostic.getSeverity() != Diagnostic.OK) {
        ProblemEditorPart problemEditorPart = new ProblemEditorPart();
        problemEditorPart.setDiagnostic(diagnostic);
        problemEditorPart.setMarkerHelper(markerHelper);
        try {
          addPage(++lastEditorPage, problemEditorPart, getEditorInput());
          setPageText(lastEditorPage, problemEditorPart.getPartName());
          setActivePage(lastEditorPage);
          showTabs();
        }
        catch (PartInitException exception) {
          SimplegmfEditorPlugin.INSTANCE.log(exception);
        }
      }

      if (markerHelper.hasMarkers(editingDomain.getResourceSet())) {
        markerHelper.deleteMarkers(editingDomain.getResourceSet());
        if (diagnostic.getSeverity() != Diagnostic.OK) {
          try {
            markerHelper.createMarkers(diagnostic);
          }
          catch (CoreException exception) {
            SimplegmfEditorPlugin.INSTANCE.log(exception);
View Full Code Here

Examples of org.eclipse.emf.common.util.BasicDiagnostic

   * <!-- end-user-doc -->
   * @generated
   */
  public Diagnostic analyzeResourceProblems(Resource resource, Exception exception) {
    if (!resource.getErrors().isEmpty() || !resource.getWarnings().isEmpty()) {
      BasicDiagnostic basicDiagnostic =
        new BasicDiagnostic
          (Diagnostic.ERROR,
           "org.openiaml.simplegmf.editor",
           0,
           getString("_UI_CreateModelError_message", resource.getURI()),
           new Object [] { exception == null ? (Object)resource : exception });
      basicDiagnostic.merge(EcoreUtil.computeDiagnostic(resource, true));
      return basicDiagnostic;
    }
    else if (exception != null) {
      return
        new BasicDiagnostic
          (Diagnostic.ERROR,
           "org.openiaml.simplegmf.editor",
           0,
           getString("_UI_CreateModelError_message", resource.getURI()),
           new Object[] { exception });
View Full Code Here

Examples of org.eclipse.emf.common.util.BasicDiagnostic

        return true;
      }
     
      // add diagnoses to all of the failing objects
      for (VerificationViolation violation : verify.getViolations()) {
        diagnostics.add(new BasicDiagnostic(
            Diagnostic.WARNING, /* severity */
            "org.openiaml.model.actions", /* source */
            0, /* code */
            violation.getMessage(), /* message */
            violation.getObjects().toArray() /* data */
 
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.