CloneSet54


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
96330.988compilation_unit
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
1961
E:/TSE/Projects-CloneDR/sql12/plugins/exportconfig/src/net/sourceforge/squirrel_sql/plugins/exportconfig/action/ExportAliasesAction.java
2971
E:/TSE/Projects-CloneDR/sql12/plugins/exportconfig/src/net/sourceforge/squirrel_sql/plugins/exportconfig/action/ExportDriversAction.java
3961
E:/TSE/Projects-CloneDR/sql12/plugins/exportconfig/src/net/sourceforge/squirrel_sql/plugins/exportconfig/action/ExportSettingsAction.java
Next
Last
Clone Instance
1
Line Count
96
Source Line
1
Source File
E:/TSE/Projects-CloneDR/sql12/plugins/exportconfig/src/net/sourceforge/squirrel_sql/plugins/exportconfig/action/ExportAliasesAction.java

package net.sourceforge.squirrel_sql.plugins.exportconfig.action;

/*
 * Copyright (C) 2003 Colin Bell
 * colbell@users.sourceforge.net
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
import java.awt.event.ActionEvent;
import net.sourceforge.squirrel_sql.fw.util.BaseException;
import net.sourceforge.squirrel_sql.fw.util.Resources;
import net.sourceforge.squirrel_sql.fw.util.StringManager;
import net.sourceforge.squirrel_sql.fw.util.StringManagerFactory;
import net.sourceforge.squirrel_sql.client.IApplication;
import net.sourceforge.squirrel_sql.client.action.SquirrelAction;
import net.sourceforge.squirrel_sql.plugins.exportconfig.ExportConfigPlugin;

/**
 * This <TT>Action</TT> will allow the user to export the database aliases to
 * the file system.
 *
 * @author <A HREF="mailto:colbell@users.sourceforge.net">Colin Bell</A>
 */
public class ExportAliasesAction extends SquirrelAction {
  private static final StringManager s_stringMgr = StringManagerFactory.getStringManager(ExportAliasesAction.class );

  /** Application API. */
  private final IApplication _app;

  /** Current plugin. */
  private final ExportConfigPlugin _plugin;

  /**
   * Ctor.
   *
   * @param       app                     Application API.
   * @param       rsrc            Plugins resources.
   * @param       plugin          This plugin.
   *
   * @throws      IllegalArgumentException
   *                      Thrown if a�<TT>null</TT> <TT>IApplication</TT>,
   *                      <TT>Resources</TT> or <TT>MysqlPlugin</TT> passed.
   *
   * @throws      IllegalArgumentException
   *                      Thrown if an invalid <TT>checktype</TT> passed.
   */
  public ExportAliasesAction(IApplication app, Resources rsrc, ExportConfigPlugin plugin) {
    super(app, rsrc);
    if (app == null) {
      throw new IllegalArgumentException("IApplication == null");
    }
    if (rsrc == null) {
      throw new IllegalArgumentException("Resources == null");
    }
    if (plugin == null) {
      throw new IllegalArgumentException("ExportConfigPlugin == null");
    }
    _app = app;
    _plugin = plugin;
  }

  public void actionPerformed(ActionEvent evt) {
    try {
      new ExportAliasesCommand(getParentFrame(evt), _plugin).execute();
    }
    catch (BaseException
           ex) {
      // i18n[exportconfig.errorSavingAlials=Error saving aliases]
      _app.showErrorDialog(s_stringMgr.getString("exportconfig.errorSavingAlials"), ex);
    }
  }
}




Next
Previous
Clone Instance
2
Line Count
97
Source Line
1
Source File
E:/TSE/Projects-CloneDR/sql12/plugins/exportconfig/src/net/sourceforge/squirrel_sql/plugins/exportconfig/action/ExportDriversAction.java

package net.sourceforge.squirrel_sql.plugins.exportconfig.action;

/*
 * Copyright (C) 2003 Colin Bell
 * colbell@users.sourceforge.net
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
import java.awt.event.ActionEvent;
import net.sourceforge.squirrel_sql.fw.util.BaseException;
import net.sourceforge.squirrel_sql.fw.util.Resources;
import net.sourceforge.squirrel_sql.fw.util.StringManager;
import net.sourceforge.squirrel_sql.fw.util.StringManagerFactory;
import net.sourceforge.squirrel_sql.client.IApplication;
import net.sourceforge.squirrel_sql.client.action.SquirrelAction;
import net.sourceforge.squirrel_sql.plugins.exportconfig.ExportConfigPlugin;

/**
 * This <TT>Action</TT> will allow the user to export the database drivers to
 * the file system.
 *
 * @author <A HREF="mailto:colbell@users.sourceforge.net">Colin Bell</A>
 */
