本文整理汇总了Java中com.intellij.ide.util.projectWizard.WizardContext.isCreatingNewProject方法的典型用法代码示例。如果您正苦于以下问题:Java WizardContext.isCreatingNewProject方法的具体用法?Java WizardContext.isCreatingNewProject怎么用?Java WizardContext.isCreatingNewProject使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.ide.util.projectWizard.WizardContext
的用法示例。
在下文中一共展示了WizardContext.isCreatingNewProject方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addSteps
import com.intellij.ide.util.projectWizard.WizardContext; //导入方法依赖的package包/类
public void addSteps(WizardContext context, ModulesProvider modulesProvider, StepSequence sequence, String specific) {
final ProjectFromSourcesBuilderImpl projectBuilder = new ProjectFromSourcesBuilderImpl(context, modulesProvider);
myProjectBuilder = projectBuilder;
final Icon icon = context.getStepIcon();
if (context.isCreatingNewProject()) {
addStep(sequence, new ProjectNameStep(context, this), specific);
}
addStep(sequence, new RootsDetectionStep(projectBuilder, context, sequence, icon, "reference.dialogs.new.project.fromCode.source"), specific);
Set<String> detectorTypes = new HashSet<String>();
for (ProjectStructureDetector detector : ProjectStructureDetector.EP_NAME.getExtensions()) {
detectorTypes.add(detector.getDetectorId());
for (ModuleWizardStep step : detector.createWizardSteps(projectBuilder, projectBuilder.getProjectDescriptor(detector), icon)) {
sequence.addSpecificStep(detector.getDetectorId(), step);
}
}
if (FrameworkDetectionStep.isEnabled()) {
FrameworkDetectionStep frameworkDetectionStep = new FrameworkDetectionStep(icon, projectBuilder) {
public List<ModuleDescriptor> getModuleDescriptors() {
final List<ModuleDescriptor> moduleDescriptors = new ArrayList<ModuleDescriptor>();
for (ProjectDescriptor descriptor : projectBuilder.getSelectedDescriptors()) {
moduleDescriptors.addAll(descriptor.getModules());
}
return moduleDescriptors;
}
};
projectBuilder.addConfigurationUpdater(frameworkDetectionStep);
sequence.addCommonFinishingStep(frameworkDetectionStep, detectorTypes);
}
}
示例2: EclipseWorkspaceRootStep
import com.intellij.ide.util.projectWizard.WizardContext; //导入方法依赖的package包/类
public EclipseWorkspaceRootStep(final WizardContext context) {
super(context);
myWorkspaceRootComponent.addBrowseFolderListener(EclipseBundle.message("eclipse.import.title.select.workspace"), "", null,
FileChooserDescriptorFactory.createSingleFolderDescriptor());
myDirComponent.addBrowseFolderListener(EclipseBundle.message("eclipse.import.title.module.dir"), "", null,
FileChooserDescriptorFactory.createSingleFolderDescriptor());
ActionListener listener = new ActionListener() {
public void actionPerformed(final ActionEvent e) {
final boolean dedicated = rbModulesDedicated.isSelected();
myDirComponent.setEnabled(dedicated);
if (dedicated && myDirComponent.getText().length() == 0) {
final String remoteStorage = Options.getProjectStorageDir(context.getProject());
myDirComponent.setText(remoteStorage != null ? remoteStorage : FileUtil.toSystemDependentName(myWorkspaceRootComponent.getText()));
}
}
};
rbModulesColocated.addActionListener(listener);
rbModulesDedicated.addActionListener(listener);
if (context.isCreatingNewProject()) {
myProjectFormatPanel = new ProjectFormatPanel();
myFormatPanel.add(myProjectFormatPanel.getPanel(), BorderLayout.WEST);
}
}
示例3: isAvailable
import com.intellij.ide.util.projectWizard.WizardContext; //导入方法依赖的package包/类
public boolean isAvailable(WizardContext context) {
return !context.isCreatingNewProject();
}
示例4: isAvailable
import com.intellij.ide.util.projectWizard.WizardContext; //导入方法依赖的package包/类
public boolean isAvailable(WizardContext context) {
return context.isCreatingNewProject();
}
示例5: GradleParentProjectForm
import com.intellij.ide.util.projectWizard.WizardContext; //导入方法依赖的package包/类
public GradleParentProjectForm(WizardContext context, @Nullable NullableConsumer<ProjectData> consumer) {
myProjectOrNull = context.getProject();
myConsumer = consumer == null ? EmptyConsumer.<ProjectData>getInstance() : consumer;
myIsVisible = !context.isCreatingNewProject() && myProjectOrNull != null && isGradleModuleExist(context);
initComponents();
}
示例6: MavenProjectImportStep
import com.intellij.ide.util.projectWizard.WizardContext; //导入方法依赖的package包/类
public MavenProjectImportStep(WizardContext wizardContext) {
super(wizardContext);
myImportingSettingsForm = new MavenImportingSettingsForm(true, wizardContext.isCreatingNewProject()) {
public String getDefaultModuleDir() {
return myRootPathComponent.getPath();
}
};
myRootPathComponent = new NamePathComponent("",
ProjectBundle.message("maven.import.label.select.root"),
ProjectBundle.message("maven.import.title.select.root"),
"",
false,
false);
JButton envSettingsButton = new JButton(ProjectBundle.message("maven.import.environment.settings"));
envSettingsButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
ShowSettingsUtil.getInstance().editConfigurable(myPanel, new MavenEnvironmentConfigurable());
}
});
myPanel = new JPanel(new GridBagLayout());
myPanel.setBorder(BorderFactory.createEtchedBorder());
GridBagConstraints c = new GridBagConstraints();
c.gridx = 0;
c.gridy = 0;
c.weightx = 1;
c.fill = GridBagConstraints.HORIZONTAL;
c.insets = new Insets(4, 4, 0, 4);
myPanel.add(myRootPathComponent, c);
c.gridy = 1;
c.insets = new Insets(4, 4, 0, 4);
myPanel.add(myImportingSettingsForm.createComponent(), c);
c.gridy = 2;
c.fill = GridBagConstraints.NONE;
c.anchor = GridBagConstraints.NORTHEAST;
c.weighty = 1;
c.insets = new Insets(4 + envSettingsButton.getPreferredSize().height, 4, 4, 4);
myPanel.add(envSettingsButton, c);
myRootPathComponent.setNameComponentVisible(false);
}