Examples of PathReference


Examples of com.bazaarvoice.jolt.common.reference.PathReference

        if ( key.charAt( 0 ) != '[' || key.charAt( key.length() - 1 ) != ']') {
            throw new SpecException( "Invalid ArrayPathElement key:" + key );
        }

        ArrayPathType apt;
        PathReference r = null;
        String aI = "";

        if ( key.length() == 2 ) {
            apt = ArrayPathType.AUTO_EXPAND;
            canonicalForm = "[]";
        }
        else {
            String meat = key.substring( 1, key.length() - 1 )// trim the [ ]

            if ( AmpReference.TOKEN.equals( meat.charAt( 0 ) ) ) {
                r = new AmpReference( meat );
                apt = ArrayPathType.REFERENCE;

                canonicalForm = "[" + r.getCanonicalForm() + "]";
            }
            else if ( HashReference.TOKEN.equals( meat.charAt( 0 ) ) ) {
                r = new HashReference( meat );
                apt = ArrayPathType.HASH;

                canonicalForm = "[" + r.getCanonicalForm() + "]";
            }
            else {
                try {
                    Integer.parseInt( meat );
                    apt = ArrayPathType.EXPLICIT_INDEX;
View Full Code Here

Examples of com.bazaarvoice.jolt.common.reference.PathReference

        if ( key.charAt( 0 ) != '[' || key.charAt( key.length() - 1 ) != ']') {
            throw new SpecException( "Invalid ArrayPathElement key:" + key );
        }

        ArrayPathType apt;
        PathReference r = null;
        String aI = "";

        if ( key.length() == 2 ) {
            apt = ArrayPathType.AUTO_EXPAND;
            canonicalForm = "[]";
        }
        else {
            String meat = key.substring( 1, key.length() - 1 )// trim the [ ]

            if ( AmpReference.TOKEN.equals( meat.charAt( 0 ) ) ) {
                r = new AmpReference( meat );
                apt = ArrayPathType.REFERENCE;

                canonicalForm = "[" + r.getCanonicalForm() + "]";
            }
            else if ( HashReference.TOKEN.equals( meat.charAt( 0 ) ) ) {
                r = new HashReference( meat );
                apt = ArrayPathType.HASH;

                canonicalForm = "[" + r.getCanonicalForm() + "]";
            }
            else {
                try {
                    Integer.parseInt( meat );
                    apt = ArrayPathType.EXPLICIT_INDEX;
View Full Code Here

Examples of com.bazaarvoice.jolt.common.reference.PathReference

        if ( key.charAt( 0 ) != '[' || key.charAt( key.length() - 1 ) != ']') {
            throw new SpecException( "Invalid ArrayPathElement key:" + key );
        }

        ArrayPathType apt;
        PathReference r = null;
        String aI = "";

        if ( key.length() == 2 ) {
            apt = ArrayPathType.AUTO_EXPAND;
            canonicalForm = "[]";
        }
        else {
            String meat = key.substring( 1, key.length() - 1 )// trim the [ ]

            if ( AmpReference.TOKEN.equals( meat.charAt( 0 ) ) ) {
                r = new AmpReference( meat );
                apt = ArrayPathType.REFERENCE;

                canonicalForm = "[" + r.getCanonicalForm() + "]";
            }
            else if ( HashReference.TOKEN.equals( meat.charAt( 0 ) ) ) {
                r = new HashReference( meat );
                apt = ArrayPathType.HASH;

                canonicalForm = "[" + r.getCanonicalForm() + "]";
            }
            else {
                try {
                    Integer.parseInt( meat );
                    apt = ArrayPathType.EXPLICIT_INDEX;
View Full Code Here

Examples of com.intellij.openapi.paths.PathReference

    @NonNls final ArrayList<String> list = new ArrayList<String>();
    combinedModel.processActions(new Processor<Action>() {
      public boolean process(final Action action) {
        for (final Result result : action.getResults()) {
          final PathReference pathReference = result.getValue();
          if (pathReference != null) {
            final PsiElement psiElement = pathReference.resolve();
            if (psiElement != null && psiElement.equals(sourceFile)) {
              String namespace = action.getNamespace();
              if (!Comparing.equal(namespace, StrutsPackage.DEFAULT_NAMESPACE)) {
                namespace += "/";
              }
View Full Code Here

Examples of com.intellij.openapi.paths.PathReference

          return builder.getText();
        }

        if (o instanceof Result) {
          final Result result = (Result) o;
          final PathReference pathReference = result.getValue();
          final String displayPath = pathReference != null ? pathReference.getPath() : "???";
          final ResultType resultType = result.getEffectiveResultType();
          final String resultTypeValue = resultType != null ? resultType.getName().getStringValue() : "???";

          final DocumentationBuilder builder = new DocumentationBuilder();
          builder.addLine("Path", displayPath)
View Full Code Here

Examples of com.intellij.openapi.paths.PathReference

      for (final Action action : strutsPackage.getActions()) {
        final ActionNode actionNode = new ActionNode(action, action.getName().getStringValue());
        addNode(actionNode);

        for (final Result result : action.getResults()) {
          final PathReference pathReference = result.getValue();
          final String path = pathReference != null ? pathReference.getPath() : UNKNOWN;

          final ResultNode resultNode = new ResultNode(result, path);
          addNode(resultNode);

          final String resultName = result.getName().getStringValue();
View Full Code Here

Examples of com.intellij.openapi.paths.PathReference

    final Result result = getIdentifyingElement();
    if (!result.isValid()) {
      return UNKNOWN_RESULT_ICON;
    }

    final PathReference pathReference = result.getValue();
    if (pathReference == null) {
      return UNKNOWN_RESULT_ICON;
    }

    if (pathReference.resolve() == null) {
      return UNKNOWN_RESULT_ICON;
    }

    final Icon pathReferenceIcon = pathReference.getIcon();
    return pathReferenceIcon != null ? pathReferenceIcon : UNKNOWN_RESULT_ICON;
  }
View Full Code Here

Examples of com.intellij.openapi.paths.PathReference

      }

      final Set<PathReference> pathReferences = new HashSet<PathReference>();
      final List<Result> results = action.getResults();
      for (final Result result : results) {
        final PathReference pathReference = result.getValue();
        ContainerUtil.addIfNotNull(pathReferences, pathReference);
      }

      final Set<PathReference> toStore = ContainerUtil.getOrCreate(pathReferenceMap,
                                                                   method,
View Full Code Here

Examples of com.intellij.openapi.paths.PathReference

        if (actionClass != null) {
          for (final Result result1 : action.getResults()) {
            final ResultType resultType = result1.getEffectiveResultType();
            if (resultType != null &&
                FreeMarkerStrutsResultContributor.FREEMARKER.equals(resultType.getName().getStringValue())) {
              final PathReference reference = result1.getValue();
              final PsiElement target = reference == null ? null : reference.resolve();
              if (target != null &&
                  (file.getManager().areElementsEquivalent(file, target) ||
                   file.getManager().areElementsEquivalent(file.getOriginalFile(), target))) {
                final PsiClassType actionType = PsiTypesUtil.getClassType(actionClass);
                final FtlPsiType ftlPsiType = FtlPsiType.wrap(actionType);
View Full Code Here

Examples of com.intellij.openapi.paths.PathReference

      };
    } else {
      iconFunction = new ConstantFunction<PathReference, Icon>(staticIcon);
    }

    return new PathReference(path, iconFunction) {
      public PsiElement resolve() {
        return target;
      }
    };
  }
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.