Package org.erlide.tracing.core.ui.dialogs

Examples of org.erlide.tracing.core.ui.dialogs.ConfigurationSaveAsDialog


            @Override
            public void widgetSelected(final SelectionEvent e) {
                final String[] configurations = ConfigurationManager.getTPConfigs();
                final Set<String> existingNames = new HashSet<String>(Arrays
                        .asList(configurations));
                final InputDialog dialog = new ConfigurationSaveAsDialog(parent
                        .getShell(), "Save trace pattern configuration",
                        "Enter name for configuration:", patternsConfigName,
                        existingNames);

                if (dialog.open() == Window.OK) {
                    if (ConfigurationManager.saveTPConfig(dialog.getValue())) {
                        patternsConfigName = dialog.getValue();
                        configNameLabel.setText(patternsConfigName);
                    } else {
                        final MessageBox messageBox = new MessageBox(parent.getShell(),
                                SWT.ICON_ERROR | SWT.OK);
                        messageBox.setMessage("Unable to save configuration: "
                                + dialog.getValue());
                        messageBox.setText("Error");
                        messageBox.open();
                    }
                }
            }
View Full Code Here


            @Override
            public void widgetSelected(final SelectionEvent e) {
                final String[] configurations = ConfigurationManager.getNodesConfig();
                final Set<String> existingNames = new HashSet<String>(Arrays
                        .asList(configurations));
                final InputDialog dialog = new ConfigurationSaveAsDialog(parent
                        .getShell(), "Save nodes configuration",
                        "Enter name for configuration:", nodesConfigName, existingNames);

                if (dialog.open() == Window.OK) {
                    if (ConfigurationManager.saveNodesConfig(dialog.getValue())) {
                        nodesConfigName = dialog.getValue();
                        configNameLabel.setText(nodesConfigName);
                    } else {
                        final MessageBox messageBox = new MessageBox(parent.getShell(),
                                SWT.ICON_ERROR | SWT.OK);
                        messageBox.setMessage("Unable to save configuration: "
                                + dialog.getValue());
                        messageBox.setText("Error");
                        messageBox.open();
                    }
                }
            }
View Full Code Here

TOP

Related Classes of org.erlide.tracing.core.ui.dialogs.ConfigurationSaveAsDialog

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.