示例#1
0
 @Override
 public void initialise() throws Exception {
   editorKit = (OWLEditorKit) getEditorKit();
   workspace = editorKit.getWorkspace();
   owlManager = editorKit.getOWLModelManager();
   modelManager = ((OBDAModelManager) editorKit.get(OBDAModelImpl.class.getName()));
 }
 public static void showDialog(OWLEditorKit editorKit, Set<OWLOntology> ontologies) {
   SaveConfirmationPanel panel = new SaveConfirmationPanel(editorKit, ontologies);
   JOptionPaneEx.showConfirmDialog(
       editorKit.getWorkspace(),
       "Saved ontologies",
       panel,
       JOptionPane.PLAIN_MESSAGE,
       JOptionPane.DEFAULT_OPTION,
       null);
 }
  protected void handleAdd() {
    // don't need to check the section as only the direct imports can be added
    OntologyImportWizard wizard =
        new OntologyImportWizard(
            (Frame) SwingUtilities.getAncestorOfClass(Frame.class, editorKit.getWorkspace()),
            editorKit);
    int ret = wizard.showModalDialog();

    if (ret == Wizard.FINISH_RETURN_CODE) {
      AddImportsStrategy strategy = new AddImportsStrategy(editorKit, ont, wizard.getImports());
      strategy.addImports();
    }
  }