Package com.intellij.openapi.paths

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


          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

      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

    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

      }

      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

        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

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

    return new PathReference(path, iconFunction) {
      public PsiElement resolve() {
        return target;
      }
    };
  }
View Full Code Here

    strutsModel.processActions(new Processor<Action>() {
      @Override
      public boolean process(final Action action) {
        for (final Result result : action.getResults()) {

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

          final String path = pathReference.getPath();
          if (!path.endsWith(filename)) {
            continue;
          }

          final PsiElement resolve = pathReference.resolve();
          if (ContainerUtil.find(allFiles, resolve) == null) {
            continue;
          }

          if (!actions.contains(action)) {
View Full Code Here

    final StrutsManager strutsManager = StrutsManager.getInstance(psiElement.getProject());
    if (strutsManager.getCombinedModel(psiElement) == null) {
      return null;
    }

    return new PathReference(path, new ConstantFunction<PathReference, Icon>(Struts2Icons.Action)); /*{
TODO not needed so far ?!
   public PsiElement resolve() {
        return action.getXmlTag();
      }
    };*/
 
View Full Code Here

TOP

Related Classes of com.intellij.openapi.paths.PathReference

Copyright © 2018 www.massapicom. 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.