Exemplo n.º 1
0
  @Override
  public String getNameImpl() {
    Import imprt = getReference();
    if (imprt == null) {
      return super.getNameImpl();
    }

    String relativePath = getRelativePath(imprt);
    if (relativePath != null && relativePath.length() > 0) {
      return relativePath;
    }
    String location = imprt.getLocation();
    if (location != null && location.length() > 0) {
      return ResolverUtility.decodeLocation(location);
    }
    String namespace = imprt.getNamespace();
    if (namespace != null && namespace.length() > 0) {
      return namespace;
    }
    // TODO:change to use NbBundle, figure out good name
    return "Unqualified";
  }
Exemplo n.º 2
0
 private String getRelativePath(Import imprt) {
   assert imprt != null;
   FileObject ifo = ResolverUtility.getImportedFileObject(imprt);
   Project modelProject = Utils.safeGetProject(imprt.getBpelModel());
   return ResolverUtility.safeGetRelativePath(ifo, modelProject);
 }