public class RefreshTreeItemAction extends SquirrelAction implements ISessionAction { /** Current session. */ private ISession _session; /** * Constructor for DropTableAction. * * @param app Application API. * * @throws IllegalArgumentException * Thrown if <tt>null</tt> <tt>IApplication</tt> passed. */ public RefreshTreeItemAction(IApplication app) throws IllegalArgumentException { super(app); } /* * @see ActionListener#actionPerformed(ActionEvent) */ public void actionPerformed(ActionEvent e) { // if (_session != null) // { // CursorChanger cursorChg = new CursorChanger(_session.getApplication().getMainFrame()); // cursorChg.show(); // try // { // _session.getSessionSheet().refreshSelectedDatabaseObjects(); // } // catch (BaseSQLException ex) // { // final String msg = "Error occured refreshing the objects tree"; // s_log.error(msg, ex); // _session.getMessageHandler().showMessage(msg); // _session.getMessageHandler().showMessage(ex); // } // finally // { // cursorChg.restore(); // } // } Dialogs.showNotYetImplemented(_session.getSessionSheet()); } /* * @see IClientSessionAction#setSession(ISession) */ public void setSession(ISession session) { _session = session
public class DBCopyPluginSessionCallback implements PluginSessionCallback { DBCopyPlugin _plugin = null; public DBCopyPluginSessionCallback(DBCopyPlugin plugin) { _plugin = plugin; } public void sqlInternalFrameOpened(SQLInternalFrame sqlInternalFrame, ISession session) { // Nothing to do for an SQL internal frame } public void objectTreeInternalFrameOpened(ObjectTreeInternalFrame objectTreeInternalFrame, ISession session) { _plugin.addMenuItemsToContextMenu(objectTreeInternalFrame.getObjectTreeAPI())
Clone fragments detected by clone detection tool
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/action/RefreshTreeItemAction.java File path: /sql12/plugins/dbcopy/src/net/sourceforge/squirrel_sql/plugins/dbcopy/DBCopyPluginSessionCallback.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public class RefreshTreeItemAction extends SquirrelAction
1
public class 
2
										implements ISessionAction
2
DBCopyPluginSessionCallback implements PluginSession
3
{
4
	/** Current session. */
5
	private ISession _session;
6
	/**
7
	 * Constructor for DropTableAction.
8
	 *
9
	 * @param	app		Application API.
10
	 *
11
	 * @throws	IllegalArgumentException
12
	 * 			Thrown if <tt>null</tt> <tt>IApplication</tt> passed.
13
	 */
14
	public RefreshTreeItemAction(IApplication app)
15
		throws IllegalArgumentException
16
	{
17
		super(app);
18
	}
19
	/*
20
	 * @see ActionListener#actionPerformed(ActionEvent)
21
	 */
22
	public void actionPerformed(ActionEvent e)
23
	{
24
//		if (_session != null)
25
//		{
26
//			CursorChanger cursorChg = new CursorChanger(_session.getApplication().getMainFrame());
27
//			cursorChg.show();
28
//			try
29
//			{
30
//				_session.getSessionSheet().refreshSelectedDatabaseObjects();
31
//			}
32
//			catch (BaseSQLException ex)
33
//			{
34
//				final String msg = "Error occured refreshing the objects tree";
35
//				s_log.error(msg, ex);
36
//				_session.getMessageHandler().showMessage(msg);
37
//				_session.getMessageHandler().showMessage(ex);
38
//			}
39
//			finally
40
//			{
41
//				cursorChg.restore();
42
//			}
43
//		}
44
		Dialogs.showNotYetImplemented(_session.getSessionSheet());
45
	}
46
	/*
47
	 * @see IClientSessionAction#setSession(ISession)
48
	 */
49
	public void setSession(ISession session)
50
	{
51
		_session = session
3
Callback {
4
    DBCopyPlugin _plugin = null;
5
    
6
    public DBCopyPluginSessionCallback(DBCopyPlugin plugin) {
7
        _plugin = plugin;
8
    }
9
    
10
    public void sqlInternalFrameOpened(SQLInternalFrame sqlInternalFrame,
11
                                       ISession session) {
12
        // Nothing to do for an SQL internal frame
13
    }
14
    public void objectTreeInternalFrameOpened(ObjectTreeInternalFrame objectTreeInternalFrame, 
15
                                              ISession session) {
16
        _plugin.addMenuItemsToContextMenu(objectTreeInternalFrame.getObjectTreeAPI())
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones location
Number of node comparisons0