/** * Creates and sets up a new (probably empty) . The new <code>EditorKit</code> will be passed to the * <code>EditorKitManager</code> for installation. * * @param plugin The <code>EditorKitFactoryPlugin</code> that describes the <code>EditorKitFactory</code> which will * be used to create the <code>EditorKit</code>. */ public boolean createAndSetupNewEditorKit(EditorKitFactoryPlugin plugin) throws Exception { EditorKitFactory editorKitFactory = getEditorKitFactory(plugin); return createAndSetupNewEditorKit(editorKitFactory) != null; }
public boolean openAndSetupRecentEditorKit(EditorKitDescriptor editorKitDescriptor) throws Exception { for (EditorKitFactoryPlugin plugin : getEditorKitFactoryPlugins()) { if (plugin.getId().equals(editorKitDescriptor.getEditorKitFactoryID())) { EditorKitFactory editorKitFactory = getEditorKitFactory(plugin); EditorKit editorKit = editorKitFactory.createEditorKit(); if (editorKit.handleLoadRecentRequest(editorKitDescriptor)) { getEditorKitManager().addEditorKit(editorKit); return true; } } } return false; }
public boolean openAndSetupRecentEditorKit(EditorKitDescriptor editorKitDescriptor) throws Exception { for (EditorKitFactoryPlugin plugin : getEditorKitFactoryPlugins()) { if (plugin.getId().equals(editorKitDescriptor.getEditorKitFactoryID())) { EditorKitFactory editorKitFactory = getEditorKitFactory(plugin); EditorKit editorKit = editorKitFactory.createEditorKit(); if (editorKit.handleLoadRecentRequest(editorKitDescriptor)) { getEditorKitManager().addEditorKit(editorKit); closeFirstEditorKitIfNotModified(); return true; } } } return false; }
/** * Creates and sets up a new (probably empty) . The new <code>EditorKit</code> will be passed to the * <code>EditorKitManager</code> for installation. * * @param plugin The <code>EditorKitFactoryPlugin</code> that describes the <code>EditorKitFactory</code> which will * be used to create the <code>EditorKit</code>. */ public synchronized boolean createAndSetupNewEditorKit(EditorKitFactoryPlugin plugin) throws Exception { EditorKitFactory editorKitFactory = getEditorKitFactory(plugin); return createAndSetupNewEditorKit(editorKitFactory) != null; }
public boolean openAndSetupRecentEditorKit(EditorKitDescriptor editorKitDescriptor) throws Exception { for (EditorKitFactoryPlugin plugin : getEditorKitFactoryPlugins()) { if (plugin.getId().equals(editorKitDescriptor.getEditorKitFactoryID())) { EditorKitFactory editorKitFactory = getEditorKitFactory(plugin); EditorKit editorKit = editorKitFactory.createEditorKit(); if (editorKit.handleLoadRecentRequest(editorKitDescriptor)) { getEditorKitManager().addEditorKit(editorKit); closeFirstEditorKitIfNotModified(); return true; } } } return false; }
public synchronized boolean createAndSetupNewEditorKit(EditorKitFactoryPlugin plugin, URI uri) throws Exception { EditorKitFactory editorKitFactory = getEditorKitFactory(plugin); return createAndSetupNewEditorKit(editorKitFactory, uri) != null; }
public boolean handleOpenFromBuilder(OntologyBuilderPlugin builder) { try { for (EditorKitFactoryPlugin plugin : getEditorKitFactoryPlugins()) { String id = plugin.getId(); if (id.equals(builder.getEditorKitId())) { EditorKitFactory editorKitFactory = getEditorKitFactory(plugin); if (editorKitFactory != null) { EditorKit editorKit = editorKitFactory.createEditorKit(); boolean success = false; try { if (builder.newInstance().loadOntology(editorKit)) { getEditorKitManager().addEditorKit(editorKit); success = true; return true; } } finally { if (!success) { editorKit.dispose(); } } } } } } catch (Throwable t) { ProtegeApplication.getErrorLog().logError(t); } return false; }
public synchronized boolean loadAndSetupEditorKitFromURI(EditorKitFactoryPlugin plugin, URI uri) throws Exception { logger.debug("[ProtegeManager] Creating and loading EditorKit. Factory: {}, URI: {}", plugin, uri); EditorKitFactory editorKitFactory = getEditorKitFactory(plugin); if (editorKitFactory != null) { boolean success = false; EditorKit editorKit = editorKitFactory.createEditorKit(); try { if (editorKit.handleLoadFrom(uri)) { getEditorKitManager().addEditorKit(editorKit); closeFirstEditorKitIfNotModified(); success = true; return true; } } finally { if (!success) { editorKit.dispose(); } } } return false; }
if (id.equals(entry.getEditorKitId())) { boolean success = false; EditorKitFactory editorKitFactory = getEditorKitFactory(plugin); if (editorKitFactory != null) { EditorKit editorKit = editorKitFactory.createEditorKit();
public boolean loadAndSetupEditorKitFromURI(EditorKitFactoryPlugin plugin, URI uri) throws Exception { EditorKitFactory editorKitFactory = getEditorKitFactory(plugin); if (editorKitFactory != null) { boolean success = false; EditorKit editorKit = editorKitFactory.createEditorKit(); try { if (editorKit.handleLoadFrom(uri)) { getEditorKitManager().addEditorKit(editorKit); success = true; return true; } } finally { if (!success) { editorKit.dispose(); } } } return false; }
if (id.equals(entry.getEditorKitId())) { boolean success = false; EditorKitFactory editorKitFactory = getEditorKitFactory(plugin); if (editorKitFactory != null) { EditorKit editorKit = editorKitFactory.createEditorKit();
/** * Opens an <code>EditorKit</code> using the <code>EditorKitFactory</code> specified by the given Id. * * @param plugin The <code>EditorKitFactoryPlugin</code> that describes the <code>EditorKitFactory</code> which will * be used to create the <code>EditorKit</code>. */ public boolean openAndSetupEditorKit(EditorKitFactoryPlugin plugin) throws Exception { EditorKitFactory editorKitFactory = getEditorKitFactory(plugin); if (editorKitFactory != null) { boolean success = false; EditorKit editorKit = editorKitFactory.createEditorKit(); try { if (editorKit.handleLoadRequest()) { getEditorKitManager().addEditorKit(editorKit); success = true; return true; } } finally { if (!success) { editorKit.dispose(); } } } return false; }
if (id.equals(entry.getEditorKitId())) { boolean success = false; EditorKitFactory editorKitFactory = getEditorKitFactory(plugin); if (editorKitFactory != null) { EditorKit editorKit = editorKitFactory.createEditorKit();
/** * Creates and sets up a new (probably empty) . The new <code>EditorKit</code> will be passed to the * <code>EditorKitManager</code> for installation. * * @param plugin The <code>EditorKitFactoryPlugin</code> that describes the <code>EditorKitFactory</code> which will * be used to create the <code>EditorKit</code>. */ public boolean createAndSetupNewEditorKit(EditorKitFactoryPlugin plugin) throws Exception { EditorKitFactory editorKitFactory = getEditorKitFactory(plugin); if (editorKitFactory != null) { boolean success = false; EditorKit editorKit = editorKitFactory.createEditorKit(); try { if (editorKit.handleNewRequest()) { getEditorKitManager().addEditorKit(editorKit); success = true; return true; } } finally { if (!success) { editorKit.dispose(); } } } return false; }
public boolean loadAndSetupEditorKitFromURI(EditorKitFactoryPlugin plugin, URI uri) throws Exception { EditorKitFactory editorKitFactory = getEditorKitFactory(plugin); if (editorKitFactory != null) { boolean success = false; EditorKit editorKit = editorKitFactory.createEditorKit(); try { if (editorKit.handleLoadFrom(uri)) { getEditorKitManager().addEditorKit(editorKit); closeFirstEditorKitIfNotModified(); success = true; return true; } } finally { if (!success) { editorKit.dispose(); } } } return false; }
/** * Opens an <code>EditorKit</code> using the <code>EditorKitFactory</code> specified by the given Id. * * @param plugin The <code>EditorKitFactoryPlugin</code> that describes the <code>EditorKitFactory</code> which will * be used to create the <code>EditorKit</code>. */ public synchronized boolean openAndSetupEditorKit(EditorKitFactoryPlugin plugin) throws Exception { EditorKitFactory editorKitFactory = getEditorKitFactory(plugin); if (editorKitFactory != null) { boolean success = false; EditorKit editorKit = editorKitFactory.createEditorKit(); try { if (editorKit.handleLoadRequest()) { getEditorKitManager().addEditorKit(editorKit); success = true; closeFirstEditorKitIfNotModified(); return true; } } finally { if (!success) { editorKit.dispose(); } } } return false; }
/** * Opens an <code>EditorKit</code> using the <code>EditorKitFactory</code> specified by the given Id. * * @param plugin The <code>EditorKitFactoryPlugin</code> that describes the <code>EditorKitFactory</code> which will * be used to create the <code>EditorKit</code>. */ public boolean openAndSetupEditorKit(EditorKitFactoryPlugin plugin) throws Exception { EditorKitFactory editorKitFactory = getEditorKitFactory(plugin); if (editorKitFactory != null) { boolean success = false; EditorKit editorKit = editorKitFactory.createEditorKit(); try { if (editorKit.handleLoadRequest()) { getEditorKitManager().addEditorKit(editorKit); success = true; closeFirstEditorKitIfNotModified(); return true; } } finally { if (!success) { editorKit.dispose(); } } } return false; }