diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/ServerLauncherPropertiesServiceElement.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/ServerLauncherPropertiesServiceElement.java index cf1e8e870e2..ae6275a93a9 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/ServerLauncherPropertiesServiceElement.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/ServerLauncherPropertiesServiceElement.java @@ -26,6 +26,7 @@ import org.eclipse.swt.graphics.Image; public class ServerLauncherPropertiesServiceElement extends RSEModelServiceElement { protected IServerLauncherProperties _launcherProperties; + private boolean _userModified = false; public ServerLauncherPropertiesServiceElement(IHost host, ServiceElement parent, IServerLauncherProperties launcherProperties) { @@ -56,10 +57,16 @@ public class ServerLauncherPropertiesServiceElement extends RSEModelServiceEleme public void childChanged(ServiceElement element) { + _userModified = true; _launcherProperties.restoreFromProperties(); _launcherProperties.commit(); getParent().childChanged(element); } + + public boolean userModified() + { + return _userModified; + } public void commit() { diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/ServicesForm.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/ServicesForm.java index be932ed4f6f..ffacebb2654 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/ServicesForm.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/ServicesForm.java @@ -157,6 +157,8 @@ public class ServicesForm extends SystemBaseForm implements ICheckStateListener return _factoryViewer.getControl(); } + + private void createFactoryViewer(Composite parent) { // Create the table viewer. @@ -199,23 +201,9 @@ public class ServicesForm extends SystemBaseForm implements ICheckStateListener tableTree.setToolTipText(_serviceTooltip); -/* - TableLayout tableLayout = new TableLayout(); - - TreeColumn factoryColumn = new TreeColumn(tableTree, SWT.LEFT); - factoryColumn.setText("Property"); - tableLayout.addColumnData(new ColumnPixelData(100)); - tableTree.setLayout(tableLayout); - - TreeColumn fileServiceColumn = new TreeColumn(tableTree, SWT.LEFT); - fileServiceColumn.setText("Value"); - tableLayout.addColumnData(new ColumnPixelData(120)); - */ _serviceViewer.setAutoExpandLevel(AbstractTreeViewer.ALL_LEVELS); - // Adjust the table viewer. - //String[] properties = new String[] {"STRING", "STRING"}; - //_serviceViewer.setColumnProperties(properties); + _serviceViewer.setContentProvider(new ServiceTableContentProvider()); _serviceViewer.setLabelProvider(new ServiceTableLabelProvider()); @@ -304,4 +292,5 @@ public class ServicesForm extends SystemBaseForm implements ICheckStateListener } return description != null ? description : ""; //$NON-NLS-1$ } + } \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/SubSystemServiceWizardPage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/SubSystemServiceWizardPage.java index 5421c0274ff..29e9f49b004 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/SubSystemServiceWizardPage.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/SubSystemServiceWizardPage.java @@ -77,6 +77,7 @@ public class SubSystemServiceWizardPage extends AbstractSystemNewConnectionWizar return control; } + protected ServiceElement[] getServiceElements() { @@ -207,11 +208,19 @@ public class SubSystemServiceWizardPage extends AbstractSystemNewConnectionWizar ServerLauncherPropertiesServiceElement[] elements = getPropertiesServiceElement(); if (elements.length > 0) { - IServerLauncherProperties properties = elements[0].getServerLauncherProperties(); + ServerLauncherPropertiesServiceElement element = elements[0]; + if (element.userModified()) + { + IServerLauncherProperties properties = element.getServerLauncherProperties(); - IConnectorService rserv = ss.getConnectorService(); - properties.saveToProperties(); + IConnectorService rserv = ss.getConnectorService(); + properties.saveToProperties(); rserv.setRemoteServerLauncherProperties(properties); + } + else + { // just using defaults + + } /* PropertyElement[] properties = elements[i].getProperties(); for (int p = 0; p < properties.length; p++)