@Override
 public void createPages() {
   super.createPages();
   URI resourceURI =
       EditUIUtil.getURI(getEditorInput(), editingDomain.getResourceSet().getURIConverter());
   selectionViewer.setInput(editingDomain.getResourceSet().getResource(resourceURI, true));
 }
 public void createModel() {
   super.createModel();
   URI resourceURI =
       EditUIUtil.getURI(getEditorInput(), editingDomain.getResourceSet().getURIConverter());
   editingDomain
       .getResourceToReadOnlyMap()
       .put(editingDomain.getResourceSet().getResource(resourceURI, true), true);
 }
Example #3
0
  /**
   * This is the method called to load a resource into the editing domain's resource set based on
   * the editor's input.
   * <!-- begin-user-doc -->
   * <!--
   * end-user-doc -->
   *
   * @generated
   */
  public void createModel() {
    URI resourceURI = EditUIUtil.getURI(getEditorInput());
    Exception exception = null;
    Resource resource = null;
    try {
      // Load the resource through the editing domain.
      //
      resource = editingDomain.getResourceSet().getResource(resourceURI, true);
    } catch (Exception e) {
      exception = e;
      resource = editingDomain.getResourceSet().getResource(resourceURI, false);
    }

    Diagnostic diagnostic = analyzeResourceProblems(resource, exception);
    if (diagnostic.getSeverity() != Diagnostic.OK) {
      resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));
    }
    editingDomain.getResourceSet().eAdapters().add(problemIndicationAdapter);
  }