]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics/src/org/simantics/startup/IStartup.java
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics / src / org / simantics / startup / IStartup.java
diff --git a/bundles/org.simantics/src/org/simantics/startup/IStartup.java b/bundles/org.simantics/src/org/simantics/startup/IStartup.java
new file mode 100644 (file)
index 0000000..c5dd014
--- /dev/null
@@ -0,0 +1,38 @@
+/*******************************************************************************\r
+ * Copyright (c) 2015 Association for Decentralized Information Management\r
+ * in Industry THTH ry.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Semantum Oy - initial API and implementation\r
+ *******************************************************************************/\r
+package org.simantics.startup;\r
+\r
+import org.simantics.CancelStartupException;\r
+import org.simantics.PlatformException;\r
+\r
+/**\r
+ * Plug-ins can register a startup extension will be activated and consulted\r
+ * during the Simantics platform startup. The extension must provide an\r
+ * implementation of this interface.\r
+ * \r
+ * @author Tuukka Lehtonen\r
+ * @since 1.18.1\r
+ */\r
+public interface IStartup {\r
+\r
+    /**\r
+     * Will be called in the platform startup thread, i.e. the UI thread during\r
+     * workbench initialization.\r
+     * \r
+     * <p>\r
+     * Can throw any {@link PlatformException}, such as\r
+     * {@link CancelStartupException} to prevent the platform from starting up\r
+     * for some reason.\r
+     */\r
+    public void preStartup() throws PlatformException;\r
+\r
+}\r