Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix/61-property-panel-open #62

Merged
merged 3 commits into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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