Java Code Examples for com.intellij.ide.util.projectWizard.WizardContext#getProjectFileDirectory()

The following examples show how to use com.intellij.ide.util.projectWizard.WizardContext#getProjectFileDirectory() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: HaxeHxmlDetectionStep.java    From intellij-haxe with Apache License 2.0 6 votes vote down vote up
public HaxeHxmlDetectionStep(ProjectFromSourcesBuilder builder, HaxeProjectConfigurationUpdater projectUpdater) {
  this.myProjectUpdater = projectUpdater;

  WizardContext context = builder.getContext();
  Vector<String> hxmlList = new Vector<>();
  String projectDir = context.getProjectFileDirectory();
  List<String> hxmlFiles = findHxmlFiles(projectDir);
  for(String hxmlPath:hxmlFiles) {
    try {
      List<HXMLData> hxmls = HXMLData.load(context.getProject(), projectDir, hxmlPath);
      if(!hasTarget(hxmls)) {
        throw new HXMLData.HXMLDataException("No compilation target.");
      }
      hxmlList.addElement(hxmlPath);
    }
    catch (HXMLData.HXMLDataException e) {
      //e.printStackTrace();
    }
  }

  myGui = new HXMLSelector(hxmlList);
}
 
Example 2
Source File: HaxeProjectStructureDetector.java    From intellij-haxe with Apache License 2.0 5 votes vote down vote up
@Override
public List<ModuleWizardStep> createWizardSteps(ProjectFromSourcesBuilder builder, ProjectDescriptor projectDescriptor, Icon stepIcon) {
  HaxeSdkType type = HaxeSdkType.getInstance();
  type.ensureSdk();
  WizardContext wizardContext = builder.getContext();
  HaxeProjectConfigurationUpdater projectUpdater = new HaxeProjectConfigurationUpdater(wizardContext.getProjectFileDirectory());
  ((ProjectFromSourcesBuilderImpl)builder).addConfigurationUpdater(projectUpdater);
  HaxeModuleInsight moduleInsight = new HaxeModuleInsight(new DelegatingProgressIndicator(), builder);
  final List<ModuleWizardStep> steps = new ArrayList<>();
  steps.add(new HaxeLibrariesDetectionStep(builder, moduleInsight, projectUpdater));
  steps.add(new ModulesDetectionStep(this, builder, projectDescriptor, moduleInsight, stepIcon, "reference.dialogs.new.project.fromCode.page2"));
  steps.add(new ProjectJdkForModuleStep(wizardContext, type));
  steps.add(new HaxeHxmlDetectionStep(builder, projectUpdater));
  return steps;
}
 
Example 3
Source File: PantsProjectImportBuilder.java    From intellij-pants-plugin with Apache License 2.0 4 votes vote down vote up
@Override
protected void doPrepare(@NotNull WizardContext context) {
  String pathToUse = context.getProjectFileDirectory();
  getControl(context.getProject()).setLinkedProjectPath(pathToUse);
}