Skip to content

Commit

Permalink
Merge pull request #62 from opencaesar/fix/61-property-panel-open
Browse files Browse the repository at this point in the history
fix/61-property-panel-open
  • Loading branch information
UTNAK authored May 8, 2024
2 parents f576f8e + 0ffc45a commit a8025cd
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
4 changes: 3 additions & 1 deletion controller/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -252,7 +255,6 @@ export function activate(context: vscode.ExtensionContext) {
command: Commands.SHOW_PROPERTIES,
payload: propertyData,
});
provider.showPropertyPanel();
}
)
);
Expand Down
10 changes: 5 additions & 5 deletions controller/src/sparql/SparqlClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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);
Expand Down
4 changes: 4 additions & 0 deletions view/src/components/Diagram/diagramUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,10 @@ const processNodes = (
}
}

if (node.type === "NA") {
node.type = "default";
}

const processedNode: any = {
id: node.id,
data: node.data,
Expand Down

0 comments on commit a8025cd

Please sign in to comment.