Open lak-proddev opened 5 years ago
@BoykoAlex Do we really need to set the server name here ?
if (wc != null) { wc.setName(nameText.getText()); } // /code-open TcServer21InstanceCreationFragment.java 480-483
Hmm... think I've tried the steps above and I believe the server name was the one I typed in:
Regarding the code snippet... Not sure... but why not? I feel that it might be the problem with isDefaultServerName
flag set above on line 461:
Maybe that line 461 should go after the code snippet you pasted because exit()
lines 453-455 looks at the isDefaultServerName` and sets default name and may overwrite the name set previously.
Would like to create a PR that makes things work for you?
NVM... looks like creating new instance is the important step from the instructions... Feels like it creates a new working copy. I reproduced the issue when created a new instance rather than used the existing one. Maybe you're right and that if block has nothing to do there... there is a modify listener there already that sets the name based on changes... Perhaps it's the tests that require it...
STEPS:
Configure a new Pivotal TC server with version 4.0.1 and provide a custom name in Server Name field. It results in server configuration created with blank server name. Reproducible with Pivotal TC server version 3.2.13.
For new instance, we are not setting any new name if not default name. which was already empty. See these code points com.vmware.vfabric.ide.eclipse.tcserver.internal.ui.TcServer21InstanceCreationFragment.exit() com.vmware.vfabric.ide.eclipse.tcserver.internal.ui.TcServer21InstanceCreationFragment.initialize()