diff --git a/controller/src/extension.ts b/controller/src/extension.ts index c3c00d6..fcd27de 100644 --- a/controller/src/extension.ts +++ b/controller/src/extension.ts @@ -230,6 +230,9 @@ export function activate(context: vscode.ExtensionContext) { vscode.commands.registerCommand( "oml-vision.showProperties", async (iri: string = "", webviewType: IWebviewType) => { + // Open the property panel immediately when showProperties command is called + provider.showPropertyPanel(); + let types: string[] = []; if (iri !== "") { const rawTypesQuery = getIriTypes(iri); @@ -252,7 +255,6 @@ export function activate(context: vscode.ExtensionContext) { command: Commands.SHOW_PROPERTIES, payload: propertyData, }); - provider.showPropertyPanel(); } ) ); diff --git a/controller/src/sparql/SparqlClient.ts b/controller/src/sparql/SparqlClient.ts index e7b76e8..333edf4 100644 --- a/controller/src/sparql/SparqlClient.ts +++ b/controller/src/sparql/SparqlClient.ts @@ -33,11 +33,6 @@ export async function SparqlClient( throw new Error(`No SPARQL queries found in current model.`); } - if (!QUERY && !query) { - vscode.window.showErrorMessage(`Unknown SPARQL query: ${query}`); - throw new Error(`Unknown SPARQL query: ${query}`); - } - if (!QUERY) { QUERY = query; // Uncomment to have VSCode notify users about SPARQL query not being defined in src/vision/sparql directory @@ -62,6 +57,11 @@ export async function SparqlClient( ); } + if (!QUERY && !query) { + vscode.window.showErrorMessage(`Unknown SPARQL query: ${query}`); + throw new Error(`Unknown SPARQL query: ${query}`); + } + if (service === "query") { console.log(`EXECUTE QUERY SERVICE: ${QUERY}`); return await queryEngine(QUERY); diff --git a/view/src/components/Diagram/diagramUtils.ts b/view/src/components/Diagram/diagramUtils.ts index 4caaffe..ae4d4d9 100644 --- a/view/src/components/Diagram/diagramUtils.ts +++ b/view/src/components/Diagram/diagramUtils.ts @@ -593,6 +593,10 @@ const processNodes = ( } } + if (node.type === "NA") { + node.type = "default"; + } + const processedNode: any = { id: node.id, data: node.data,