1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-08 17:45:24 +02:00

removing warnings

This commit is contained in:
David McKnight 2006-12-19 21:18:48 +00:00
parent d31c468dbd
commit a2e7931a88
15 changed files with 70 additions and 76 deletions

View file

@ -45,7 +45,7 @@ public class ImageRegistry {
public static final String T_OBJ = "obj16"; //$NON-NLS-1$ public static final String T_OBJ = "obj16"; //$NON-NLS-1$
public static final String T_WIZBAN = "wizban"; //$NON-NLS-1$ public static final String T_WIZBAN = "wizban"; //$NON-NLS-1$
public static final String IMG_CERTIF_FILE = "certif_file.gif"; public static final String IMG_CERTIF_FILE = "certif_file.gif"; //$NON-NLS-1$
public static final String IMG_WZ_IMPORT_CERTIF = "import_cert_wiz.gif";//"newjprj_wiz.gif";//$NON-NLS-1$ public static final String IMG_WZ_IMPORT_CERTIF = "import_cert_wiz.gif";//"newjprj_wiz.gif";//$NON-NLS-1$
public static final ImageDescriptor DESC_IMG_CERTIF_FILE = createManaged(T_OBJ,IMG_CERTIF_FILE); public static final ImageDescriptor DESC_IMG_CERTIF_FILE = createManaged(T_OBJ,IMG_CERTIF_FILE);
@ -96,7 +96,7 @@ public class ImageRegistry {
String relPath) { String relPath) {
try { try {
ImageDescriptor id = ImageDescriptor id =
ImageDescriptor.createFromURL(makeIconFileURL("d" + type, relPath)); ImageDescriptor.createFromURL(makeIconFileURL("d" + type, relPath)); //$NON-NLS-1$
//$NON-NLS-1$ //$NON-NLS-1$
if (id != null) { if (id != null) {
action.setDisabledImageDescriptor(id); action.setDisabledImageDescriptor(id);

View file

@ -22,7 +22,6 @@ import java.util.List;
import org.eclipse.rse.core.comm.ISystemKeystoreProvider; import org.eclipse.rse.core.comm.ISystemKeystoreProvider;
import org.eclipse.rse.dstore.security.wizards.SystemImportCertAction; import org.eclipse.rse.dstore.security.wizards.SystemImportCertAction;
import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
public class UniversalKeystoreProvider implements ISystemKeystoreProvider public class UniversalKeystoreProvider implements ISystemKeystoreProvider
@ -48,7 +47,6 @@ public class UniversalKeystoreProvider implements ISystemKeystoreProvider
public void run() public void run()
{ {
Shell shell = Display.getDefault().getActiveShell();
SystemImportCertAction importAction = new SystemImportCertAction(_provider, _certificates, _systemName); SystemImportCertAction importAction = new SystemImportCertAction(_provider, _certificates, _systemName);
importAction.run(); importAction.run();
_wasCancelled = importAction.wasCancelled(); _wasCancelled = importAction.wasCancelled();

View file

@ -32,7 +32,7 @@ import org.osgi.framework.BundleContext;
public class UniversalSecurityPlugin extends AbstractUIPlugin public class UniversalSecurityPlugin extends AbstractUIPlugin
{ {
private final static String KEYSTORE = "dstorekeystore.dat"; private final static String KEYSTORE = "dstorekeystore.dat"; //$NON-NLS-1$
private static UniversalSecurityPlugin inst; private static UniversalSecurityPlugin inst;
private static ResourceBundle aResourceBundle; private static ResourceBundle aResourceBundle;
public static final String PLUGIN_ID = "org.eclipse.rse.dstore.security"; //$NON-NLS-1$ public static final String PLUGIN_ID = "org.eclipse.rse.dstore.security"; //$NON-NLS-1$
@ -80,7 +80,7 @@ public class UniversalSecurityPlugin extends AbstractUIPlugin
public static String getKeyStorePassword() public static String getKeyStorePassword()
{ {
return "dstore"; return "dstore"; //$NON-NLS-1$
} }
public static String getWorkspaceName(){ public static String getWorkspaceName(){

View file

@ -87,7 +87,7 @@ public class CertTableLabelProvider
break; break;
} }
} }
return ""; return ""; //$NON-NLS-1$
} }

View file

@ -28,8 +28,8 @@ import org.eclipse.swt.widgets.TableColumn;
public class CertTableSorter public class CertTableSorter
extends ViewerSorter extends ViewerSorter
{ {
private final static String ASC_SYMBOL = "^"; private final static String ASC_SYMBOL = "^"; //$NON-NLS-1$
private final static String DESC_SYMBOL = "."; private final static String DESC_SYMBOL = "."; //$NON-NLS-1$
private TableViewer tableViewer; private TableViewer tableViewer;
private int currentColumn; private int currentColumn;

View file

@ -97,7 +97,7 @@ public class NewCertDialog extends SystemPromptDialog implements Listener
catch(FileNotFoundException e){ catch(FileNotFoundException e){
String text = UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_KEY_IO_ERROR_); String text = UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_KEY_IO_ERROR_);
text = StringModifier.change(text, "%1", _certForm.getPath()); text = StringModifier.change(text, "%1", _certForm.getPath()); //$NON-NLS-1$
String msg = UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_CERTIFICATE_LOAD_EXC_); String msg = UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_CERTIFICATE_LOAD_EXC_);
Status err = new Status(IStatus.ERROR,ResourcesPlugin.PI_RESOURCES,IStatus.ERROR,text,e); Status err = new Status(IStatus.ERROR,ResourcesPlugin.PI_RESOURCES,IStatus.ERROR,text,e);
@ -108,9 +108,9 @@ public class NewCertDialog extends SystemPromptDialog implements Listener
catch(IOException e){ catch(IOException e){
String text = UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_LOAD_IO_EXC_); String text = UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_LOAD_IO_EXC_);
text = StringModifier.change(text, "%1", _certForm.getPath()); text = StringModifier.change(text, "%1", _certForm.getPath()); //$NON-NLS-1$
text = StringModifier.change(text, "%1", UniversalSecurityPlugin.getKeyStoreLocation()); text = StringModifier.change(text, "%1", UniversalSecurityPlugin.getKeyStoreLocation()); //$NON-NLS-1$
String msg = UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_CERTIFICATE_LOAD_EXC_); String msg = UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_CERTIFICATE_LOAD_EXC_);
Status err = new Status(IStatus.ERROR,ResourcesPlugin.PI_RESOURCES,IStatus.ERROR,text,e); Status err = new Status(IStatus.ERROR,ResourcesPlugin.PI_RESOURCES,IStatus.ERROR,text,e);
@ -121,7 +121,7 @@ public class NewCertDialog extends SystemPromptDialog implements Listener
catch(CertificateException exc){ catch(CertificateException exc){
String text = UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_CERTIFICATE_EXC_); String text = UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_CERTIFICATE_EXC_);
text = StringModifier.change(text, "%1", _certForm.getPath()); text = StringModifier.change(text, "%1", _certForm.getPath()); //$NON-NLS-1$
String msg = UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_CERTIFICATE_LOAD_EXC_); String msg = UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_CERTIFICATE_LOAD_EXC_);
@ -132,7 +132,7 @@ public class NewCertDialog extends SystemPromptDialog implements Listener
} }
catch(KeyStoreException exc){ catch(KeyStoreException exc){
String text = UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_KEY_STORE_ERROR_); String text = UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_KEY_STORE_ERROR_);
text = StringModifier.change(text, "%1", UniversalSecurityPlugin.getKeyStoreLocation()); text = StringModifier.change(text, "%1", UniversalSecurityPlugin.getKeyStoreLocation()); //$NON-NLS-1$
String msg = UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_CERTIFICATE_LOAD_EXC_); String msg = UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_CERTIFICATE_LOAD_EXC_);
Status err = new Status(IStatus.ERROR,ResourcesPlugin.PI_RESOURCES,IStatus.ERROR,text,exc); Status err = new Status(IStatus.ERROR,ResourcesPlugin.PI_RESOURCES,IStatus.ERROR,text,exc);

