Search in sources :

Example 1 with TemplateModuleBuilder

use of com.intellij.platform.templates.TemplateModuleBuilder in project liferay-ide by liferay.

the class LiferayProjectSettingsStep method updateDataModel.

@Override
public void updateDataModel() {
    _context.setProjectName(_namePathComponent.getNameValue());
    _context.setProjectFileDirectory(_namePathComponent.getPath());
    _formatPanel.updateData(_context);
    _moduleNameLocationComponent.updateDataModel();
    ProjectBuilder moduleBuilder = _context.getProjectBuilder();
    if (moduleBuilder instanceof TemplateModuleBuilder) {
        _context.setProjectStorageFormat(StorageScheme.DIRECTORY_BASED);
    }
    if (_settingsStep != null) {
        _settingsStep.updateDataModel();
    }
}
Also used : ProjectBuilder(com.intellij.ide.util.projectWizard.ProjectBuilder) TemplateModuleBuilder(com.intellij.platform.templates.TemplateModuleBuilder)

Example 2 with TemplateModuleBuilder

use of com.intellij.platform.templates.TemplateModuleBuilder in project intellij-community by JetBrains.

the class ProjectSettingsStep method setupPanels.

private void setupPanels() {
    ModuleBuilder moduleBuilder = (ModuleBuilder) myWizardContext.getProjectBuilder();
    restorePanel(myNamePathComponent, 4);
    restorePanel(getModulePanel(), myWizardContext.isCreatingNewProject() ? 8 : 6);
    restorePanel(myExpertPanel, myWizardContext.isCreatingNewProject() ? 1 : 0);
    mySettingsStep = moduleBuilder == null ? null : moduleBuilder.modifySettingsStep(this);
    myExpertPlaceholder.setVisible(!(moduleBuilder instanceof TemplateModuleBuilder) && myExpertPanel.getComponentCount() > 0);
    for (int i = 0; i < 6; i++) {
        getModulePanel().getComponent(i).setVisible(!(moduleBuilder instanceof EmptyModuleBuilder));
    }
    mySettingsPanel.revalidate();
    mySettingsPanel.repaint();
}
Also used : TemplateModuleBuilder(com.intellij.platform.templates.TemplateModuleBuilder) TemplateModuleBuilder(com.intellij.platform.templates.TemplateModuleBuilder)

Example 3 with TemplateModuleBuilder

use of com.intellij.platform.templates.TemplateModuleBuilder in project liferay-ide by liferay.

the class LiferayProjectSettingsStep method _setupPanels.

private void _setupPanels() {
    ModuleBuilder moduleBuilder = (ModuleBuilder) _context.getProjectBuilder();
    _restorePanel(_namePathComponent, 4);
    _restorePanel(_getModulePanel(), _context.isCreatingNewProject() ? 8 : 6);
    _restorePanel(_expertPanel, _context.isCreatingNewProject() ? 1 : 0);
    _settingsStep = moduleBuilder == null ? null : moduleBuilder.modifySettingsStep(this);
    _expertPlaceholder.setVisible(!(moduleBuilder instanceof TemplateModuleBuilder) && _expertPanel.getComponentCount() > 0);
    for (int i = 0; i < 6; i++) {
        Component component = _getModulePanel().getComponent(i);
        component.setVisible(!(moduleBuilder instanceof EmptyModuleBuilder));
    }
    _settingsPanel.revalidate();
    _settingsPanel.repaint();
}
Also used : ModuleBuilder(com.intellij.ide.util.projectWizard.ModuleBuilder) TemplateModuleBuilder(com.intellij.platform.templates.TemplateModuleBuilder) EmptyModuleBuilder(com.intellij.ide.util.projectWizard.EmptyModuleBuilder) TemplateModuleBuilder(com.intellij.platform.templates.TemplateModuleBuilder) JComponent(javax.swing.JComponent) Component(java.awt.Component) EmptyModuleBuilder(com.intellij.ide.util.projectWizard.EmptyModuleBuilder)

Example 4 with TemplateModuleBuilder

use of com.intellij.platform.templates.TemplateModuleBuilder in project liferay-ide by liferay.

the class LiferayProjectTypeStep method _setTemplatesList.

private void _setTemplatesList(TemplatesGroup group, Collection<ProjectTemplate> templates, boolean preserveSelection) {
    List<ProjectTemplate> list = new ArrayList<>(templates);
    ModuleBuilder moduleBuilder = group.getModuleBuilder();
    if ((moduleBuilder != null) && !(moduleBuilder instanceof TemplateModuleBuilder)) {
        list.add(0, new BuilderBasedTemplate(moduleBuilder));
    }
    _templatesList.setTemplates(list, preserveSelection);
}
Also used : BuilderBasedTemplate(com.intellij.platform.templates.BuilderBasedTemplate) ModuleBuilder(com.intellij.ide.util.projectWizard.ModuleBuilder) TemplateModuleBuilder(com.intellij.platform.templates.TemplateModuleBuilder) ArrayList(java.util.ArrayList) TemplateModuleBuilder(com.intellij.platform.templates.TemplateModuleBuilder) ProjectTemplate(com.intellij.platform.ProjectTemplate)

Aggregations

TemplateModuleBuilder (com.intellij.platform.templates.TemplateModuleBuilder)4 ModuleBuilder (com.intellij.ide.util.projectWizard.ModuleBuilder)2 EmptyModuleBuilder (com.intellij.ide.util.projectWizard.EmptyModuleBuilder)1 ProjectBuilder (com.intellij.ide.util.projectWizard.ProjectBuilder)1 ProjectTemplate (com.intellij.platform.ProjectTemplate)1 BuilderBasedTemplate (com.intellij.platform.templates.BuilderBasedTemplate)1 Component (java.awt.Component)1 ArrayList (java.util.ArrayList)1 JComponent (javax.swing.JComponent)1