SCLModuleBrowser parentBrowser;
- String initialPackageName = "";
- String initialPluginName = "";
+ String initialPackageName = ""; //$NON-NLS-1$
+ String initialPluginName = ""; //$NON-NLS-1$
Text packageName;
Text moduleName;
@Override
protected Control createDialogArea(Composite parent) {
- getShell().setText("Create New Module");
+ getShell().setText(Messages.CreateModuleDialog_CreateNewModule);
getShell().addDisposeListener(new DisposeListener() {
@Override
public void widgetDisposed(DisposeEvent e) {
// Package name
Label packageNameLabel = new Label(composite, SWT.NONE);
- packageNameLabel.setText("Package");
+ packageNameLabel.setText(Messages.CreateModuleDialog_Package);
GridDataFactory.fillDefaults().applyTo(packageNameLabel);
packageName = new Text(composite, SWT.BORDER);
// Module name
Label moduleNameLabel = new Label(composite, SWT.NONE);
- moduleNameLabel.setText("Module name");
+ moduleNameLabel.setText(Messages.CreateModuleDialog_ModuleName);
GridDataFactory.fillDefaults().applyTo(moduleNameLabel);
moduleName = new Text(composite, SWT.BORDER);
// Plugin
Label pluginNameLabel = new Label(composite, SWT.NONE);
- pluginNameLabel.setText("Plugin");
+ pluginNameLabel.setText(Messages.CreateModuleDialog_Plugin);
GridDataFactory.fillDefaults().applyTo(pluginNameLabel);
Composite pluginNameComposite = new Composite(composite, SWT.NONE);
pluginName.addModifyListener(modifyListener);
Button browsePlugins = new Button(pluginNameComposite, SWT.PUSH);
- browsePlugins.setText("Browse...");
+ browsePlugins.setText(Messages.CreateModuleDialog_Browse);
GridDataFactory.fillDefaults().applyTo(browsePlugins);
browsePlugins.addSelectionListener(new SelectionAdapter() {
@Override
boolean validModuleName = CreateModuleValidator.isValidModuleName(moduleName.getText());
if(validModuleName && validPackageName) {
- String fullModuleName = packageName.getText() + "/" + moduleName.getText();
+ String fullModuleName = packageName.getText() + "/" + moduleName.getText(); //$NON-NLS-1$
validModuleName = SCLOsgi.SOURCE_REPOSITORY.getModuleSource(fullModuleName, null) == null;
}
moduleName.setBackground(validModuleName ? normalBackground : errorBackground);
if(bundle != null) {
CreateModuleAction.createModule(bundle, packageName.getText(), moduleName.getText());
parentBrowser.refresh();
- OpenSCLModule.scheduleOpenModule(packageName.getText() + "/" + moduleName.getText());
+ OpenSCLModule.scheduleOpenModule(packageName.getText() + "/" + moduleName.getText()); //$NON-NLS-1$
}
} catch (IOException e) {
- ErrorDialog.openError(getParentShell(), "Module creation failed", e.getMessage(),
- new Status(Status.ERROR, "org.simantics.scl.ui", e.getMessage()));
+ ErrorDialog.openError(getParentShell(), "Module creation failed", e.getMessage(), //$NON-NLS-1$
+ new Status(Status.ERROR, "org.simantics.scl.ui", e.getMessage())); //$NON-NLS-1$
}
super.okPressed();
}