Package com.intellij.struts2.model.constant

Examples of com.intellij.struts2.model.constant.StrutsConstantManager


    final Module module = ModuleUtilCore.findModuleForPsiElement(element);
    if (module == null) {
      return null;
    }

    final StrutsFacet strutsFacet = StrutsFacet.getInstance(module);
    if (strutsFacet == null) {
      return null;
    }

    // handle suitable JAVA classes --> overlay icon
View Full Code Here


  @NotNull
  @Override
  public PsiReference[] getReferencesByElement(@NotNull final PsiElement psiElement,
                                               @NotNull final ProcessingContext processingContext) {
    final StrutsFacet facet = StrutsFacet.getInstance(psiElement);
    return facet != null && !facet.getConfiguration().isPropertiesKeysDisabled() ?
        propertiesProvider.getReferencesByElement(psiElement, processingContext) : PsiReference.EMPTY_ARRAY;
  }
View Full Code Here

        }

        public void invoke(@NotNull final Project project,
                           final Editor editor,
                           final PsiFile psiFile) throws IncorrectOperationException {
          final StrutsFacet strutsFacet = StrutsFacet.getInstance(module);
          assert strutsFacet != null;
          ModulesConfigurator.showFacetSettingsDialog(strutsFacet, null);
        }

        public boolean startInWriteAction() {
View Full Code Here

    }

    public void invoke(@NotNull final Project project,
                       final Editor editor,
                       final PsiFile file) throws IncorrectOperationException {
      final StrutsFacet strutsFacet = StrutsFacet.getInstance(file);
      assert strutsFacet != null;

      final Set<StrutsFileSet> strutsFileSets = strutsFacet.getConfiguration().getFileSets();
      final BaseListPopupStep<StrutsFileSet> step =
        new BaseListPopupStep<StrutsFileSet>(StrutsBundle.message("annotators.fileset.fix.choose.fileset"),
                                             new ArrayList<StrutsFileSet>(strutsFileSets)) {

          public Icon getIconFor(final StrutsFileSet aValue) {
View Full Code Here

                                                                 editorContext,
                                                                 validatorsManager);
    validatorsManager.registerValidator(validator);

    return new FacetEditorTab[]{new FileSetConfigurationTab(this, editorContext),
                                new FeaturesConfigurationTab(this)};
  }
View Full Code Here

                                                                 new StrutsFacetLibrariesValidatorDescription(),
                                                                 editorContext,
                                                                 validatorsManager);
    validatorsManager.registerValidator(validator);

    return new FacetEditorTab[]{new FileSetConfigurationTab(this, editorContext),
                                new FeaturesConfigurationTab(this)};
  }
View Full Code Here

          final StrutsFileSet fileSet = new StrutsFileSet(StrutsFileSet.getUniqueId(empty),
                                                          StrutsFileSet.getUniqueName("Default File Set", empty),
                                                          strutsFacetConfiguration);
          fileSet.addFile(((XmlFile) psiElement).getVirtualFile());

          final StrutsConfigsSearcher searcher = new StrutsConfigsSearcher(module);
          searcher.search();
          final MultiMap<VirtualFile, PsiFile> jarConfigFiles = searcher.getJars();
          for (final VirtualFile virtualFile : jarConfigFiles.keySet()) {
            final Collection<PsiFile> psiFiles = jarConfigFiles.get(virtualFile);
            for (final PsiFile psiFile : psiFiles) {
              fileSet.addFile(psiFile.getVirtualFile());
            }
View Full Code Here

          final PsiElement psiElement = FileTemplateUtil.createFromTemplate(strutsXmlTemplate,
                                                                            StrutsConstants.STRUTS_XML_DEFAULT_FILENAME,
                                                                            null,
                                                                            directory);
          final Set<StrutsFileSet> empty = Collections.emptySet();
          final StrutsFileSet fileSet = new StrutsFileSet(StrutsFileSet.getUniqueId(empty),
                                                          StrutsFileSet.getUniqueName("Default File Set", empty),
                                                          strutsFacetConfiguration);
          fileSet.addFile(((XmlFile) psiElement).getVirtualFile());

          final StrutsConfigsSearcher searcher = new StrutsConfigsSearcher(module);
          searcher.search();
          final MultiMap<VirtualFile, PsiFile> jarConfigFiles = searcher.getJars();
          for (final VirtualFile virtualFile : jarConfigFiles.keySet()) {
            final Collection<PsiFile> psiFiles = jarConfigFiles.get(virtualFile);
            for (final PsiFile psiFile : psiFiles) {
              fileSet.addFile(psiFile.getVirtualFile());
            }
          }
          strutsFacetConfiguration.getFileSets().add(fileSet);

View Full Code Here

    for (final Object setElement : element.getChildren(FILESET)) {
      final String setName = ((Element) setElement).getAttributeValue(SET_NAME);
      final String setId = ((Element) setElement).getAttributeValue(SET_ID);
      final String removed = ((Element) setElement).getAttributeValue(SET_REMOVED);
      if (setName != null && setId != null) {
        final StrutsFileSet fileSet = new StrutsFileSet(setId, setName, this);
        final List files = ((Element) setElement).getChildren(FILE);
        for (final Object fileElement : files) {
          final String text = ((Element) fileElement).getText();
          fileSet.addFile(text);
        }
        fileSet.setRemoved(Boolean.valueOf(removed));
        myFileSets.add(fileSet);
      }
    }

    // new in X
View Full Code Here

    final Project project = xmlFile.getProject();
    final Graph2D graph = GraphManager.getGraphManager().createGraph2D();
    final Graph2DView view = GraphManager.getGraphManager().createGraph2DView();

    progress.setText("Building model...");
    final StrutsDataModel myDataModel = new StrutsDataModel(xmlFile);
    final StrutsPresentationModel presentationModel = new StrutsPresentationModel(graph);

    progress.setText("Setup graph...");
    myBuilder = GraphBuilderFactory.getInstance(project).createGraphBuilder(graph,
                                                                            view,
View Full Code Here

TOP

Related Classes of com.intellij.struts2.model.constant.StrutsConstantManager

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.