if (document.getDocumentFile() == null) {
panel.add(new MessageBar("<html> <b>Please save your document first.</b></html>"), BorderLayout.NORTH);
} else {
ActionHeader actionHeader = new ActionHeader();
actionHeader.setLayout(new BoxLayout(actionHeader, BoxLayout.LINE_AXIS));
InsetLabel actionHeaderLabel = new InsetLabel("Code Libraries");
actionHeader.add(Box.createHorizontalStrut(10));
actionHeader.add(actionHeaderLabel);
actionHeader.add(Box.createHorizontalGlue());
JButton removeLibraryButton = new JButton(minusIcon);
removeLibraryButton.addActionListener(new ActionListener() {