TDQ-6518 MDMWizard don't care about label and name property of connection when change name

git-svn-id: http://talendforge.org/svn/tos/trunk@94597 f6f1c999-d317-4740-80b0-e6d1abc6f99e
This commit is contained in:
zshen
2012-11-29 08:16:43 +00:00
parent 3d0883d83d
commit 50ba17ea27

View File

@@ -237,6 +237,8 @@ public class MDMWizard extends RepositoryWizard implements INewWizard {
} else {
// changed by hqzhang for TDI-19527, label=displayName
connectionProperty.setLabel(connectionProperty.getDisplayName());
connectionItem.getConnection().setLabel(connectionProperty.getDisplayName());
connectionItem.getConnection().setName(connectionProperty.getDisplayName());
RepositoryUpdateManager.updateFileConnection(connectionItem);
// factory.save(connectionItem);
boolean isModified = propertiesWizardPage.isNameModifiedByUser();
@@ -249,7 +251,11 @@ public class MDMWizard extends RepositoryWizard implements INewWizard {
}
}
}
boolean isNameModified = propertiesWizardPage.isNameModifiedByUser();
if (isNameModified && tdqRepService != null) {
tdqRepService.saveConnectionWithDependency(connectionItem);
closeLockStrategy();
} else {
IWorkspace workspace = ResourcesPlugin.getWorkspace();
IWorkspaceRunnable operation = new IWorkspaceRunnable() {
@@ -264,6 +270,7 @@ public class MDMWizard extends RepositoryWizard implements INewWizard {
}
};
workspace.run(operation, null);
}
}
} catch (Exception e) {
String detailError = e.toString();