Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Mylyn/Incubator/Generic Industrial Connector/Configuring Industrial Connector using Nothing"

(Step 3: Create a connector.xml)
 
(14 intermediate revisions by the same user not shown)
Line 3: Line 3:
 
==Step 1: Get the Source==
 
==Step 1: Get the Source==
 
Point your favorit SVN client towards
 
Point your favorit SVN client towards
  svn://bugs.industrial-tsi.com/mylyn_gsc/trunk
+
  http://svn.codespot.com/a/eclipselabs.org/industrial-mylyn/trunk/
and get all the projects.
+
and get all the projects. If you want to build the memory connector yourself then close the reference implementation project ''org.eclipse.mylyn.industrial.demo.memory'' to get it out of the way.
  
 
==Step 2: Create a Fragment Project==
 
==Step 2: Create a Fragment Project==
Line 12: Line 12:
 
This is going to be moved to the extension point mechanism in a very near future version. For now, create a connector.xml file in the root of your project with the following contents:
 
This is going to be moved to the extension point mechanism in a very near future version. For now, create a connector.xml file in the root of your project with the following contents:
  
<?xml version="1.0" encoding="UTF-8"?>
+
[[Mylyn/Incubator/Generic SQL Connector/Configuring Industrial Connector using Nothing/connector.xml|Here is the source]]
<!--
+
/*******************************************************************************
+
* Copyright (c) 2008 Industrial TSI and Maarten Meijer.
+
* 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:
+
* Industrial TSI - initial API and implementation
+
*
+
*******************************************************************************/
+
* Author: Ahmed Aadel
+
-->
+
<connector xmlns="ptth://www.industrial-tsi.com/mylyn/connector/connector_1_0.dtd">
+
  
<repository name="Memory">
+
There is already a reference project called ''org.eclipse.mylyn.industrial.demo.memory'' where you can also view the comments in this file.
<persistor name="Memory">
+
  <class>org.eclipse.mylyn.industrial.demo.memory.MemoryPersistor</class>
+
</persistor>
+
<repository-properties>
+
<!-- You can enable some repository functions.
+
You may be willing to configure only what you need and let the rest to their default value, which is false.(means disabled)-->
+
<property name="can-create-new-task" value="true" />
+
<property name="can-create-task-from-key" value="true" />
+
<property name="can-query-repository" value="true" />
+
<property name="can-synchronize-tasks" value="true" />
+
  <property name="can-get-attachments" value="true" />
+
  <property name="can-post-attachments" value="true" />
+
  </repository-properties>
+
  <task>
+
  <!--
+
  You can disable a task attribute shown on the editor by setting its read-only value to true.
+
  You may be willing to configure only what you need and let the rest to their default value, which is false.
+
  -->
+
  <task-attributes>
+
  <!--  <attribute id="task.common.summary" readonly="true" />
+
  <attribute id="task.common.product" readonly="true" />
+
  <attribute id="task.common.status" readonly="true" />
+
  <attribute id="task.common.user.assigned" readonly="true" />
+
  <attribute id="task.common.date.due" readonly="true" />
+
  <attribute id="task.common.date.created" readonly="true" />
+
  <attribute id="task.common.date.modified" readonly="true" />
+
  <attribute id="task.common.priority" readonly="true"/>
+
  <attribute id="task.common.description" readonly="true" />
+
  <attribute id="task.common.reporter" readonly="true" /> -->
+
  </task-attributes>
+
  </task>
+
  </repository>
+
</connector>
+
  
==Step 3: Implement IPersistor ==
+
==Step 4: Implement IPersistor ==
Make an extension to ''org.eclipse.mylyn.industrial.core.persistor'' and open the class that you have typed in there. Now implement the following class:
+
Make an extension to ''org.eclipse.mylyn.industrial.core.persistor'' and open the class that you have typed in there. Make sure the name of this class appears in the config.xml described in step 3.
 +
 
 +
Now implement the class like [[Mylyn/Incubator/Generic SQL Connector/Configuring Industrial Connector using Nothing/persistorsource|we did in this link.]] (You can also copy the source to the clipboard and paste it in the source folder of your project)
 +
 
 +
==Step 5: Give it a Spin ==
 +
Ready?
 +
* Open the Build tab in the fragement and make sure to include connector.xml on the binary build
 +
* Create a run configuration and connect your fragment project and then "Add required projects". Run and when the workspace comes up,
 +
* Open the Mylyn task list and the Mylyn repository views.
 +
* Create a new repository and select "Industrial" --> Next.
 +
[[Image:p1.png]]
 +
* Type "jdbc:memory://helloworld" as the repos, give it a fancy name and select the name you have placed in the connector.xml ("Memory" in our example)
 +
[[Image:p2.png]]
 +
* Press finish
 +
* Press Yes
 +
[[Image:p3.png]]
 +
* Enter some criteria
 +
[[Image:p4.png]]
 +
* Create tasks.

Latest revision as of 16:55, 10 March 2011

This page describes how you can implement a Mylyn connector in 5 minutes using your computers memory as the persistance medium.

Step 1: Get the Source

Point your favorit SVN client towards

http://svn.codespot.com/a/eclipselabs.org/industrial-mylyn/trunk/

and get all the projects. If you want to build the memory connector yourself then close the reference implementation project org.eclipse.mylyn.industrial.demo.memory to get it out of the way.

Step 2: Create a Fragment Project

Create a fragment project for your connector with the org.eclipse.mylyn.industrial.core project as the host.

Step 3: Create a connector.xml

This is going to be moved to the extension point mechanism in a very near future version. For now, create a connector.xml file in the root of your project with the following contents:

Here is the source

There is already a reference project called org.eclipse.mylyn.industrial.demo.memory where you can also view the comments in this file.

Step 4: Implement IPersistor

Make an extension to org.eclipse.mylyn.industrial.core.persistor and open the class that you have typed in there. Make sure the name of this class appears in the config.xml described in step 3.

Now implement the class like we did in this link. (You can also copy the source to the clipboard and paste it in the source folder of your project)

Step 5: Give it a Spin

Ready?

  • Open the Build tab in the fragement and make sure to include connector.xml on the binary build
  • Create a run configuration and connect your fragment project and then "Add required projects". Run and when the workspace comes up,
  • Open the Mylyn task list and the Mylyn repository views.
  • Create a new repository and select "Industrial" --> Next.

P1.png

  • Type "jdbc:memory://helloworld" as the repos, give it a fancy name and select the name you have placed in the connector.xml ("Memory" in our example)

P2.png

  • Press finish
  • Press Yes

P3.png

  • Enter some criteria

P4.png

  • Create tasks.

Back to the top