Skip to content

Commit

Permalink
#120 Contribute to XHTML generation for new ReqIF.Text format (#121)
Browse files Browse the repository at this point in the history
Resolves #120

Change-Id: Ie471ac622cd62b6d4dc7ab24c42f853a851c47d2
Signed-off-by: Tu Ton <minhtutonthat@gmail.com>
  • Loading branch information
minhtutonthat committed Jan 20, 2021
1 parent df1f1f5 commit cd1d122
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ Require-Bundle: org.eclipse.emf.ecore,
org.eclipse.egf.pattern.ftask;visibility:=reexport,
org.polarsys.kitalpha.vp.requirements.docgen,
org.polarsys.kitalpha.doc.gen.business.core.preference,
org.polarsys.capella.vp.requirements.model
org.polarsys.capella.vp.requirements.model,
org.polarsys.capella.docgen
Export-Package: org.polarsys.kitalpha.vp.requirements.docgen,
org.polarsys.kitalpha.vp.requirements.docgen.common,
org.polarsys.kitalpha.vp.requirements.docgen.content,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ protected void method_content(final StringBuffer stringBuffer, final PatternCont
stringBuffer.append(TEXT_1);
super.method_content(stringBuffer, ctx);
stringBuffer.append(TEXT_2);
stringBuffer.append(RequirementHelper.generateRequirementProperties(parameter));
stringBuffer.append(RequirementHelper.generateRequirementProperties(parameter, projectName, outputFolder));
stringBuffer.append(TEXT_2);
stringBuffer.append(RequirementHelper.generateFolderContent(parameter));
stringBuffer.append(TEXT_2);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import org.eclipse.emf.ecore.EObject;
import org.polarsys.capella.common.helpers.EObjectExt;
import org.polarsys.capella.core.data.capellacore.CapellaElement;
import org.polarsys.capella.docgen.util.StringUtil;
import org.polarsys.capella.vp.requirements.CapellaRequirements.CapellaIncomingRelation;
import org.polarsys.capella.vp.requirements.CapellaRequirements.CapellaOutgoingRelation;
import org.polarsys.capella.vp.requirements.CapellaRequirements.CapellaRequirementsPackage;
Expand All @@ -46,12 +47,12 @@

public class RequirementHelper {

public static String generateRequirementProperties(Requirement requirement) {
public static String generateRequirementProperties(Requirement requirement, String projectName, String outputFolder) {
String reqIFIdentifier = requirement.getReqIFIdentifier();
String chapterName = requirement.getReqIFChapterName();
String reqIFName = requirement.getReqIFName();
String reqIFLongName = requirement.getReqIFLongName();
String reqIFText = requirement.getReqIFText();
String reqIFText = StringUtil.transformAREFString(requirement, requirement.getReqIFText(), projectName, outputFolder);
RequirementType requirementType = requirement.getRequirementType();

StringBuilder builder = new StringBuilder();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2017, 2019 THALES GLOBAL SERVICES.
* Copyright (c) 2017, 2021 THALES GLOBAL SERVICES.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
Expand Down Expand Up @@ -42,3 +42,7 @@ location "https://download.eclipse.org/modeling/emf/cdo/drops/R20180613-0111/" {
location kitalpha "https://download.eclipse.org/kitalpha/updates/nightly/runtime/master" {
org.polarsys.kitalpha.doc.gen.business.core.feature.feature.group
}

location xhtml "https://download.eclipse.org/capella/addons/xhtmldocgen/updates/nightly/master" {
org.polarsys.capella.docgen.feature.feature.group
}

0 comments on commit cd1d122

Please sign in to comment.