本文整理汇总了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;
}
示例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;
}
});
}
示例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);
}
}
示例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());
}