From: Pavel V. <va...@us...> - 2002-09-10 19:33:29
|
Update of /cvsroot/javaprofiler/module/net/sourceforge/javaprofiler/module/actions In directory usw-pr-cvs1:/tmp/cvs-serv9029 Modified Files: AttachAction.java Bundle.properties DetachAction.java Log Message: launch action by lukas Index: AttachAction.java =================================================================== RCS file: /cvsroot/javaprofiler/module/net/sourceforge/javaprofiler/module/actions/AttachAction.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** AttachAction.java 16 May 2002 12:14:26 -0000 1.2 --- AttachAction.java 10 Sep 2002 19:33:26 -0000 1.3 *************** *** 61,64 **** --- 61,87 ---- dialog=TopManager.getDefault().createDialog(descr); dialog.show(); + + // at the time of writing, connect() can block, so we better move it off + // event-dispatching thread + if (descr.getValue().equals(DialogDescriptor.OK_OPTION)) { + boolean ok=false; + TopManager.getDefault().setStatusText("Attaching to Profiler..."); + try { + //PENDING + // switch workspace + Session session=panel.connect(); + ProfilerData.getData().addSession(session); + TopManager.getDefault().setStatusText( + "Attaching to Profiler...done"); + ok=true; + } catch (ConnectingException e) { + TopManager.getDefault().notifyException(e); + } finally { + if (!ok) + TopManager.getDefault().setStatusText( + "Attaching to Profiler...error"); + } + } + panel=null; } *************** *** 81,109 **** /** ! * Attaches to the profiled process. * * @param event ActionEvent from the Attach to VM dialog. */ ! public void actionPerformed(ActionEvent event) { ! if (event.getSource().equals(DialogDescriptor.OK_OPTION)) { ! try { ! //PENDING ! // switch workspace ! Session session=panel.connect(); ! ProfilerData.getData().addSession(session); ! } catch (ConnectingException e) { ! TopManager.getDefault().notifyException(e); ! } ! } ! panel=null; dialog.setVisible(false); dialog.dispose(); } } - } /* * $Log$ * Revision 1.2 2002/05/16 12:14:26 stolis * Attach panel generalized for both attach and listen connectors. --- 104,124 ---- /** ! * Closes the dialog. * * @param event ActionEvent from the Attach to VM dialog. */ ! public void actionPerformed(ActionEvent event) { dialog.setVisible(false); dialog.dispose(); } } } /* * $Log$ + * Revision 1.3 2002/09/10 19:33:26 vachis + * launch action + * by lukas + * * Revision 1.2 2002/05/16 12:14:26 stolis * Attach panel generalized for both attach and listen connectors. Index: Bundle.properties =================================================================== RCS file: /cvsroot/javaprofiler/module/net/sourceforge/javaprofiler/module/actions/Bundle.properties,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** Bundle.properties 6 Sep 2002 19:16:13 -0000 1.9 --- Bundle.properties 10 Sep 2002 19:33:26 -0000 1.10 *************** *** 19,23 **** ## Lukas Petru and Marek Przeczek. ## ! LBL_attachAction=Attach LBL_destroyAction=Destroy HINT_finishAction=Finishes currently profiled session. --- 19,23 ---- ## Lukas Petru and Marek Przeczek. ## ! LBL_attachAction=Attach... LBL_destroyAction=Destroy HINT_finishAction=Finishes currently profiled session. *************** *** 63,72 **** LBL_ShowTable=Show Table LBL_ShowHistogram=Show Histogram ! ! LBL_BTAction=Open Backtrace ! ! LBL_CTAction=Open Call Tree ! ! LBL_detachAction=Detach ! ! HINT_detachAction=Detaches from currently profiled session. --- 63,65 ---- LBL_ShowTable=Show Table LBL_ShowHistogram=Show Histogram ! LBL_Start=Start Index: DetachAction.java =================================================================== RCS file: /cvsroot/javaprofiler/module/net/sourceforge/javaprofiler/module/actions/DetachAction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** DetachAction.java 6 Sep 2002 19:16:51 -0000 1.1 --- DetachAction.java 10 Sep 2002 19:33:26 -0000 1.2 *************** *** 41,45 **** Session session=data.currentSession(); if (session!=null) { ! session.getVM().dispose(); data.removeSession(session); } --- 41,45 ---- Session session=data.currentSession(); if (session!=null) { ! session.getVM().disconnect(); data.removeSession(session); } *************** *** 67,70 **** --- 67,74 ---- /* * $Log$ + * Revision 1.2 2002/09/10 19:33:26 vachis + * launch action + * by lukas + * * Revision 1.1 2002/09/06 19:16:51 vachis * new detach action |