Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
4c770c4
removed old hard coded handbook and tutorial buttons and git / psf in…
arg0n1s Oct 24, 2022
6dde138
+ added flag to allow creation of files that have not been there befo…
arg0n1s Oct 25, 2022
af7bd17
removed more old / unused projects
arg0n1s Oct 26, 2022
309b209
added a color picker function to account for dark themes
arg0n1s Oct 26, 2022
379b658
code formatting
arg0n1s Nov 8, 2022
031d6ca
Merge remote-tracking branch 'origin/refactoring_GT_TGG'
Arikae Mar 2, 2023
04227a0
MoflonEmfBuilder no longer throws exceptions when there is no model f…
Arikae Apr 11, 2023
0aaeedf
Revert "+ added flag to allow creation of files that have not been th…
arg0n1s Oct 25, 2022
c578e61
Merge pull request #143 from eMoflon/hotfix/absolute-smartemf-files-f…
Arikae Jun 26, 2023
454d90f
fixed npe for notifications that involve string attributes
Arikae Jul 10, 2023
29661ab
fixed npe for notifications that involve string attributes
Arikae Jul 12, 2023
fcdb36e
Merge branch 'master' into refactoring_GT_TGG
Arikae Jul 12, 2023
4a6ae0d
fixed a bug where adding an element to a resource did not reset eCont…
Arikae Jul 29, 2023
334d7f2
fixed a problem where setting a containment edge did not set the reso…
Arikae Jul 29, 2023
559bd41
fixed missing notifications such as add messages for the ResourceCont…
Arikae Aug 2, 2023
791e41b
fixed a problem where too many add and remove messages were sent (whe…
Arikae Aug 10, 2023
d8d8608
Extend copyAll returned result
adrianmoeller Aug 14, 2023
4839887
fixed an issue where removing the adapter from the resource led to a …
Arikae Aug 15, 2023
6899bd3
fixed an issue with missing add messages when putting an element dire…
Arikae Aug 17, 2023
1318dac
improved the EMoflonModelVisualiser by using name attributes when ava…
Arikae Aug 18, 2023
cc6576e
improved readability of SmartEMFNotification.toString()
Arikae Aug 18, 2023
eb81929
removed unncessary remove Notifications and readded missing ones
Arikae Aug 18, 2023
d85f579
added another message back in or else readded edges cannot be disting…
Arikae Aug 18, 2023
fe9e7e0
small fix for success notifications in smartemf
Arikae Oct 12, 2023
79bf9b4
Merge branch 'master' into refactoring_GT_TGG
maxkratz Oct 12, 2023
67514c2
Removes non-existing plugins from feature.xml to fix updatesite
maxkratz Oct 12, 2023
b78a9c9
Merge branch 'master' into refactoring_GT_TGG
maxkratz Nov 10, 2023
9e725c3
fixed an issue where platform:/resource uris were converted to platfo…
Arikae Jan 19, 2024
71474c1
Merge remote-tracking branch 'origin/master' into refactoring_GT_TGG
maxkratz Feb 20, 2024
e7cb4d6
Merge remote-tracking branch 'origin/master' into refactoring_GT_TGG
maxkratz Jun 18, 2024
3b5cc7e
Merge remote-tracking branch 'origin/master' into refactoring_GT_TGG
maxkratz Jun 20, 2024
2255be6
Merge remote-tracking branch 'origin/master' into refactoring_GT_TGG
maxkratz Dec 17, 2024
a450928
Merge remote-tracking branch 'origin/master' into refactoring_GT_TGG
maxkratz Dec 19, 2024
6b82d1b
Merge remote-tracking branch 'origin/master' into refactoring_GT_TGG
maxkratz Mar 19, 2025
0422864
Properly update all projects to Java 21
maxkratz Mar 20, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.codegen.targetPlatform=21
org.eclipse.jdt.core.compiler.compliance=21
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=17
org.eclipse.jdt.core.compiler.source=21
2 changes: 1 addition & 1 deletion org.emoflon.smartemf.dependencies/.classpath
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-15"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-21"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry exported="true" kind="lib" path="jdom-2.0.6.jar"/>
<classpathentry exported="true" kind="lib" path="jdom-2.0.6-contrib.jar"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=15
org.eclipse.jdt.core.compiler.compliance=15
org.eclipse.jdt.core.compiler.codegen.targetPlatform=21
org.eclipse.jdt.core.compiler.compliance=21
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=15
org.eclipse.jdt.core.compiler.source=21
2 changes: 1 addition & 1 deletion org.emoflon.smartemf.dependencies/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@ Export-Package: org.jdom2,
org.jdom2.xpath.jaxen,
org.jdom2.xpath.util
Require-Bundle: org.junit
Bundle-RequiredExecutionEnvironment: JavaSE-15
Bundle-RequiredExecutionEnvironment: JavaSE-21
Automatic-Module-Name: org.emoflon.smartemf.dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -24,38 +24,38 @@
/**
* Class which generates the code
*/
public class SmartEMFGenerator{
public class SmartEMFGenerator {

/** ########################Attributes######################## */

/**########################Attributes########################*/

private String path;
private Collection<CodeTemplate> templates;
private GenModel genModel;

/**########################Constructor########################*/
/** ########################Constructor######################## */

/**
* constructs a new EMFGenerator object
*
* @param ePackage to build from
* @param genmodel to build with
* @param path to the original Ecore of the corresponding project
*/
* @param path to the original Ecore of the corresponding project
*/
public SmartEMFGenerator(IProject project, EPackage ePackage, GenModel genmodel) {
String projectPath = project.getLocation().makeAbsolute().toString();

// if modeldirectory contains project name -> don't duplicate it
if(genmodel.getModelDirectory().contains(project.getName())) {
if (genmodel.getModelDirectory().contains(project.getName())) {
File f = new File(projectPath);
path = f.getParentFile().getAbsolutePath() + "/" + genmodel.getModelDirectory() + "/";
}
else {
path = projectPath + "/" + genmodel.getModelDirectory()+ "/";
} else {
path = projectPath + "/" + genmodel.getModelDirectory() + "/";
}

templates = new LinkedList<>();
this.genModel = genmodel;
for(GenPackage genPkg : getGenPackages(genmodel)){

for (GenPackage genPkg : getGenPackages(genmodel)) {
initTemplates(genPkg);
}
}
Expand All @@ -67,65 +67,65 @@ private void initTemplates(GenPackage genPkg) {
initFactoryImplementation(genPkg);
initSmartEMFInterfaces(genPkg);
initSmartEMFImplementations(genPkg);
for(GenPackage subPkg : genPkg.getSubGenPackages()) {

for (GenPackage subPkg : genPkg.getSubGenPackages()) {
initTemplates(subPkg);
}
}

private Collection<GenPackage> getGenPackages(GenModel genmodel) {
Collection<GenPackage> visited = new HashSet<>();
Collection<GenPackage> unvisited = new HashSet<>();
unvisited.addAll(genmodel.getGenPackages());
while(!unvisited.isEmpty()) {
while (!unvisited.isEmpty()) {
GenPackage next = unvisited.iterator().next();
visited.add(next);
unvisited.remove(next);

unvisited.addAll(next.getSubGenPackages());
}
return visited;
}

private void initPackageInterface(GenPackage genPkg) {
PackageInterfaceTemplate creator = new PackageInterfaceTemplate(genPkg, path);
templates.add(creator);
for(org.eclipse.emf.ecore.EEnum eenum : TemplateUtil.getEEnums(genPkg)){

for (org.eclipse.emf.ecore.EEnum eenum : TemplateUtil.getEEnums(genPkg)) {
EEnumTemplate eenum_creator = new EEnumTemplate(genPkg, eenum, path);
templates.add(eenum_creator);
}
}

private void initPackageImplementation(GenPackage genPkg) {
PackageImplTemplate creator = new PackageImplTemplate(genPkg, path);
templates.add(creator);
}

private void initFactoryInterface(GenPackage genPkg) {
FactoryInterfaceTemplate creator = new FactoryInterfaceTemplate(genPkg, path);
templates.add(creator);
}

private void initFactoryImplementation(GenPackage genPkg) {
FactoryImplTemplate creator = new FactoryImplTemplate(genPkg, path);
templates.add(creator);
}

private void initSmartEMFInterfaces(GenPackage genPkg) {
for(EClassifier classifier : genPkg.getEcorePackage().getEClassifiers()){
if(classifier instanceof EClass eClass) {
for (EClassifier classifier : genPkg.getEcorePackage().getEClassifiers()) {
if (classifier instanceof EClass eClass) {
SmartEMFInterfaceTemplate interfaceTemplate = new SmartEMFInterfaceTemplate(genPkg, eClass, path);
templates.add(interfaceTemplate);
templates.add(interfaceTemplate);
}
}

}

private void initSmartEMFImplementations(GenPackage genPkg) {
for(EClassifier classifier : genPkg.getEcorePackage().getEClassifiers()){
if(classifier instanceof EClass eClass) {
if(eClass.isInterface()) {
for (EClassifier classifier : genPkg.getEcorePackage().getEClassifiers()) {
if (classifier instanceof EClass eClass) {
if (eClass.isInterface()) {
continue;
}
SmartEMFObjectTemplate implTemplate = new SmartEMFObjectTemplate(genPkg, eClass, path);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ public class AdapterList implements EList<Adapter> {

private Collection<Adapter> adapters = new LinkedHashSet<>();
private SmartEMFResource resource;

public AdapterList(SmartEMFResource resource) {
this.resource = resource;
}

@Override
public int size() {
return adapters.size();
Expand Down Expand Up @@ -50,7 +50,7 @@ public <T> T[] toArray(T[] a) {

@Override
public boolean add(Adapter e) {
if(!adapters.contains(e)) {
if (!adapters.contains(e)) {
boolean result = adapters.add(e);
resource.adapterAdded(e);
return result;
Expand All @@ -76,7 +76,7 @@ public boolean containsAll(Collection<?> c) {
@Override
public boolean addAll(Collection<? extends Adapter> c) {
boolean changed = false;
for(Adapter a : c) {
for (Adapter a : c) {
changed = changed || add(a);
}
return changed;
Expand All @@ -90,10 +90,10 @@ public boolean addAll(int index, Collection<? extends Adapter> c) {
@Override
public boolean removeAll(Collection<?> c) {
boolean changed = false;
for(Object a : c) {
for (Object a : c) {
boolean success = remove(a);
changed = changed || success;
if(success)
if (success)
resource.sendRemoveAdapterMessages((Adapter) a);
}
return changed;
Expand Down
Loading