Author: dgeraskov
Date: 2009-11-18 05:48:16 -0500 (Wed, 18 Nov 2009)
New Revision: 18727
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/ConsoleConfigurationPropertySource.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/ConsoleConfigurationWizardPage.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4899
String changed to constants call.
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/ConsoleConfigurationPropertySource.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/ConsoleConfigurationPropertySource.java 2009-11-18
10:46:33 UTC (rev 18726)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/ConsoleConfigurationPropertySource.java 2009-11-18
10:48:16 UTC (rev 18727)
@@ -32,6 +32,7 @@
import org.eclipse.datatools.connectivity.ProfileManager;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
import org.eclipse.jface.viewers.ICellEditorValidator;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.osgi.util.NLS;
@@ -110,7 +111,7 @@
try {
ILaunchConfiguration lc =
HibernateConsolePlugin.getDefault().findLaunchConfig(cfg.getName());
if (lc != null){
- String projectName =
lc.getAttribute("org.eclipse.jdt.launching.PROJECT_ATTR", "");
//$NON-NLS-1$//$NON-NLS-2$
+ String projectName =
lc.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, "");
//$NON-NLS-1$
return Arrays.binarySearch(getSortedProjectNames(), projectName);
} else {
HibernateConsolePlugin.getDefault().log("Can't find Console Configuration
\"" + cfg.getName() + "\"");//$NON-NLS-1$//$NON-NLS-2$
@@ -219,7 +220,7 @@
ILaunchConfiguration lc =
HibernateConsolePlugin.getDefault().findLaunchConfig(cfg.getName());
if (lc != null){
ILaunchConfigurationWorkingCopy wc = lc.getWorkingCopy();
- wc.setAttribute("org.eclipse.jdt.launching.PROJECT_ATTR",
getSortedProjectNames()[index]);////$NON-NLS-1$
+ wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME,
getSortedProjectNames()[index]);
wc.doSave();
} else {
HibernateConsolePlugin.getDefault().log("Can't find Console Configuration
\"" + cfg.getName() + "\"");//$NON-NLS-1$//$NON-NLS-2$
@@ -266,7 +267,7 @@
try {
ILaunchConfiguration lc =
HibernateConsolePlugin.getDefault().findLaunchConfig(cfg.getName());
if (lc != null){
- String projectName =
lc.getAttribute("org.eclipse.jdt.launching.PROJECT_ATTR", (String)null);
//$NON-NLS-1$
+ String projectName =
lc.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, (String)null);
if (projectName != null){
return
NLS.bind(HibernateConsoleMessages.ConsoleConfigurationMainTab_the_java_project_does_not_exist,
projectName);
}
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/ConsoleConfigurationWizardPage.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/ConsoleConfigurationWizardPage.java 2009-11-18
10:46:33 UTC (rev 18726)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/ConsoleConfigurationWizardPage.java 2009-11-18
10:48:16 UTC (rev 18727)
@@ -557,6 +557,7 @@
}
if (flagFileWillBeCreated) {
setPathAttribute(currentLaunchConfig,
IConsoleConfigurationLaunchConstants.CFG_XML_FILE, configFullPath);
+ setStrAttribute(currentLaunchConfig,
IConsoleConfigurationLaunchConstants.CONFIGURATION_FACTORY,
ConfigurationMode.CORE.toString());
ConsoleConfigurationMainTab ccmt = null;
ILaunchConfigurationTab[] tabs = tabGroup.getTabs();
for (int i = 0; i < tabs.length; i++) {