MCPcopy Create free account
hub / github.com/GateNLP/gate-core / changeMessage

Method changeMessage

src/main/java/gate/gui/CorpusEditor.java:721–759  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

719 }
720
721 protected void changeMessage() {
722 SwingUtilities.invokeLater(new Runnable(){ @Override
723 public void run() {
724 if (corpus == null || corpus.size() == 0) {
725 newDocumentAction.setEnabled(true);
726 messageLabel.setText(
727 "<html>To add or remove documents to this corpus:<ul>" +
728 "<li>use the toolbar buttons at the top of this view" +
729 "<li>drag documents from the left resources tree and drop them below" +
730 "<li>right click on the corpus in the resources tree and choose 'Populate'" +
731 "</ul></html>");
732 messageLabel.setVisible(true);
733 }
734 // This is a really stupid way of checking if all the open documents are in the
735 //corpus and it seems to be causing more problems than it might possibly be trying
736 //to solve
737 /*else if (documentsLoadedCount > 0
738 && documentsLoadedCount == corpus.size()) {
739 newDocumentAction.setEnabled(false);
740 messageLabel.setText("All the documents loaded in the " +
741 "system are in this corpus.");
742 messageLabel.setVisible(true);
743 } */
744 else if (documentsLoadedCount == 0) {
745 newDocumentAction.setEnabled(false);
746 if (corpus.getDataStore() == null) {
747 messageLabel.setText(
748 "There are no documents loaded in the system. " +
749 "Press F1 for help.");
750 } else {
751 messageLabel.setText("Open a document to load it from the datastore.");
752 }
753 messageLabel.setVisible(true);
754 } else {
755 newDocumentAction.setEnabled(true);
756 messageLabel.setVisible(false);
757 }
758 }});
759 }
760
761 protected XJTable docTable;
762 protected DocumentTableModel docTableModel;

Callers 7

importDataMethod · 0.95
initGuiComponentsMethod · 0.95
resourceLoadedMethod · 0.95
resourceUnloadedMethod · 0.95
runMethod · 0.95
actionPerformedMethod · 0.80
actionPerformedMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected