Commit 5d738a47 authored by Florian Hölzl's avatar Florian Hölzl
Browse files

Components: JavaFX editor. Merged version bump.

Issue-Ref: 3815
Issue-Url: https://af3-developer.fortiss.org/issues/3815

Signed-off-by: Florian Hölzl's avatarFlorian Hoelzl <hoelzl@fortiss.org>
parents 5a82ea22 923eba9d
......@@ -2,10 +2,10 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Tooling Base UI
Bundle-SymbolicName: org.fortiss.tooling.base.ui;singleton:=true
Bundle-Version: 2.15.0.qualifier
Bundle-Version: 2.16.0.qualifier
Bundle-Activator: org.fortiss.tooling.base.ui.ToolingBaseUIActivator
Require-Bundle: org.fortiss.tooling.base;bundle-version="2.15.0";visibility:=reexport,
org.fortiss.tooling.kernel.ui;bundle-version="2.15.0";visibility:=reexport,
Require-Bundle: org.fortiss.tooling.base;bundle-version="2.16.0";visibility:=reexport,
org.fortiss.tooling.kernel.ui;bundle-version="2.16.0";visibility:=reexport,
org.eclipse.swt
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-11
......
......@@ -2,14 +2,14 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.fortiss.tooling.base;singleton:=true
Bundle-Version: 2.15.0.qualifier
Bundle-Version: 2.16.0.qualifier
Bundle-ClassPath: .
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-11
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.emf.ecore;visibility:=reexport,
org.fortiss.tooling.kernel;visibility:=reexport;bundle-version="2.15.0"
org.fortiss.tooling.kernel;visibility:=reexport;bundle-version="2.16.0"
Bundle-ActivationPolicy: lazy
Export-Package: org.fortiss.tooling.base,
org.fortiss.tooling.base.annotation,
......
......@@ -2,9 +2,9 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Tooling Commons UI
Bundle-SymbolicName: org.fortiss.tooling.common.ui;singleton:=true
Bundle-Version: 2.15.0.qualifier
Bundle-Version: 2.16.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-11
Require-Bundle: org.fortiss.tooling.common;bundle-version="2.15.0";visibility:=reexport,
Require-Bundle: org.fortiss.tooling.common;visibility:=reexport,
org.eclipse.core.resources;visibility:=reexport,
org.eclipse.ui;visibility:=reexport,
org.eclipse.ui.editors;visibility:=reexport,
......
......@@ -8,9 +8,9 @@
</classpathentry>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry exported="true" kind="lib" path="lib/apache-commons/commons-lang-2.6.jar"/>
<classpathentry exported="true" kind="lib" path="lib/apache-commons/commons-lang3-3.7.jar" sourcepath="lib/apache-commons/commons-lang3-3.7-sources.jar">
<classpathentry exported="true" kind="lib" path="lib/apache-commons/commons-lang3-3.9.jar" sourcepath="lib/apache-commons/commons-lang3-3.9-sources.jar">
<attributes>
<attribute name="javadoc_location" value="jar:platform:/resource/org.fortiss.tooling.common/lib/apache-commons/commons-lang3-3.7-javadoc.jar!/"/>
<attribute name="javadoc_location" value="jar:platform:/resource/org.fortiss.tooling.common/lib/apache-commons/commons-lang3-3.9-javadoc.jar!/"/>
</attributes>
</classpathentry>
<classpathentry exported="true" kind="lib" path="lib/apache-commons/commons-io-2.4.jar" sourcepath="lib/apache-commons/commons-io-2.4-sources.jar"/>
......
......@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Tooling Commons
Bundle-SymbolicName: org.fortiss.tooling.common;singleton:=true
Bundle-Version: 2.15.0.qualifier
Bundle-Version: 2.16.0.qualifier
Require-Bundle: org.eclipse.core.runtime;visibility:=reexport,
com.ibm.icu;visibility:=reexport,
org.junit;visibility:=reexport
......@@ -10,7 +10,7 @@ Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ClassPath: .,
lib/apache-commons/commons-lang-2.6.jar,
lib/apache-commons/commons-lang3-3.7.jar,
lib/apache-commons/commons-lang3-3.9.jar,
lib/apache-commons/commons-io-2.4.jar,
lib/org.conqat.ide.commons.jar,
lib/opencsv-2.3.jar
......
......@@ -8,6 +8,6 @@ bin.includes = .,\
lib/apache-commons/commons-lang-2.6.jar,\
lib/apache-commons/commons-io-2.4.jar,\
lib/opencsv-2.3.jar,\
lib/apache-commons/commons-lang3-3.7.jar,\
lib/apache-commons/commons-lang3-3.9.jar,\
lib/apache-commons/LICENSE.txt
src.includes = lib/
......@@ -2,10 +2,10 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Tooling Graphics GL UI
Bundle-SymbolicName: org.fortiss.tooling.graphicsGL.ui;singleton:=true
Bundle-Version: 2.15.0.qualifier
Bundle-Version: 2.16.0.qualifier
Bundle-Activator: org.fortiss.tooling.graphicsGL.ui.ToolingGraphicsGLUIActivator
Require-Bundle: org.fortiss.tooling.graphicsGL;bundle-version="2.15.0";visibility:=reexport,
org.fortiss.tooling.base.ui;bundle-version="2.15.0";visibility:=reexport
Require-Bundle: org.fortiss.tooling.graphicsGL;bundle-version="2.16.0";visibility:=reexport,
org.fortiss.tooling.base.ui;bundle-version="2.16.0";visibility:=reexport
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-Vendor: fortiss GmbH
......
......@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.fortiss.tooling.graphicsGL;singleton:=true
Bundle-Version: 2.15.0.qualifier
Bundle-Version: 2.16.0.qualifier
Bundle-ClassPath: .
Bundle-Vendor: %providerName
Bundle-Localization: plugin
......@@ -23,5 +23,5 @@ Export-Package: org.fortiss.tooling.graphicsGL,
org.fortiss.tooling.graphicsGL.model.scene.util,
org.fortiss.tooling.graphicsGL.model.util,
org.fortiss.tooling.graphicsGL.util
Require-Bundle: org.fortiss.tooling.kernel;bundle-version="2.15.0";visibility:=reexport
Require-Bundle: org.fortiss.tooling.kernel;bundle-version="2.16.0";visibility:=reexport
Automatic-Module-Name: org.fortiss.tooling.graphicsGL
......@@ -2,10 +2,10 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Tooling Kernel UI
Bundle-SymbolicName: org.fortiss.tooling.kernel.ui;singleton:=true
Bundle-Version: 2.15.0.qualifier
Bundle-Version: 2.16.0.qualifier
Bundle-Activator: org.fortiss.tooling.kernel.ui.ToolingKernelUIActivator
Require-Bundle: org.fortiss.tooling.common.ui;bundle-version="2.15.0";visibility:=reexport,
org.fortiss.tooling.kernel;bundle-version="2.15.0";visibility:=reexport,
Require-Bundle: org.fortiss.tooling.common.ui;bundle-version="2.16.0";visibility:=reexport,
org.fortiss.tooling.kernel;bundle-version="2.16.0";visibility:=reexport,
org.eclipse.core.resources;visibility:=reexport,
org.eclipse.emf.databinding;visibility:=reexport,
org.eclipse.core.databinding.property;visibility:=reexport
......
......@@ -2,12 +2,12 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.fortiss.tooling.kernel;singleton:=true
Bundle-Version: 2.15.0.qualifier
Bundle-Version: 2.16.0.qualifier
Bundle-ClassPath: .
Bundle-Activator: org.fortiss.tooling.kernel.ToolingKernelActivator
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Require-Bundle: org.fortiss.tooling.common;visibility:=reexport;bundle-version="2.15.0",
Require-Bundle: org.fortiss.tooling.common;visibility:=reexport;bundle-version="2.16.0",
org.eclipse.core.runtime,
org.eclipse.emf.ecore;visibility:=reexport;bundle-version="2.7.0",
org.eclipse.emf.transaction;visibility:=reexport;bundle-version="1.4.0",
......
EMFTypeMap.java b6c39465568f0edbfbd5c90400a4f519c042d423 GREEN
EMFTypeToTypeMap.java 294abe02e7af4ad751d8760b6c6286a3c1f6d73f GREEN
EMFTypeToTypeSetMap.java d131702e4f04ef8d8a2c70113dce2c628ce65c3d GREEN
EMFTypeMap.java ad1c6ecba7fbb2dff0d72ea12cd5040abe52364f GREEN
EMFTypeToTypeMap.java 792b6f10042562983b192cfe2a2547221391e701 GREEN
EMFTypeToTypeSetMap.java e7572738d19c81fd507bc8ca88a3408058d88bf0 GREEN
TypeSet.java e18e66236b223eaf4c22037459779b421a0c2703 GREEN
......@@ -15,42 +15,24 @@
+--------------------------------------------------------------------------*/
package org.fortiss.tooling.kernel.service.types;
import static org.fortiss.tooling.kernel.utils.EcoreUtils.getInterfaceType;
import java.util.Comparator;
import java.util.TreeMap;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
/**
* Base class to map an EMF type to a target type. For a given {@link EClass} {@code Foo}, the
* map considers the generated interface class {@code Foo} and the corresponding implementation
* class {@code FooImpl} identical.
*/
public class EMFTypeMap<S, T> extends TreeMap<Class<? extends S>, T> {
/**
* Suffix used by EMF to denote implementation classes of the Java interfaces corresponding
* to EClasses.
*/
private static final String IMPL_CLASS_SUFFIX = "Impl";
public class EMFTypeMap<S extends EObject, T> extends TreeMap<Class<? extends S>, T> {
/** Constructor. */
public EMFTypeMap() {
super(new Comparator<Class<? extends S>>() {
@SuppressWarnings("unchecked")
private Class<? extends S> getInterfaceType(Class<? extends S> c) {
final String className = c.getSimpleName();
if(className.endsWith(IMPL_CLASS_SUFFIX)) {
final String ifaceName =
className.substring(0, className.length() - IMPL_CLASS_SUFFIX.length());
for(Class<?> iFace : c.getInterfaces()) {
if(iFace.getSimpleName().equals(ifaceName)) {
return (Class<? extends S>)iFace;
}
}
}
return c;
}
/** {@inheritDoc} */
@Override
public int compare(Class<? extends S> c1, Class<? extends S> c2) {
......
......@@ -15,7 +15,9 @@
+--------------------------------------------------------------------------*/
package org.fortiss.tooling.kernel.service.types;
import org.eclipse.emf.ecore.EObject;
/** Maps a given EMF type to another type. */
public class EMFTypeToTypeMap<S, T> extends EMFTypeMap<S, Class<? extends T>> {
public class EMFTypeToTypeMap<S extends EObject, T> extends EMFTypeMap<S, Class<? extends T>> {
// Nothing to do
}
......@@ -23,8 +23,10 @@ import java.util.Collection;
import java.util.Set;
import java.util.function.Predicate;
import org.eclipse.emf.ecore.EObject;
/** Maps a given EMF type to a {@link Set} of types. */
public class EMFTypeToTypeSetMap<S, T> extends EMFTypeMap<S, TypeSet<T>> {
public class EMFTypeToTypeSetMap<S extends EObject, T> extends EMFTypeMap<S, TypeSet<T>> {
/** Adds the given {@code targetType} to the mapped types of the given {@code sourceType}. */
public void addTypeSetEntry(Class<? extends S> sourceType, Class<? extends T> targetType) {
......
......@@ -2,7 +2,7 @@ CompositionUtils.java 34c0a191bd0fb4176c94b4d61abb5c88a679d5e8 GREEN
ConstraintsUtils.java 0f8be020f2ca4bb08931c32452163c04a28e30ce GREEN
EMFResourceUtils.java 979d0e1f4f66a2b3e715d2da0ebef6493f547fd7 GREEN
EcoreSerializerBase.java 0a0c2969d793d2e68094c55c8f7b0a662ef6e5d5 GREEN
EcoreUtils.java 95ee8d9c99ea5369ea788f517ebc8dc6f864f4ac GREEN
EcoreUtils.java af30c39f36db02322c0a805bfc67ffeeb157c52b GREEN
ExtensionPointUtils.java 7ce63242b49eb9a7cd4eaadd223f5ebce1dfd75b GREEN
HierarchicalNameComparator.java 6face1b673126701a0721af48ead2f9766c17d46 GREEN
IdentifierUtils.java fff43dc4e84cdd89c3ece4f5d9d89aec4b0749c2 GREEN
......
......@@ -77,6 +77,12 @@ public class EcoreUtils {
private static final Notification refreshNotification =
new NotificationImpl(EVENT_TYPE_COUNT + 1, null, null);
/**
* Suffix used by EMF to denote implementation classes of the Java interfaces corresponding
* to EClasses.
*/
private static final String IMPL_CLASS_SUFFIX = "Impl";
/**
* Same as org.fortiss.tooling.kernel.utils.JavaUtils.convertList(Class<T>, List<S>) but with
* {@link EList} instead of {@link List}.
......@@ -306,8 +312,8 @@ public class EcoreUtils {
}
/**
* Returns a list of all parent {@link EObject}s that satisfy the given {@link Predicate}. If none
* are found, an empty list is returned.
* Returns a list of all parent {@link EObject}s that satisfy the given {@link Predicate}. If
* none are found, an empty list is returned.
*
* @param child
* The {@link EObject} from which the "upwards" search shall begin.
......@@ -747,4 +753,37 @@ public class EcoreUtils {
public static <T> EList<T> collectToEList(Stream<T> s) {
return new BasicEList<T>(s.collect(Collectors.toList()));
}
/**
* Returns the interface type of the EMF class that can be either the interface itself or its
* implementation class.
*
* @param c
* interface or impl class.
* @return interface class.
*/
@SuppressWarnings("unchecked")
public static <T extends EObject> Class<T> getInterfaceType(Class<? extends T> c) {
final String className = c.getSimpleName();
if(className.endsWith(IMPL_CLASS_SUFFIX)) {
final String ifaceName =
className.substring(0, className.length() - IMPL_CLASS_SUFFIX.length());
for(Class<?> iFace : c.getInterfaces()) {
if(iFace.getSimpleName().equals(ifaceName)) {
return (Class<T>)iFace;
}
}
}
return (Class<T>)c;
}
/**
* Returns the interface type of the given EMF object.
*
* @return interface class.
*/
@SuppressWarnings("unchecked")
public static <S extends EObject> Class<? super S> getInterfaceType(S instance) {
return (Class<? super S>)getInterfaceType(instance.getClass());
}
}
......@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Spider Chart
Bundle-SymbolicName: org.fortiss.tooling.spiderchart.ui
Bundle-Version: 2.15.0.qualifier
Bundle-Version: 2.16.0.qualifier
Bundle-Vendor: fortiss GmbH
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-Developer: Amit Kumar Mondal (admin@amitinside.com)
......@@ -12,6 +12,6 @@ Export-Package: org.fortiss.tooling.spiderchart.model,
org.fortiss.tooling.spiderchart.util,
org.fortiss.tooling.spiderchart.widget
Require-Bundle: org.eclipse.swt,
org.fortiss.tooling.base.ui;bundle-version="2.15.0";visibility:=reexport
org.fortiss.tooling.base.ui;bundle-version="2.16.0";visibility:=reexport
Bundle-ActivationPolicy: lazy
Automatic-Module-Name: org.fortiss.tooling.spiderchart.ui
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment