saveProjectAsItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S, MENU_MASK | Event.SHIFT_MASK)); loadBugsItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O, MENU_MASK | Event.ALT_MASK)); saveBugsItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S, MENU_MASK | Event.ALT_MASK));
	private void postInitComponents() {		logger = new ConsoleLogger(this);		viewPanelLayout = (CardLayout) viewPanel.getLayout();		// Console starts out disabled		consoleSplitter.setDividerLocation(1.0);		// List of bug group tabs.		// This must be in the same order as GROUP_BY_ORDER_LIST!		bugTreeList = new JTree[]{byClassBugTree, byPackageBugTree, byBugTypeBugTree};		// Configure bug trees		for (int i = 0; i < bugTreeList.length; ++i) {			JTree bugTree = bugTreeList[i];			bugTree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);			bugTree.setCellRenderer(bugCellRenderer);			bugTree.setRootVisible(false);			bugTree.setShowsRootHandles(true);			bugTree.addTreeSelectionListener(new TreeSelectionListener() {				public void valueChanged(TreeSelectionEvent e) {					bugTreeSelectionChanged(e);				}			});		}		jarFileList.setModel(new DefaultListModel());		sourceDirList.setModel(new DefaultListModel());		classpathEntryList.setModel(new DefaultListModel());		// We use a special highlight painter to ensure that the highlights cover		// complete source lines, even though the source text doesn't		// fill the lines completely.		final Highlighter.HighlightPainter painter =		        new DefaultHighlighter.DefaultHighlightPainter(sourceTextArea.getSelectionColor()) {			        public Shape paintLayer(Graphics g, int offs0, int offs1,			                                Shape bounds, JTextComponent c, View view) {				        try {					        Shape extent = view.modelToView(offs0, Position.Bias.Forward, offs1, Position.Bias.Backward, bounds);					        Rectangle rect = extent.getBounds();					        rect.x = 0;					        rect.width = bounds.getBounds().width;					        g.setColor(getColor());					        g.fillRect(rect.x, rect.y, rect.width, rect.height);					        return rect;				        } catch (BadLocationException e) {					        return null;				        }			        }		        };		Highlighter sourceHighlighter = new DefaultHighlighter() {			public Object addHighlight(int p0, int p1, Highlighter.HighlightPainter p)			        throws BadLocationException {				return super.addHighlight(p0, p1, painter);			}		};		sourceTextArea.setHighlighter(sourceHighlighter);		updateTitle(getCurrentProject());		// Load the icon for the UMD logo		ClassLoader classLoader = this.getClass().getClassLoader();		ImageIcon logoIcon = new ImageIcon(classLoader.getResource("edu/umd/cs/findbugs/gui/logo_umd.png"));		logoLabel.setIcon(logoIcon);				if (MAC_OS_X) {			// Leave room for the growBox on Mac			growBoxSpacer.setMinimumSize(new java.awt.Dimension(16,16));			// Remove Unnecessary/Redundant menu items.			fileMenu.remove(exitItem);			fileMenu.remove(jSeparator6);			theMenuBar.remove(helpMenu);			// Set up listeners for Quit and About menu items using			// Apple's EAWT API.			// We use reflection here, so there is no posible chance that the			// class loader will try to load OSXAdapter on a non Mac system			try {				Class osxAdapter = Class.forName("edu.umd.cs.findbugs.gui.OSXAdapter");                					Class[] defArgs = {FindBugsFrame.class};				Method registerMethod = osxAdapter.getDeclaredMethod("registerMacOSXApplication", defArgs);				if (registerMethod != null) {					Object[] args = {this};					registerMethod.invoke(osxAdapter, args);				}			}			catch (NoClassDefFoundError e) {				// This will be thrown first if the OSXAdapter is loaded on a system without the EAWT				// because OSXAdapter extends ApplicationAdapter in its def				System.err.println("This version of Mac OS X does not support the Apple EAWT. Application Menu handling has been disabled (" + e + ")");			}			catch (ClassNotFoundException e) {				// This shouldn't be reached; if there's a problem with the OSXAdapter we should get the				// above NoClassDefFoundError first.				System.err.println("This version of Mac OS X does not support the Apple EAWT. Application Menu handling has been disabled (" + e + ")");			}			catch (Exception e) {				System.err.println("Exception while loading the OSXAdapter:");				e.printStackTrace();			}		}	}