Package no.hal.jex

Examples of no.hal.jex.AbstractRequirement.eResource()


    boolean validate = false;
    if (location.endsWith(REQUIREMENT_VALIDATION_SUFFIX)) {
      location = location.substring(0, location.length() - REQUIREMENT_VALIDATION_SUFFIX.length());
      validate = true;
    }
    Resource res = req.eResource();
    EObject eo = res.getEObject(location);
    if (eo instanceof AbstractRequirement) {
      setSelectedRequirement((AbstractRequirement)eo);
      fireRequirementSelected(req);
      if (validate && req instanceof JavaRequirement) {
View Full Code Here


      }
    } else {
      String location = null;
      AbstractRequirement descriptionReq = AbstractRequirementImpl.findNearestPreviousRequirementWithDescription(req);
      if (descriptionReq != null) {
        URI uri = descriptionReq.eResource().getURI().appendFragment(JexXmlHelper.getID(descriptionReq, "description")); // .getDescriptionURI();
        location = createLocation(uri);
        if (location != null && (! descriptionReq.eResource().getResourceSet().getURIConverter().exists(URI.createURI(location), Collections.EMPTY_MAP))) {
          location = null;
        }
      }
View Full Code Here

      String location = null;
      AbstractRequirement descriptionReq = AbstractRequirementImpl.findNearestPreviousRequirementWithDescription(req);
      if (descriptionReq != null) {
        URI uri = descriptionReq.eResource().getURI().appendFragment(JexXmlHelper.getID(descriptionReq, "description")); // .getDescriptionURI();
        location = createLocation(uri);
        if (location != null && (! descriptionReq.eResource().getResourceSet().getURIConverter().exists(URI.createURI(location), Collections.EMPTY_MAP))) {
          location = null;
        }
      }
      setRightControl(exerciseDetailsView);
      if (location != null) {
View Full Code Here

  public Object getParent(Object child) {
    if (child instanceof Resource) {
      return ((Resource) child).getResourceSet();
    } else if (child instanceof AbstractRequirement) {
      AbstractRequirement req = (AbstractRequirement) child, parent = req.getParent();
      return (parent == null || parent instanceof Exercise ? req.eResource() : parent);
    }
    return null;
  }

  private int getChildCount(Object parent) {
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.