use of com.intellij.openapi.externalSystem.model.project.ProjectId in project intellij-community by JetBrains.
the class GradleModuleWizardStep method updateDataModel.
@Override
public void updateDataModel() {
myContext.setProjectBuilder(myBuilder);
ProjectData parentProject = myParentProjectForm.getParentProject();
myBuilder.setParentProject(parentProject);
myBuilder.setProjectId(new ProjectId(myGroupIdField.getText(), myArtifactIdField.getText(), myVersionField.getText()));
myBuilder.setInheritGroupId(myInheritGroupIdCheckBox.isSelected());
myBuilder.setInheritVersion(myInheritVersionCheckBox.isSelected());
if (StringUtil.isNotEmpty(myBuilder.getProjectId().getArtifactId())) {
myContext.setProjectName(myBuilder.getProjectId().getArtifactId());
}
if (parentProject != null) {
myContext.setProjectFileDirectory(parentProject.getLinkedExternalProjectPath() + '/' + myContext.getProjectName());
} else {
if (myProjectOrNull != null) {
myContext.setProjectFileDirectory(myProjectOrNull.getBaseDir().getPath() + '/' + myContext.getProjectName());
}
}
}
use of com.intellij.openapi.externalSystem.model.project.ProjectId in project intellij-community by JetBrains.
the class GradleModuleWizardStep method updateStep.
@Override
public void updateStep() {
ProjectData parentProject = myParentProjectForm.getParentProject();
ProjectId projectId = myBuilder.getProjectId();
if (projectId == null) {
setTestIfEmpty(myArtifactIdField, myBuilder.getName());
setTestIfEmpty(myGroupIdField, parentProject == null ? myBuilder.getName() : parentProject.getGroup());
setTestIfEmpty(myVersionField, parentProject == null ? DEFAULT_VERSION : parentProject.getVersion());
} else {
setTestIfEmpty(myArtifactIdField, projectId.getArtifactId());
setTestIfEmpty(myGroupIdField, projectId.getGroupId());
setTestIfEmpty(myVersionField, projectId.getVersion());
}
myInheritGroupIdCheckBox.setSelected(myBuilder.isInheritGroupId());
myInheritVersionCheckBox.setSelected(myBuilder.isInheritVersion());
updateComponents();
}
Aggregations