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;
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());
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);
@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();
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() {