]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.document.linking.ui/src/org/simantics/document/linking/wizard/ReportSelectionPage.java
Externalize org.simantics.document.linking.ui
[simantics/platform.git] / bundles / org.simantics.document.linking.ui / src / org / simantics / document / linking / wizard / ReportSelectionPage.java
index da8ff028a00ba9d677cb829ff1fa40c76e5f6606..abc017609c21607e8b82dcb00e7aef3e7e3de253 100644 (file)
@@ -19,6 +19,7 @@ import org.eclipse.swt.widgets.FileDialog;
 import org.eclipse.swt.widgets.Group;
 import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Text;
+import org.simantics.Simantics;
 import org.simantics.db.ReadGraph;
 import org.simantics.db.Resource;
 import org.simantics.db.common.request.ReadRequest;
@@ -68,14 +69,14 @@ public class ReportSelectionPage extends WizardPage{
                Composite composite = new Composite(parent, SWT.NONE);
                composite.setLayout(new GridLayout(3,false));
                Label label = new Label(composite, SWT.NONE);
-               label.setText("Model:");
+               label.setText(Messages.ReportSelectionPage_Model);
                modelCombo = new CCombo(composite, SWT.BORDER|SWT.READ_ONLY);
                
                label = new Label(composite, SWT.NONE);
-               label.setText("File:");
+               label.setText(Messages.ReportSelectionPage_File);
                filenameText = new Text(composite, SWT.BORDER|SWT.SINGLE);
                browseButton = new Button(composite, SWT.PUSH);
-               browseButton.setText("Browse");
+               browseButton.setText(Messages.ReportSelectionPage_Browse);
                
                reportWriters.add(new ModelDocumentWriter());
                reportWriters.add(new ReferredDocumentWriter());
@@ -85,7 +86,7 @@ public class ReportSelectionPage extends WizardPage{
                reportWriters.add(new CompleteStructureWriter());
                
                Group group = new Group(composite, SWT.NONE);
-               group.setText("Report templates");
+               group.setText(Messages.ReportSelectionPage_ReportTemplates);
                group.setLayout(new FillLayout(SWT.VERTICAL));
                
                GridDataFactory.fillDefaults().grab(true, false).align(SWT.FILL, SWT.CENTER).applyTo(filenameText);
@@ -97,11 +98,11 @@ public class ReportSelectionPage extends WizardPage{
                        @Override
                        public void widgetSelected(SelectionEvent e) {
                                FileDialog dialog = new FileDialog(Display.getCurrent().getActiveShell(),SWT.SAVE);
-                               dialog.setFilterExtensions(new String[]{"*.pdf","*.html"});
-                               dialog.setFilterNames(new String[]{"PDF Document","HTML Document"});
+                               dialog.setFilterExtensions(new String[]{"*.pdf","*.html"}); //$NON-NLS-1$ //$NON-NLS-2$
+                               dialog.setFilterNames(new String[]{Messages.ReportSelectionPage_FilterPDFDocument,Messages.ReportSelectionPage_FilterHTMLDocument});
                                String filename = dialog.open();
                                if (filename == null)
-                                       filenameText.setText("");
+                                       filenameText.setText(""); //$NON-NLS-1$
                                else
                                        filenameText.setText(filename);
                                validate();
@@ -125,11 +126,11 @@ public class ReportSelectionPage extends WizardPage{
                        reportSelectionButtons.add(b);
                }
                
-               SimanticsUI.getSession().asyncRequest(new ReadRequest() {
+               Simantics.getSession().asyncRequest(new ReadRequest() {
                        
                        @Override
                        public void run(ReadGraph graph) throws DatabaseException {
-                               Resource project = SimanticsUI.getProject().get();
+                               Resource project = Simantics.getProject().get();
                                modelToComboListener = new ModelToComboListener(modelCombo) {
                                        @Override
                                        public Resource getCurrentModel() {