Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/exception')
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/exception/DerivedTypedElementEvaluationException.java44
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/exception/DerivedTypedElementTypeCheckingException.java37
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/exception/FacetConformanceEvaluationException.java32
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/exception/NonApplicableFacetException.java21
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/exception/NonConformingEObjectException.java21
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/exception/SaveStructuralFeatureInstanceModelException.java40
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/exception/UnmatchingExpectedTypeException.java45
7 files changed, 240 insertions, 0 deletions
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/exception/DerivedTypedElementEvaluationException.java b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/exception/DerivedTypedElementEvaluationException.java
new file mode 100644
index 00000000000..5a56a16ddf2
--- /dev/null
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/exception/DerivedTypedElementEvaluationException.java
@@ -0,0 +1,44 @@
+/**
+ * Copyright (c) 2009 Mia-Software.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Gregoire Dupe (Mia-Software) - initial API and implementation
+ * Nicolas Bros (Mia-Software) - Bug 362191 - [Restructuring] Query mechanism for eFacet2
+ */
+package org.eclipse.emf.facet.efacet.core.internal.exception;
+
+import org.eclipse.emf.facet.efacet.core.exception.DerivedTypedElementException;
+import org.eclipse.emf.facet.util.core.internal.ErrorHandlingUtils;
+
+/**
+ * This exception occurs when something goes wrong during the execution of a query.
+ *
+ * @since 0.2
+ */
+public class DerivedTypedElementEvaluationException extends DerivedTypedElementException {
+ // This class is a copy of
+ // org.eclipse.emf.facet.infra.query.core.ModelQueryExecutionException
+
+ private static final long serialVersionUID = -8464252257666617685L;
+
+ public DerivedTypedElementEvaluationException(final String message) {
+ super(message);
+ }
+
+ public DerivedTypedElementEvaluationException(final String message, final Throwable cause) {
+ super(message, cause);
+ }
+
+ public DerivedTypedElementEvaluationException(final Throwable cause) {
+ super(cause);
+ }
+
+ /** Constructor for evaluation exception due to wrong type */
+ public DerivedTypedElementEvaluationException(final String message, final Class<?> expectedType, final Object resultElement) {
+ super(ErrorHandlingUtils.buildWrongTypeMessage(message, expectedType, resultElement));
+ }
+}
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/exception/DerivedTypedElementTypeCheckingException.java b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/exception/DerivedTypedElementTypeCheckingException.java
new file mode 100644
index 00000000000..6af52e9ca25
--- /dev/null
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/exception/DerivedTypedElementTypeCheckingException.java
@@ -0,0 +1,37 @@
+/**
+ * Copyright (c) 2009 Mia-Software.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Gregoire Dupe (Mia-Software) - initial API and implementation
+ * Nicolas Bros (Mia-Software) - Bug 362191 - [Restructuring] Query mechanism for eFacet2
+ */
+package org.eclipse.emf.facet.efacet.core.internal.exception;
+
+import org.eclipse.emf.facet.efacet.core.exception.DerivedTypedElementException;
+
+/**
+ * This exception occurs when the type of the result of evaluating a derived typed element is not
+ * the one that was expected
+ *
+ * @since 0.2
+ */
+public class DerivedTypedElementTypeCheckingException extends DerivedTypedElementException {
+
+ private static final long serialVersionUID = -9064274334817642819L;
+
+ public DerivedTypedElementTypeCheckingException(final String message) {
+ super(message);
+ }
+
+ public DerivedTypedElementTypeCheckingException(final String message, final Throwable cause) {
+ super(message, cause);
+ }
+
+ public DerivedTypedElementTypeCheckingException(final Throwable cause) {
+ super(cause);
+ }
+}
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/exception/FacetConformanceEvaluationException.java b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/exception/FacetConformanceEvaluationException.java
new file mode 100644
index 00000000000..bbdbeed0281
--- /dev/null
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/exception/FacetConformanceEvaluationException.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Mia-Software
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas Bros (Mia-Software) - Bug 361612 - New core for new version of the Facet metamodel
+ *******************************************************************************/
+package org.eclipse.emf.facet.efacet.core.internal.exception;
+
+/**
+ * Happens when there is an error evaluating a Facet's conformance typed element.
+ *
+ * @since 0.2
+ */
+public class FacetConformanceEvaluationException extends Exception {
+ private static final long serialVersionUID = -5306430483154103388L;
+
+ public FacetConformanceEvaluationException(final String message) {
+ super(message);
+ }
+
+ public FacetConformanceEvaluationException(final String message, final Throwable cause) {
+ super(message, cause);
+ }
+
+ public FacetConformanceEvaluationException(final Throwable cause) {
+ super(cause);
+ }
+}
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/exception/NonApplicableFacetException.java b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/exception/NonApplicableFacetException.java
new file mode 100644
index 00000000000..cd3c4af722c
--- /dev/null
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/exception/NonApplicableFacetException.java
@@ -0,0 +1,21 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Mia-Software
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas Bros (Mia-Software) - Bug 361612 - New core for new version of the Facet metamodel
+ *******************************************************************************/
+package org.eclipse.emf.facet.efacet.core.internal.exception;
+
+/**
+ * This exception is raised when an object cannot be extended by a facet because the class of the object does not correspond
+ * to the extended metaclass of the facet.
+ * @since 0.2
+ */
+public class NonApplicableFacetException extends Exception {
+
+ private static final long serialVersionUID = 2984069177830836577L;
+}
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/exception/NonConformingEObjectException.java b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/exception/NonConformingEObjectException.java
new file mode 100644
index 00000000000..a4562303aa5
--- /dev/null
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/exception/NonConformingEObjectException.java
@@ -0,0 +1,21 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Mia-Software
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas Bros (Mia-Software) - Bug 361612 - New core for new version of the Facet metamodel
+ *******************************************************************************/
+package org.eclipse.emf.facet.efacet.core.internal.exception;
+
+/**
+ * This exception is raised when an object cannot be extended by a facet because it is filtered by the conformance query
+ * of this facet.
+ * @since 0.2
+ */
+public class NonConformingEObjectException extends Exception {
+
+ private static final long serialVersionUID = -7778081627619345385L;
+}
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/exception/SaveStructuralFeatureInstanceModelException.java b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/exception/SaveStructuralFeatureInstanceModelException.java
new file mode 100644
index 00000000000..ea924dc8de4
--- /dev/null
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/exception/SaveStructuralFeatureInstanceModelException.java
@@ -0,0 +1,40 @@
+/**
+ * Copyright (c) 2011 Mia-Software.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Emmanuelle Rouillé (Mia-Software) - Bug 352618 - To be able to use non derived facet structural features and save them values.
+ */
+package org.eclipse.emf.facet.efacet.core.internal.exception;
+
+import org.eclipse.emf.facet.efacet.core.exception.FacetManagerException;
+
+/**
+ * This exception is raised when an IOException is caught when trying to save a structural feature instance model
+ * @since 0.2
+ */
+public class SaveStructuralFeatureInstanceModelException extends
+ FacetManagerException {
+
+ private static final long serialVersionUID = 7024009106572531846L;
+
+ /**
+ * Creates a new instance of UnmatchingExpectedTypeException
+ * with {@link Throwable} the exception at the origin of this exception
+ */
+ public SaveStructuralFeatureInstanceModelException(final Throwable cause) {
+ super(cause);
+ }
+
+ /**
+ * Creates a new instance of UnmatchingExpectedTypeException
+ * with {@link Throwable} the exception at the origin of this exception
+ */
+ public SaveStructuralFeatureInstanceModelException(final String message) {
+ super(message);
+ }
+}
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/exception/UnmatchingExpectedTypeException.java b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/exception/UnmatchingExpectedTypeException.java
new file mode 100644
index 00000000000..1f68b161a44
--- /dev/null
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/exception/UnmatchingExpectedTypeException.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Mia-Software
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Emmanuelle Rouillé (Mia-Software) - Bug 352618 - To be able to use non derived facet structural features and save them values.
+ * Nicolas Bros (Mia-Software) - Bug 361612 - New core for new version of the Facet metamodel
+ *******************************************************************************/
+package org.eclipse.emf.facet.efacet.core.internal.exception;
+
+import org.eclipse.emf.facet.efacet.core.exception.FacetManagerException;
+import org.eclipse.emf.facet.util.core.internal.ErrorHandlingUtils;
+
+/**
+ * This exception is raised when a value's type does not match with the expected type
+ *
+ * @since 0.2
+ */
+public class UnmatchingExpectedTypeException extends FacetManagerException {
+
+ private static final long serialVersionUID = 1456802297756942271L;
+
+ public UnmatchingExpectedTypeException() {
+ super();
+ }
+
+ public UnmatchingExpectedTypeException(final String message) {
+ super(message);
+ }
+
+ public UnmatchingExpectedTypeException(final String message, final Throwable cause) {
+ super(message, cause);
+ }
+
+ public UnmatchingExpectedTypeException(final Throwable cause) {
+ super(cause);
+ }
+
+ public UnmatchingExpectedTypeException(final String message, final Class<?> expectedType, final Object resultElement) {
+ super(ErrorHandlingUtils.buildWrongTypeMessage(message, expectedType, resultElement));
+ }
+}

Back to the top