View file

@ -57,7 +57,6 @@ import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Event; import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Listener; import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Table; import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableColumn; import org.eclipse.swt.widgets.TableColumn;
@ -119,7 +118,7 @@ public class UniversalSecurityPreferencePage extends PreferencePage implements
createButtons(buttons); createButtons(buttons);
initializeValues(); initializeValues();
SystemWidgetHelpers.setCompositeHelp(parent, RSEUIPlugin.HELPPREFIX + "ssls0000"); SystemWidgetHelpers.setCompositeHelp(parent, RSEUIPlugin.HELPPREFIX + "ssls0000"); //$NON-NLS-1$
return composite; return composite;
} }
@ -159,7 +158,7 @@ public class UniversalSecurityPreferencePage extends PreferencePage implements
table.setLayout(tableLayout); table.setLayout(tableLayout);
// Adjust the table viewer. // Adjust the table viewer.
String[] properties = new String[] {"STRING", "STRING", "STRING", "NUMBER"}; String[] properties = new String[] {"STRING", "STRING", "STRING", "NUMBER"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
_viewer.setColumnProperties(properties); _viewer.setColumnProperties(properties);
_viewer.setContentProvider(new CertTableContentProvider()); _viewer.setContentProvider(new CertTableContentProvider());
_viewer.setLabelProvider(new CertTableLabelProvider()); _viewer.setLabelProvider(new CertTableLabelProvider());
@ -220,16 +219,16 @@ public class UniversalSecurityPreferencePage extends PreferencePage implements
{ {
String text = UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_IO_SAVE_ERROR_); String text = UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_IO_SAVE_ERROR_);
text = StringModifier.change(text, "%1", storePath); text = StringModifier.change(text, "%1", storePath); //$NON-NLS-1$
text = StringModifier.change(text, "%1", storePath); text = StringModifier.change(text, "%1", storePath); //$NON-NLS-1$
String msg = UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_KEYSTORE_SAVE_ERROR_); String msg = UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_KEYSTORE_SAVE_ERROR_);
Status err = new Status(IStatus.ERROR, ResourcesPlugin.PI_RESOURCES, Status err = new Status(IStatus.ERROR, ResourcesPlugin.PI_RESOURCES,
IStatus.ERROR, text, e); IStatus.ERROR, text, e);
ErrorDialog.openError(UniversalSecurityPlugin ErrorDialog.openError(UniversalSecurityPlugin
.getActiveWorkbenchShell(), UniversalSecurityPlugin .getActiveWorkbenchShell(), UniversalSecurityPlugin
.getString("SEC_MSG"), msg, err); .getString("SEC_MSG"), msg, err); //$NON-NLS-1$
return false; return false;
} }
@ -237,7 +236,7 @@ public class UniversalSecurityPreferencePage extends PreferencePage implements
{ {
String text = UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_CERTIFICATE_STORE_ERROR_); String text = UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_CERTIFICATE_STORE_ERROR_);
text = StringModifier.change(text, "%1", storePath); text = StringModifier.change(text, "%1", storePath); //$NON-NLS-1$
String msg = UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_KEYSTORE_SAVE_ERROR_); String msg = UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_KEYSTORE_SAVE_ERROR_);
Status err = new Status(IStatus.ERROR, ResourcesPlugin.PI_RESOURCES, Status err = new Status(IStatus.ERROR, ResourcesPlugin.PI_RESOURCES,
@ -250,33 +249,33 @@ public class UniversalSecurityPreferencePage extends PreferencePage implements
catch (KeyStoreException exc) catch (KeyStoreException exc)
{ {
String text = UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_UNINIT_KEYSTORE_ERROR_); String text = UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_UNINIT_KEYSTORE_ERROR_);
text = StringModifier.change(text, "%1", UniversalSecurityPlugin text = StringModifier.change(text, "%1", UniversalSecurityPlugin //$NON-NLS-1$
.getKeyStoreLocation()); .getKeyStoreLocation());
String msg = UniversalSecurityPlugin String msg = UniversalSecurityPlugin
.getString("RESID_SECURITY_KEYSTORE_SAVE_ERROR_"); .getString("RESID_SECURITY_KEYSTORE_SAVE_ERROR_"); //$NON-NLS-1$
Status err = new Status(IStatus.ERROR, ResourcesPlugin.PI_RESOURCES, Status err = new Status(IStatus.ERROR, ResourcesPlugin.PI_RESOURCES,
IStatus.ERROR, text, exc); IStatus.ERROR, text, exc);
ErrorDialog.openError(UniversalSecurityPlugin ErrorDialog.openError(UniversalSecurityPlugin
.getActiveWorkbenchShell(), UniversalSecurityPlugin .getActiveWorkbenchShell(), UniversalSecurityPlugin
.getString("SEC_MSG"), msg, err); .getString("SEC_MSG"), msg, err); //$NON-NLS-1$
return false; return false;
} }
catch (NoSuchAlgorithmException exc2) catch (NoSuchAlgorithmException exc2)
{ {
String text = UniversalSecurityPlugin String text = UniversalSecurityPlugin
.getString("RESID_SECURITY_ALGORITHM_ERROR_"); .getString("RESID_SECURITY_ALGORITHM_ERROR_"); //$NON-NLS-1$
text = StringModifier.change(text, "%1", UniversalSecurityPlugin text = StringModifier.change(text, "%1", UniversalSecurityPlugin //$NON-NLS-1$
.getKeyStoreLocation()); .getKeyStoreLocation());
String msg = UniversalSecurityPlugin String msg = UniversalSecurityPlugin
.getString("RESID_SECURITY_KEYSTORE_SAVE_ERROR_"); .getString("RESID_SECURITY_KEYSTORE_SAVE_ERROR_"); //$NON-NLS-1$
Status err = new Status(IStatus.ERROR, ResourcesPlugin.PI_RESOURCES, Status err = new Status(IStatus.ERROR, ResourcesPlugin.PI_RESOURCES,
IStatus.ERROR, text, exc2); IStatus.ERROR, text, exc2);
ErrorDialog.openError(UniversalSecurityPlugin ErrorDialog.openError(UniversalSecurityPlugin
.getActiveWorkbenchShell(), UniversalSecurityPlugin .getActiveWorkbenchShell(), UniversalSecurityPlugin
.getString("SEC_MSG"), msg, err); .getString("SEC_MSG"), msg, err); //$NON-NLS-1$
return false; return false;
} }
@ -324,7 +323,7 @@ public class UniversalSecurityPreferencePage extends PreferencePage implements
Key key = _keyStore.getKey(alias, passw.toCharArray()); Key key = _keyStore.getKey(alias, passw.toCharArray());
KeyElement elem = new KeyElement(alias, KeyElement elem = new KeyElement(alias,
UniversalSecurityPlugin UniversalSecurityPlugin
.getString("RESID_SECURITY_KEY_ENTRY"), .getString("RESID_SECURITY_KEY_ENTRY"), //$NON-NLS-1$
key); key);
_tableItems.add(elem); _tableItems.add(elem);
} }
@ -340,81 +339,81 @@ public class UniversalSecurityPreferencePage extends PreferencePage implements
{ {
String text = UniversalSecurityPlugin String text = UniversalSecurityPlugin
.getString("RESID_SECURITY_LOAD_IO_EXC_"); .getString("RESID_SECURITY_LOAD_IO_EXC_"); //$NON-NLS-1$
text = StringModifier.change(text, "%1", storePath); text = StringModifier.change(text, "%1", storePath); //$NON-NLS-1$
String msg = UniversalSecurityPlugin String msg = UniversalSecurityPlugin
.getString("RESID_SECURITY_LOAD_KEYSTORE_ERROR_"); .getString("RESID_SECURITY_LOAD_KEYSTORE_ERROR_"); //$NON-NLS-1$
Status err = new Status(IStatus.ERROR, ResourcesPlugin.PI_RESOURCES, Status err = new Status(IStatus.ERROR, ResourcesPlugin.PI_RESOURCES,
IStatus.ERROR, text, e); IStatus.ERROR, text, e);
ErrorDialog.openError(UniversalSecurityPlugin ErrorDialog.openError(UniversalSecurityPlugin
.getActiveWorkbenchShell(), UniversalSecurityPlugin .getActiveWorkbenchShell(), UniversalSecurityPlugin
.getString("SEC_MSG"), msg, err); .getString("SEC_MSG"), msg, err); //$NON-NLS-1$
} }
catch (CertificateException exc) catch (CertificateException exc)
{ {
String text = UniversalSecurityPlugin String text = UniversalSecurityPlugin
.getString("RESID_SECURITY_KEY_LOAD_ERROR_"); .getString("RESID_SECURITY_KEY_LOAD_ERROR_"); //$NON-NLS-1$
text = StringModifier.change(text, "%1", storePath); text = StringModifier.change(text, "%1", storePath); //$NON-NLS-1$
String msg = UniversalSecurityPlugin String msg = UniversalSecurityPlugin
.getString("RESID_SECURITY_LOAD_KEYSTORE_ERROR_"); .getString("RESID_SECURITY_LOAD_KEYSTORE_ERROR_"); //$NON-NLS-1$
Status err = new Status(IStatus.ERROR, ResourcesPlugin.PI_RESOURCES, Status err = new Status(IStatus.ERROR, ResourcesPlugin.PI_RESOURCES,
IStatus.ERROR, text, exc); IStatus.ERROR, text, exc);
ErrorDialog.openError(UniversalSecurityPlugin ErrorDialog.openError(UniversalSecurityPlugin
.getActiveWorkbenchShell(), UniversalSecurityPlugin .getActiveWorkbenchShell(), UniversalSecurityPlugin
.getString("SEC_MSG"), msg, err); .getString("SEC_MSG"), msg, err); //$NON-NLS-1$
} }
catch (KeyStoreException exc) catch (KeyStoreException exc)
{ {
String text = UniversalSecurityPlugin String text = UniversalSecurityPlugin
.getString("RESID_SECURITY_INITIALIZE_ERROR_"); .getString("RESID_SECURITY_INITIALIZE_ERROR_"); //$NON-NLS-1$
text = StringModifier.change(text, "%1", UniversalSecurityPlugin text = StringModifier.change(text, "%1", UniversalSecurityPlugin //$NON-NLS-1$
.getKeyStoreLocation()); .getKeyStoreLocation());
String msg = UniversalSecurityPlugin String msg = UniversalSecurityPlugin
.getString("RESID_SECURITY_LOAD_KEYSTORE_ERROR_"); .getString("RESID_SECURITY_LOAD_KEYSTORE_ERROR_"); //$NON-NLS-1$
Status err = new Status(IStatus.ERROR, ResourcesPlugin.PI_RESOURCES, Status err = new Status(IStatus.ERROR, ResourcesPlugin.PI_RESOURCES,
IStatus.ERROR, text, exc); IStatus.ERROR, text, exc);
ErrorDialog.openError(UniversalSecurityPlugin ErrorDialog.openError(UniversalSecurityPlugin
.getActiveWorkbenchShell(), UniversalSecurityPlugin .getActiveWorkbenchShell(), UniversalSecurityPlugin
.getString("SEC_MSG"), msg, err); .getString("SEC_MSG"), msg, err); //$NON-NLS-1$
} }
catch (NoSuchProviderException exc2) catch (NoSuchProviderException exc2)
{ {
String text = UniversalSecurityPlugin String text = UniversalSecurityPlugin
.getString("RESID_SECURITY_SECURITY_PROVIDER_ERROR_"); .getString("RESID_SECURITY_SECURITY_PROVIDER_ERROR_"); //$NON-NLS-1$
String msg = UniversalSecurityPlugin String msg = UniversalSecurityPlugin
.getString("RESID_SECURITY_INITIALIZE_ERROR_"); .getString("RESID_SECURITY_INITIALIZE_ERROR_"); //$NON-NLS-1$
msg = StringModifier.change(msg, "%1", UniversalSecurityPlugin msg = StringModifier.change(msg, "%1", UniversalSecurityPlugin //$NON-NLS-1$
.getKeyStoreLocation()); .getKeyStoreLocation());
Status err = new Status(IStatus.ERROR, ResourcesPlugin.PI_RESOURCES, Status err = new Status(IStatus.ERROR, ResourcesPlugin.PI_RESOURCES,
IStatus.ERROR, text, exc2); IStatus.ERROR, text, exc2);
ErrorDialog.openError(UniversalSecurityPlugin ErrorDialog.openError(UniversalSecurityPlugin
.getActiveWorkbenchShell(), UniversalSecurityPlugin .getActiveWorkbenchShell(), UniversalSecurityPlugin
.getString("SEC_MSG"), msg, err); .getString("SEC_MSG"), msg, err); //$NON-NLS-1$
} }
catch (NoSuchAlgorithmException exc2) catch (NoSuchAlgorithmException exc2)
{ {
String text = UniversalSecurityPlugin String text = UniversalSecurityPlugin
.getString("RESID_SECURITY_ALGORITHM_ERROR_"); .getString("RESID_SECURITY_ALGORITHM_ERROR_"); //$NON-NLS-1$
text = StringModifier.change(text, "%1", UniversalSecurityPlugin text = StringModifier.change(text, "%1", UniversalSecurityPlugin //$NON-NLS-1$
.getKeyStoreLocation()); .getKeyStoreLocation());
String msg = UniversalSecurityPlugin String msg = UniversalSecurityPlugin
.getString("RESID_SECURITY_LOAD_KEYSTORE_ERROR_"); .getString("RESID_SECURITY_LOAD_KEYSTORE_ERROR_"); //$NON-NLS-1$
Status err = new Status(IStatus.ERROR, ResourcesPlugin.PI_RESOURCES, Status err = new Status(IStatus.ERROR, ResourcesPlugin.PI_RESOURCES,
IStatus.ERROR, text, exc2); IStatus.ERROR, text, exc2);
ErrorDialog.openError(UniversalSecurityPlugin ErrorDialog.openError(UniversalSecurityPlugin
.getActiveWorkbenchShell(), UniversalSecurityPlugin .getActiveWorkbenchShell(), UniversalSecurityPlugin
.getString("SEC_MSG"), msg, err); .getString("SEC_MSG"), msg, err); //$NON-NLS-1$
} }

