当前位置: 首页>>代码示例>>Java>>正文


Java WizardContext.setProjectFileDirectory方法代码示例

本文整理汇总了Java中com.intellij.ide.util.projectWizard.WizardContext.setProjectFileDirectory方法的典型用法代码示例。如果您正苦于以下问题:Java WizardContext.setProjectFileDirectory方法的具体用法?Java WizardContext.setProjectFileDirectory怎么用?Java WizardContext.setProjectFileDirectory使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.ide.util.projectWizard.WizardContext的用法示例。


在下文中一共展示了WizardContext.setProjectFileDirectory方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: initContext

import com.intellij.ide.util.projectWizard.WizardContext; //导入方法依赖的package包/类
private static WizardContext initContext(@Nullable Project project, @Nullable String defaultPath, Disposable parentDisposable) {
  WizardContext context = new WizardContext(project, parentDisposable);
  if (defaultPath != null) {
    context.setProjectFileDirectory(defaultPath, true);
    context.setProjectName(defaultPath.substring(FileUtil.toSystemIndependentName(defaultPath).lastIndexOf("/") + 1));
  }
 return context;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:AbstractProjectWizard.java

示例2: AdtImportLocationStep

import com.intellij.ide.util.projectWizard.WizardContext; //导入方法依赖的package包/类
public AdtImportLocationStep(WizardContext context) {
  super(context);

  myDestinationLabel.setFont(UIUtil.getLabelFont().deriveFont(Font.BOLD));


  String prev = context.getProjectFileDirectory();
  mySourceProject = new File(FileUtil.toSystemDependentName(prev));

  String name = new File(prev).getName();
  //noinspection ConstantConditions
  context.setProjectFileDirectory(null);
  String defaultDir = context.getProjectFileDirectory();
  int index = 0;
  File file;
  do {
    String suffix = index == 0 ? "" : Integer.toString(index);
    index++;
    file = new File(defaultDir, name + suffix);
  } while (file.exists());
  myDestDirText.setText(file.getPath());
  context.setProjectFileDirectory(prev);

  FileChooserDescriptor descriptor = FileChooserDescriptorFactory.createSingleFolderDescriptor();
  descriptor.setTitle("Choose Destination Directory");
  descriptor.setDescription("Pick a directory to import the given Eclipse Android project into");
  myDestDirText.addBrowseFolderListener(new TextBrowseFolderListener(descriptor) {
    @Override
    protected void onFileChosen(@NotNull VirtualFile chosenFile) {
      super.onFileChosen(chosenFile);
      myIsPathChangedByUser = true;
    }

    @Override
    public void actionPerformed(ActionEvent e) {
      super.actionPerformed(e);
      myIsPathChangedByUser = true;
    }
  });
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:41,代码来源:AdtImportLocationStep.java

示例3: updateDataModel

import com.intellij.ide.util.projectWizard.WizardContext; //导入方法依赖的package包/类
@Override
public void updateDataModel() {
  WizardContext context = getWizardContext();
  context.setProjectFileDirectory(getProjectFileDirectory());

  AdtImportBuilder builder = (AdtImportBuilder)context.getProjectBuilder();
  if (builder != null) {
    builder.setSelectedProject(mySourceProject);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:AdtImportLocationStep.java

示例4: updateDataModel

import com.intellij.ide.util.projectWizard.WizardContext; //导入方法依赖的package包/类
@Override
public void updateDataModel() {
  BlazeNewProjectBuilder builder = getProjectBuilder();
  control.updateBuilder(builder);

  WizardContext wizardContext = getWizardContext();
  wizardContext.setProjectName(builder.getProjectName());
  wizardContext.setProjectFileDirectory(builder.getProjectDataDirectory());
}
 
开发者ID:bazelbuild,项目名称:intellij,代码行数:10,代码来源:BlazeEditProjectViewImportWizardStep.java


注:本文中的com.intellij.ide.util.projectWizard.WizardContext.setProjectFileDirectory方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。