Skip to content

Commit

Permalink
JaMoPP version update.
Browse files Browse the repository at this point in the history
The dependencies and especially the package names have been updated to our latest version of JaMoPP: https://github.com/MDSD-Tools/JaMoPP
  • Loading branch information
dr6817 committed Feb 9, 2024
1 parent c2a9027 commit 0ce6494
Show file tree
Hide file tree
Showing 206 changed files with 10,750 additions and 11,118 deletions.
2 changes: 1 addition & 1 deletion .project
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>Palladio-ReverseEngineering-SoMoX-JaMoPP</name>
<name>Palladio-ReverseEngineering-SoMoX</name>
<comment></comment>
<projects>
</projects>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ Require-Bundle: org.somox.core,
org.somox.sourcecodedecorator,
org.palladiosimulator.pcm,
org.palladiosimulator.pcm.resources,
org.emftext.language.java,
org.eclipse.emf.common,
org.somox.metricvaluesstorage,
org.somox.metrics,
org.somox.util,
org.somox.gast2seff,
org.jgrapht.core
org.jgrapht.core,
tools.mdsd.jamopp.model.java
Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Export-Package: org.somox.analyzer.simplemodelanalyzer,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

import org.apache.log4j.Category;
import org.apache.log4j.Logger;
import org.emftext.language.java.classifiers.ConcreteClassifier;
import org.emftext.language.java.types.Type;
import org.palladiosimulator.pcm.core.composition.ProvidedDelegationConnector;
import org.palladiosimulator.pcm.core.composition.RequiredDelegationConnector;
import org.palladiosimulator.pcm.repository.Interface;
Expand All @@ -16,6 +14,9 @@
import org.somox.kdmhelper.metamodeladdition.Root;
import org.somox.sourcecodedecorator.ComponentImplementingClassesLink;

import tools.mdsd.jamopp.model.java.classifiers.ConcreteClassifier;
import tools.mdsd.jamopp.model.java.types.Type;