View file

@ -45,7 +45,7 @@ public class X509CertificateElement extends Element
public String getVersion() public String getVersion()
{ {
return "V." + _cert.getVersion(); return "V." + _cert.getVersion(); //$NON-NLS-1$
} }
private String[] parse(String full) private String[] parse(String full)
@ -72,13 +72,13 @@ public class X509CertificateElement extends Element
} }
result.append(c); result.append(c);
} }
return result.toString().split(";"); return result.toString().split(";"); //$NON-NLS-1$
} }
private String extract(String full, int index) private String extract(String full, int index)
{ {
String[] pairs = parse(full); String[] pairs = parse(full);
String match = pairs[index].split("=")[1]; String match = pairs[index].split("=")[1]; //$NON-NLS-1$
return match; return match;
} }

View file

@ -83,7 +83,7 @@ public class CertificateForm extends SystemBaseForm
lblPath.setText(UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_CERTIFICATE_FILE)); lblPath.setText(UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_CERTIFICATE_FILE));
_pathField = new Text(nameGroup, SWT.BORDER); _pathField = new Text(nameGroup, SWT.BORDER);
_pathField.setLayoutData(GridUtil.createHorizontalFill()); _pathField.setLayoutData(GridUtil.createHorizontalFill());
_pathField.setText(""); _pathField.setText(""); //$NON-NLS-1$
_browseButton = new Button(nameGroup, SWT.PUSH); _browseButton = new Button(nameGroup, SWT.PUSH);
_browseButton.setText(UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_BROWSE)); _browseButton.setText(UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_BROWSE));
@ -93,7 +93,7 @@ public class CertificateForm extends SystemBaseForm
Label lblName = new Label(nameGroup, SWT.NONE); Label lblName = new Label(nameGroup, SWT.NONE);
lblName.setText(UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_CERTIFICATE_ALIAS)); lblName.setText(UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_CERTIFICATE_ALIAS));
_aliasField = new Text(nameGroup, SWT.BORDER); _aliasField = new Text(nameGroup, SWT.BORDER);
_aliasField.setText(""); _aliasField.setText(""); //$NON-NLS-1$
_aliasField.setLayoutData(GridUtil.createHorizontalFill()); _aliasField.setLayoutData(GridUtil.createHorizontalFill());
@ -140,7 +140,7 @@ public class CertificateForm extends SystemBaseForm
FileDialog dlg = new FileDialog(_shell, SWT.OPEN); FileDialog dlg = new FileDialog(_shell, SWT.OPEN);
dlg.setFileName(currentSource); dlg.setFileName(currentSource);
dlg.setFilterExtensions(new String[]{"*.cer", "*.*"}); dlg.setFilterExtensions(new String[]{"*.cer", "*.*"}); //$NON-NLS-1$ //$NON-NLS-2$
String source = dlg.open(); String source = dlg.open();

