Package com.intellij.facet

Examples of com.intellij.facet.ModifiableFacetModel


            }
        });

        ApplicationManager.getApplication().runWriteAction(new Runnable() {
            public void run() {
                ModifiableFacetModel modifiableFacetModel =
                        FacetManager.getInstance(fixture.getModule()).createModifiableModel();
                OsmorcFacet facet = new OsmorcFacet(fixture.getModule());
                facet.getConfiguration().setManifestGenerationMode(ManifestGenerationMode.Manually);
                modifiableFacetModel.addFacet(facet);
                modifiableFacetModel.commit();
            }
        });


    }
View Full Code Here


  public static void createOsmorcFacetForAllModules(final Project project) {
    ApplicationManager.getApplication().runWriteAction(new Runnable() {
      public void run() {
        final Module[] modules = ModuleManager.getInstance(project).getModules();
        for (Module module : modules) {
          final ModifiableFacetModel modifiableFacetModel = FacetManager.getInstance(module).createModifiableModel();
          final OsmorcFacet facet = new OsmorcFacet(module);
          facet.getConfiguration().setUseProjectDefaultManifestFileLocation(false);
          facet.getConfiguration().setManifestLocation("META-INF/MANIFEST.MF");
          facet.getConfiguration().setManifestGenerationMode(ManifestGenerationMode.Manually);
          modifiableFacetModel.addFacet(facet);
          modifiableFacetModel.commit();
        }
      }
    });
  }
View Full Code Here

  //should only be called from write action
  public static void createFacet(@NotNull Module module) {
    FacetManager facetManager = FacetManager.getInstance(module);
    ErlangFacet facet = facetManager.createFacet(FacetType.findInstance(ErlangFacetType.class), ErlangFacetConstants.NAME, null);
    ModifiableFacetModel facetModel = facetManager.createModifiableModel();
    facetModel.addFacet(facet);
    facetModel.commit();
  }
View Full Code Here

TOP

Related Classes of com.intellij.facet.ModifiableFacetModel

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.