From 14b13897dd0ee6991918f2ee982819cca5d5988b Mon Sep 17 00:00:00 2001
From: Vincent Aravantinos <aravantinos@fortiss.org>
Date: Mon, 11 Jul 2016 16:03:25 +0000
Subject: [PATCH] refs 2634

---
 .../base/ConstraintVerifierUIBases.java        | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/extension/base/ConstraintVerifierUIBases.java b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/extension/base/ConstraintVerifierUIBases.java
index 5de0be747..1458bfa91 100644
--- a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/extension/base/ConstraintVerifierUIBases.java
+++ b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/extension/base/ConstraintVerifierUIBases.java
@@ -55,7 +55,7 @@ import org.fortiss.tooling.kernel.utils.ConstraintsUtils;
  * @author vincent
  * @author $Author$
  * @version $Rev$
- * @ConQAT.Rating YELLOW Hash: 0D74DFF10E167E1EB9754CFB52A8CCC4
+ * @ConQAT.Rating YELLOW Hash: C5988D4406478156AB853129BD596B95
  */
 public class ConstraintVerifierUIBases {
 
@@ -236,4 +236,20 @@ public class ConstraintVerifierUIBases {
 			return false;
 		}
 	}
+
+	/**
+	 * Standard warning message to display when a resource-consuming check is activated for the
+	 * first time.
+	 */
+	public static void displayTimeConsumptionWarning() {
+		Display d = Display.getCurrent();
+		d = d == null ? Display.getDefault() : d;
+		Shell shell = d.getActiveShell();
+		String title = "Time/resource-consuming background operation about to start";
+		String msg = "Activating this check for the first time might consume lots of resources, ";
+		msg += "this operation will run in the background so that you can still work, but your ";
+		msg += "system might be slowing down. Note that this is a one-time thing: once the check ";
+		msg += "is activated, subsequent runs should be unnoticed.";
+		MessageDialog.openWarning(shell, title, msg);
+	}
 }
-- 
GitLab