View file

@ -163,14 +163,14 @@ public class CertificatePropertiesForm extends SystemBaseForm
lblAlgorithmValue.setLayoutData(data); lblAlgorithmValue.setLayoutData(data);
if(_certificate instanceof X509Certificate){ if(_certificate instanceof X509Certificate){
lblVersionValue.setText(((X509Certificate)_certificate).getType() + " V."+((X509Certificate)_certificate).getVersion()); lblVersionValue.setText(((X509Certificate)_certificate).getType() + " V."+((X509Certificate)_certificate).getVersion()); //$NON-NLS-1$
lblIssuedToValue.setText(((X509Certificate)_certificate).getSubjectDN().getName()); lblIssuedToValue.setText(((X509Certificate)_certificate).getSubjectDN().getName());
lblIssuedByValue.setText(((X509Certificate)_certificate).getIssuerDN().getName()); lblIssuedByValue.setText(((X509Certificate)_certificate).getIssuerDN().getName());
DateFormat df = DateFormat.getDateInstance(DateFormat.LONG); DateFormat df = DateFormat.getDateInstance(DateFormat.LONG);
String validity = UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_VALIDITY_PERIOD); String validity = UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_VALIDITY_PERIOD);
validity = StringModifier.change(validity,"%1", df.format(((X509Certificate)_certificate).getNotBefore())); validity = StringModifier.change(validity,"%1", df.format(((X509Certificate)_certificate).getNotBefore())); //$NON-NLS-1$
validity = StringModifier.change(validity,"%2", df.format(((X509Certificate)_certificate).getNotAfter())); validity = StringModifier.change(validity,"%2", df.format(((X509Certificate)_certificate).getNotAfter())); //$NON-NLS-1$
lblValidityValue.setText(validity); lblValidityValue.setText(validity);
lblAlgorithmValue.setText(((X509Certificate)_certificate).getSigAlgName()); lblAlgorithmValue.setText(((X509Certificate)_certificate).getSigAlgName());
@ -270,14 +270,14 @@ public class CertificatePropertiesForm extends SystemBaseForm
lblAlgorithmValue.setLayoutData(data); lblAlgorithmValue.setLayoutData(data);
if(_certificate instanceof X509Certificate){ if(_certificate instanceof X509Certificate){
lblVersionValue.setText(((X509Certificate)_certificate).getType() + " V."+((X509Certificate)_certificate).getVersion()); lblVersionValue.setText(((X509Certificate)_certificate).getType() + " V."+((X509Certificate)_certificate).getVersion()); //$NON-NLS-1$
lblIssuedToValue.setText(((X509Certificate)_certificate).getSubjectDN().getName()); lblIssuedToValue.setText(((X509Certificate)_certificate).getSubjectDN().getName());
lblIssuedByValue.setText(((X509Certificate)_certificate).getIssuerDN().getName()); lblIssuedByValue.setText(((X509Certificate)_certificate).getIssuerDN().getName());
DateFormat df = DateFormat.getDateInstance(DateFormat.LONG); DateFormat df = DateFormat.getDateInstance(DateFormat.LONG);
String validity = UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_VALIDITY_PERIOD); String validity = UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_VALIDITY_PERIOD);
validity = StringModifier.change(validity,"%1", df.format(((X509Certificate)_certificate).getNotBefore())); validity = StringModifier.change(validity,"%1", df.format(((X509Certificate)_certificate).getNotBefore())); //$NON-NLS-1$
validity = StringModifier.change(validity,"%2", df.format(((X509Certificate)_certificate).getNotAfter())); validity = StringModifier.change(validity,"%2", df.format(((X509Certificate)_certificate).getNotAfter())); //$NON-NLS-1$
lblValidityValue.setText(validity); lblValidityValue.setText(validity);
lblAlgorithmValue.setText(((X509Certificate)_certificate).getSigAlgName()); lblAlgorithmValue.setText(((X509Certificate)_certificate).getSigAlgName());

