Example: Provide custom/extended tasks for the workflow


  • EolExtTask.java
  • plugin.xml
  • Get it!
/*******************************************************************************
 * Copyright (c) 2008 The University of York.
 * 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:
 *     Dimitrios Kolovos - initial API and implementation
******************************************************************************/

package org.eclipse.epsilon.workflow.extension.example.tasks;

import org.eclipse.epsilon.workflow.tasks.EolTask; 
 
public class EolExtTask extends EolTask{
  
  @Override
  protected void initialize() {
    System.err.println("Extending initialize()");
    super.initialize();
  }
  
  @Override
  protected void examine() throws Exception {
    super.examine();
    System.err.println("Extending examine()");
  }
} 
 
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.2"?>
<plugin>
   <extension
         point="org.eclipse.ant.core.antTasks">
      <antTask
            class="org.eclipse.epsilon.workflow.extension.example.tasks.EolExtTask"
            library="lib/org.eclipse.epsilon.workflow.extension.example.jar"
            name="epsilon.eol.ext">
      </antTask>
   </extension>
   <extension
         point="org.eclipse.ant.core.extraClasspathEntries">
      <extraClasspathEntry
            library="lib/org.eclipse.epsilon.workflow.extension.example.jar">
      </extraClasspathEntry>
   </extension>

</plugin>
						

There are two ways to get the code of this example:

  1. download the following zip archive(s), extract them and import them as new Eclipse projects
  2. or check out the code from the SVN
    • go to the SVN repository
    • navigate to trunk/examples
    • check out the org.eclipse.epsilon.workflow.extension.example project