Java 类com.intellij.openapi.project.ProjectType 实例源码

项目:intellij-ce-playground    文件:ActionManagerImpl.java   
private AnAction registerChameleon(String actionId, AnAction action, PluginId pluginId, String projectType) {
  ProjectType type = projectType == null ? null : new ProjectType(projectType);
  // make sure id+projectType is unique
  AnAction o = myId2Action.get(actionId);
  ChameleonAction chameleonAction;
  if (o == null) {
    chameleonAction = new ChameleonAction(action, type);
    myId2Action.put(actionId, chameleonAction);
    return chameleonAction;
  }
  if (o instanceof ChameleonAction) {
    chameleonAction = (ChameleonAction)o;
  }
  else {
    chameleonAction = new ChameleonAction(o, type);
    myId2Action.put(actionId, chameleonAction);
  }
  AnAction old = chameleonAction.addAction(action, type);
  if (old != null) {
    reportActionError(pluginId,
                      "action with the ID \"" + actionId + "\" was already registered. Action being registered is " + action +
                      "; Registered action is " +
                      myId2Action.get(actionId) + getPluginInfo(pluginId));
    return null;
  }
  return chameleonAction;
}
项目:intellij-ce-playground    文件:ChameleonAction.java   
public AnAction addAction(AnAction action, ProjectType projectType) {
  if (action instanceof ActionStub) {
    String type = ((ActionStub)action).getProjectType();
    action = ActionManagerImpl.convertStub((ActionStub)action);
    projectType = type == null ? null : new ProjectType(type);
  }
  return myActions.put(projectType, action);
}
项目:intellij-ce-playground    文件:ChameleonAction.java   
@Nullable
private AnAction getAction(AnActionEvent e) {
  Project project = CommonDataKeys.PROJECT.getData(e.getDataContext());
  ProjectType projectType = ProjectTypeService.getProjectType(project);
  AnAction action = myActions.get(projectType);
  if (action == null) action = myActions.get(null);
  return action;
}
项目:intellij-ce-playground    文件:GradleResourceCompilerConfigurationGenerator.java   
private static boolean shouldBeBuiltByExternalSystem(@NotNull Project project) {
  // skip resource compilation by IDE for Android projects
  // TODO [vlad] this check should be replaced when an option to make any gradle project with gradle be introduced.
  ProjectType projectType = ProjectTypeService.getProjectType(project);
  if (projectType != null && "Android".equals(projectType.getId())) return true;
  return false;
}
项目:intellij-ce-playground    文件:ChameleonAction.java   
public ChameleonAction(@NotNull AnAction first, ProjectType projectType) {
  addAction(first, projectType);
  copyFrom(myActions.values().iterator().next());
}
项目:intellij-ce-playground    文件:ChameleonAction.java   
@TestOnly
public Map<ProjectType, AnAction> getActions() {
  return myActions;
}
项目:intellij-ce-playground    文件:ModuleBuilder.java   
protected ProjectType getProjectType() {
  return null;
}
项目:intellij-ce-playground    文件:ModuleBuilder.java   
protected void setProjectType(Module module) {
  ProjectType projectType = getProjectType();
  if (projectType != null && ProjectTypeService.getProjectType(module.getProject()) == null) {
    ProjectTypeService.setProjectType(module.getProject(), projectType);
  }
}
项目:intellij-ce-playground    文件:AndroidModuleBuilder.java   
@Override
protected ProjectType getProjectType() {
  return ANDROID_PROJECT_TYPE;
}
项目:intellij-ce-playground    文件:ImportWizardModuleBuilder.java   
@Override
protected ProjectType getProjectType() {
  return AndroidModuleBuilder.ANDROID_PROJECT_TYPE;
}
项目:embeddedlinux-jvmdebugger-intellij    文件:RPiJavaModuleBuilder.java   
/**
 * Project Type
 * @return
 */
@Override
protected ProjectType getProjectType() {
    return PI_PROJECT_TYPE;
}
项目:embeddedlinux-jvmdebugger-intellij    文件:BeagleBoneBlackJavaModuleBuilder.java   
/**
 * Project Type
 * @return
 */
@Override
protected ProjectType getProjectType() {
    return BBB_PROJECT_TYPE;
}