View file

@ -87,7 +87,7 @@ public class NewCertTableLabelProvider
break; break;
} }
} }
return ""; return ""; //$NON-NLS-1$
} }

View file

@ -24,7 +24,6 @@ import org.eclipse.rse.dstore.security.ImageRegistry;
import org.eclipse.rse.dstore.security.UniversalSecurityProperties; import org.eclipse.rse.dstore.security.UniversalSecurityProperties;
import org.eclipse.rse.ui.actions.SystemBaseWizardAction; import org.eclipse.rse.ui.actions.SystemBaseWizardAction;
import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
public class SystemImportCertAction extends SystemBaseWizardAction public class SystemImportCertAction extends SystemBaseWizardAction
{ {
@ -45,7 +44,6 @@ public class SystemImportCertAction extends SystemBaseWizardAction
public IWizard createWizard() public IWizard createWizard()
{ {
Shell shell = Display.getDefault().getActiveShell();
SystemImportCertWizard importWiz = new SystemImportCertWizard(_provider, _systemName); SystemImportCertWizard importWiz = new SystemImportCertWizard(_provider, _systemName);
importWiz.setInputObject(_certificates); importWiz.setInputObject(_certificates);
return importWiz; return importWiz;

View file

@ -25,7 +25,6 @@ import org.eclipse.rse.core.SystemBasePlugin;
import org.eclipse.rse.core.comm.ISystemKeystoreProvider; import org.eclipse.rse.core.comm.ISystemKeystoreProvider;
import org.eclipse.rse.dstore.security.ImageRegistry; import org.eclipse.rse.dstore.security.ImageRegistry;
import org.eclipse.rse.dstore.security.UniversalSecurityProperties; import org.eclipse.rse.dstore.security.UniversalSecurityProperties;
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
import org.eclipse.rse.ui.wizards.AbstractSystemWizard; import org.eclipse.rse.ui.wizards.AbstractSystemWizard;
public class SystemImportCertWizard public class SystemImportCertWizard
@ -64,7 +63,7 @@ public class SystemImportCertWizard
//super.addPages(); //super.addPages();
} catch (Exception exc) } catch (Exception exc)
{ {
SystemBasePlugin.logError("New File: Error in createPages: ",exc); SystemBasePlugin.logError("New File: Error in createPages: ",exc); //$NON-NLS-1$
} }
} }
@ -74,11 +73,11 @@ public class SystemImportCertWizard
*/ */
protected SystemImportCertWizardMainPage createMainPage() protected SystemImportCertWizardMainPage createMainPage()
{ {
SystemMessage errMsg = null; // SystemMessage errMsg = null;
_mainPage = new SystemImportCertWizardMainPage(this, getCertificates()); _mainPage = new SystemImportCertWizardMainPage(this, getCertificates());
if (errMsg != null) // if (errMsg != null)
_mainPage.setErrorMessage(errMsg); // _mainPage.setErrorMessage(errMsg);
return _mainPage; return _mainPage;
} }
@ -88,11 +87,11 @@ public class SystemImportCertWizard
*/ */
protected SystemImportCertWizardAliasPage createAliasPage() protected SystemImportCertWizardAliasPage createAliasPage()
{ {
SystemMessage errMsg = null; // SystemMessage errMsg = null;
_aliasPage = new SystemImportCertWizardAliasPage(this, getCertificates(), _systemName); _aliasPage = new SystemImportCertWizardAliasPage(this, getCertificates(), _systemName);
if (errMsg != null) // if (errMsg != null)
_aliasPage.setErrorMessage(errMsg); // _aliasPage.setErrorMessage(errMsg);
return _aliasPage; return _aliasPage;
} }

