Changeset 399

Show
Ignore:
Timestamp:
08/10/10 18:46:20 (1 year ago)
Author:
ke
Message:

Added profiler menu.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • kahina/trunk/src/org/kahina/core/KahinaInstance.java

    r390 r399  
    3131import org.kahina.core.util.FileUtilities; 
    3232import org.kahina.core.util.ProgressMonitorWrapper; 
    33 import org.kahina.core.util.SwingUtilities; 
     33import org.kahina.core.util.KahinaSwingUtilities; 
    3434import org.kahina.core.visual.KahinaDefaultView; 
    3535import org.kahina.core.visual.source.KahinaSourceCodeView; 
     
    162162                } catch (Exception e) 
    163163                { 
    164                         gui.showMessageDialog(SwingUtilities.visualError("Session could not be loaded due to the following problem: ", e), "Error", JOptionPane.ERROR_MESSAGE); 
     164                        gui.showMessageDialog(KahinaSwingUtilities.visualError("Session could not be loaded due to the following problem: ", e), "Error", JOptionPane.ERROR_MESSAGE); 
    165165                        return; 
    166166                } finally 
     
    174174                                } catch (IOException e) 
    175175                                { 
    176                                         gui.showMessageDialog(SwingUtilities.visualError("Session could not be loaded due to the following problem: ", e), "Error", JOptionPane.ERROR_MESSAGE); 
     176                                        gui.showMessageDialog(KahinaSwingUtilities.visualError("Session could not be loaded due to the following problem: ", e), "Error", JOptionPane.ERROR_MESSAGE); 
    177177                                } 
    178178                        } 
     
    194194                } catch (IOException e) 
    195195                { 
    196                         gui.showMessageDialog(SwingUtilities.visualError("Session could not be saved due to the following problem:", e), "Error", JOptionPane.ERROR_MESSAGE); 
     196                        gui.showMessageDialog(KahinaSwingUtilities.visualError("Session could not be saved due to the following problem:", e), "Error", JOptionPane.ERROR_MESSAGE); 
    197197                        return; 
    198198                } 
     
    233233                { 
    234234                        monitor.close(); 
    235                         gui.showMessageDialog(SwingUtilities.visualError("Session could not be saved due to the following problem: ", e), "Error", JOptionPane.ERROR_MESSAGE); 
     235                        gui.showMessageDialog(KahinaSwingUtilities.visualError("Session could not be saved due to the following problem: ", e), "Error", JOptionPane.ERROR_MESSAGE); 
    236236                } finally 
    237237                { 
     
    243243                                } catch (IOException e) 
    244244                                { 
    245                                         gui.showMessageDialog(SwingUtilities.visualError("Session could not be saved due to the following problem: ", e), "Error", JOptionPane.ERROR_MESSAGE); 
     245                                        gui.showMessageDialog(KahinaSwingUtilities.visualError("Session could not be saved due to the following problem: ", e), "Error", JOptionPane.ERROR_MESSAGE); 
    246246                                } 
    247247                        } 
  • kahina/trunk/src/org/kahina/core/gui/KahinaMainWindow.java

    r392 r399  
    1515import org.kahina.core.event.KahinaTreeEvent; 
    1616import org.kahina.core.event.KahinaTreeEventType; 
     17import org.kahina.core.gui.profiler.KahinaProfilerMenu; 
    1718 
    1819public class KahinaMainWindow extends KahinaWindow implements KahinaListener 
     
    3839                menuBar.add(new KahinaParseMenu()); 
    3940                menuBar.add(new KahinaBreakpointMenu()); 
     41                menuBar.add(new KahinaProfilerMenu()); 
    4042                menuBar.add(new KahinaHelpMenu()); 
    4143                this.setJMenuBar(menuBar); 
  • kahina/trunk/src/org/kahina/core/util/KahinaSwingUtilities.java

    r373 r399  
    22 
    33import java.awt.Point; 
     4import java.awt.event.ActionListener; 
    45 
     6import javax.swing.JMenuItem; 
    57import javax.swing.JScrollPane; 
    68import javax.swing.JTextArea; 
    79import javax.swing.JViewport; 
    810 
    9 public class SwingUtilities 
     11public class KahinaSwingUtilities 
    1012{ 
    1113    public static void scrollToCenter(JScrollPane scrollPane, int x, int y) 
     
    3638                return new Object[] { message, new JScrollPane(new JTextArea(Utilities.join(System.getProperty("line.separator"), Utilities.portrayStackTrace(t)), 20, 80)) }; 
    3739        } 
     40 
     41        public static JMenuItem createMenuItem(String text, String actionCommand, ActionListener actionListener) 
     42        { 
     43                JMenuItem result = new JMenuItem(text); 
     44                result.setActionCommand(actionCommand); 
     45                result.addActionListener(actionListener); 
     46                return result; 
     47        } 
    3848} 
  • kahina/trunk/src/org/kahina/core/visual/dag/KahinaDAGViewPanel.java

    r357 r399  
    1515import javax.swing.JScrollPane; 
    1616 
    17 import org.kahina.core.util.SwingUtilities; 
     17import org.kahina.core.util.KahinaSwingUtilities; 
    1818import org.kahina.core.visual.KahinaViewPanel; 
    1919import org.kahina.core.visual.tree.KahinaTreeView; 
     
    324324            else 
    325325            { 
    326                 SwingUtilities.scrollToCenter((JScrollPane) parent, view.getNodeX(nodeID), view.getNodeY(nodeID)); 
     326                KahinaSwingUtilities.scrollToCenter((JScrollPane) parent, view.getNodeX(nodeID), view.getNodeY(nodeID)); 
    327327            } 
    328328        } 
  • kahina/trunk/src/org/kahina/core/visual/tree/KahinaTreeViewPanel.java

    r314 r399  
    1515import javax.swing.JScrollPane; 
    1616 
    17 import org.kahina.core.util.SwingUtilities; 
     17import org.kahina.core.util.KahinaSwingUtilities; 
    1818import org.kahina.core.visual.KahinaViewPanel; 
    1919 
     
    467467            else 
    468468            { 
    469                 SwingUtilities.scrollToCenter((JScrollPane) parent, view.getNodeX(nodeID), view.getNodeY(nodeID)); 
     469                KahinaSwingUtilities.scrollToCenter((JScrollPane) parent, view.getNodeX(nodeID), view.getNodeY(nodeID)); 
    470470            } 
    471471        }