blob: 5c6584027c275054abc025e56f83e14527ad9ab9 [file] [log] [blame]
<?xml version="1.0"?>
<!--
Copyright (c) 2018 CEA LIST and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License 2.0
which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-2.0/
SPDX-License-Identifier: EPL-2.0
Contributors:
Eike Stepper - initial API and implementation
-->
<project name="migrate" default="migrate">
<fail unless="git.clone.papyrus" message="Property 'git.clone.papyrus' is undefined! Go to Preferences -> Run/Debug -> String Substitution..." />
<property name="source-package" value="org/eclipse/papyrus/infra/gmfdiag/css" />
<property name="source-project" location="${git.clone.papyrus}/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css" />
<property name="source" location="${source-project}/src/${source-package}" />
<echo message="Source: ${source}" />
<fail message="The 'basedir' property must point to the directory that contains this script!">
<condition>
<not>
<available file="${basedir}/migrate.ant" type="file" />
</not>
</condition>
</fail>
<property name="target" location="${basedir}/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo" />
<echo message="Target: ${target}" />
<target name="migrate">
<delete includeemptydirs="true">
<fileset dir="${target}">
<include name="**/*.java" />
</fileset>
</delete>
<copy todir="${target}">
<fileset dir="${source}">
<include name="*Impl.java" />
<include name="factory/*.java" />
<include name="notation/CSSDiagramImpl.java" />
</fileset>
<filterchain>
<replacestring from="package org.eclipse.papyrus.infra.gmfdiag.css" to="package org.eclipse.papyrus.infra.gmfdiag.css.cdo" />
<replacestring from="import org.eclipse.gmf.runtime.notation.impl." to="import org.eclipse.emf.cdo.gmf.notation.impl." />
</filterchain>
</copy>
<replace file="${target}/factory/CSSNotationFactory.java" token="import org.eclipse.papyrus.infra.gmfdiag.css." value="import org.eclipse.papyrus.infra.gmfdiag.css.cdo." />
<replace file="${target}/notation/CSSDiagramImpl.java" token="implements CSSDiagram," value="implements org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagram," />
<replace file="${target}/notation/CSSDiagramImpl.java" token="CSSStyles" value="org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSStyles" />
<replace file="${target}/notation/CSSDiagramImpl.java" token="ForceValueHelper" value="org.eclipse.papyrus.infra.gmfdiag.css.notation.ForceValueHelper" />
</target>
</project>