Skip to content

Commit

Permalink
avoid duplicated name error on Xsmp Documents
Browse files Browse the repository at this point in the history
  • Loading branch information
ydaveluy committed Apr 15, 2024
1 parent 7110dc2 commit 3f0aab5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.xsmp.model.xsmp.Catalogue;
import org.eclipse.xsmp.model.xsmp.Document;
import org.eclipse.xsmp.model.xsmp.Namespace;
import org.eclipse.xsmp.model.xsmp.Operation;
import org.eclipse.xsmp.model.xsmp.Parameter;
Expand Down Expand Up @@ -45,9 +45,9 @@ protected boolean isDuplicate(IEObjectDescription description, IEObjectDescripti
final var first = description.getEObjectOrProxy();
final var second = candidate.getEObjectOrProxy();

if (first instanceof Catalogue || second instanceof Catalogue)
if (first instanceof Document || second instanceof Document)
{
result = first instanceof Catalogue && second instanceof Catalogue;
result = first.eClass().equals(second.eClass());
}
// 2 namespaces can have the same name except if they are in the same catalogue
else if (first instanceof Namespace && second instanceof Namespace)
Expand Down
1 change: 0 additions & 1 deletion vscode-extension/src/wizard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ export async function createProjectWizard() {
const profiles = [
{ id: xsmpSdkProfileId, label: "XSMP-SDK Profile" },
{ id: esaCdkProfileId, label: "ESA-CDK Profile" },
{ id: esaCdkLegacyProfileId, label: "ESA-CDK Legacy Profile (Preview)" }
];

const profile = await vscode.window.showQuickPick(profiles, {
Expand Down

0 comments on commit 3f0aab5

Please sign in to comment.