public class ExportDriversAction extends SquirrelAction {
  private static final StringManager s_stringMgr = StringManagerFactory.getStringManager(ExportDriversAction.class );

  /** Application API. */
  private final IApplication _app;

  /** Current plugin. */
  private final ExportConfigPlugin _plugin;

  /**
   * Ctor.
   *
   * @param       app                     Application API.
   * @param       rsrc            Plugins resources.
   * @param       plugin          This plugin.
   *
   * @throws      IllegalArgumentException
   *                      Thrown if a�<TT>null</TT> <TT>IApplication</TT>,
   *                      <TT>Resources</TT> or <TT>MysqlPlugin</TT> passed.
   *
   * @throws      IllegalArgumentException
   *                      Thrown if an invalid <TT>checktype</TT> passed.
   */
  public ExportDriversAction(IApplication app, Resources rsrc, ExportConfigPlugin plugin) {
    super(app, rsrc);
    if (app == null) {
      throw new IllegalArgumentException("IApplication == null");
    }
    if (rsrc == null) {
      throw new IllegalArgumentException("Resources == null");
    }
    if (plugin == null) {
      throw new IllegalArgumentException("ExportConfigPlugin == null");
    }
    _app = app;
    _plugin = plugin;
  }

  public void actionPerformed(ActionEvent evt) {
    try {
      new ExportDriversCommand(getParentFrame(evt), _plugin).execute();
    }
    catch (BaseException
           ex) {
      // i18n[exportconfig.errorSavingDrivers=Error saving drivers]
      _app.showErrorDialog(s_stringMgr.getString("exportconfig.errorSavingDrivers"), ex);
    }
  }
}




First
Previous
Clone Instance
3
Line Count
96
Source Line
1
Source File
E:/TSE/Projects-CloneDR/sql12/plugins/exportconfig/src/net/sourceforge/squirrel_sql/plugins/exportconfig/action/ExportSettingsAction.java

package net.sourceforge.squirrel_sql.plugins.exportconfig.action;

/*
 * Copyright (C) 2003 Colin Bell
 * colbell@users.sourceforge.net
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
import java.awt.event.ActionEvent;
import net.sourceforge.squirrel_sql.fw.util.BaseException;
import net.sourceforge.squirrel_sql.fw.util.Resources;
import net.sourceforge.squirrel_sql.fw.util.StringManager;
import net.sourceforge.squirrel_sql.fw.util.StringManagerFactory;
import net.sourceforge.squirrel_sql.client.IApplication;
import net.sourceforge.squirrel_sql.client.action.SquirrelAction;
import net.sourceforge.squirrel_sql.plugins.exportconfig.ExportConfigPlugin;

/**
 * This <TT>Action</TT> will allow the user to export the application settings to
 * the file system.
 *
 * @author <A HREF="mailto:colbell@users.sourceforge.net">Colin Bell</A>
 */
public class ExportSettingsAction extends SquirrelAction {
  private static final StringManager s_stringMgr = StringManagerFactory.getStringManager(ExportSettingsAction.class );

  /** Application API. */
  private final IApplication _app;

  /** Current plugin. */
  private final ExportConfigPlugin _plugin;

  /**
   * Ctor.
   *
   * @param       app                     Application API.
   * @param       rsrc            Plugins resources.
   * @param       plugin          This plugin.
   *
   * @throws      IllegalArgumentException
   *                      Thrown if a�<TT>null</TT> <TT>IApplication</TT>,
   *                      <TT>Resources</TT> or <TT>MysqlPlugin</TT> passed.
   *
   * @throws      IllegalArgumentException
   *                      Thrown if an invalid <TT>checktype</TT> passed.
   */
  public ExportSettingsAction(IApplication app, Resources rsrc, ExportConfigPlugin plugin) {
    super(app, rsrc);
    if (app == null) {
      throw new IllegalArgumentException("IApplication == null");
    }
    if (rsrc == null) {
      throw new IllegalArgumentException("Resources == null");
    }
    if (plugin == null) {
      throw new IllegalArgumentException("ExportConfigPlugin == null");
    }
    _app = app;
    _plugin = plugin;
  }

