public class AadlUnparser extends AadlProcessingSwitch
copyright, DONE, INSTANCE, NOT_DONE
DEFAULT_DEFAULT_TRAVERSAL, NO_DEFAULT, PROCESS_BOTTOM_UP_COMPONENT_IMPL, PROCESS_POST_ORDER_ALL, PROCESS_PRE_ORDER_ALL, PROCESS_TOP_DOWN_COMPONENT_CLASSIFIER, PROCESS_TOP_DOWN_COMPONENT_IMPL
Constructor and Description |
---|
AadlUnparser() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
doUnparse(Element as)
Unparses the aadl spec and returns it as string
|
void |
doUnparseToExternalFile(Element obj,
java.io.File file)
Used to unparse to files outside the scope of Eclipse.
|
void |
doUnparseToFile(Element obj) |
org.eclipse.core.resources.IFile |
doUnparseToFile(Element obj,
org.eclipse.core.runtime.IPath path)
unparse the AADL model into the specified file.
|
void |
doUnparseToFile(org.eclipse.core.resources.IResource aaxlFile) |
void |
doUnparseToFile(org.eclipse.emf.ecore.resource.Resource res) |
static AadlUnparser |
getAadlUnparser() |
java.lang.String |
getOutput()
returns the unparsed output as a single String
|
boolean |
hasDeclaredFeatures(org.eclipse.emf.common.util.EList ftl) |
boolean |
isComment(org.eclipse.xtext.AbstractRule rule) |
boolean |
isCommentNode(org.eclipse.xtext.nodemodel.INode node) |
void |
processComment(org.eclipse.emf.ecore.EObject o) |
void |
processCurlyList(org.eclipse.emf.common.util.EList<PropertyAssociation> list)
unparse curly (property) list
|
void |
processEList(org.eclipse.emf.common.util.EList list,
java.lang.String separator)
Does processing of list with separators
|
void |
processModalElement(ModalElement mm)
unparse modes of ModalElement
|
void |
processModalPath(ModalPath mm)
unparse modes of ModalElement
|
void |
processOptionalEList(org.eclipse.emf.common.util.EList list,
java.lang.String separator)
Does processing of list with separators and parens if not empty
|
void |
processOptionalSection(org.eclipse.emf.common.util.EList list,
java.lang.String sectionName,
java.lang.String emptyOption)
Does processing of list as optional section without separators
|
void |
processRefEList(org.eclipse.emf.common.util.EList list,
java.lang.String separator,
Element context)
Does processing of list with separators
|
void |
processSection(org.eclipse.emf.common.util.EList list,
java.lang.String sectionName,
java.lang.Boolean doNone)
Does processing of list as section without separators
|
getAadl2Switch, getInstanceSwitch, process
cancelled, defaultTraversal, defaultTraversal, defaultTraversalAllDeclarativeModels, defaultTraversalAllInstances, error, error, getErrorManager, getResultList, info, info, internalError, internalError, notCancelled, processAllComponentImpl, processBottomUpComponentImpl, processBottomUpComponentImpl, processEList, processObject, processPostOrderAll, processPostOrderAll, processPostOrderAll, processPostOrderAllDeclarativeModels, processPostOrderAllInstances, processPostOrderComponentInstance, processPostOrderComponentInstance, processPreOrderAll, processPreOrderAll, processPreOrderAll, processPreOrderAllDeclarativeModels, processPreOrderAllInstances, processPreOrderComponentInstance, processPreOrderComponentInstance, processPreOrderComponentInstanceStop, processResources, processResources, processResourcesIgnoreFailure, processTopDownComponentClassifier, processTopDownComponentClassifierAllDeclarativeModels, processTopDownComponentImpl, processTopDownComponentImpl, processTree, processTreeIgnoreFailure, warning, warning
public static AadlUnparser getAadlUnparser()
public java.lang.String getOutput()
public void processOptionalEList(org.eclipse.emf.common.util.EList list, java.lang.String separator)
list
- separator
- public void processEList(org.eclipse.emf.common.util.EList list, java.lang.String separator)
list
- separator
- public void processRefEList(org.eclipse.emf.common.util.EList list, java.lang.String separator, Element context)
list
- separator
- public void processCurlyList(org.eclipse.emf.common.util.EList<PropertyAssociation> list)
public void processModalElement(ModalElement mm)
mm
- modal elementpublic void processModalPath(ModalPath mm)
mm
- modal elementpublic void processOptionalSection(org.eclipse.emf.common.util.EList list, java.lang.String sectionName, java.lang.String emptyOption)
list
- to be processedsectionName
- sectionemptyOption
- shown with section name if empty listpublic void processSection(org.eclipse.emf.common.util.EList list, java.lang.String sectionName, java.lang.Boolean doNone)
list
- to be processedsectionName
- sectionemptyOption
- shown with section name if empty listpublic boolean hasDeclaredFeatures(org.eclipse.emf.common.util.EList ftl)
public java.lang.String doUnparse(Element as)
as
- AadlSpec or any other Element in the Aadl grammarpublic void doUnparseToFile(org.eclipse.core.resources.IResource aaxlFile)
public org.eclipse.core.resources.IFile doUnparseToFile(Element obj, org.eclipse.core.runtime.IPath path)
obj
- Element. If it is an Instance object nothing is unparsed.path
- The file path to unparse to.public void doUnparseToExternalFile(Element obj, java.io.File file)
public void doUnparseToFile(Element obj)
public void doUnparseToFile(org.eclipse.emf.ecore.resource.Resource res)
public void processComment(org.eclipse.emf.ecore.EObject o)
public boolean isCommentNode(org.eclipse.xtext.nodemodel.INode node)
public boolean isComment(org.eclipse.xtext.AbstractRule rule)