View file

@ -57,7 +57,7 @@ public class SystemImportCertWizardAliasPage
*/ */
public SystemImportCertWizardAliasPage(Wizard wizard, List certs, String systemName) public SystemImportCertWizardAliasPage(Wizard wizard, List certs, String systemName)
{ {
super(wizard, "SpecifyAlias", super(wizard, "SpecifyAlias", //$NON-NLS-1$
UniversalSecurityProperties.RESID_SECURITY_TRUST_WIZ_ALIAS_TITLE, UniversalSecurityProperties.RESID_SECURITY_TRUST_WIZ_ALIAS_TITLE,
UniversalSecurityProperties.RESID_SECURITY_TRUST_WIZ_ALIAS_DESC); UniversalSecurityProperties.RESID_SECURITY_TRUST_WIZ_ALIAS_DESC);
_systemName = systemName; _systemName = systemName;
@ -165,7 +165,7 @@ public class SystemImportCertWizardAliasPage
public String getAlias() public String getAlias()
{ {
String alias = _alias.getText().trim(); String alias = _alias.getText().trim();
if (alias.equals("")) if (alias.equals("")) //$NON-NLS-1$
{ {
try try
{ {

View file

@ -65,7 +65,7 @@ public class SystemImportCertWizardMainPage
*/ */
public SystemImportCertWizardMainPage(Wizard wizard, List certs) public SystemImportCertWizardMainPage(Wizard wizard, List certs)
{ {
super(wizard, "NewCertificate", super(wizard, "NewCertificate", //$NON-NLS-1$
UniversalSecurityProperties.RESID_SECURITY_TRUST_WIZ_CERTIFICATE_TITLE, UniversalSecurityProperties.RESID_SECURITY_TRUST_WIZ_CERTIFICATE_TITLE,
UniversalSecurityProperties.RESID_SECURITY_TRUST_WIZ_CERTIFICATE_DESC); UniversalSecurityProperties.RESID_SECURITY_TRUST_WIZ_CERTIFICATE_DESC);
_certificates = certs; _certificates = certs;
@ -131,7 +131,7 @@ public class SystemImportCertWizardMainPage
table.setLayout(tableLayout); table.setLayout(tableLayout);
// Adjust the table viewer. // Adjust the table viewer.
String[] properties = new String[] {"STRING", "STRING", "NUMBER"}; String[] properties = new String[] {"STRING", "STRING", "NUMBER"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
_viewer.setColumnProperties(properties); _viewer.setColumnProperties(properties);
_viewer.setContentProvider(new CertTableContentProvider()); _viewer.setContentProvider(new CertTableContentProvider());
_viewer.setLabelProvider(new NewCertTableLabelProvider()); _viewer.setLabelProvider(new NewCertTableLabelProvider());