Skip to content

Commit

Permalink
Prevent Capella index extension use on non-Capella models (#53)
Browse files Browse the repository at this point in the history
Prevent to override index item computation on non-Capella model.

Change-Id: I00cb4abdd14c99cb007089068012d8f50f84c493
Signed-off-by: Arnaud Dieumegard <[email protected]>
  • Loading branch information
arnauddieumegard authored Dec 17, 2020
1 parent 0447d57 commit 7fafb49
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//Generated with EGF 1.6.1.201906060805
//Generated with EGF 1.6.2.202001031546
package org.polarsys.capella.docgen.index.items.builder;

import org.polarsys.kitalpha.doc.gen.business.core.services.IndexItem;
Expand All @@ -12,6 +12,7 @@
import org.eclipse.egf.pattern.execution.*;
import org.eclipse.egf.pattern.query.*;
import org.polarsys.kitalpha.doc.gen.business.core.util.DefaultFileNameService;
import org.polarsys.capella.common.data.modellingcore.ModelElement;

public class CollectCapellaItems {
protected static String nl;
Expand Down Expand Up @@ -140,6 +141,6 @@ protected void method_body(final StringBuffer stringBuffer, final PatternContext
}

public boolean preCondition(PatternContext ctx) throws Exception {
return true;
return parameter instanceof ModelElement;
}
}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<%@ jet package="PACKAGE" class="CLASS" imports="org.polarsys.kitalpha.doc.gen.business.core.services.IndexItem org.polarsys.capella.docgen.util.CapellaServices org.polarsys.capella.docgen.util.DocGenHtmlCapellaUtil org.polarsys.kitalpha.doc.gen.business.core.services.IndexerService org.polarsys.kitalpha.doc.gen.business.core.services.ExtensionService org.polarsys.kitalpha.doc.gen.business.core.helper.IConceptsHelper java.util.* org.eclipse.egf.model.pattern.* org.eclipse.egf.pattern.execution.* org.eclipse.egf.pattern.query.* org.polarsys.kitalpha.doc.gen.business.core.util.DefaultFileNameService" %>
<%@ jet package="PACKAGE" class="CLASS" imports="org.polarsys.kitalpha.doc.gen.business.core.services.IndexItem org.polarsys.capella.docgen.util.CapellaServices org.polarsys.capella.docgen.util.DocGenHtmlCapellaUtil org.polarsys.kitalpha.doc.gen.business.core.services.IndexerService org.polarsys.kitalpha.doc.gen.business.core.services.ExtensionService org.polarsys.kitalpha.doc.gen.business.core.helper.IConceptsHelper java.util.* org.eclipse.egf.model.pattern.* org.eclipse.egf.pattern.execution.* org.eclipse.egf.pattern.query.* org.polarsys.kitalpha.doc.gen.business.core.util.DefaultFileNameService org.polarsys.capella.common.data.modellingcore.ModelElement" %>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
return parameter instanceof ModelElement;

0 comments on commit 7fafb49

Please sign in to comment.