[448583] 1.0.0 Release
Added some null checks required when executed outside of osgi
diff --git a/plugins/org.eclipse.emf.edapt.common/src/org/eclipse/emf/edapt/common/LoggingUtils.java b/plugins/org.eclipse.emf.edapt.common/src/org/eclipse/emf/edapt/common/LoggingUtils.java
index df93560..4d5d97a 100644
--- a/plugins/org.eclipse.emf.edapt.common/src/org/eclipse/emf/edapt/common/LoggingUtils.java
+++ b/plugins/org.eclipse.emf.edapt.common/src/org/eclipse/emf/edapt/common/LoggingUtils.java
@@ -59,12 +59,18 @@
/** Log status. */
public static void log(Plugin plugin, IStatus status) {
+ if (plugin == null) {
+ return;
+ }
plugin.getLog().log(status);
}
/** Create status. */
public static IStatus createStatus(Plugin plugin, int severity, int code,
String message, Throwable exception) {
+ if (plugin == null) {
+ return null;
+ }
String pluginId = plugin.getBundle().getSymbolicName();
return new Status(severity, pluginId, code, message, exception);
}
diff --git a/plugins/org.eclipse.emf.edapt.migration/generated-src/org/eclipse/emf/edapt/spi/migration/MigrationPlugin.java b/plugins/org.eclipse.emf.edapt.migration/generated-src/org/eclipse/emf/edapt/spi/migration/MigrationPlugin.java
index e6a0293..f88e7e1 100644
--- a/plugins/org.eclipse.emf.edapt.migration/generated-src/org/eclipse/emf/edapt/spi/migration/MigrationPlugin.java
+++ b/plugins/org.eclipse.emf.edapt.migration/generated-src/org/eclipse/emf/edapt/spi/migration/MigrationPlugin.java
@@ -67,9 +67,6 @@
* @generated
*/
public static Implementation getPlugin() {
- if (plugin == null) {
- plugin = new Implementation();
- }
return plugin;
}
diff --git a/plugins/org.eclipse.emf.edapt.migration/src/org/eclipse/emf/edapt/internal/migration/FactoryHelper.java b/plugins/org.eclipse.emf.edapt.migration/src/org/eclipse/emf/edapt/internal/migration/FactoryHelper.java
index 16a884a..7c7d103 100644
--- a/plugins/org.eclipse.emf.edapt.migration/src/org/eclipse/emf/edapt/internal/migration/FactoryHelper.java
+++ b/plugins/org.eclipse.emf.edapt.migration/src/org/eclipse/emf/edapt/internal/migration/FactoryHelper.java
@@ -49,6 +49,9 @@
private void readExtensionPoint() {
final IExtensionRegistry extensionRegistry = Platform
.getExtensionRegistry();
+ if (extensionRegistry == null) {
+ return;
+ }
final IConfigurationElement[] configurationElements = extensionRegistry
.getConfigurationElementsFor(POINT_ID);
for (final IConfigurationElement configurationElement : configurationElements) {