  public void actionPerformed(ActionEvent evt) {
    try {
      new ExportSettingsCommand(getParentFrame(evt), _plugin).execute();
    }
    catch (BaseException
           ex) {
      // i18n[exportconfig.errorSavingAliases=Error saving aliases]                   
      _app.showErrorDialog(s_stringMgr.getString("exportconfig.errorSavingAliases"), ex);
    }
  }
}




Clone AbstractionParameter Count: 3Parameter Bindings

package net.sourceforge.squirrel_sql.plugins.exportconfig.action;

/*
 * Copyright (C) 2003 Colin Bell
 * colbell@users.sourceforge.net
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
import java.awt.event.ActionEvent;
import net.sourceforge.squirrel_sql.fw.util.BaseException;
import net.sourceforge.squirrel_sql.fw.util.Resources;
import net.sourceforge.squirrel_sql.fw.util.StringManager;
import net.sourceforge.squirrel_sql.fw.util.StringManagerFactory;
import net.sourceforge.squirrel_sql.client.IApplication;
import net.sourceforge.squirrel_sql.client.action.SquirrelAction;
import net.sourceforge.squirrel_sql.plugins.exportconfig.ExportConfigPlugin;

/**
 * This <TT>Action</TT> will allow the user to export the database aliases to
 * the file system.
 *
 * @author <A HREF="mailto:colbell@users.sourceforge.net">Colin Bell</A>
 */
/**
 * This <TT>Action</TT> will allow the user to export the database drivers to
 * the file system.
 *
 * @author <A HREF="mailto:colbell@users.sourceforge.net">Colin Bell</A>
 */
/**
 * This <TT>Action</TT> will allow the user to export the application settings to
 * the file system.
 *
 * @author <A HREF="mailto:colbell@users.sourceforge.net">Colin Bell</A>
 */
public class [[#variable1cf0fa40]]extends SquirrelAction {
  private static final StringManager s_stringMgr = StringManagerFactory.getStringManager( [[#variable1cf0fa40]].class );

  /** Application API. */
  private final IApplication _app;

  /** Current plugin. */
  private final ExportConfigPlugin _plugin;

  /**
           * Ctor.
           *
           * @param       app                     Application API.
           * @param       rsrc            Plugins resources.
           * @param       plugin          This plugin.
           *
           * @throws      IllegalArgumentException
           *                      Thrown if a�<TT>null</TT> <TT>IApplication</TT>,
           *                      <TT>Resources</TT> or <TT>MysqlPlugin</TT> passed.
           *
           * @throws      IllegalArgumentException
           *                      Thrown if an invalid <TT>checktype</TT> passed.
           */
  public [[#variable1cf0fa40]](IApplication app, Resources rsrc, ExportConfigPlugin plugin) {
    super(app, rsrc);
    if (app == null) {
      throw new IllegalArgumentException("IApplication == null");
    }
    if (rsrc == null) {
      throw new IllegalArgumentException("Resources == null");
    }
    if (plugin == null) {
      throw new IllegalArgumentException("ExportConfigPlugin == null");
    }
    _app = app;
    _plugin = plugin;
  }

  public void actionPerformed(ActionEvent evt) {
    try {
      new [[#variable18c6b9a0]](getParentFrame(evt), _plugin).execute();
    }
    catch (BaseException
           ex) {
      // i18n[exportconfig.errorSavingAlials=Error saving aliases]
      // i18n[exportconfig.errorSavingDrivers=Error saving drivers]
      // i18n[exportconfig.errorSavingAliases=Error saving aliases]                   
      _app.showErrorDialog(s_stringMgr.getString( [[#variable1904c900]]), ex);
    }
  }
}


 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#1cf0fa40]]
ExportAliasesAction 
12[[#1cf0fa40]]
ExportDriversAction 
13[[#1cf0fa40]]
ExportSettingsAction 
21[[#18c6b9a0]]
ExportAliasesCommand 
22[[#18c6b9a0]]
ExportDriversCommand 
23[[#18c6b9a0]]
ExportSettingsCommand 
31[[#1904c900]]
"exportconfig.errorSavingAlials" 
32[[#1904c900]]
"exportconfig.errorSavingDrivers" 
33[[#1904c900]]
"exportconfig.errorSavingAliases"