Project

General

Profile

« Previous | Next » 

Revision 221a1f2e

Added by Patrick Plitzner over 8 years ago

Externalize Strings

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/UriWithLabelElement.java
59 59
        initText(formFactory, null, textHeight, null, false, style, textAndButton);
60 60

  
61 61
        //button
62
		btnOpenBrowser = formFactory.createButton(textAndButton, "", SWT.NONE);
62
		btnOpenBrowser = formFactory.createButton(textAndButton, "", SWT.NONE); //$NON-NLS-1$
63 63
		btnOpenBrowser.setImage(ImageResources.getImage(ImageResources.WEB));
64
		btnOpenBrowser.setToolTipText("Open in external browser");
64
		btnOpenBrowser.setToolTipText(Messages.UriWithLabelElement_OPEN_EXTERNAL_BROWSER);
65 65
		btnOpenBrowser.addSelectionListener(new SelectionAdapter() {
66 66
		    @Override
67 67
		    public void widgetSelected(SelectionEvent e) {
68
		        String errorTitle = "Invalid URL";
69
		        String errorText = "Could not open external browser. URL is invalid";
68
		        String errorTitle = Messages.UriWithLabelElement_INVALID_URL;
69
		        String errorText = Messages.UriWithLabelElement_COULD_NOT_OPEN_BROWSER;
70 70

  
71 71
		        URI uri = getUri();
72 72
		        if(uri!=null){
......
80 80
                        MessagingUtils.informationDialog(errorTitle, new Status(IStatus.WARNING, TaxeditorStorePlugin.PLUGIN_ID, errorText, iae));
81 81
                    }
82 82
		        }
83
		        else{
84
		            MessagingUtils.informationDialog(errorTitle, new Status(IStatus.WARNING, TaxeditorStorePlugin.PLUGIN_ID, errorText, null));
85
		        }
83 86
		    }
84 87
        });
85 88
		btnOpenBrowser.setLayoutData(LayoutConstants.RIGHT());
86 89

  
87
		labelException = formFactory.createLabel(getLayoutComposite(), "", SWT.WRAP);
90
		labelException = formFactory.createLabel(getLayoutComposite(), "", SWT.WRAP); //$NON-NLS-1$
88 91
		int numColumns = AbstractFormSection.DEFAULT_NUM_COLUMNS;
89 92
		if(getLayoutComposite().getLayout() instanceof TableWrapLayout){
90 93
		    numColumns = ((TableWrapLayout)getLayoutComposite().getLayout()).numColumns;

Also available in: Unified diff