Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIgor Fedorenko2014-04-19 09:02:55 -0400
committerIgor Fedorenko2014-04-20 19:04:43 -0400
commit99fd1dd4ae33375b4ec2b56d48a0f456469a42a5 (patch)
tree9bef22b2bf3d62fc83bfb67acadd14b615be209d
parent29cf3f60e55941e95d97eaf8627877d9ff734130 (diff)
downloadm2e-core-99fd1dd4ae33375b4ec2b56d48a0f456469a42a5.tar.gz
m2e-core-99fd1dd4ae33375b4ec2b56d48a0f456469a42a5.tar.xz
m2e-core-99fd1dd4ae33375b4ec2b56d48a0f456469a42a5.zip
432436 exposed user settings in maven launch config UI
Change-Id: I88f3709ef62e0ce178c973cab4890d4ee787ab28 Signed-off-by: Igor Fedorenko <igor@ifedorenko.com>
-rw-r--r--org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/Messages.java2
-rw-r--r--org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/messages.properties30
-rw-r--r--org.eclipse.m2e.launching/src/org/eclipse/m2e/ui/internal/launch/MavenLaunchMainTab.java32
3 files changed, 49 insertions, 15 deletions
diff --git a/org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/Messages.java b/org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/Messages.java
index ad9938a4..dd25d431 100644
--- a/org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/Messages.java
+++ b/org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/Messages.java
@@ -110,6 +110,8 @@ public class Messages extends NLS {
public static String launchPomDirectoryEmpty;
public static String launchPomDirectoryDoesntExist;
+ public static String MavenLaunchMainTab_lblUserSettings_text;
+ public static String MavenLaunchMainTab_btnUserSettings_text;
static {
// initialize resource bundle
diff --git a/org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/messages.properties b/org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/messages.properties
index 16a68c90..d38c7739 100644
--- a/org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/messages.properties
+++ b/org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/messages.properties
@@ -1,11 +1,14 @@
-ExecutePomAction_dialog_debug_message=Select a launch configuration to debug:
-ExecutePomAction_dialog_run_message=Select a launch configuration to run:
+#Eclipse modern messages class
+#Sat Apr 19 16:43:19 MSK 2014
+ExecutePomAction_dialog_debug_message=Select a launch configuration to debug\:
+ExecutePomAction_dialog_run_message=Select a launch configuration to run\:
ExecutePomAction_dialog_title=Select Configuration
ExecutePomAction_executing=Executing {0} in {1}
MavenFileEditorInput_0=Unable to open {0}
MavenLaunchDelegate_error_cannot_create_conf=Can't create m2.conf
MavenLaunchDelegate_job_name=Refreshing resources...
-MavenLaynchDelegate_unsupported_source_locator=Unknown or unsupported source locator {0}
+MavenLaunchExtensionsTab_lblExtensions=Maven Launch Extensions
+MavenLaunchExtensionsTab_name=Launch Extensions
MavenLaunchMainTab_btnAfterClean=Selec&t...
MavenLaunchMainTab_btnAutoBuild=&Select...
MavenLaunchMainTab_btnCleanBuild=Se&lect...
@@ -17,19 +20,18 @@ MavenLaunchMainTab_btnOffline=&Offline
MavenLaunchMainTab_btnResolveWorkspace=Resolve Workspace artifacts
MavenLaunchMainTab_btnSkipTests=S&kip Tests
MavenLaunchMainTab_btnUpdateSnapshots=&Update Snapshots
-MavenLaunchMainTab_lblAfterClean=A&fter a Clean Goals:
-MavenLaunchMainTab_lblAutoBuildGoals=Auto &Build Goals:
-MavenLaunchMainTab_lblCleanBuild=&During a Clean Goals:
-MavenLaunchMainTab_lblManualGoals=Ma&nual Build Goals:
-MavenLaunchMainTab_lblRuntime=Maven Runt&ime:
+MavenLaunchMainTab_btnUserSettings_text=File...
+MavenLaunchMainTab_lblAfterClean=A&fter a Clean Goals\:
+MavenLaunchMainTab_lblAutoBuildGoals=Auto &Build Goals\:
+MavenLaunchMainTab_lblCleanBuild=&During a Clean Goals\:
+MavenLaunchMainTab_lblManualGoals=Ma&nual Build Goals\:
+MavenLaunchMainTab_lblRuntime=Maven Runt&ime\:
MavenLaunchMainTab_lblThreads=&Threads
+MavenLaunchMainTab_lblUserSettings_text=User settings\:
MavenLaunchMainTab_property_dialog_edit_title=Edit Parameter
MavenLaunchMainTab_property_dialog_title=Add Parameter
-MavenLaunchExtensionsTab_name=Launch Extensions
-MavenLaunchExtensionsTab_lblExtensions=Maven Launch Extensions
MavenLaunchUtils_error_no_maven_install=Can't find Maven installation {0}
-
-
+MavenLaynchDelegate_unsupported_source_locator=Unknown or unsupported source locator {0}
launchBrowseFs=Browse File Syste&m...
launchBrowseVariables=&Variables...
launchBrowseWorkspace=Browse &Workspace...
@@ -39,11 +41,11 @@ launchGoalsLabel=&Goals\:
launchMainTabName=Main
launchPomDirectoryDoesntExist=Base directory doesn't exist or can't be read
launchPomDirectoryEmpty=Base directory should be specified
-launchPomGroup=Base directory:
+launchPomGroup=Base directory\:
launchProfilesLabel=&Profiles\:
launchPropAddButton=&Add...
+launchPropEditButton=E&dit...
launchPropName=Parameter Name
launchPropRemoveButton=&Remove
-launchPropEditButton=E&dit...
launchPropValue=Value
launchPropertyDialogBrowseVariables=Varia&bles...
diff --git a/org.eclipse.m2e.launching/src/org/eclipse/m2e/ui/internal/launch/MavenLaunchMainTab.java b/org.eclipse.m2e.launching/src/org/eclipse/m2e/ui/internal/launch/MavenLaunchMainTab.java
index 69c2fa68..54f06a9a 100644
--- a/org.eclipse.m2e.launching/src/org/eclipse/m2e/ui/internal/launch/MavenLaunchMainTab.java
+++ b/org.eclipse.m2e.launching/src/org/eclipse/m2e/ui/internal/launch/MavenLaunchMainTab.java
@@ -49,6 +49,7 @@ import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.DirectoryDialog;
+import org.eclipse.swt.widgets.FileDialog;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Table;
@@ -115,6 +116,8 @@ public class MavenLaunchMainTab extends AbstractLaunchConfigurationTab implement
private MavenRuntimeSelector runtimeSelector;
+ protected Text userSettings;
+
public MavenLaunchMainTab() {
}
@@ -246,6 +249,29 @@ public class MavenLaunchMainTab extends AbstractLaunchConfigurationTab implement
profilesText = new Text(mainComposite, SWT.BORDER);
profilesText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 4, 1));
profilesText.addModifyListener(modyfyingListener);
+
+ Label lblUserSettings = new Label(mainComposite, SWT.NONE);
+ lblUserSettings.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
+ lblUserSettings.setText(Messages.MavenLaunchMainTab_lblUserSettings_text);
+
+ userSettings = new Text(mainComposite, SWT.BORDER);
+ userSettings.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 3, 1));
+ userSettings.addModifyListener(modyfyingListener);
+
+ Button btnUserSettings = new Button(mainComposite, SWT.NONE);
+ btnUserSettings.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ FileDialog dialog = new FileDialog(getShell());
+ String file = dialog.open();
+ if(file != null) {
+ userSettings.setText(file);
+ entriesChanged();
+ }
+ }
+ });
+ btnUserSettings.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));
+ btnUserSettings.setText(Messages.MavenLaunchMainTab_btnUserSettings_text);
new Label(mainComposite, SWT.NONE);
offlineButton = new Button(mainComposite, SWT.CHECK);
@@ -467,9 +493,11 @@ public class MavenLaunchMainTab extends AbstractLaunchConfigurationTab implement
this.profilesText.setText(getAttribute(configuration, ATTR_PROFILES, "")); //$NON-NLS-1$
try {
-
IMavenConfiguration mavenConfiguration = MavenPlugin.getMavenConfiguration();
+ this.userSettings.setText(getAttribute(configuration, ATTR_USER_SETTINGS, ""));
+ this.userSettings.setMessage(mavenConfiguration.getUserSettingsFile());
+
this.offlineButton.setSelection(getAttribute(configuration, ATTR_OFFLINE, mavenConfiguration.isOffline()));
this.debugOutputButton.setSelection(getAttribute(configuration, ATTR_DEBUG_OUTPUT,
mavenConfiguration.isDebugOutput()));
@@ -542,6 +570,8 @@ public class MavenLaunchMainTab extends AbstractLaunchConfigurationTab implement
configuration.setAttribute(ATTR_PROFILES, this.profilesText.getText());
+ configuration.setAttribute(ATTR_USER_SETTINGS, this.userSettings.getText());
+
configuration.setAttribute(ATTR_OFFLINE, this.offlineButton.getSelection());
configuration.setAttribute(ATTR_UPDATE_SNAPSHOTS, this.updateSnapshotsButton.getSelection());
configuration.setAttribute(ATTR_SKIP_TESTS, this.skipTestsButton.getSelection());

Back to the top