Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorptessier2014-02-14 14:07:29 +0000
committerptessier2014-02-14 14:07:29 +0000
commit64ee2ce1efd7404b1818daea15cb8300b316e982 (patch)
tree639ebb814fc6359110a104e42f10b5a1b05ad5cc /plugins/facet/editor
parentbd9c3e2c992df463576d221b33411bd3ed189685 (diff)
downloadorg.eclipse.papyrus-64ee2ce1efd7404b1818daea15cb8300b316e982.tar.gz
org.eclipse.papyrus-64ee2ce1efd7404b1818daea15cb8300b316e982.tar.xz
org.eclipse.papyrus-64ee2ce1efd7404b1818daea15cb8300b316e982.zip
386118: [EMF Facet] Papyrus should progressively support EMF Facet 0.2
https://bugs.eclipse.org/bugs/show_bug.cgi?id=386118
Diffstat (limited to 'plugins/facet/editor')
-rw-r--r--plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/.classpath7
-rw-r--r--plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/.project28
-rw-r--r--plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/META-INF/MANIFEST.MF90
-rw-r--r--plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/META-INF/eclipse.inf2
-rw-r--r--plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/META-INF/maven/org.eclipse.emft/org.eclipse.emf.facet.custom.sdk.core/pom.properties5
-rw-r--r--plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/META-INF/maven/org.eclipse.emft/org.eclipse.emf.facet.custom.sdk.core/pom.xml15
-rw-r--r--plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/OSGI-INF/l10n/bundle.properties18
-rw-r--r--plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/about.html28
-rw-r--r--plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/build.properties6
-rw-r--r--plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/plugin.xml49
-rw-r--r--plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/src/org/eclipse/emf/facet/custom/sdk/core/ICustomizationActions.java44
-rw-r--r--plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/src/org/eclipse/emf/facet/custom/sdk/core/ICustomizationCommandFactory.java61
-rw-r--r--plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/src/org/eclipse/emf/facet/custom/sdk/core/ICustomizationCommandFactoryFactory.java39
-rw-r--r--plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/src/org/eclipse/emf/facet/custom/sdk/core/internal/Activator.java54
-rw-r--r--plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/src/org/eclipse/emf/facet/custom/sdk/core/internal/CustomizationActionsImpl.java69
-rw-r--r--plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/src/org/eclipse/emf/facet/custom/sdk/core/internal/CustomizationCommandFactory.java93
-rw-r--r--plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/src/org/eclipse/emf/facet/custom/sdk/core/internal/CustomizationCommandFactoryFactory.java26
-rw-r--r--plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/src/org/eclipse/emf/facet/custom/sdk/core/internal/validation/AvoidEClassOverlayConstraint.java57
-rw-r--r--plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/src/org/eclipse/emf/facet/custom/sdk/core/internal/validation/CustomizationValidationBuilder.java116
-rw-r--r--plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/src/org/eclipse/emf/facet/custom/sdk/core/internal/validation/ValidationDelegateClientSelector.java23
21 files changed, 0 insertions, 837 deletions
diff --git a/plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/.classpath b/plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/.classpath
deleted file mode 100644
index da1049abda9..00000000000
--- a/plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src/"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/.project b/plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/.project
deleted file mode 100644
index 29c8e2849d7..00000000000
--- a/plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.emf.facet.custom.sdk.core</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/.settings/org.eclipse.jdt.core.prefs b/plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 44217f8c068..00000000000
--- a/plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
diff --git a/plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/META-INF/MANIFEST.MF b/plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/META-INF/MANIFEST.MF
deleted file mode 100644
index c68e485e743..00000000000
--- a/plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,90 +0,0 @@
-Manifest-Version: 1.0
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Built-By: hudsonbuild
-Bundle-SymbolicName: org.eclipse.emf.facet.custom.sdk.core;singleton:=
- true
-Bundle-Activator: org.eclipse.emf.facet.custom.sdk.core.internal.Activ
- ator
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.emf.validation;bundle-version="1.4.0",
- org.eclipse.emf.facet.efacet.metamodel;bundle-version="0.2.0",
- org.eclipse.papyrus.emf.facet.custom.metamodel;bundle-version="0.2.0",
- org.eclipse.papyrus.emf.facet.custom.core;bundle-version="0.2.0",
- org.eclipse.emf.facet.common.sdk.core;bundle-version="0.2.0",
- org.eclipse.papyrus.emf.facet.util.core;bundle-version="0.2.1"
-Export-Package: org.eclipse.emf.facet.custom.sdk.core,org.eclipse.emf.
- facet.custom.sdk.core.internal.validation;x-internal:=true
-Bundle-Version: 0.4.0.201308190853
-Build-Jdk: 1.6.0_27
-Bundle-ActivationPolicy: lazy
-Bundle-Vendor: %Bundle-Vendor
-Bundle-Name: %Bundle-Name
-Archiver-Version: Plexus Archiver
-Created-By: Apache Maven
-Import-Package: org.eclipse.emf.edit.command,org.eclipse.emf.edit.doma
- in
-Bundle-ManifestVersion: 2
-
-Name: org/eclipse/emf/facet/custom/sdk/core/internal/validation/Custom
- izationValidationBuilder$1.class
-SHA1-Digest: a2c/VQwHirS1oVaDQK60zGOeEEw=
-
-Name: org/eclipse/emf/facet/custom/sdk/core/internal/CustomizationComm
- andFactory.class
-SHA1-Digest: kkQeikO3qmDOtF/kmWZcvsL9sEE=
-
-Name: META-INF/eclipse.inf
-SHA1-Digest: 09gN05tobgS/MdtqyTNQhOhB73M=
-
-Name: org/eclipse/emf/facet/custom/sdk/core/ICustomizationActions.clas
- s
-SHA1-Digest: 7iICM3XQpiiDRrDWu9j5MACqHa8=
-
-Name: org/eclipse/emf/facet/custom/sdk/core/internal/Activator.class
-SHA1-Digest: ROk6wwbKaYUHt1BRJLnvSDMstNM=
-
-Name: OSGI-INF/l10n/bundle.properties
-SHA1-Digest: MEzrd+0W7q63rVcyhYAFGWjzDlE=
-
-Name: org/eclipse/emf/facet/custom/sdk/core/ICustomizationCommandFacto
- ry.class
-SHA1-Digest: LqY5qkFpPffuYXRNURdQjltFLvg=
-
-Name: org/eclipse/emf/facet/custom/sdk/core/internal/validation/AvoidE
- ClassOverlayConstraint.class
-SHA1-Digest: iuYac+bauyAFLnB3ORLBrAihrcU=
-
-Name: about.html
-SHA1-Digest: ucbJ2JQyMW17Zy+4pyWJhaS7Sws=
-
-Name: org/eclipse/emf/facet/custom/sdk/core/internal/CustomizationActi
- onsImpl.class
-SHA1-Digest: jIlckGDcCr+UGEKgfJJcnPlEMmc=
-
-Name: org/eclipse/emf/facet/custom/sdk/core/internal/validation/Valida
- tionDelegateClientSelector.class
-SHA1-Digest: /IkNe4dnxb1XqCX9MEpvMPVImfg=
-
-Name: META-INF/maven/org.eclipse.emft/org.eclipse.emf.facet.custom.sdk
- .core/pom.xml
-SHA1-Digest: U7k3BUDvm0wdkMRv++7ZPJs6NLc=
-
-Name: org/eclipse/emf/facet/custom/sdk/core/ICustomizationCommandFacto
- ryFactory.class
-SHA1-Digest: PJx69uWI/T7bxHoNyBC4LCKOlOQ=
-
-Name: org/eclipse/emf/facet/custom/sdk/core/internal/validation/Custom
- izationValidationBuilder.class
-SHA1-Digest: NwAj+3+uMBpR4LS+FMWPJvS95Tg=
-
-Name: META-INF/maven/org.eclipse.emft/org.eclipse.emf.facet.custom.sdk
- .core/pom.properties
-SHA1-Digest: eH89MLRlm3v8lGVGWY3es9BnwwM=
-
-Name: org/eclipse/emf/facet/custom/sdk/core/internal/CustomizationComm
- andFactoryFactory.class
-SHA1-Digest: AcTA6xEcBZVz1Vq79qo7dUo8w4Q=
-
-Name: plugin.xml
-SHA1-Digest: p00Th6aTJXvyUEM4V0hIPUW5pLc=
-
diff --git a/plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/META-INF/eclipse.inf b/plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/META-INF/eclipse.inf
deleted file mode 100644
index 92ffed2421c..00000000000
--- a/plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/META-INF/eclipse.inf
+++ /dev/null
@@ -1,2 +0,0 @@
-#Processed using Jarprocessor
-pack200.conditioned = true
diff --git a/plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/META-INF/maven/org.eclipse.emft/org.eclipse.emf.facet.custom.sdk.core/pom.properties b/plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/META-INF/maven/org.eclipse.emft/org.eclipse.emf.facet.custom.sdk.core/pom.properties
deleted file mode 100644
index c787265127d..00000000000
--- a/plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/META-INF/maven/org.eclipse.emft/org.eclipse.emf.facet.custom.sdk.core/pom.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-#Generated by Maven
-#Mon Aug 19 04:56:52 EDT 2013
-version=0.4.0-SNAPSHOT
-groupId=org.eclipse.emft
-artifactId=org.eclipse.emf.facet.custom.sdk.core
diff --git a/plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/META-INF/maven/org.eclipse.emft/org.eclipse.emf.facet.custom.sdk.core/pom.xml b/plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/META-INF/maven/org.eclipse.emft/org.eclipse.emf.facet.custom.sdk.core/pom.xml
deleted file mode 100644
index 42b2a5278e1..00000000000
--- a/plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/META-INF/maven/org.eclipse.emft/org.eclipse.emf.facet.custom.sdk.core/pom.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.emf.facet.build</artifactId>
- <groupId>org.eclipse.emft</groupId>
- <version>0.4.0</version>
- <relativePath>../../</relativePath>
- </parent>
- <groupId>org.eclipse.emft</groupId>
- <artifactId>org.eclipse.emf.facet.custom.sdk.core</artifactId>
- <version>0.4.0-SNAPSHOT</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/OSGI-INF/l10n/bundle.properties b/plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/OSGI-INF/l10n/bundle.properties
deleted file mode 100644
index a04987648b2..00000000000
--- a/plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/OSGI-INF/l10n/bundle.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-###############################################################################
-# Copyright (c) 2012 CEA LIST.
-# 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 375054 - Add validation warning for overlay on EClass
-###############################################################################
-#Properties file for org.eclipse.emf.facet.custom.sdk.core
-Bundle-Vendor = Eclipse Modeling Project
-Bundle-Name = EMF Facet Custom SDK Core (Incubation)
-modelValidation.category = EMF Facet Custom Model Validation
-avoidEClassOverlay.constraint.name = Avoid EClass Overlay
-avoidEClassOverlay.constraint.message = Avoid overlay customizations on EClass. Define an overlay on a Facet instead.
-avoidEClassOverlay.constraint.description = Overlay customizations on EClass should be avoided, and replaced by an overlay on a Facet.
-validation.builder.name = EMF Facet Customization Validation Builder
diff --git a/plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/about.html b/plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/about.html
deleted file mode 100644
index 3019b95b9cf..00000000000
--- a/plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>December 22, 2008</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/build.properties b/plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/build.properties
deleted file mode 100644
index 0bb06efdc96..00000000000
--- a/plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/build.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-source.. = src/
-bin.includes = META-INF/,\
- .,\
- about.html,\
- plugin.xml,\
- OSGI-INF/
diff --git a/plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/plugin.xml b/plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/plugin.xml
deleted file mode 100644
index f7f989630e0..00000000000
--- a/plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/plugin.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
- <extension
- id="org.eclipse.emf.facet.custom.sdk.core.validation"
- point="org.eclipse.emf.validation.constraintProviders">
- <category
- id="org.eclipse.emf.facet.custom.sdk.core.validation.category"
- name="%modelValidation.category">
- </category>
- <constraintProvider mode="Batch">
- <package namespaceUri="http://www.eclipse.org/emf/facet/custom/0.2.incubation/custom"/>
- <package namespaceUri="http://www.eclipse.org/emf/facet/efacet/0.2.incubation/efacet"/>
- <constraints categories="org.eclipse.emf.facet.custom.sdk.core.validation.category">
- <constraint
- class="org.eclipse.emf.facet.custom.sdk.core.internal.validation.AvoidEClassOverlayConstraint"
- id="org.eclipse.emf.facet.custom.sdk.core.constraint.avoidEClassOverlay"
- isEnabledByDefault="true"
- lang="Java"
- mode="Batch"
- name="%avoidEClassOverlay.constraint.name"
- severity="WARNING"
- statusCode="1">
- <message>
- %avoidEClassOverlay.constraint.message
- </message>
- <description>
- %avoidEClassOverlay.constraint.description
- </description>
- </constraint>
- </constraints>
- </constraintProvider>
- </extension>
-
- <extension point="org.eclipse.emf.validation.constraintBindings">
- <clientContext
- default="false"
- id="org.eclipse.emf.facet.custom.sdk.core.validation.context">
- <selector class="org.eclipse.emf.facet.custom.sdk.core.internal.validation.ValidationDelegateClientSelector"/>
- </clientContext>
- <binding
- context="org.eclipse.emf.facet.custom.sdk.core.validation.context"
- category="org.eclipse.emf.facet.custom.sdk.core.validation.category"/>
- </extension>
-
- <extension point="org.eclipse.emf.facet.common.sdk.core.builderRegistration">
- <builder class="org.eclipse.emf.facet.custom.sdk.core.internal.validation.CustomizationValidationBuilder"/>
- </extension>
-</plugin>
diff --git a/plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/src/org/eclipse/emf/facet/custom/sdk/core/ICustomizationActions.java b/plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/src/org/eclipse/emf/facet/custom/sdk/core/ICustomizationActions.java
deleted file mode 100644
index cbe214e96bf..00000000000
--- a/plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/src/org/eclipse/emf/facet/custom/sdk/core/ICustomizationActions.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * 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:
- * Alban Ménager (Soft-Maint) - Bug 387470 - [EFacet][Custom] Editors
- */
-package org.eclipse.emf.facet.custom.sdk.core;
-
-import java.io.IOException;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.emf.facet.custom.metamodel.v0_2_0.custom.Customization;
-import org.eclipse.emf.facet.custom.sdk.core.internal.CustomizationActionsImpl;
-import org.eclipse.emf.facet.util.emf.core.exception.InvalidFacetSetException;
-
-/**
- * This interface provides the creation of a new customization model file.
- *
- * @see CustomizationActionsImpl
- * @noextend This interface is not intended to be extended by clients.
- * @noimplement This interface is not intended to be implemented by clients.
- */
-public interface ICustomizationActions {
-
- ICustomizationActions INSTANCE = new CustomizationActionsImpl();
-
- /**
- * Add the given customization to the given customization model file, which
- * will be created.
- *
- * @param customization
- * the customization to be created. Cannot be <code>null</code>
- * @param file
- * the new file in which the customization has to be created.
- * Cannot be <code>null</code>, and cannot already exist
- */
- void saveCustomization(Customization customization, IFile file)
- throws IOException, InvalidFacetSetException;
-}
diff --git a/plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/src/org/eclipse/emf/facet/custom/sdk/core/ICustomizationCommandFactory.java b/plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/src/org/eclipse/emf/facet/custom/sdk/core/ICustomizationCommandFactory.java
deleted file mode 100644
index b25fd22378e..00000000000
--- a/plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/src/org/eclipse/emf/facet/custom/sdk/core/ICustomizationCommandFactory.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * 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:
- * Alban Ménager (Soft-Maint) - Bug 387470 - [EFacet][Custom] Editors
- * Grégoire Dupé (Mia-Software) - Bug 387470 - [EFacet][Custom] Editors
- */
-package org.eclipse.emf.facet.custom.sdk.core;
-
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.facet.custom.metamodel.v0_2_0.custom.Customization;
-import org.eclipse.emf.facet.custom.metamodel.v0_2_0.custom.EClassCustomization;
-import org.eclipse.emf.facet.custom.metamodel.v0_2_0.custom.ETypedElementCase;
-import org.eclipse.emf.facet.custom.metamodel.v0_2_0.custom.FacetCustomization;
-import org.eclipse.emf.facet.custom.sdk.core.internal.CustomizationCommandFactory;
-import org.eclipse.emf.facet.efacet.metamodel.v0_2_0.efacet.extensible.Query;
-
-/**
- * This interface provide a command factory. A command modify the editingDomain.
- *
- * @since 0.3
- * @see CustomizationCommandFactory
- * @noextend This interface is not intended to be extended by clients.
- * @noimplement This interface is not intended to be implemented by clients.
- */
-public interface ICustomizationCommandFactory {
-
- /**
- * Create the command to add a eClassCustomization to an existing
- * customization (parent).
- *
- * @param Customization
- * the parent of the eClassCustomization to add.
- * @param eClassCustom
- * the eClassCustomization to add.
- * @return the command.
- */
- Command createEClassCustomization(Customization parent,
- EClassCustomization eClassCustom);
-
- /**
- * Create the command to add a facetCustomization to an existing
- * customization (parent).
- *
- * @param parent
- * the parent of the facetCustomization to add.
- * @param facetCustom
- * the facetCustomization to add.
- * @return the command.
- */
- Command createFacetCustomization(Customization parent,
- FacetCustomization facetCustom);
-
- Command addValueInCase(final ETypedElementCase elementCase,
- final Query value);
-}
diff --git a/plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/src/org/eclipse/emf/facet/custom/sdk/core/ICustomizationCommandFactoryFactory.java b/plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/src/org/eclipse/emf/facet/custom/sdk/core/ICustomizationCommandFactoryFactory.java
deleted file mode 100644
index 3e038315588..00000000000
--- a/plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/src/org/eclipse/emf/facet/custom/sdk/core/ICustomizationCommandFactoryFactory.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * 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:
- * Grégoire Dupé (Mia-Software) - Bug 387470 - [EFacet][Custom] Editors
- */
-package org.eclipse.emf.facet.custom.sdk.core;
-
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.emf.facet.custom.sdk.core.internal.CustomizationCommandFactoryFactory;
-import org.eclipse.emf.facet.custom.sdk.core.internal.CustomizationCommandFactory;
-
-/**
- * This interface provide a command factory. A command modify the editingDomain.
- *
- * @since 0.3
- * @see CustomizationCommandFactory
- * @noextend This interface is not intended to be extended by clients.
- * @noimplement This interface is not intended to be implemented by clients.
- */
-public interface ICustomizationCommandFactoryFactory {
-
- ICustomizationCommandFactoryFactory DEFAULT = new CustomizationCommandFactoryFactory();
-
- /**
- * Set the editingDomain.
- *
- * @param editingDomain
- * the current editing domain.
- */
- ICustomizationCommandFactory createICustomizationCommandFactory(
- EditingDomain editingDomain);
-
-}
diff --git a/plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/src/org/eclipse/emf/facet/custom/sdk/core/internal/Activator.java b/plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/src/org/eclipse/emf/facet/custom/sdk/core/internal/Activator.java
deleted file mode 100644
index fdf1b570d8c..00000000000
--- a/plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/src/org/eclipse/emf/facet/custom/sdk/core/internal/Activator.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
- * Copyright (c) 2012 CEA LIST.
- * 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 375054 - Add validation warning for overlay on EClass
- * Alban Ménager (Soft-Maint) - Bug 387470 - [EFacet][Custom] Editors
- */
-package org.eclipse.emf.facet.custom.sdk.core.internal;
-
-import org.eclipse.core.runtime.Plugin;
-import org.osgi.framework.BundleContext;
-
-@SuppressWarnings("PMD.UseSingleton")
-// @SuppressWarnings("PMD.UseSingleton") We cannot conforms to this rule because
-// this class is an Eclipse plug-in activator which will be instantiated by the
-// Eclipse framework.
-public class Activator extends Plugin {
-
- private static Activator plugin;
-
- @Override
- @SuppressWarnings("PMD.SignatureDeclareThrowsException")
- // @SuppressWarnings("PMD.SignatureDeclareThrowsException") We have to use
- // this signature because this is an override of an Eclipse framework's
- // method.
- public void start(final BundleContext bundleContext) throws Exception {
- super.start(bundleContext);
- Activator.plugin = this;
- }
-
- @Override
- @SuppressWarnings({ "PMD.SignatureDeclareThrowsException",
- "PMD.NullAssignment" })
- // @SuppressWarnings("PMD.SignatureDeclareThrowsException") We have to use
- // this signature because this is an override of an Eclipse framework's
- // method.
- // @SuppressWarnings("PMD.NullAssignment")
- // No choice to right it in another way : this is an Eclipse pattern.
- public void stop(final BundleContext bundleContext) throws Exception {
- Activator.plugin = null;
- super.stop(bundleContext);
- }
-
- public static Plugin getDefault() {
- return Activator.plugin;
- }
-
-}
diff --git a/plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/src/org/eclipse/emf/facet/custom/sdk/core/internal/CustomizationActionsImpl.java b/plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/src/org/eclipse/emf/facet/custom/sdk/core/internal/CustomizationActionsImpl.java
deleted file mode 100644
index 3449b341624..00000000000
--- a/plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/src/org/eclipse/emf/facet/custom/sdk/core/internal/CustomizationActionsImpl.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/**
- * 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:
- * Alban Ménager (Soft-Maint) - Bug 387470 - [EFacet][Custom] Editors
- */
-package org.eclipse.emf.facet.custom.sdk.core.internal;
-
-import java.io.IOException;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
-import org.eclipse.emf.facet.custom.metamodel.v0_2_0.custom.Customization;
-import org.eclipse.emf.facet.custom.sdk.core.ICustomizationActions;
-import org.eclipse.emf.facet.util.core.Logger;
-//import org.eclipse.emf.facet.util.core.internal.BuildPropertiesUtils;
-import org.eclipse.emf.facet.util.emf.core.ICatalogSetManager2;
-import org.eclipse.emf.facet.util.emf.core.ICatalogSetManagerFactory;
-import org.eclipse.emf.facet.util.emf.core.exception.InvalidFacetSetException;
-
-/**
- * Concrete implementation of {@link ICustomizationActions}.
- */
-public class CustomizationActionsImpl implements ICustomizationActions {
-
- public void saveCustomization(final Customization customization,
- final IFile file) throws IOException, InvalidFacetSetException {
-
- if (customization == null) {
- throw new IllegalArgumentException(
- "The given customization cannot be null"); //$NON-NLS-1$
- }
- if (file == null) {
- throw new IllegalArgumentException("The given file cannot be null"); //$NON-NLS-1$
- }
- if (file.exists()) {
- throw new IllegalArgumentException("The given file already exists"); //$NON-NLS-1$
- }
- // Create a resource set
- final ResourceSet resourceSet = new ResourceSetImpl();
- // Get the URI of the model file.
- final URI fileURI = URI.createPlatformResourceURI(file.getFullPath()
- .toString(), true);
- // Create a resource for this file.
- final Resource resource = resourceSet.createResource(fileURI);
- // Add the facetSet the resource contents.
- resource.getContents().add(customization);
- // Save the contents of the resource to the file system.
- resource.save(null);
- try {
- //BuildPropertiesUtils.addToBuild(file);
- } catch (final Exception e) {
- Logger.logError(e, "Error adding file " + file.getFullPath() //$NON-NLS-1$
- + " to the build.properties", Activator.getDefault()); //$NON-NLS-1$
- }
- final ICatalogSetManager2 catalogSetManager = ICatalogSetManagerFactory.DEFAULT
- .createICatalogSetManager(resourceSet);
- catalogSetManager.registerModelDeclaration(file);
- }
-
-}
diff --git a/plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/src/org/eclipse/emf/facet/custom/sdk/core/internal/CustomizationCommandFactory.java b/plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/src/org/eclipse/emf/facet/custom/sdk/core/internal/CustomizationCommandFactory.java
deleted file mode 100644
index 98454ba3191..00000000000
--- a/plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/src/org/eclipse/emf/facet/custom/sdk/core/internal/CustomizationCommandFactory.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/**
- * 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:
- * Alban Ménager (Soft-Maint) - Bug 387470 - [EFacet][Custom] Editors
- * Grégoire Dupé (Mia-Software) - Bug 387470 - [EFacet][Custom] Editors
- */
-package org.eclipse.emf.facet.custom.sdk.core.internal;
-
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.EcorePackage;
-import org.eclipse.emf.edit.command.AddCommand;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.emf.facet.custom.metamodel.v0_2_0.custom.Customization;
-import org.eclipse.emf.facet.custom.metamodel.v0_2_0.custom.EClassCustomization;
-import org.eclipse.emf.facet.custom.metamodel.v0_2_0.custom.ETypedElementCase;
-import org.eclipse.emf.facet.custom.metamodel.v0_2_0.custom.FacetCustomization;
-import org.eclipse.emf.facet.custom.sdk.core.ICustomizationCommandFactory;
-import org.eclipse.emf.facet.efacet.metamodel.v0_2_0.efacet.extensible.Query;
-
-/**
- * Concrete implementation of {@link ICustomizationCommandFactory}.
- */
-public class CustomizationCommandFactory implements
- ICustomizationCommandFactory {
-
- private final EditingDomain editingDomain;
-
- public CustomizationCommandFactory(final EditingDomain editingDomain) {
- if (editingDomain == null) {
- throw new IllegalArgumentException(
- "The given EditingDomain cannot be null"); //$NON-NLS-1$
- }
- this.editingDomain = editingDomain;
- }
-
- /**
- * Create an {@link AddCommand} to add the element to the owner.
- *
- * @param owner
- * the owner.
- * @param element
- * the element to add.
- * @return the command.
- */
- private Command createAddCommand(final Object owner, final Object element) {
- if (owner == null) {
- throw new IllegalArgumentException("The given owner cannot be null"); //$NON-NLS-1$
- }
- if (element == null) {
- throw new IllegalArgumentException(
- "The given element cannot be null"); //$NON-NLS-1$
- }
- return AddCommand.create(this.editingDomain, owner,
- getEStructuralFeature(element), element);
- }
-
- /**
- * Return the {@link EStructuralFeature} for a given element.
- *
- * @param element
- * the element.
- * @return the eStructuralFeature for the element.
- */
- private static EStructuralFeature getEStructuralFeature(final Object element) {
- EStructuralFeature result = null;
- if (element instanceof EClassCustomization) {
- result = EcorePackage.eINSTANCE.getEPackage_EClassifiers();
- }
- return result;
- }
-
- public Command createEClassCustomization(final Customization parent,
- final EClassCustomization eClassCustom) {
- return createAddCommand(parent, eClassCustom);
- }
-
- public Command createFacetCustomization(final Customization parent,
- final FacetCustomization facetCustom) {
- return createAddCommand(parent, facetCustom);
- }
-
- public Command addValueInCase(final ETypedElementCase elementCase,
- final Query value) {
- return createAddCommand(elementCase, value);
- }
-}
diff --git a/plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/src/org/eclipse/emf/facet/custom/sdk/core/internal/CustomizationCommandFactoryFactory.java b/plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/src/org/eclipse/emf/facet/custom/sdk/core/internal/CustomizationCommandFactoryFactory.java
deleted file mode 100644
index b96f8240d28..00000000000
--- a/plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/src/org/eclipse/emf/facet/custom/sdk/core/internal/CustomizationCommandFactoryFactory.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * 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:
- * Grégoire Dupé (Mia-Software) - Bug 387470 - [EFacet][Custom] Editors
- */
-package org.eclipse.emf.facet.custom.sdk.core.internal;
-
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.emf.facet.custom.sdk.core.ICustomizationCommandFactory;
-import org.eclipse.emf.facet.custom.sdk.core.ICustomizationCommandFactoryFactory;
-
-public class CustomizationCommandFactoryFactory implements
- ICustomizationCommandFactoryFactory {
-
- public ICustomizationCommandFactory createICustomizationCommandFactory(
- final EditingDomain editingDomain) {
- return new CustomizationCommandFactory(editingDomain);
- }
-
-}
diff --git a/plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/src/org/eclipse/emf/facet/custom/sdk/core/internal/validation/AvoidEClassOverlayConstraint.java b/plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/src/org/eclipse/emf/facet/custom/sdk/core/internal/validation/AvoidEClassOverlayConstraint.java
deleted file mode 100644
index b8081af3e8d..00000000000
--- a/plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/src/org/eclipse/emf/facet/custom/sdk/core/internal/validation/AvoidEClassOverlayConstraint.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012 CEA LIST.
- * 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 375054 - Add validation warning for overlay on EClass
- *******************************************************************************/
-package org.eclipse.emf.facet.custom.sdk.core.internal.validation;
-
-import java.util.Arrays;
-import java.util.List;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.emf.facet.custom.metamodel.v0_2_0.custom.EClassCustomization;
-import org.eclipse.emf.facet.efacet.metamodel.v0_2_0.efacet.DerivedTypedElement;
-import org.eclipse.emf.facet.efacet.metamodel.v0_2_0.efacet.FacetOperation;
-import org.eclipse.emf.validation.AbstractModelConstraint;
-import org.eclipse.emf.validation.IValidationContext;
-
-/**
- * Creates a warning if a {@link FacetOperation} defined in an {@link EClassCustomization} overrides (i.e. customizes)
- * an overlay operation.
- */
-public class AvoidEClassOverlayConstraint extends AbstractModelConstraint {
-
- private static final List<String> OVERLAY_OPS = Arrays.asList(
- "platform:/plugin/org.eclipse.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject/topLeftOverlay", //$NON-NLS-1$
- "platform:/plugin/org.eclipse.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject/topMiddleOverlay", //$NON-NLS-1$
- "platform:/plugin/org.eclipse.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject/topRightOverlay", //$NON-NLS-1$
- "platform:/plugin/org.eclipse.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject/bottomLeftOverlay", //$NON-NLS-1$
- "platform:/plugin/org.eclipse.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject/bottomMiddleOverlay", //$NON-NLS-1$
- "platform:/plugin/org.eclipse.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject/bottomRightOverlay" //$NON-NLS-1$
- );
-
- @Override
- public IStatus validate(final IValidationContext ctx) {
- IStatus result = ctx.createSuccessStatus();
- final EObject target = ctx.getTarget();
- if (target instanceof FacetOperation) {
- final FacetOperation facetOperation = (FacetOperation) target;
- final DerivedTypedElement override = facetOperation.getOverride();
- final URI overrideURI = EcoreUtil.getURI(override);
- if (facetOperation.eContainer() instanceof EClassCustomization
- && AvoidEClassOverlayConstraint.OVERLAY_OPS.contains(overrideURI.toString())) {
- result = ctx.createFailureStatus();
- }
- }
- return result;
- }
-
-}
diff --git a/plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/src/org/eclipse/emf/facet/custom/sdk/core/internal/validation/CustomizationValidationBuilder.java b/plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/src/org/eclipse/emf/facet/custom/sdk/core/internal/validation/CustomizationValidationBuilder.java
deleted file mode 100644
index 666d02d586b..00000000000
--- a/plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/src/org/eclipse/emf/facet/custom/sdk/core/internal/validation/CustomizationValidationBuilder.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012 CEA LIST.
- * 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 375054 - Add validation warning for overlay on EClass
- *******************************************************************************/
-package org.eclipse.emf.facet.custom.sdk.core.internal.validation;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceDelta;
-import org.eclipse.core.resources.IResourceDeltaVisitor;
-import org.eclipse.core.resources.IResourceVisitor;
-import org.eclipse.core.resources.IncrementalProjectBuilder;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.emf.common.util.TreeIterator;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.emf.facet.common.sdk.core.internal.exported.IEmfFacetProjectBuilder;
-import org.eclipse.emf.facet.custom.core.internal.exported.Constants;
-import org.eclipse.emf.validation.marker.MarkerUtil;
-import org.eclipse.emf.validation.model.EvaluationMode;
-import org.eclipse.emf.validation.service.IBatchValidator;
-import org.eclipse.emf.validation.service.ModelValidationService;
-
-/** A builder that validates customization model files. */
-public class CustomizationValidationBuilder implements IEmfFacetProjectBuilder, IResourceDeltaVisitor, IResourceVisitor {
-
- public IProject[] build(final IncrementalProjectBuilder builder, final int kind, final Map<?, ?> args, final IProgressMonitor monitor) throws CoreException {
- if (kind == IncrementalProjectBuilder.FULL_BUILD) {
- fullBuild(builder);
- } else {
- final IResourceDelta delta = builder.getDelta(builder.getProject());
- if (delta == null) {
- fullBuild(builder);
- } else {
- incrementalBuild(delta);
- }
- }
- return new IProject[0];
- }
-
- public void clean(final IncrementalProjectBuilder builder, final IProgressMonitor monitor) throws CoreException {
- builder.getProject().accept(new IResourceVisitor() {
- public boolean visit(final IResource resource) throws CoreException {
- if (isCustomizationFile(resource)) {
- resource.deleteMarkers(MarkerUtil.VALIDATION_MARKER_TYPE, true, IResource.DEPTH_INFINITE);
- }
- return true;
- }
- });
- }
-
- private void incrementalBuild(final IResourceDelta delta) throws CoreException {
- delta.accept(this);
- }
-
- private void fullBuild(final IncrementalProjectBuilder builder) throws CoreException {
- builder.getProject().accept(this);
- }
-
- protected static boolean isCustomizationFile(final IResource resource) {
- return resource.getType() == IResource.FILE
- && Constants.CUSTOM_FILE_EXT
- .equals(resource.getFileExtension());
- }
-
- public boolean visit(final IResourceDelta delta) throws CoreException {
- if (isCustomizationFile(delta.getResource())) {
- validate(delta.getResource());
- }
- return true;
- }
-
- public boolean visit(final IResource resource) throws CoreException {
- if (Constants.CUSTOM_FILE_EXT.equals(resource.getFileExtension())) {
- validate(resource);
- }
- return true;
- }
-
- protected static void validate(final IResource resource) throws CoreException {
- if (resource.exists()) {
- final IBatchValidator validator = (IBatchValidator) ModelValidationService.getInstance()
- .newValidator(EvaluationMode.BATCH);
- validator.setOption(IBatchValidator.OPTION_TRACK_RESOURCES, Boolean.TRUE);
- final IStatus multiStatus = validator.validate(getAllContents(resource));
- MarkerUtil.updateMarkers(multiStatus);
- }
- }
-
- /** @return all the model elements contained in the given platform resource. */
- public static List<EObject> getAllContents(final IResource resource) {
- final List<EObject> result = new ArrayList<EObject>();
- final ResourceSetImpl resourceSet = new ResourceSetImpl();
- final Resource modelResource = resourceSet.getResource(URI.createPlatformResourceURI(resource.getFullPath().toString(), true), true);
- final TreeIterator<EObject> allContents = EcoreUtil.getAllContents(modelResource, true);
- while (allContents.hasNext()) {
- result.add(allContents.next());
- }
- return result;
- }
-}
diff --git a/plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/src/org/eclipse/emf/facet/custom/sdk/core/internal/validation/ValidationDelegateClientSelector.java b/plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/src/org/eclipse/emf/facet/custom/sdk/core/internal/validation/ValidationDelegateClientSelector.java
deleted file mode 100644
index cc56ae119af..00000000000
--- a/plugins/facet/editor/org.eclipse.emf.facet.custom.sdk.core/src/org/eclipse/emf/facet/custom/sdk/core/internal/validation/ValidationDelegateClientSelector.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012 CEA LIST.
- * 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 375054 - Add validation warning for overlay on EClass
- *******************************************************************************/
-package org.eclipse.emf.facet.custom.sdk.core.internal.validation;
-
-import org.eclipse.emf.validation.model.IClientSelector;
-
-/** Enables validation depending on a client context. */
-public class ValidationDelegateClientSelector implements IClientSelector {
-
- public boolean selects(final Object object) {
- // always enabled
- return true;
- }
-
-}

Back to the top