/**
* Component, package, interface, and port naming facility.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
import org.apache.log4j.Logger;
import org.eclipse.emf.common.util.BasicEList;
import org.eclipse.emf.common.util.EList;
import org.emftext.language.java.classifiers.ConcreteClassifier;
import org.emftext.language.java.types.Type;
import org.jgrapht.Graph;
import org.palladiosimulator.pcm.core.composition.AssemblyContext;
import org.palladiosimulator.pcm.core.composition.ComposedStructure;
Expand All @@ -28,6 +26,9 @@
import org.somox.sourcecodedecorator.FileLevelSourceCodeLink;
import org.somox.sourcecodedecorator.SourcecodedecoratorFactory;

import tools.mdsd.jamopp.model.java.classifiers.ConcreteClassifier;
import tools.mdsd.jamopp.model.java.types.Type;

/**
* Builder for SAMM structures. Takes care of updating the source code
* decorator. The core builder facility.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,6 @@

import org.apache.log4j.Logger;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.emftext.language.java.classifiers.Classifier;
//import org.eclipse.gmt.modisco.java.ASTNode;
//Commentable statt AstNode
import org.emftext.language.java.classifiers.ConcreteClassifier;
import org.emftext.language.java.types.ClassifierReference;
import org.emftext.language.java.types.Type;
import org.emftext.language.java.types.TypeReference;
import org.palladiosimulator.pcm.core.entity.ComposedProvidingRequiringEntity;
import org.palladiosimulator.pcm.repository.BasicComponent;
import org.palladiosimulator.pcm.repository.Interface;
Expand All @@ -26,13 +19,6 @@
import org.palladiosimulator.pcm.repository.RepositoryFactory;
import org.palladiosimulator.pcm.repository.RequiredRole;
import org.palladiosimulator.pcm.repository.Role;
//import de.fzi.gast.accesses.Access;
//import de.fzi.gast.accesses.InheritanceTypeAccess;
//import de.fzi.gast.accesses.accessesPackage;
//import de.fzi.gast.core.Root;
//import de.fzi.gast.types.GASTClass;
//import org.eclipse.gmt.modisco.java.TypeReference;
//import org.eclipse.gmt.modisco.java.emf.JavaPackage;
import org.somox.analyzer.AnalysisResult;
import org.somox.analyzer.simplemodelanalyzer.builder.util.InterfacePortBuilderHelper;
import org.somox.analyzer.simplemodelanalyzer.detection.ComponentInterfaceStrategy;
Expand All @@ -46,6 +32,12 @@
import org.somox.sourcecodedecorator.InterfaceSourceCodeLink;
import org.somox.sourcecodedecorator.SourcecodedecoratorFactory;

import tools.mdsd.jamopp.model.java.classifiers.Classifier;
import tools.mdsd.jamopp.model.java.classifiers.ConcreteClassifier;
import tools.mdsd.jamopp.model.java.types.ClassifierReference;
import tools.mdsd.jamopp.model.java.types.Type;
import tools.mdsd.jamopp.model.java.types.TypeReference;

/**
* Builder used to create {@link Interface}s in the SAMM instance based on
* reverse engineered code
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,6 @@

import org.apache.log4j.Logger;
import org.eclipse.emf.common.util.EList;
import org.emftext.language.java.arrays.ArrayTypeable;
import org.emftext.language.java.classifiers.ConcreteClassifier;
import org.emftext.language.java.commons.Commentable;
import org.emftext.language.java.containers.CompilationUnit;
import org.emftext.language.java.generics.QualifiedTypeArgument;
import org.emftext.language.java.members.Field;
import org.emftext.language.java.members.Method;
import org.emftext.language.java.types.Type;
import org.emftext.language.java.variables.Variable;
import org.palladiosimulator.pcm.core.entity.NamedElement;
import org.palladiosimulator.pcm.repository.CollectionDataType;
import org.palladiosimulator.pcm.repository.CompositeDataType;
Expand All @@ -36,6 +27,16 @@
import org.somox.sourcecodedecorator.SourcecodedecoratorFactory;
import org.somox.util.DefaultResourceEnvironment;

import tools.mdsd.jamopp.model.java.arrays.ArrayTypeable;
import tools.mdsd.jamopp.model.java.classifiers.ConcreteClassifier;
import tools.mdsd.jamopp.model.java.commons.Commentable;
import tools.mdsd.jamopp.model.java.containers.CompilationUnit;
import tools.mdsd.jamopp.model.java.generics.QualifiedTypeArgument;
import tools.mdsd.jamopp.model.java.members.Field;
import tools.mdsd.jamopp.model.java.members.Method;
import tools.mdsd.jamopp.model.java.types.Type;
import tools.mdsd.jamopp.model.java.variables.Variable;

/**
* Builder for operations, parameters, message types, and data types. Keeps the
* source code decorator updated.
Expand Down Expand Up @@ -109,7 +110,7 @@ private Method getRealMethod(final ConcreteClassifier implementationClass, final
}
for (final ConcreteClassifier superClass : KDMHelper.getSuperTypes(implementationClass)) {
if (!KDMHelper.isAbstract(superClass) && !KDMHelper.isInterface(superClass)
&& (superClass instanceof org.emftext.language.java.classifiers.Class)) {
&& (superClass instanceof tools.mdsd.jamopp.model.java.classifiers.Class)) {
final Method real = getRealMethod(superClass, inputMethod);
if (real != null) {
return real;
Expand Down Expand Up @@ -163,12 +164,12 @@ private OperationSignature createOperationSignature(final Method method, final O
}

if ((null != method.getTypeReference()) && (null != GetAccessedType.getAccessedType(method.getTypeReference()))
&& !(method.getTypeReference() instanceof org.emftext.language.java.types.Void)) {
&& !(method.getTypeReference() instanceof tools.mdsd.jamopp.model.java.types.Void)) {
final DataType returnType = getType(GetAccessedType.getAccessedType(method.getTypeReference()),
analysisResult.getInternalArchitectureModel(), (ArrayTypeable) method.getTypeReference());
operation.setReturnType__OperationSignature(returnType);
} else if ((null != method.getTypeReference())
&& !(method.getTypeReference() instanceof org.emftext.language.java.types.Void)) {
&& !(method.getTypeReference() instanceof tools.mdsd.jamopp.model.java.types.Void)) {
final Type accessedType = GetAccessedType.getAccessedType(method.getTypeReference());
final DataType type = getType(accessedType, analysisResult.getInternalArchitectureModel(),
(ArrayTypeable) method.getTypeReference());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,6 @@

import org.apache.log4j.Logger;
import org.eclipse.emf.common.util.EList;
import org.emftext.language.java.classifiers.ConcreteClassifier;
import org.emftext.language.java.containers.CompilationUnit;
import org.emftext.language.java.members.ClassMethod;
import org.emftext.language.java.members.Constructor;
import org.emftext.language.java.members.InterfaceMethod;
import org.emftext.language.java.members.Member;
import org.emftext.language.java.members.Method;
import org.emftext.language.java.statements.StatementListContainer;
import org.emftext.language.java.types.Type;
import org.palladiosimulator.pcm.repository.BasicComponent;
import org.palladiosimulator.pcm.repository.EventGroup;
import org.palladiosimulator.pcm.repository.EventType;
Expand All @@ -42,6 +33,16 @@
import org.somox.sourcecodedecorator.SourceCodeDecoratorRepository;
import org.somox.sourcecodedecorator.SourcecodedecoratorFactory;

import tools.mdsd.jamopp.model.java.classifiers.ConcreteClassifier;
import tools.mdsd.jamopp.model.java.containers.CompilationUnit;
import tools.mdsd.jamopp.model.java.members.ClassMethod;
import tools.mdsd.jamopp.model.java.members.Constructor;
import tools.mdsd.jamopp.model.java.members.InterfaceMethod;
import tools.mdsd.jamopp.model.java.members.Member;
import tools.mdsd.jamopp.model.java.members.Method;
import tools.mdsd.jamopp.model.java.statements.StatementListContainer;
import tools.mdsd.jamopp.model.java.types.Type;

/**
* Builder used to add GAST behaviour to methods detected as provided operations
* of components
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
package org.somox.analyzer.simplemodelanalyzer.builder.util;

import org.apache.log4j.Logger;
import org.emftext.language.java.arrays.ArrayTypeable;
import org.emftext.language.java.classifiers.ConcreteClassifier;
import org.emftext.language.java.members.Constructor;
import org.emftext.language.java.members.Member;
import org.emftext.language.java.members.Method;
import org.emftext.language.java.types.Type;
import org.palladiosimulator.pcm.repository.DataType;
import org.palladiosimulator.pcm.repository.EventGroup;
import org.palladiosimulator.pcm.repository.EventType;
Expand All @@ -20,6 +14,13 @@
import org.somox.sourcecodedecorator.SourceCodeDecoratorRepository;
import org.somox.util.SourceCodeDecoratorHelper;

import tools.mdsd.jamopp.model.java.arrays.ArrayTypeable;
import tools.mdsd.jamopp.model.java.classifiers.ConcreteClassifier;
import tools.mdsd.jamopp.model.java.members.Constructor;
import tools.mdsd.jamopp.model.java.members.Member;
import tools.mdsd.jamopp.model.java.members.Method;
import tools.mdsd.jamopp.model.java.types.Type;

public class PcmModelCreationHelper {

private static final Logger logger = Logger.getLogger(PcmModelCreationHelper.class.getSimpleName());
Expand Down Expand Up @@ -51,7 +52,7 @@ public OperationSignature createOperationSignatureInInterfaceForJaMoPPMemberAndU
}
final OperationSignature opSignature = RepositoryFactory.eINSTANCE.createOperationSignature();
opSignature.setEntityName(jaMoPPMember.getName());
if (jaMoPPMember instanceof final org.emftext.language.java.members.Method jaMoPPMethod) {
if (jaMoPPMember instanceof final tools.mdsd.jamopp.model.java.members.Method jaMoPPMethod) {
if ((null != jaMoPPMethod.getTypeReference()) && (null != jaMoPPMethod.getTypeReference().getTarget())) {
final DataType returnType = getDataTypeAndUpdateSourceCodeDecorator(repo,
jaMoPPMethod.getTypeReference().getTarget(), (ArrayTypeable) jaMoPPMethod.getTypeReference());
Expand All @@ -65,11 +66,11 @@ public OperationSignature createOperationSignatureInInterfaceForJaMoPPMemberAndU
opSignature.setReturnType__OperationSignature(defaultDataType);

}
for (final org.emftext.language.java.parameters.Parameter jaMoPPParam : jaMoPPMethod.getParameters()) {
for (final tools.mdsd.jamopp.model.java.parameters.Parameter jaMoPPParam : jaMoPPMethod.getParameters()) {
createParameterAndAddParameter(repo, opSignature, jaMoPPParam);
}
} else if (jaMoPPMember instanceof final Constructor ctor) {
for (final org.emftext.language.java.parameters.Parameter ctorParam : ctor.getParameters()) {
for (final tools.mdsd.jamopp.model.java.parameters.Parameter ctorParam : ctor.getParameters()) {
createParameterAndAddParameter(repo, opSignature, ctorParam);
}
}
Expand All @@ -86,15 +87,17 @@ public OperationSignature createOperationSignatureInInterfaceForJaMoPPMemberAndU

public EventGroup createEventGroupAndEventTypeAndUpdateSourceCodeDecorator(
final ConcreteClassifier observedEventDataType, final Repository repository,
final org.emftext.language.java.parameters.Parameter observedJaMoPPParameter, final Member jaMoPPMember) {
final tools.mdsd.jamopp.model.java.parameters.Parameter observedJaMoPPParameter,
final Member jaMoPPMember) {
final EventGroup eventGroup = createEventGroupAndUpdateSCDM(observedEventDataType);
createEventType(eventGroup, repository, observedEventDataType, observedJaMoPPParameter, jaMoPPMember);
return eventGroup;
}

private EventType createEventType(final EventGroup eventGroup, final Repository repoitory,
final ConcreteClassifier observedEventDataType,
final org.emftext.language.java.parameters.Parameter observedJaMoPPParameter, final Member jaMoPPMember) {
final tools.mdsd.jamopp.model.java.parameters.Parameter observedJaMoPPParameter,
final Member jaMoPPMember) {
final EventType eventType = RepositoryFactory.eINSTANCE.createEventType();
eventType.setEntityName(observedEventDataType.getName());
eventGroup.getEventTypes__EventGroup().add(eventType);
Expand Down Expand Up @@ -142,13 +145,13 @@ private DataType getDataTypeAndUpdateSourceCodeDecorator(final Repository repo,
}

private void createParameterAndAddParameter(final Repository repo, final OperationSignature opSignature,
final org.emftext.language.java.parameters.Parameter jaMoPPParam) {
final tools.mdsd.jamopp.model.java.parameters.Parameter jaMoPPParam) {
final Parameter pcmParam = createParameter(repo, jaMoPPParam);
opSignature.getParameters__OperationSignature().add(pcmParam);
}

private Parameter createParameter(final Repository repo,
final org.emftext.language.java.parameters.Parameter jaMoPPParam) {
final tools.mdsd.jamopp.model.java.parameters.Parameter jaMoPPParam) {
final Parameter pcmParam = RepositoryFactory.eINSTANCE.createParameter();
pcmParam.setParameterName(jaMoPPParam.getName());

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
package org.somox.analyzer.simplemodelanalyzer.detection;

import org.emftext.language.java.classifiers.ConcreteClassifier;
import org.somox.filter.BaseFilter;
import org.somox.filter.DataObjectFilter;
import org.somox.kdmhelper.KDMHelper;

//import de.fzi.gast.functions.Method;
//import de.fzi.gast.types.GASTClass;
//import de.fzi.gast.types.GASTStruct;
import tools.mdsd.jamopp.model.java.classifiers.ConcreteClassifier;

/**
* Abstract class for {@link IInitializationStrategy} providing default class
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import org.apache.log4j.Logger;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.SubProgressMonitor;
import org.emftext.language.java.classifiers.ConcreteClassifier;
import org.jgrapht.Graph;
import org.jgrapht.alg.connectivity.ConnectivityInspector;
import org.jgrapht.graph.AsSubgraph;
Expand All @@ -42,10 +41,10 @@
import org.somox.metrics.helper.ComponentToImplementingClassesHelper;
import org.somox.metrics.registry.MetricsRegistry;
import org.somox.metrics.util.GraphPrinter;
//import de.fzi.gast.core.Root;
//import de.fzi.gast.types.GASTClass;
import org.somox.sourcecodedecorator.ComponentImplementingClassesLink;

import tools.mdsd.jamopp.model.java.classifiers.ConcreteClassifier;

/**
* Detection strategy for composite component which relies on clustering of
* metrics computed for pair-wise component relationships
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
package org.somox.analyzer.simplemodelanalyzer.detection;

import org.emftext.language.java.classifiers.ConcreteClassifier;
import org.emftext.language.java.members.ClassMethod;
import org.emftext.language.java.members.Method;
import org.emftext.language.java.types.Type;
import org.somox.kdmhelper.KDMHelper;
//import de.fzi.gast.functions.Method;
//import de.fzi.gast.types.GASTClass;
import org.somox.sourcecodedecorator.InterfaceSourceCodeLink;
import org.somox.sourcecodedecorator.SourceCodeDecoratorRepository;

import tools.mdsd.jamopp.model.java.classifiers.ConcreteClassifier;
import tools.mdsd.jamopp.model.java.members.ClassMethod;
import tools.mdsd.jamopp.model.java.members.Method;
import tools.mdsd.jamopp.model.java.types.Type;

/**
* Default interface detection strategy. Conditions in GAST: interface or only
* virtual methods which is not primitive or identified a component interface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,15 @@
import java.util.ArrayList;
import java.util.List;

import org.emftext.language.java.classifiers.ConcreteClassifier;
import org.somox.analyzer.simplemodelanalyzer.builder.ComponentBuilder;
import org.somox.configuration.SoMoXConfiguration;
import org.somox.filter.ComposedFilter;
import org.somox.filter.EClassBasedFilter;
import org.somox.kdmhelper.metamodeladdition.Root;
//import de.fzi.gast.core.Root;
//import de.fzi.gast.types.GASTClass;
//import de.fzi.gast.types.typesPackage;
import org.somox.sourcecodedecorator.ComponentImplementingClassesLink;

import tools.mdsd.jamopp.model.java.classifiers.ConcreteClassifier;

/**
* Initialization class for the conversion from GAST class to component. <br>
* Classes are extracted from the Resource and "bundled" with their inner
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.somox.analyzer.simplemodelanalyzer.detection;

import org.emftext.language.java.classifiers.ConcreteClassifier;
import tools.mdsd.jamopp.model.java.classifiers.ConcreteClassifier;

//import de.fzi.gast.types.GASTClass;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,16 @@
import java.util.ArrayList;
import java.util.List;

import org.emftext.language.java.classifiers.ConcreteClassifier;
import org.somox.analyzer.simplemodelanalyzer.builder.ComponentBuilder;
import org.somox.configuration.SoMoXConfiguration;
import org.somox.filter.ComposedFilter;
import org.somox.filter.EClassBasedFilter;
import org.somox.kdmhelper.KDMHelper;
import org.somox.kdmhelper.metamodeladdition.Root;
//import de.fzi.gast.core.Root;
//import de.fzi.gast.types.GASTClass;
//import de.fzi.gast.types.typesPackage;
import org.somox.sourcecodedecorator.ComponentImplementingClassesLink;

import tools.mdsd.jamopp.model.java.classifiers.ConcreteClassifier;

/**
* Initialization class which only lists a filtered set of classes which
* potentially can become a component. Does NOT create a SAMM primitive
Expand Down
Loading

0 comments on commit 0ce6494

Please sign in to comment.