From 47fe61a02ab8ebe43c9bb8ed77cb37c4a1be2081 Mon Sep 17 00:00:00 2001 From: Anna Dushistova Date: Tue, 14 Feb 2012 19:46:21 +0000 Subject: [PATCH] [352072] added a hyperlink to the proxy configuration properties. --- .../rse/internal/ui/SystemResources.java | 7 +++++-- .../internal/ui/SystemResources.properties | 4 +++- .../eclipse/rse/ui/SystemConnectionForm.java | 21 +++++++++++++++++-- 3 files changed, 27 insertions(+), 5 deletions(-) diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/SystemResources.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/SystemResources.java index 959da53aebb..b0182903912 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/SystemResources.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/SystemResources.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006, 2008 IBM Corporation and others. + * Copyright (c) 2006, 2012 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -25,7 +25,8 @@ * David Dykstal (IBM) - [188150] adding "go up one level" tooltip * David Dykstal (IBM) - [233678] title string is constructed by concatenation, should be substituted * David McKnight (IBM) - [248922] [dnd] Remote to local overwrite copy does not work - *******************************************************************************/ + * Anna Dushistova (MontaVista) - [352072] RSE attempts to use proxy where it should not +*******************************************************************************/ package org.eclipse.rse.internal.ui; @@ -1013,6 +1014,8 @@ public class SystemResources extends NLS public static String RESID_IMPORT_CONNECTION_LABEL_LONG; + public static String SystemConnectionForm_0; + public static String SystemExportConnectionAction_CoreExceptionFound; public static String SystemExportConnectionAction_Error; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/SystemResources.properties b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/SystemResources.properties index 3bed4150b07..806f782fa9e 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/SystemResources.properties +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/SystemResources.properties @@ -1,5 +1,5 @@ ################################################################################ -# Copyright (c) 2000, 2010 IBM Corporation and others. All rights reserved. +# Copyright (c) 2000, 2012 IBM Corporation and others. All rights reserved. # This program and the accompanying materials are made available under the terms # of the Eclipse Public License v1.0 which accompanies this distribution, and is # available at http://www.eclipse.org/legal/epl-v10.html @@ -28,6 +28,7 @@ # David Dykstal (IBM) - [233678] title string is constructed by concatenation, should be substituted # David McKnight (IBM) - [248922] [dnd] Remote to local overwrite copy does not work # David McKnight (IBM) - [287066] TVT35:TCT635: PLK: dots at ends of tooltips +# Anna Dushistova (MontaVista) - [352072] RSE attempts to use proxy where it should not ################################################################################ # NLS_MESSAGEFORMAT_VAR @@ -1077,6 +1078,7 @@ RESID_HOST_ENCODING_ENTER_TOOLTIP=Select or enter an encoding RESID_IMPORT_CONNECTION_ACTION_LABEL=Import... RESID_IMPORT_CONNECTION_ACTION_TOOLTIP=Import connection definition RESID_IMPORT_CONNECTION_LABEL_LONG=Import Connection... +SystemConnectionForm_0=Configure proxy settings SystemExportConnectionAction_CoreExceptionFound=Core exception found during export. SystemExportConnectionAction_Error=Error SystemExportConnectionAction_ExportJobName=RSE Connection Export Job diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemConnectionForm.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemConnectionForm.java index 689aa6a9bb9..aa0689c2e92 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemConnectionForm.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemConnectionForm.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2002, 2011 IBM Corporation and others. + * Copyright (c) 2002, 2012 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -25,6 +25,7 @@ * David McKnight (IBM) - [229610] [api] File transfers should use workspace text file encoding * David McKnight (IBM) - [238314] Default user ID on host properties page not disabled * David McKnight (IBM) - [353377] Connection name with ":" causes problems + * Anna Dushistova (MontaVista) - [352072] RSE attempts to use proxy where it should not *******************************************************************************/ package org.eclipse.rse.ui; @@ -41,6 +42,7 @@ import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.jface.dialogs.ProgressMonitorDialog; import org.eclipse.jface.operation.IRunnableContext; import org.eclipse.jface.operation.IRunnableWithProgress; +import org.eclipse.jface.preference.PreferenceDialog; import org.eclipse.jface.resource.JFaceResources; import org.eclipse.jface.wizard.IWizard; import org.eclipse.jface.wizard.IWizardPage; @@ -82,9 +84,12 @@ import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Event; import org.eclipse.swt.widgets.Group; import org.eclipse.swt.widgets.Label; +import org.eclipse.swt.widgets.Link; import org.eclipse.swt.widgets.Listener; import org.eclipse.swt.widgets.Text; import org.eclipse.ui.IWorkbenchPropertyPage; +import org.eclipse.ui.PlatformUI; +import org.eclipse.ui.dialogs.PreferencesUtil; import org.eclipse.ui.dialogs.PropertyPage; import org.eclipse.ui.ide.IDEEncoding; @@ -778,6 +783,18 @@ public class SystemConnectionForm implements Listener, SelectionListener, Runnab SystemWidgetHelpers.setHelp(workOfflineCB, RSEUIPlugin.HELPPREFIX + "wofp0000"); //$NON-NLS-1$ } + //AD: link to a network preference page + Link proxyLink = new Link(composite_prompts,SWT.NONE); + proxyLink.setText(""+SystemResources.SystemConnectionForm_0+""); //$NON-NLS-1$ //$NON-NLS-2$ + proxyLink.addSelectionListener(new SelectionAdapter() { + public void widgetSelected(SelectionEvent evt) { + PreferenceDialog dialog = PreferencesUtil.createPreferenceDialogOn( + PlatformUI.getWorkbench().getDisplay().getActiveShell(), "org.eclipse.ui.net.NetPreferences", //$NON-NLS-1$ + null, null); + dialog.open(); + } + }); + // connectionNameEmpty = (textConnectionName.getText().trim().length() == 0); // d43191 textConnectionName.setFocus(); @@ -969,7 +986,7 @@ public class SystemConnectionForm implements Listener, SelectionListener, Runnab } else { String workspaceDefault = SystemEncodingUtil.getInstance().getLocalDefaultEncoding(); - otherEncodingCombo.setText(workspaceDefault); //$NON-NLS-1$ + otherEncodingCombo.setText(workspaceDefault); } }