protected boolean validatePage() { boolean valid = super.validatePage(); if (valid) { String fileName = getFileName(); if (!fileName.endsWith(".erd")) { setErrorMessage(DBPlugin.getResourceString("error.erd.extension")); valid = false; } } if (valid) { setMessage(DBPlugin.getResourceString("wizard.new.erd.message")); } return valid; }
public PasteAction(VisualDBEditor editor) { super(editor); setId(ActionFactory.PASTE.getId()); // setActionDefinitionId(ActionFactory.PASTE.getId()); setText(DBPlugin.getResourceString("action.paste")); ISharedImages sharedImages = PlatformUI.getWorkbench().getSharedImages(); setImageDescriptor(sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_PASTE)); setDisabledImageDescriptor( sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_PASTE_DISABLED)); }
public void createControl(Composite parent) { super.createControl(parent); Composite composite = new Composite((Composite) getControl(), SWT.NULL); GridLayout layout = new GridLayout(2, false); layout.marginWidth = 0; layout.marginHeight = 0; composite.setLayout(layout); composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); Label label = new Label(composite, SWT.NULL); label.setText(DBPlugin.getResourceString("wizard.new.erd.dialect")); combo = new Combo(composite, SWT.READ_ONLY); String[] dialectNames = DialectProvider.getDialectNames(); for (int i = 0; i < dialectNames.length; i++) { combo.add(dialectNames[i]); } combo.setText(dialectNames[0]); validatePage(); }
public NewDiagramWizardPage1(IStructuredSelection selection, NewDiagramWizardPage2 page2) { super(DBPlugin.getResourceString("wizard.new.erd.title"), selection); setTitle(DBPlugin.getResourceString("wizard.new.erd.title")); setFileName("newfile.erd"); this.page2 = page2; }