Search in sources :

Example 1 with FacetType

use of com.intellij.facet.FacetType in project intellij-community by JetBrains.

the class PythonModuleTypeBase method getDescription.

@NotNull
public String getDescription() {
    String basicDescription = "Python modules are used for developing <b>Python</b> applications.";
    FacetType[] facetTypes = Extensions.getExtensions(FacetType.EP_NAME);
    for (FacetType type : facetTypes) {
        if (type.getId().toString().equalsIgnoreCase("django")) {
            return basicDescription + " Supported technologies include <b>Django, Google App Engine, Mako, Jinja2</b> and others.";
        }
    }
    return basicDescription;
}
Also used : FacetType(com.intellij.facet.FacetType) NotNull(org.jetbrains.annotations.NotNull)

Example 2 with FacetType

use of com.intellij.facet.FacetType in project intellij-community by JetBrains.

the class AddFacetOfTypeAction method createAddFacetActions.

public static AnAction[] createAddFacetActions(FacetStructureConfigurable configurable) {
    final List<AnAction> result = new ArrayList<>();
    final StructureConfigurableContext context = configurable.myContext;
    for (FacetType type : FacetTypeRegistry.getInstance().getSortedFacetTypes()) {
        if (hasSuitableModules(context, type)) {
            result.add(new AddFacetOfTypeAction(type, context));
        }
    }
    return result.toArray(new AnAction[result.size()]);
}
Also used : FacetType(com.intellij.facet.FacetType) ArrayList(java.util.ArrayList) AnAction(com.intellij.openapi.actionSystem.AnAction)

Example 3 with FacetType

use of com.intellij.facet.FacetType in project intellij-community by JetBrains.

the class AddFacetOfTypeAction method actionPerformed.

@Override
public void actionPerformed(AnActionEvent e) {
    final FacetType type = myFacetType;
    if (type == null)
        return;
    final FacetTypeId underlyingFacetType = type.getUnderlyingFacetType();
    if (underlyingFacetType == null) {
        addFacetToModule(type);
    } else {
        addSubFacet(type, underlyingFacetType);
    }
}
Also used : FacetType(com.intellij.facet.FacetType) FacetTypeId(com.intellij.facet.FacetTypeId)

Aggregations

FacetType (com.intellij.facet.FacetType)3 FacetTypeId (com.intellij.facet.FacetTypeId)1 AnAction (com.intellij.openapi.actionSystem.AnAction)1 ArrayList (java.util.ArrayList)1 NotNull (org.jetbrains.annotations.NotNull)1