예제 #1
0
 @Override
 public String getName() {
   if (DBeaverCore.getGlobalPreferenceStore()
       .getBoolean(DBeaverPreferences.NAVIGATOR_EDITOR_FULL_NAME)) {
     return node.getNodeFullName();
   } else {
     return node.getName();
   }
 }
예제 #2
0
  @Override
  public IPersistableElement getPersistable() {
    if (getExecutionContext() == null
        || !DBeaverCore.getGlobalPreferenceStore()
            .getBoolean(DBeaverPreferences.UI_KEEP_DATABASE_EDITORS)) {
      return null;
    }

    return this;
  }
예제 #3
0
 private DBPPreferenceStore getPreferences() {
   DBPPreferenceStore store = null;
   DBPDataSource dataSource = editor.getDataSource();
   if (dataSource != null) {
     store = dataSource.getContainer().getPreferenceStore();
   }
   if (store == null) {
     store = DBeaverCore.getGlobalPreferenceStore();
   }
   return store;
 }
예제 #4
0
  @Override
  public boolean performAction() {
    try {
      source.saveState(DBeaverCore.getGlobalPreferenceStore());

      NewSearchUI.runQueryInBackground(createQueryAdapter(source.createQuery()));
    } catch (Exception e) {
      UIUtils.showErrorDialog(getControl().getShell(), "Search", "Can't perform search", e);
      return false;
    }
    return true;
  }
예제 #5
0
  @Override
  public boolean performFinish() {
    objectsPage.saveState();

    final DBPPreferenceStore store = DBeaverCore.getGlobalPreferenceStore();
    store.setValue("MySQL.export.outputFilePattern", this.outputFilePattern);
    store.setValue("MySQL.export.noCreateStatements", noCreateStatements);
    store.setValue("MySQL.export.addDropStatements", addDropStatements);
    store.setValue("MySQL.export.disableKeys", disableKeys);
    store.setValue("MySQL.export.extendedInserts", extendedInserts);
    store.setValue("MySQL.export.dumpEvents", dumpEvents);
    store.setValue("MySQL.export.comments", comments);
    store.setValue("MySQL.export.removeDefiner", removeDefiner);
    store.setValue("MySQL.export.binariesInHex", binariesInHex);
    store.setValue("MySQL.export.showViews", showViews);

    return super.performFinish();
  }
예제 #6
0
  public MySQLExportWizard(Collection<DBSObject> objects) {
    super(objects, MySQLMessages.tools_db_export_wizard_task_name);
    this.method = DumpMethod.NORMAL;
    this.outputFolder = new File(DialogUtils.getCurDialogFolder()); // $NON-NLS-1$ //$NON-NLS-2$

    final DBPPreferenceStore store = DBeaverCore.getGlobalPreferenceStore();
    this.outputFilePattern = store.getString("MySQL.export.outputFilePattern");
    if (CommonUtils.isEmpty(this.outputFilePattern)) {
      this.outputFilePattern = "dump-${database}-${timestamp}.sql";
    }
    noCreateStatements =
        CommonUtils.getBoolean(store.getString("MySQL.export.noCreateStatements"), false);
    addDropStatements =
        CommonUtils.getBoolean(store.getString("MySQL.export.addDropStatements"), true);
    disableKeys = CommonUtils.getBoolean(store.getString("MySQL.export.disableKeys"), true);
    extendedInserts = CommonUtils.getBoolean(store.getString("MySQL.export.extendedInserts"), true);
    dumpEvents = CommonUtils.getBoolean(store.getString("MySQL.export.dumpEvents"), false);
    comments = CommonUtils.getBoolean(store.getString("MySQL.export.comments"), false);
    removeDefiner = CommonUtils.getBoolean(store.getString("MySQL.export.removeDefiner"), false);
    binariesInHex = CommonUtils.getBoolean(store.getString("MySQL.export.binariesInHex"), false);
    showViews = CommonUtils.getBoolean(store.getString("MySQL.export.showViews"), false);
  }
예제 #7
0
 @Override
 public void createControl(Composite parent) {
   source.loadState(DBeaverCore.getGlobalPreferenceStore());
   source.createControl(parent);
 }