This repository has been archived by the owner on Dec 14, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
logic: allow to specify custom Maven settings.xml file in project set…
- Loading branch information
1 parent
d33a535
commit 3932bb1
Showing
10 changed files
with
159 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
src/lib_gui/qt/project_wizard/content/path/QtProjectWizardContentPathSettingsMaven.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#include "QtProjectWizardContentPathSettingsMaven.h" | ||
|
||
#include <QCheckBox> | ||
|
||
//#include "Application.h" | ||
//#include "ApplicationSettings.h" | ||
//#include "MessageStatus.h" | ||
//#include "QtDialogView.h" | ||
//#include "ScopedFunctor.h" | ||
//#include "SourceGroupJavaMaven.h" | ||
#include "SourceGroupSettingsJavaMaven.h" | ||
//#include "logging.h" | ||
//#include "utility.h" | ||
//#include "utilityFile.h" | ||
//#include "utilityMaven.h" | ||
|
||
QtProjectWizardContentPathSettingsMaven::QtProjectWizardContentPathSettingsMaven( | ||
std::shared_ptr<SourceGroupSettingsJavaMaven> settings, QtProjectWizardWindow* window) | ||
: QtProjectWizardContentPath(window), m_settings(settings) | ||
{ | ||
setTitleString("Maven Settings File (settings.xml)"); | ||
setHelpString( | ||
"If your project uses a custom Maven settings file, specify it here. " | ||
"If you leave this option empty, the default Maven settings will be used.<br />" | ||
"<br />" | ||
"You can make use of environment variables with ${ENV_VAR}."); | ||
setPlaceholderString("Use Default"); | ||
setAllowEmpty(true); | ||
setFileEndings({L".xml"}); | ||
} | ||
|
||
void QtProjectWizardContentPathSettingsMaven::populate(QGridLayout* layout, int& row) | ||
{ | ||
QtProjectWizardContentPath::populate(layout, row); | ||
m_picker->setPickDirectory(false); | ||
m_picker->setFileFilter("Settings File (*.xml)"); | ||
} | ||
|
||
void QtProjectWizardContentPathSettingsMaven::load() | ||
{ | ||
m_picker->setText(QString::fromStdWString(m_settings->getMavenSettingsFilePath().wstr())); | ||
} | ||
|
||
void QtProjectWizardContentPathSettingsMaven::save() | ||
{ | ||
m_settings->setMavenSettingsFilePath(FilePath(m_picker->getText().toStdWString())); | ||
} | ||
|
||
std::shared_ptr<SourceGroupSettings> QtProjectWizardContentPathSettingsMaven::getSourceGroupSettings() | ||
{ | ||
return m_settings; | ||
} |
29 changes: 29 additions & 0 deletions
29
src/lib_gui/qt/project_wizard/content/path/QtProjectWizardContentPathSettingsMaven.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#ifndef QT_PROJECT_WIZARD_CONTENT_PATH_SETTINGS_MAVEN_H | ||
#define QT_PROJECT_WIZARD_CONTENT_PATH_SETTINGS_MAVEN_H | ||
|
||
#include "QtProjectWizardContentPath.h" | ||
|
||
class QCheckBox; | ||
class SourceGroupSettingsJavaMaven; | ||
|
||
class QtProjectWizardContentPathSettingsMaven: public QtProjectWizardContentPath | ||
{ | ||
Q_OBJECT | ||
|
||
public: | ||
QtProjectWizardContentPathSettingsMaven( | ||
std::shared_ptr<SourceGroupSettingsJavaMaven> settings, QtProjectWizardWindow* window); | ||
|
||
// QtProjectWizardContent implementation | ||
void populate(QGridLayout* layout, int& row) override; | ||
|
||
void load() override; | ||
void save() override; | ||
|
||
private: | ||
std::shared_ptr<SourceGroupSettings> getSourceGroupSettings() override; | ||
|
||
std::shared_ptr<SourceGroupSettingsJavaMaven> m_settings; | ||
}; | ||
|
||
#endif // QT_PROJECT_WIZARD_CONTENT_PATH_SETTINGS_MAVEN_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters