diff --git a/org.fortiss.af3.platform.raspberry/trunk/plugin.xml b/org.fortiss.af3.platform.raspberry/trunk/plugin.xml index 0171d29d6fe7192d9cc42f64da5442f2c34418f5..ba71e30417c2b6b28990a9205854daa9024fe625 100644 --- a/org.fortiss.af3.platform.raspberry/trunk/plugin.xml +++ b/org.fortiss.af3.platform.raspberry/trunk/plugin.xml @@ -296,5 +296,295 @@ </objectClass> </target> </transformationProvider> + + <transformationProvider + transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.rumblepad.ButtonATransformation"> + <source> + <objectClass + objectClass="org.fortiss.af3.platform.raspberry.model.rumblepad.ButtonA"> + </objectClass> + </source> + <target> + <objectClass + objectClass="org.fortiss.af3.platform.raspberry.generator.executable.rumblepad.ButtonAExecutable"> + </objectClass> + </target> + </transformationProvider> + + <transformationProvider + transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.rumblepad.ButtonBTransformation"> + <source> + <objectClass + objectClass="org.fortiss.af3.platform.raspberry.model.rumblepad.ButtonB"> + </objectClass> + </source> + <target> + <objectClass + objectClass="org.fortiss.af3.platform.raspberry.generator.executable.rumblepad.ButtonBExecutable"> + </objectClass> + </target> + </transformationProvider> + + <transformationProvider + transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.rumblepad.ButtonXTransformation"> + <source> + <objectClass + objectClass="org.fortiss.af3.platform.raspberry.model.rumblepad.ButtonX"> + </objectClass> + </source> + <target> + <objectClass + objectClass="org.fortiss.af3.platform.raspberry.generator.executable.rumblepad.ButtonXExecutable"> + </objectClass> + </target> + </transformationProvider> + + <transformationProvider + transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.rumblepad.ButtonYTransformation"> + <source> + <objectClass + objectClass="org.fortiss.af3.platform.raspberry.model.rumblepad.ButtonY"> + </objectClass> + </source> + <target> + <objectClass + objectClass="org.fortiss.af3.platform.raspberry.generator.executable.rumblepad.ButtonYExecutable"> + </objectClass> + </target> + </transformationProvider> + + <transformationProvider + transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.rumblepad.ButtonStartTransformation"> + <source> + <objectClass + objectClass="org.fortiss.af3.platform.raspberry.model.rumblepad.ButtonStart"> + </objectClass> + </source> + <target> + <objectClass + objectClass="org.fortiss.af3.platform.raspberry.generator.executable.rumblepad.ButtonStartExecutable"> + </objectClass> + </target> + </transformationProvider> + + <transformationProvider + transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.rumblepad.ButtonSelectTransformation"> + <source> + <objectClass + objectClass="org.fortiss.af3.platform.raspberry.model.rumblepad.ButtonSelect"> + </objectClass> + </source> + <target> + <objectClass + objectClass="org.fortiss.af3.platform.raspberry.generator.executable.rumblepad.ButtonSelectExecutable"> + </objectClass> + </target> + </transformationProvider> + + <transformationProvider + transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.rumblepad.ButtonHomeTransformation"> + <source> + <objectClass + objectClass="org.fortiss.af3.platform.raspberry.model.rumblepad.ButtonHome"> + </objectClass> + </source> + <target> + <objectClass + objectClass="org.fortiss.af3.platform.raspberry.generator.executable.rumblepad.ButtonHomeExecutable"> + </objectClass> + </target> + </transformationProvider> + + <transformationProvider + transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.rumblepad.ButtonL1Transformation"> + <source> + <objectClass + objectClass="org.fortiss.af3.platform.raspberry.model.rumblepad.ButtonL1"> + </objectClass> + </source> + <target> + <objectClass + objectClass="org.fortiss.af3.platform.raspberry.generator.executable.rumblepad.ButtonL1Executable"> + </objectClass> + </target> + </transformationProvider> + + <transformationProvider + transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.rumblepad.ButtonL3Transformation"> + <source> + <objectClass + objectClass="org.fortiss.af3.platform.raspberry.model.rumblepad.ButtonL3"> + </objectClass> + </source> + <target> + <objectClass + objectClass="org.fortiss.af3.platform.raspberry.generator.executable.rumblepad.ButtonL3Executable"> + </objectClass> + </target> + </transformationProvider> + + <transformationProvider + transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.rumblepad.ButtonR1Transformation"> + <source> + <objectClass + objectClass="org.fortiss.af3.platform.raspberry.model.rumblepad.ButtonR1"> + </objectClass> + </source> + <target> + <objectClass + objectClass="org.fortiss.af3.platform.raspberry.generator.executable.rumblepad.ButtonR1Executable"> + </objectClass> + </target> + </transformationProvider> + + <transformationProvider + transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.rumblepad.ButtonR3Transformation"> + <source> + <objectClass + objectClass="org.fortiss.af3.platform.raspberry.model.rumblepad.ButtonR3"> + </objectClass> + </source> + <target> + <objectClass + objectClass="org.fortiss.af3.platform.raspberry.generator.executable.rumblepad.ButtonR3Executable"> + </objectClass> + </target> + </transformationProvider> + + <transformationProvider + transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.rumblepad.DPadDownTransformation"> + <source> + <objectClass + objectClass="org.fortiss.af3.platform.raspberry.model.rumblepad.DPadDown"> + </objectClass> + </source> + <target> + <objectClass + objectClass="org.fortiss.af3.platform.raspberry.generator.executable.rumblepad.DPadDownExecutable"> + </objectClass> + </target> + </transformationProvider> + + <transformationProvider + transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.rumblepad.DPadUpTransformation"> + <source> + <objectClass + objectClass="org.fortiss.af3.platform.raspberry.model.rumblepad.DPadUp"> + </objectClass> + </source> + <target> + <objectClass + objectClass="org.fortiss.af3.platform.raspberry.generator.executable.rumblepad.DPadUpExecutable"> + </objectClass> + </target> + </transformationProvider> + + <transformationProvider + transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.rumblepad.DPadLeftTransformation"> + <source> + <objectClass + objectClass="org.fortiss.af3.platform.raspberry.model.rumblepad.DPadLeft"> + </objectClass> + </source> + <target> + <objectClass + objectClass="org.fortiss.af3.platform.raspberry.generator.executable.rumblepad.DPadLeftExecutable"> + </objectClass> + </target> + </transformationProvider> + + <transformationProvider + transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.rumblepad.DPadRightTransformation"> + <source> + <objectClass + objectClass="org.fortiss.af3.platform.raspberry.model.rumblepad.DPadRight"> + </objectClass> + </source> + <target> + <objectClass + objectClass="org.fortiss.af3.platform.raspberry.generator.executable.rumblepad.DPadRightExecutable"> + </objectClass> + </target> + </transformationProvider> + + <transformationProvider + transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.rumblepad.Left_StickXTransformation"> + <source> + <objectClass + objectClass="org.fortiss.af3.platform.raspberry.model.rumblepad.Left_StickX_Position"> + </objectClass> + </source> + <target> + <objectClass + objectClass="org.fortiss.af3.platform.raspberry.generator.executable.rumblepad.Left_StickXExecutable"> + </objectClass> + </target> + </transformationProvider> + <transformationProvider + transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.rumblepad.Left_StickYTransformation"> + <source> + <objectClass + objectClass="org.fortiss.af3.platform.raspberry.model.rumblepad.Left_StickY_Position"> + </objectClass> + </source> + <target> + <objectClass + objectClass="org.fortiss.af3.platform.raspberry.generator.executable.rumblepad.Left_StickYExecutable"> + </objectClass> + </target> + </transformationProvider> + <transformationProvider + transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.rumblepad.Right_StickXTransformation"> + <source> + <objectClass + objectClass="org.fortiss.af3.platform.raspberry.model.rumblepad.Right_StickX_Position"> + </objectClass> + </source> + <target> + <objectClass + objectClass="org.fortiss.af3.platform.raspberry.generator.executable.rumblepad.Right_StickXExecutable"> + </objectClass> + </target> + </transformationProvider> + <transformationProvider + transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.rumblepad.Right_StickYTransformation"> + <source> + <objectClass + objectClass="org.fortiss.af3.platform.raspberry.model.rumblepad.Right_StickY_Position"> + </objectClass> + </source> + <target> + <objectClass + objectClass="org.fortiss.af3.platform.raspberry.generator.executable.rumblepad.Right_StickYExecutable"> + </objectClass> + </target> + </transformationProvider> + <transformationProvider + transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.rumblepad.L2PositionTransformation"> + <source> + <objectClass + objectClass="org.fortiss.af3.platform.raspberry.model.rumblepad.L2_Position"> + </objectClass> + </source> + <target> + <objectClass + objectClass="org.fortiss.af3.platform.raspberry.generator.executable.rumblepad.L2PositionExecutable"> + </objectClass> + </target> + </transformationProvider> + <transformationProvider + transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.rumblepad.R2PositionTransformation"> + <source> + <objectClass + objectClass="org.fortiss.af3.platform.raspberry.model.rumblepad.R2_Position"> + </objectClass> + </source> + <target> + <objectClass + objectClass="org.fortiss.af3.platform.raspberry.generator.executable.rumblepad.R2PositionExecutable"> + </objectClass> + </target> + </transformationProvider> + </extension> </plugin> diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/rumblepad/ButtonATransformation.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/rumblepad/ButtonATransformation.java new file mode 100644 index 0000000000000000000000000000000000000000..9a6f60f1fed6b342410d3206915ca27acd986c04 --- /dev/null +++ b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/rumblepad/ButtonATransformation.java @@ -0,0 +1,61 @@ +/*--------------------------------------------------------------------------+ +$Id$ +| | +| Copyright 2017 fortiss GmbH | +| | +| Licensed under the Apache License, Version 2.0 (the "License"); | +| you may not use this file except in compliance with the License. | +| You may obtain a copy of the License at | +| | +| http://www.apache.org/licenses/LICENSE-2.0 | +| | +| Unless required by applicable law or agreed to in writing, software | +| distributed under the License is distributed on an "AS IS" BASIS, | +| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | +| See the License for the specific language governing permissions and | +| limitations under the License. | ++--------------------------------------------------------------------------*/ +package org.fortiss.af3.platform.raspberry.generator.transform.rumblepad; + +import org.fortiss.af3.platform.raspberry.generator.executable.rumblepad.ButtonAExecutable; +import org.fortiss.af3.platform.raspberry.model.rumblepad.ButtonA; +import org.fortiss.af3.platform.raspberry.model.rumblepad.ButtonL1; +import org.fortiss.tooling.kernel.extension.ITransformationProvider; +import org.fortiss.tooling.kernel.extension.data.ITransformationContext; + +/** + * Transformation for {@link ButtonA}. + * + * @author eder + * @author $Author$ + * @version $Rev$ + * @ConQAT.Rating RED Hash: + */ +public class ButtonATransformation implements ITransformationProvider { + + /** {@inheritDoc} */ + @Override + public Class<?> getTargetClass() { + return ButtonAExecutable.class; + } + + /** {@inheritDoc} */ + @Override + public boolean + canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { + return ButtonA.class.isAssignableFrom(sourceClass); + } + + /** {@inheritDoc} */ + @Override + public boolean canTransform(Object source, ITransformationContext context) { + return source instanceof ButtonL1; + } + + /** {@inheritDoc} */ + @Override + public Object transform(Object source, ITransformationContext context) { + return new ButtonAExecutable((ButtonA)source); + } + +} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/rumblepad/ButtonBTransformation.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/rumblepad/ButtonBTransformation.java new file mode 100644 index 0000000000000000000000000000000000000000..2dbb87709ef5cb2725b8f091cbbd6fde4dda7851 --- /dev/null +++ b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/rumblepad/ButtonBTransformation.java @@ -0,0 +1,60 @@ +/*--------------------------------------------------------------------------+ +$Id$ +| | +| Copyright 2017 fortiss GmbH | +| | +| Licensed under the Apache License, Version 2.0 (the "License"); | +| you may not use this file except in compliance with the License. | +| You may obtain a copy of the License at | +| | +| http://www.apache.org/licenses/LICENSE-2.0 | +| | +| Unless required by applicable law or agreed to in writing, software | +| distributed under the License is distributed on an "AS IS" BASIS, | +| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | +| See the License for the specific language governing permissions and | +| limitations under the License. | ++--------------------------------------------------------------------------*/ +package org.fortiss.af3.platform.raspberry.generator.transform.rumblepad; + +import org.fortiss.af3.platform.raspberry.generator.executable.rumblepad.ButtonBExecutable; +import org.fortiss.af3.platform.raspberry.model.rumblepad.ButtonB; +import org.fortiss.tooling.kernel.extension.ITransformationProvider; +import org.fortiss.tooling.kernel.extension.data.ITransformationContext; + +/** + * Transformation for {@link ButtonB}. + * + * @author eder + * @author $Author$ + * @version $Rev$ + * @ConQAT.Rating RED Hash: + */ +public class ButtonBTransformation implements ITransformationProvider { + + /** {@inheritDoc} */ + @Override + public Class<?> getTargetClass() { + return ButtonBExecutable.class; + } + + /** {@inheritDoc} */ + @Override + public boolean + canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { + return ButtonB.class.isAssignableFrom(sourceClass); + } + + /** {@inheritDoc} */ + @Override + public boolean canTransform(Object source, ITransformationContext context) { + return source instanceof ButtonB; + } + + /** {@inheritDoc} */ + @Override + public Object transform(Object source, ITransformationContext context) { + return new ButtonBExecutable((ButtonB)source); + } + +} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/rumblepad/ButtonHomeTransformation.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/rumblepad/ButtonHomeTransformation.java new file mode 100644 index 0000000000000000000000000000000000000000..6b2bbdb919af5da28a6adaadf21201fbc8cfe70f --- /dev/null +++ b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/rumblepad/ButtonHomeTransformation.java @@ -0,0 +1,60 @@ +/*--------------------------------------------------------------------------+ +$Id$ +| | +| Copyright 2017 fortiss GmbH | +| | +| Licensed under the Apache License, Version 2.0 (the "License"); | +| you may not use this file except in compliance with the License. | +| You may obtain a copy of the License at | +| | +| http://www.apache.org/licenses/LICENSE-2.0 | +| | +| Unless required by applicable law or agreed to in writing, software | +| distributed under the License is distributed on an "AS IS" BASIS, | +| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | +| See the License for the specific language governing permissions and | +| limitations under the License. | ++--------------------------------------------------------------------------*/ +package org.fortiss.af3.platform.raspberry.generator.transform.rumblepad; + +import org.fortiss.af3.platform.raspberry.generator.executable.rumblepad.ButtonHomeExecutable; +import org.fortiss.af3.platform.raspberry.model.rumblepad.ButtonHome; +import org.fortiss.tooling.kernel.extension.ITransformationProvider; +import org.fortiss.tooling.kernel.extension.data.ITransformationContext; + +/** + * Transformation for {@link ButtonHome}. + * + * @author eder + * @author $Author$ + * @version $Rev$ + * @ConQAT.Rating RED Hash: + */ +public class ButtonHomeTransformation implements ITransformationProvider { + + /** {@inheritDoc} */ + @Override + public Class<?> getTargetClass() { + return ButtonHomeExecutable.class; + } + + /** {@inheritDoc} */ + @Override + public boolean + canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { + return ButtonHome.class.isAssignableFrom(sourceClass); + } + + /** {@inheritDoc} */ + @Override + public boolean canTransform(Object source, ITransformationContext context) { + return source instanceof ButtonHome; + } + + /** {@inheritDoc} */ + @Override + public Object transform(Object source, ITransformationContext context) { + return new ButtonHomeExecutable((ButtonHome)source); + } + +} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/rumblepad/ButtonL1Transformation.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/rumblepad/ButtonL1Transformation.java new file mode 100644 index 0000000000000000000000000000000000000000..f842eccaaf6b96298d0bb0583244ea2e0b418cc6 --- /dev/null +++ b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/rumblepad/ButtonL1Transformation.java @@ -0,0 +1,60 @@ +/*--------------------------------------------------------------------------+ +$Id$ +| | +| Copyright 2017 fortiss GmbH | +| | +| Licensed under the Apache License, Version 2.0 (the "License"); | +| you may not use this file except in compliance with the License. | +| You may obtain a copy of the License at | +| | +| http://www.apache.org/licenses/LICENSE-2.0 | +| | +| Unless required by applicable law or agreed to in writing, software | +| distributed under the License is distributed on an "AS IS" BASIS, | +| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | +| See the License for the specific language governing permissions and | +| limitations under the License. | ++--------------------------------------------------------------------------*/ +package org.fortiss.af3.platform.raspberry.generator.transform.rumblepad; + +import org.fortiss.af3.platform.raspberry.generator.executable.rumblepad.ButtonL1Executable; +import org.fortiss.af3.platform.raspberry.model.rumblepad.ButtonL1; +import org.fortiss.tooling.kernel.extension.ITransformationProvider; +import org.fortiss.tooling.kernel.extension.data.ITransformationContext; + +/** + * Transformation for {@link ButtonL1}. + * + * @author eder + * @author $Author$ + * @version $Rev$ + * @ConQAT.Rating RED Hash: + */ +public class ButtonL1Transformation implements ITransformationProvider { + + /** {@inheritDoc} */ + @Override + public Class<?> getTargetClass() { + return ButtonL1Executable.class; + } + + /** {@inheritDoc} */ + @Override + public boolean + canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { + return ButtonL1.class.isAssignableFrom(sourceClass); + } + + /** {@inheritDoc} */ + @Override + public boolean canTransform(Object source, ITransformationContext context) { + return source instanceof ButtonL1; + } + + /** {@inheritDoc} */ + @Override + public Object transform(Object source, ITransformationContext context) { + return new ButtonL1Executable((ButtonL1)source); + } + +} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/rumblepad/ButtonL3Transformation.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/rumblepad/ButtonL3Transformation.java new file mode 100644 index 0000000000000000000000000000000000000000..601326f8ac4e25e5e2a1e02362a329662e269831 --- /dev/null +++ b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/rumblepad/ButtonL3Transformation.java @@ -0,0 +1,60 @@ +/*--------------------------------------------------------------------------+ +$Id$ +| | +| Copyright 2017 fortiss GmbH | +| | +| Licensed under the Apache License, Version 2.0 (the "License"); | +| you may not use this file except in compliance with the License. | +| You may obtain a copy of the License at | +| | +| http://www.apache.org/licenses/LICENSE-2.0 | +| | +| Unless required by applicable law or agreed to in writing, software | +| distributed under the License is distributed on an "AS IS" BASIS, | +| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | +| See the License for the specific language governing permissions and | +| limitations under the License. | ++--------------------------------------------------------------------------*/ +package org.fortiss.af3.platform.raspberry.generator.transform.rumblepad; + +import org.fortiss.af3.platform.raspberry.generator.executable.rumblepad.ButtonL3Executable; +import org.fortiss.af3.platform.raspberry.model.rumblepad.ButtonL3; +import org.fortiss.tooling.kernel.extension.ITransformationProvider; +import org.fortiss.tooling.kernel.extension.data.ITransformationContext; + +/** + * Transformation for {@link ButtonL3}. + * + * @author eder + * @author $Author$ + * @version $Rev$ + * @ConQAT.Rating RED Hash: + */ +public class ButtonL3Transformation implements ITransformationProvider { + + /** {@inheritDoc} */ + @Override + public Class<?> getTargetClass() { + return ButtonL3Executable.class; + } + + /** {@inheritDoc} */ + @Override + public boolean + canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { + return ButtonL3.class.isAssignableFrom(sourceClass); + } + + /** {@inheritDoc} */ + @Override + public boolean canTransform(Object source, ITransformationContext context) { + return source instanceof ButtonL3; + } + + /** {@inheritDoc} */ + @Override + public Object transform(Object source, ITransformationContext context) { + return new ButtonL3Executable((ButtonL3)source); + } + +} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/rumblepad/ButtonR1Transformation.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/rumblepad/ButtonR1Transformation.java new file mode 100644 index 0000000000000000000000000000000000000000..5fc68d194b5be1ab2d2a5bc63587384848dde194 --- /dev/null +++ b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/rumblepad/ButtonR1Transformation.java @@ -0,0 +1,60 @@ +/*--------------------------------------------------------------------------+ +$Id$ +| | +| Copyright 2017 fortiss GmbH | +| | +| Licensed under the Apache License, Version 2.0 (the "License"); | +| you may not use this file except in compliance with the License. | +| You may obtain a copy of the License at | +| | +| http://www.apache.org/licenses/LICENSE-2.0 | +| | +| Unless required by applicable law or agreed to in writing, software | +| distributed under the License is distributed on an "AS IS" BASIS, | +| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | +| See the License for the specific language governing permissions and | +| limitations under the License. | ++--------------------------------------------------------------------------*/ +package org.fortiss.af3.platform.raspberry.generator.transform.rumblepad; + +import org.fortiss.af3.platform.raspberry.generator.executable.rumblepad.ButtonR1Executable; +import org.fortiss.af3.platform.raspberry.model.rumblepad.ButtonR1; +import org.fortiss.tooling.kernel.extension.ITransformationProvider; +import org.fortiss.tooling.kernel.extension.data.ITransformationContext; + +/** + * Transformation for {@link ButtonR1}. + * + * @author eder + * @author $Author$ + * @version $Rev$ + * @ConQAT.Rating RED Hash: + */ +public class ButtonR1Transformation implements ITransformationProvider { + + /** {@inheritDoc} */ + @Override + public Class<?> getTargetClass() { + return ButtonR1Executable.class; + } + + /** {@inheritDoc} */ + @Override + public boolean + canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { + return ButtonR1.class.isAssignableFrom(sourceClass); + } + + /** {@inheritDoc} */ + @Override + public boolean canTransform(Object source, ITransformationContext context) { + return source instanceof ButtonR1; + } + + /** {@inheritDoc} */ + @Override + public Object transform(Object source, ITransformationContext context) { + return new ButtonR1Executable((ButtonR1)source); + } + +} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/rumblepad/ButtonR3Transformation.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/rumblepad/ButtonR3Transformation.java new file mode 100644 index 0000000000000000000000000000000000000000..c3236100ef4803a6d1a138fb9064e861b6837c2b --- /dev/null +++ b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/rumblepad/ButtonR3Transformation.java @@ -0,0 +1,60 @@ +/*--------------------------------------------------------------------------+ +$Id$ +| | +| Copyright 2017 fortiss GmbH | +| | +| Licensed under the Apache License, Version 2.0 (the "License"); | +| you may not use this file except in compliance with the License. | +| You may obtain a copy of the License at | +| | +| http://www.apache.org/licenses/LICENSE-2.0 | +| | +| Unless required by applicable law or agreed to in writing, software | +| distributed under the License is distributed on an "AS IS" BASIS, | +| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | +| See the License for the specific language governing permissions and | +| limitations under the License. | ++--------------------------------------------------------------------------*/ +package org.fortiss.af3.platform.raspberry.generator.transform.rumblepad; + +import org.fortiss.af3.platform.raspberry.generator.executable.rumblepad.ButtonR3Executable; +import org.fortiss.af3.platform.raspberry.model.rumblepad.ButtonR3; +import org.fortiss.tooling.kernel.extension.ITransformationProvider; +import org.fortiss.tooling.kernel.extension.data.ITransformationContext; + +/** + * Transformation for {@link ButtonR3}. + * + * @author eder + * @author $Author$ + * @version $Rev$ + * @ConQAT.Rating RED Hash: + */ +public class ButtonR3Transformation implements ITransformationProvider { + + /** {@inheritDoc} */ + @Override + public Class<?> getTargetClass() { + return ButtonR3Executable.class; + } + + /** {@inheritDoc} */ + @Override + public boolean + canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { + return ButtonR3.class.isAssignableFrom(sourceClass); + } + + /** {@inheritDoc} */ + @Override + public boolean canTransform(Object source, ITransformationContext context) { + return source instanceof ButtonR3; + } + + /** {@inheritDoc} */ + @Override + public Object transform(Object source, ITransformationContext context) { + return new ButtonR3Executable((ButtonR3)source); + } + +} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/rumblepad/ButtonSelectTransformation.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/rumblepad/ButtonSelectTransformation.java new file mode 100644 index 0000000000000000000000000000000000000000..027de2ed8ed667ec2e8cffe7984c011e632e47f6 --- /dev/null +++ b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/rumblepad/ButtonSelectTransformation.java @@ -0,0 +1,60 @@ +/*--------------------------------------------------------------------------+ +$Id$ +| | +| Copyright 2017 fortiss GmbH | +| | +| Licensed under the Apache License, Version 2.0 (the "License"); | +| you may not use this file except in compliance with the License. | +| You may obtain a copy of the License at | +| | +| http://www.apache.org/licenses/LICENSE-2.0 | +| | +| Unless required by applicable law or agreed to in writing, software | +| distributed under the License is distributed on an "AS IS" BASIS, | +| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | +| See the License for the specific language governing permissions and | +| limitations under the License. | ++--------------------------------------------------------------------------*/ +package org.fortiss.af3.platform.raspberry.generator.transform.rumblepad; + +import org.fortiss.af3.platform.raspberry.generator.executable.rumblepad.ButtonSelectExecutable; +import org.fortiss.af3.platform.raspberry.model.rumblepad.ButtonSelect; +import org.fortiss.tooling.kernel.extension.ITransformationProvider; +import org.fortiss.tooling.kernel.extension.data.ITransformationContext; + +/** + * Transformation for {@link ButtonSelect}. + * + * @author eder + * @author $Author$ + * @version $Rev$ + * @ConQAT.Rating RED Hash: + */ +public class ButtonSelectTransformation implements ITransformationProvider { + + /** {@inheritDoc} */ + @Override + public Class<?> getTargetClass() { + return ButtonSelectExecutable.class; + } + + /** {@inheritDoc} */ + @Override + public boolean + canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { + return ButtonSelect.class.isAssignableFrom(sourceClass); + } + + /** {@inheritDoc} */ + @Override + public boolean canTransform(Object source, ITransformationContext context) { + return source instanceof ButtonSelect; + } + + /** {@inheritDoc} */ + @Override + public Object transform(Object source, ITransformationContext context) { + return new ButtonSelectExecutable((ButtonSelect)source); + } + +} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/rumblepad/ButtonStartTransformation.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/rumblepad/ButtonStartTransformation.java new file mode 100644 index 0000000000000000000000000000000000000000..46bc08a01cbb0b56021aef180823fafbba1902ac --- /dev/null +++ b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/rumblepad/ButtonStartTransformation.java @@ -0,0 +1,60 @@ +/*--------------------------------------------------------------------------+ +$Id$ +| | +| Copyright 2017 fortiss GmbH | +| | +| Licensed under the Apache License, Version 2.0 (the "License"); | +| you may not use this file except in compliance with the License. | +| You may obtain a copy of the License at | +| | +| http://www.apache.org/licenses/LICENSE-2.0 | +| | +| Unless required by applicable law or agreed to in writing, software | +| distributed under the License is distributed on an "AS IS" BASIS, | +| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | +| See the License for the specific language governing permissions and | +| limitations under the License. | ++--------------------------------------------------------------------------*/ +package org.fortiss.af3.platform.raspberry.generator.transform.rumblepad; + +import org.fortiss.af3.platform.raspberry.generator.executable.rumblepad.ButtonStartExecutable; +import org.fortiss.af3.platform.raspberry.model.rumblepad.ButtonStart; +import org.fortiss.tooling.kernel.extension.ITransformationProvider; +import org.fortiss.tooling.kernel.extension.data.ITransformationContext; + +/** + * Transformation for {@link ButtonStart}. + * + * @author eder + * @author $Author$ + * @version $Rev$ + * @ConQAT.Rating RED Hash: + */ +public class ButtonStartTransformation implements ITransformationProvider { + + /** {@inheritDoc} */ + @Override + public Class<?> getTargetClass() { + return ButtonStartExecutable.class; + } + + /** {@inheritDoc} */ + @Override + public boolean + canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { + return ButtonStart.class.isAssignableFrom(sourceClass); + } + + /** {@inheritDoc} */ + @Override + public boolean canTransform(Object source, ITransformationContext context) { + return source instanceof ButtonStart; + } + + /** {@inheritDoc} */ + @Override + public Object transform(Object source, ITransformationContext context) { + return new ButtonStartExecutable((ButtonStart)source); + } + +} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/rumblepad/ButtonXTransformation.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/rumblepad/ButtonXTransformation.java new file mode 100644 index 0000000000000000000000000000000000000000..c2686e423f09132b8a886dbc6509f21000f3e242 --- /dev/null +++ b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/rumblepad/ButtonXTransformation.java @@ -0,0 +1,60 @@ +/*--------------------------------------------------------------------------+ +$Id$ +| | +| Copyright 2017 fortiss GmbH | +| | +| Licensed under the Apache License, Version 2.0 (the "License"); | +| you may not use this file except in compliance with the License. | +| You may obtain a copy of the License at | +| | +| http://www.apache.org/licenses/LICENSE-2.0 | +| | +| Unless required by applicable law or agreed to in writing, software | +| distributed under the License is distributed on an "AS IS" BASIS, | +| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | +| See the License for the specific language governing permissions and | +| limitations under the License. | ++--------------------------------------------------------------------------*/ +package org.fortiss.af3.platform.raspberry.generator.transform.rumblepad; + +import org.fortiss.af3.platform.raspberry.generator.executable.rumblepad.ButtonXExecutable; +import org.fortiss.af3.platform.raspberry.model.rumblepad.ButtonX; +import org.fortiss.tooling.kernel.extension.ITransformationProvider; +import org.fortiss.tooling.kernel.extension.data.ITransformationContext; + +/** + * Transformation for {@link ButtonX}. + * + * @author eder + * @author $Author$ + * @version $Rev$ + * @ConQAT.Rating RED Hash: + */ +public class ButtonXTransformation implements ITransformationProvider { + + /** {@inheritDoc} */ + @Override + public Class<?> getTargetClass() { + return ButtonXExecutable.class; + } + + /** {@inheritDoc} */ + @Override + public boolean + canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { + return ButtonX.class.isAssignableFrom(sourceClass); + } + + /** {@inheritDoc} */ + @Override + public boolean canTransform(Object source, ITransformationContext context) { + return source instanceof ButtonX; + } + + /** {@inheritDoc} */ + @Override + public Object transform(Object source, ITransformationContext context) { + return new ButtonXExecutable((ButtonX)source); + } + +} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/rumblepad/ButtonYTransformation.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/rumblepad/ButtonYTransformation.java new file mode 100644 index 0000000000000000000000000000000000000000..9c4d58ddd79c84a95281a9f9fdd36fa382298700 --- /dev/null +++ b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/rumblepad/ButtonYTransformation.java @@ -0,0 +1,60 @@ +/*--------------------------------------------------------------------------+ +$Id$ +| | +| Copyright 2017 fortiss GmbH | +| | +| Licensed under the Apache License, Version 2.0 (the "License"); | +| you may not use this file except in compliance with the License. | +| You may obtain a copy of the License at | +| | +| http://www.apache.org/licenses/LICENSE-2.0 | +| | +| Unless required by applicable law or agreed to in writing, software | +| distributed under the License is distributed on an "AS IS" BASIS, | +| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | +| See the License for the specific language governing permissions and | +| limitations under the License. | ++--------------------------------------------------------------------------*/ +package org.fortiss.af3.platform.raspberry.generator.transform.rumblepad; + +import org.fortiss.af3.platform.raspberry.generator.executable.rumblepad.ButtonYExecutable; +import org.fortiss.af3.platform.raspberry.model.rumblepad.ButtonY; +import org.fortiss.tooling.kernel.extension.ITransformationProvider; +import org.fortiss.tooling.kernel.extension.data.ITransformationContext; + +/** + * Transformation for {@link ButtonY}. + * + * @author eder + * @author $Author$ + * @version $Rev$ + * @ConQAT.Rating RED Hash: + */ +public class ButtonYTransformation implements ITransformationProvider { + + /** {@inheritDoc} */ + @Override + public Class<?> getTargetClass() { + return ButtonYExecutable.class; + } + + /** {@inheritDoc} */ + @Override + public boolean + canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { + return ButtonY.class.isAssignableFrom(sourceClass); + } + + /** {@inheritDoc} */ + @Override + public boolean canTransform(Object source, ITransformationContext context) { + return source instanceof ButtonY; + } + + /** {@inheritDoc} */ + @Override + public Object transform(Object source, ITransformationContext context) { + return new ButtonYExecutable((ButtonY)source); + } + +} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/rumblepad/DPadDownTransformation.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/rumblepad/DPadDownTransformation.java new file mode 100644 index 0000000000000000000000000000000000000000..7afc96cdbb3f72837776cf092a400e9b174a5034 --- /dev/null +++ b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/rumblepad/DPadDownTransformation.java @@ -0,0 +1,60 @@ +/*--------------------------------------------------------------------------+ +$Id$ +| | +| Copyright 2017 fortiss GmbH | +| | +| Licensed under the Apache License, Version 2.0 (the "License"); | +| you may not use this file except in compliance with the License. | +| You may obtain a copy of the License at | +| | +| http://www.apache.org/licenses/LICENSE-2.0 | +| | +| Unless required by applicable law or agreed to in writing, software | +| distributed under the License is distributed on an "AS IS" BASIS, | +| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | +| See the License for the specific language governing permissions and | +| limitations under the License. | ++--------------------------------------------------------------------------*/ +package org.fortiss.af3.platform.raspberry.generator.transform.rumblepad; + +import org.fortiss.af3.platform.raspberry.generator.executable.rumblepad.DPadDownExecutable; +import org.fortiss.af3.platform.raspberry.model.rumblepad.DPadDown; +import org.fortiss.tooling.kernel.extension.ITransformationProvider; +import org.fortiss.tooling.kernel.extension.data.ITransformationContext; + +/** + * Transformation for {@link DPadDown}. + * + * @author eder + * @author $Author$ + * @version $Rev$ + * @ConQAT.Rating RED Hash: + */ +public class DPadDownTransformation implements ITransformationProvider { + + /** {@inheritDoc} */ + @Override + public Class<?> getTargetClass() { + return DPadDownExecutable.class; + } + + /** {@inheritDoc} */ + @Override + public boolean + canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { + return DPadDown.class.isAssignableFrom(sourceClass); + } + + /** {@inheritDoc} */ + @Override + public boolean canTransform(Object source, ITransformationContext context) { + return source instanceof DPadDown; + } + + /** {@inheritDoc} */ + @Override + public Object transform(Object source, ITransformationContext context) { + return new DPadDownExecutable((DPadDown)source); + } + +} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/rumblepad/DPadLeftTransformation.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/rumblepad/DPadLeftTransformation.java new file mode 100644 index 0000000000000000000000000000000000000000..d28ebe8087f4b0c9983f4ecb98b4a3cc6fd849c6 --- /dev/null +++ b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/rumblepad/DPadLeftTransformation.java @@ -0,0 +1,60 @@ +/*--------------------------------------------------------------------------+ +$Id$ +| | +| Copyright 2017 fortiss GmbH | +| | +| Licensed under the Apache License, Version 2.0 (the "License"); | +| you may not use this file except in compliance with the License. | +| You may obtain a copy of the License at | +| | +| http://www.apache.org/licenses/LICENSE-2.0 | +| | +| Unless required by applicable law or agreed to in writing, software | +| distributed under the License is distributed on an "AS IS" BASIS, | +| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | +| See the License for the specific language governing permissions and | +| limitations under the License. | ++--------------------------------------------------------------------------*/ +package org.fortiss.af3.platform.raspberry.generator.transform.rumblepad; + +import org.fortiss.af3.platform.raspberry.generator.executable.rumblepad.DPadLeftExecutable; +import org.fortiss.af3.platform.raspberry.model.rumblepad.DPadLeft; +import org.fortiss.tooling.kernel.extension.ITransformationProvider; +import org.fortiss.tooling.kernel.extension.data.ITransformationContext; + +/** + * Transformation for {@link DPadLeft}. + * + * @author eder + * @author $Author$ + * @version $Rev$ + * @ConQAT.Rating RED Hash: + */ +public class DPadLeftTransformation implements ITransformationProvider { + + /** {@inheritDoc} */ + @Override + public Class<?> getTargetClass() { + return DPadLeftExecutable.class; + } + + /** {@inheritDoc} */ + @Override + public boolean + canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { + return DPadLeft.class.isAssignableFrom(sourceClass); + } + + /** {@inheritDoc} */ + @Override + public boolean canTransform(Object source, ITransformationContext context) { + return source instanceof DPadLeft; + } + + /** {@inheritDoc} */ + @Override + public Object transform(Object source, ITransformationContext context) { + return new DPadLeftExecutable((DPadLeft)source); + } + +} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/rumblepad/DPadRightTransformation.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/rumblepad/DPadRightTransformation.java new file mode 100644 index 0000000000000000000000000000000000000000..d87d70b68af9f743869ec878da9c22c3610a5d2f --- /dev/null +++ b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/rumblepad/DPadRightTransformation.java @@ -0,0 +1,59 @@ +/*--------------------------------------------------------------------------+ +$Id$ +| | +| Copyright 2017 fortiss GmbH | +| | +| Licensed under the Apache License, Version 2.0 (the "License"); | +| you may not use this file except in compliance with the License. | +| You may obtain a copy of the License at | +| | +| http://www.apache.org/licenses/LICENSE-2.0 | +| | +| Unless required by applicable law or agreed to in writing, software | +| distributed under the License is distributed on an "AS IS" BASIS, | +| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | +| See the License for the specific language governing permissions and | +| limitations under the License. | ++--------------------------------------------------------------------------*/ +package org.fortiss.af3.platform.raspberry.generator.transform.rumblepad; + +import org.fortiss.af3.platform.raspberry.generator.executable.rumblepad.DPadRightExecutable; +import org.fortiss.af3.platform.raspberry.model.rumblepad.DPadRight; +import org.fortiss.tooling.kernel.extension.ITransformationProvider; +import org.fortiss.tooling.kernel.extension.data.ITransformationContext; + +/** + * Transformation for {@link DPadRight}. + * + * @author eder + * @author $Author$ + * @version $Rev$ + * @ConQAT.Rating RED Hash: + */ +public class DPadRightTransformation implements ITransformationProvider { + + /** {@inheritDoc} */ + @Override + public Class<?> getTargetClass() { + return DPadRightExecutable.class; + } + + /** {@inheritDoc} */ + @Override + public boolean + canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { + return DPadRight.class.isAssignableFrom(sourceClass); + } + + /** {@inheritDoc} */ + @Override + public boolean canTransform(Object source, ITransformationContext context) { + return source instanceof DPadRight; + } + + /** {@inheritDoc} */ + @Override + public Object transform(Object source, ITransformationContext context) { + return new DPadRightExecutable((DPadRight)source); + } +} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/rumblepad/DPadUpTransformation.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/rumblepad/DPadUpTransformation.java new file mode 100644 index 0000000000000000000000000000000000000000..a3997cec8c9ad38630690fdea7d8c1b112a37729 --- /dev/null +++ b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/rumblepad/DPadUpTransformation.java @@ -0,0 +1,60 @@ +/*--------------------------------------------------------------------------+ +$Id$ +| | +| Copyright 2017 fortiss GmbH | +| | +| Licensed under the Apache License, Version 2.0 (the "License"); | +| you may not use this file except in compliance with the License. | +| You may obtain a copy of the License at | +| | +| http://www.apache.org/licenses/LICENSE-2.0 | +| | +| Unless required by applicable law or agreed to in writing, software | +| distributed under the License is distributed on an "AS IS" BASIS, | +| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | +| See the License for the specific language governing permissions and | +| limitations under the License. | ++--------------------------------------------------------------------------*/ +package org.fortiss.af3.platform.raspberry.generator.transform.rumblepad; + +import org.fortiss.af3.platform.raspberry.generator.executable.rumblepad.DPadUpExecutable; +import org.fortiss.af3.platform.raspberry.model.rumblepad.DPadUp; +import org.fortiss.tooling.kernel.extension.ITransformationProvider; +import org.fortiss.tooling.kernel.extension.data.ITransformationContext; + +/** + * Transformation for {@link DPadUp}. + * + * @author eder + * @author $Author$ + * @version $Rev$ + * @ConQAT.Rating RED Hash: + */ +public class DPadUpTransformation implements ITransformationProvider { + + /** {@inheritDoc} */ + @Override + public Class<?> getTargetClass() { + return DPadUpExecutable.class; + } + + /** {@inheritDoc} */ + @Override + public boolean + canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { + return DPadUp.class.isAssignableFrom(sourceClass); + } + + /** {@inheritDoc} */ + @Override + public boolean canTransform(Object source, ITransformationContext context) { + return source instanceof DPadUp; + } + + /** {@inheritDoc} */ + @Override + public Object transform(Object source, ITransformationContext context) { + return new DPadUpExecutable((DPadUp)source); + } + +} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/rumblepad/L2PositionTransformation.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/rumblepad/L2PositionTransformation.java new file mode 100644 index 0000000000000000000000000000000000000000..e805f0beb497c71801277e1b00e047853d78cfa1 --- /dev/null +++ b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/rumblepad/L2PositionTransformation.java @@ -0,0 +1,60 @@ +/*--------------------------------------------------------------------------+ +$Id$ +| | +| Copyright 2017 fortiss GmbH | +| | +| Licensed under the Apache License, Version 2.0 (the "License"); | +| you may not use this file except in compliance with the License. | +| You may obtain a copy of the License at | +| | +| http://www.apache.org/licenses/LICENSE-2.0 | +| | +| Unless required by applicable law or agreed to in writing, software | +| distributed under the License is distributed on an "AS IS" BASIS, | +| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | +| See the License for the specific language governing permissions and | +| limitations under the License. | ++--------------------------------------------------------------------------*/ +package org.fortiss.af3.platform.raspberry.generator.transform.rumblepad; + +import org.fortiss.af3.platform.raspberry.generator.executable.rumblepad.L2PositionExecutable; +import org.fortiss.af3.platform.raspberry.model.rumblepad.L2_Position; +import org.fortiss.tooling.kernel.extension.ITransformationProvider; +import org.fortiss.tooling.kernel.extension.data.ITransformationContext; + +/** + * Transformation for {@link L2_Position}. + * + * @author eder + * @author $Author$ + * @version $Rev$ + * @ConQAT.Rating RED Hash: + */ +public class L2PositionTransformation implements ITransformationProvider { + + /** {@inheritDoc} */ + @Override + public Class<?> getTargetClass() { + return L2PositionExecutable.class; + } + + /** {@inheritDoc} */ + @Override + public boolean + canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { + return L2_Position.class.isAssignableFrom(sourceClass); + } + + /** {@inheritDoc} */ + @Override + public boolean canTransform(Object source, ITransformationContext context) { + return source instanceof L2_Position; + } + + /** {@inheritDoc} */ + @Override + public Object transform(Object source, ITransformationContext context) { + return new L2PositionExecutable((L2_Position)source); + } + +} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/rumblepad/Left_StickXTransformation.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/rumblepad/Left_StickXTransformation.java new file mode 100644 index 0000000000000000000000000000000000000000..83624286601214017e406538fdb5b251df61d31d --- /dev/null +++ b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/rumblepad/Left_StickXTransformation.java @@ -0,0 +1,60 @@ +/*--------------------------------------------------------------------------+ +$Id$ +| | +| Copyright 2017 fortiss GmbH | +| | +| Licensed under the Apache License, Version 2.0 (the "License"); | +| you may not use this file except in compliance with the License. | +| You may obtain a copy of the License at | +| | +| http://www.apache.org/licenses/LICENSE-2.0 | +| | +| Unless required by applicable law or agreed to in writing, software | +| distributed under the License is distributed on an "AS IS" BASIS, | +| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | +| See the License for the specific language governing permissions and | +| limitations under the License. | ++--------------------------------------------------------------------------*/ +package org.fortiss.af3.platform.raspberry.generator.transform.rumblepad; + +import org.fortiss.af3.platform.raspberry.generator.executable.rumblepad.Left_StickXExecutable; +import org.fortiss.af3.platform.raspberry.model.rumblepad.Left_StickX_Position; +import org.fortiss.tooling.kernel.extension.ITransformationProvider; +import org.fortiss.tooling.kernel.extension.data.ITransformationContext; + +/** + * Transformation for {@link Left_StickX_Position}. + * + * @author eder + * @author $Author$ + * @version $Rev$ + * @ConQAT.Rating RED Hash: + */ +public class Left_StickXTransformation implements ITransformationProvider { + + /** {@inheritDoc} */ + @Override + public Class<?> getTargetClass() { + return Left_StickXExecutable.class; + } + + /** {@inheritDoc} */ + @Override + public boolean + canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { + return Left_StickX_Position.class.isAssignableFrom(sourceClass); + } + + /** {@inheritDoc} */ + @Override + public boolean canTransform(Object source, ITransformationContext context) { + return source instanceof Left_StickX_Position; + } + + /** {@inheritDoc} */ + @Override + public Object transform(Object source, ITransformationContext context) { + return new Left_StickXExecutable((Left_StickX_Position)source); + } + +} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/rumblepad/Left_StickYTransformation.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/rumblepad/Left_StickYTransformation.java new file mode 100644 index 0000000000000000000000000000000000000000..d06504c9b44e7d85f3ea5f6bfbe2e1a5d12cf6bc --- /dev/null +++ b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/rumblepad/Left_StickYTransformation.java @@ -0,0 +1,60 @@ +/*--------------------------------------------------------------------------+ +$Id$ +| | +| Copyright 2017 fortiss GmbH | +| | +| Licensed under the Apache License, Version 2.0 (the "License"); | +| you may not use this file except in compliance with the License. | +| You may obtain a copy of the License at | +| | +| http://www.apache.org/licenses/LICENSE-2.0 | +| | +| Unless required by applicable law or agreed to in writing, software | +| distributed under the License is distributed on an "AS IS" BASIS, | +| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | +| See the License for the specific language governing permissions and | +| limitations under the License. | ++--------------------------------------------------------------------------*/ +package org.fortiss.af3.platform.raspberry.generator.transform.rumblepad; + +import org.fortiss.af3.platform.raspberry.generator.executable.rumblepad.Left_StickYExecutable; +import org.fortiss.af3.platform.raspberry.model.rumblepad.Left_StickY_Position; +import org.fortiss.tooling.kernel.extension.ITransformationProvider; +import org.fortiss.tooling.kernel.extension.data.ITransformationContext; + +/** + * Transformation for {@link Left_StickY_Position}. + * + * @author eder + * @author $Author$ + * @version $Rev$ + * @ConQAT.Rating RED Hash: + */ +public class Left_StickYTransformation implements ITransformationProvider { + + /** {@inheritDoc} */ + @Override + public Class<?> getTargetClass() { + return Left_StickYExecutable.class; + } + + /** {@inheritDoc} */ + @Override + public boolean + canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { + return Left_StickY_Position.class.isAssignableFrom(sourceClass); + } + + /** {@inheritDoc} */ + @Override + public boolean canTransform(Object source, ITransformationContext context) { + return source instanceof Left_StickY_Position; + } + + /** {@inheritDoc} */ + @Override + public Object transform(Object source, ITransformationContext context) { + return new Left_StickYExecutable((Left_StickY_Position)source); + } + +} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/rumblepad/R2PositionTransformation.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/rumblepad/R2PositionTransformation.java new file mode 100644 index 0000000000000000000000000000000000000000..4c3938fdc0b4d9b37652eb07f6d5adb853986294 --- /dev/null +++ b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/rumblepad/R2PositionTransformation.java @@ -0,0 +1,60 @@ +/*--------------------------------------------------------------------------+ +$Id$ +| | +| Copyright 2017 fortiss GmbH | +| | +| Licensed under the Apache License, Version 2.0 (the "License"); | +| you may not use this file except in compliance with the License. | +| You may obtain a copy of the License at | +| | +| http://www.apache.org/licenses/LICENSE-2.0 | +| | +| Unless required by applicable law or agreed to in writing, software | +| distributed under the License is distributed on an "AS IS" BASIS, | +| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | +| See the License for the specific language governing permissions and | +| limitations under the License. | ++--------------------------------------------------------------------------*/ +package org.fortiss.af3.platform.raspberry.generator.transform.rumblepad; + +import org.fortiss.af3.platform.raspberry.generator.executable.rumblepad.R2PositionExecutable; +import org.fortiss.af3.platform.raspberry.model.rumblepad.R2_Position; +import org.fortiss.tooling.kernel.extension.ITransformationProvider; +import org.fortiss.tooling.kernel.extension.data.ITransformationContext; + +/** + * Transformation for {@link R2_Position}. + * + * @author eder + * @author $Author$ + * @version $Rev$ + * @ConQAT.Rating RED Hash: + */ +public class R2PositionTransformation implements ITransformationProvider { + + /** {@inheritDoc} */ + @Override + public Class<?> getTargetClass() { + return R2PositionExecutable.class; + } + + /** {@inheritDoc} */ + @Override + public boolean + canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { + return R2_Position.class.isAssignableFrom(sourceClass); + } + + /** {@inheritDoc} */ + @Override + public boolean canTransform(Object source, ITransformationContext context) { + return source instanceof R2_Position; + } + + /** {@inheritDoc} */ + @Override + public Object transform(Object source, ITransformationContext context) { + return new R2PositionExecutable((R2_Position)source); + } + +} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/rumblepad/Right_StickXTransformation.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/rumblepad/Right_StickXTransformation.java new file mode 100644 index 0000000000000000000000000000000000000000..8145090a2538266675959e1d31e228d7a74521c6 --- /dev/null +++ b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/rumblepad/Right_StickXTransformation.java @@ -0,0 +1,60 @@ +/*--------------------------------------------------------------------------+ +$Id$ +| | +| Copyright 2017 fortiss GmbH | +| | +| Licensed under the Apache License, Version 2.0 (the "License"); | +| you may not use this file except in compliance with the License. | +| You may obtain a copy of the License at | +| | +| http://www.apache.org/licenses/LICENSE-2.0 | +| | +| Unless required by applicable law or agreed to in writing, software | +| distributed under the License is distributed on an "AS IS" BASIS, | +| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | +| See the License for the specific language governing permissions and | +| limitations under the License. | ++--------------------------------------------------------------------------*/ +package org.fortiss.af3.platform.raspberry.generator.transform.rumblepad; + +import org.fortiss.af3.platform.raspberry.generator.executable.rumblepad.Right_StickXExecutable; +import org.fortiss.af3.platform.raspberry.model.rumblepad.Right_StickX_Position; +import org.fortiss.tooling.kernel.extension.ITransformationProvider; +import org.fortiss.tooling.kernel.extension.data.ITransformationContext; + +/** + * Transformation for {@link Right_StickX_Position}. + * + * @author eder + * @author $Author$ + * @version $Rev$ + * @ConQAT.Rating RED Hash: + */ +public class Right_StickXTransformation implements ITransformationProvider { + + /** {@inheritDoc} */ + @Override + public Class<?> getTargetClass() { + return Right_StickXExecutable.class; + } + + /** {@inheritDoc} */ + @Override + public boolean + canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { + return Right_StickX_Position.class.isAssignableFrom(sourceClass); + } + + /** {@inheritDoc} */ + @Override + public boolean canTransform(Object source, ITransformationContext context) { + return source instanceof Right_StickX_Position; + } + + /** {@inheritDoc} */ + @Override + public Object transform(Object source, ITransformationContext context) { + return new Right_StickXExecutable((Right_StickX_Position)source); + } + +} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/rumblepad/Right_StickYTransformation.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/rumblepad/Right_StickYTransformation.java new file mode 100644 index 0000000000000000000000000000000000000000..e728e304b275556c7f4986dd50dd6847393e7de4 --- /dev/null +++ b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/transform/rumblepad/Right_StickYTransformation.java @@ -0,0 +1,60 @@ +/*--------------------------------------------------------------------------+ +$Id$ +| | +| Copyright 2017 fortiss GmbH | +| | +| Licensed under the Apache License, Version 2.0 (the "License"); | +| you may not use this file except in compliance with the License. | +| You may obtain a copy of the License at | +| | +| http://www.apache.org/licenses/LICENSE-2.0 | +| | +| Unless required by applicable law or agreed to in writing, software | +| distributed under the License is distributed on an "AS IS" BASIS, | +| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | +| See the License for the specific language governing permissions and | +| limitations under the License. | ++--------------------------------------------------------------------------*/ +package org.fortiss.af3.platform.raspberry.generator.transform.rumblepad; + +import org.fortiss.af3.platform.raspberry.generator.executable.rumblepad.Right_StickYExecutable; +import org.fortiss.af3.platform.raspberry.model.rumblepad.Right_StickY_Position; +import org.fortiss.tooling.kernel.extension.ITransformationProvider; +import org.fortiss.tooling.kernel.extension.data.ITransformationContext; + +/** + * Transformation for {@link Right_StickY_Position}. + * + * @author eder + * @author $Author$ + * @version $Rev$ + * @ConQAT.Rating RED Hash: + */ +public class Right_StickYTransformation implements ITransformationProvider { + + /** {@inheritDoc} */ + @Override + public Class<?> getTargetClass() { + return Right_StickYExecutable.class; + } + + /** {@inheritDoc} */ + @Override + public boolean + canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) { + return Right_StickY_Position.class.isAssignableFrom(sourceClass); + } + + /** {@inheritDoc} */ + @Override + public boolean canTransform(Object source, ITransformationContext context) { + return source instanceof Right_StickY_Position; + } + + /** {@inheritDoc} */ + @Override + public Object transform(Object source, ITransformationContext context) { + return new Right_StickYExecutable((Right_StickY_Position)source); + } + +}