no more hardcoding of project path
diff --git a/modeling/plugins/org.eclipse.pde.ds.builder/src/org/eclipse/pde/ds/builder/internal/validation/constraints/ComponentImplementationTypeIsOnClasspath.java b/modeling/plugins/org.eclipse.pde.ds.builder/src/org/eclipse/pde/ds/builder/internal/validation/constraints/ComponentImplementationTypeIsOnClasspath.java
index 65e0ecf..1822514 100644
--- a/modeling/plugins/org.eclipse.pde.ds.builder/src/org/eclipse/pde/ds/builder/internal/validation/constraints/ComponentImplementationTypeIsOnClasspath.java
+++ b/modeling/plugins/org.eclipse.pde.ds.builder/src/org/eclipse/pde/ds/builder/internal/validation/constraints/ComponentImplementationTypeIsOnClasspath.java
@@ -8,16 +8,16 @@
  * Contributors:
  *     Anyware Technologies - initial API and implementation
  *
- * $Id: ComponentImplementationTypeIsOnClasspath.java,v 1.2 2009/07/02 09:34:02 bcabe Exp $
+ * $Id: ComponentImplementationTypeIsOnClasspath.java,v 1.3 2009/07/02 21:54:54 bcabe Exp $
  */
 package org.eclipse.pde.ds.builder.internal.validation.constraints;
 
-import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.emf.validation.AbstractModelConstraint;
 import org.eclipse.emf.validation.IValidationContext;
 import org.eclipse.emf.validation.model.ConstraintStatus;
 import org.eclipse.jdt.core.*;
+import org.eclipse.pde.ds.builder.internal.validation.EMFHelper;
 import org.eclipse.pde.ds.builder.internal.validation.EnhancedConstraintStatus;
 import org.eclipse.pde.ds.scr.Implementation;
 import org.eclipse.pde.ds.scr.ScrPackage;
@@ -31,8 +31,8 @@
 	@Override
 	public IStatus validate(IValidationContext ctx) {
 		Implementation impl = (Implementation) ctx.getTarget();
-		IJavaProject project = JavaCore.create(ResourcesPlugin.getWorkspace()
-				.getRoot().getProject("/a"));
+		IJavaProject project = JavaCore.create(EMFHelper.getIProject(impl
+				.eResource()));
 		IType type;
 		try {
 			type = project.findType(impl.getClass_());
diff --git a/modeling/plugins/org.eclipse.pde.ds.builder/src/org/eclipse/pde/ds/builder/internal/validation/constraints/ComponentMethodsAreValidAndAccessible.java b/modeling/plugins/org.eclipse.pde.ds.builder/src/org/eclipse/pde/ds/builder/internal/validation/constraints/ComponentMethodsAreValidAndAccessible.java
index 13d9025..88108f9 100644
--- a/modeling/plugins/org.eclipse.pde.ds.builder/src/org/eclipse/pde/ds/builder/internal/validation/constraints/ComponentMethodsAreValidAndAccessible.java
+++ b/modeling/plugins/org.eclipse.pde.ds.builder/src/org/eclipse/pde/ds/builder/internal/validation/constraints/ComponentMethodsAreValidAndAccessible.java
@@ -8,18 +8,18 @@
  * Contributors:
  *     Anyware Technologies - initial API and implementation
  *
- * $Id: OverviewPage.java,v 1.9 2009/06/02 10:48:05 bcabe Exp $
+ * $Id: ComponentMethodsAreValidAndAccessible.java,v 1.2 2009/07/02 09:34:02 bcabe Exp $
  */
 package org.eclipse.pde.ds.builder.internal.validation.constraints;
 
 import java.util.*;
-import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.emf.ecore.EStructuralFeature;
 import org.eclipse.emf.validation.AbstractModelConstraint;
 import org.eclipse.emf.validation.IValidationContext;
 import org.eclipse.emf.validation.model.ConstraintStatus;
 import org.eclipse.jdt.core.*;
+import org.eclipse.pde.ds.builder.internal.validation.EMFHelper;
 import org.eclipse.pde.ds.builder.internal.validation.EnhancedConstraintStatus;
 import org.eclipse.pde.ds.scr.Component;
 import org.eclipse.pde.ds.scr.ScrPackage;
@@ -42,9 +42,8 @@
 	@Override
 	public IStatus validate(IValidationContext ctx) {
 		Component comp = (Component) ctx.getTarget();
-		IJavaProject project = JavaCore.create(ResourcesPlugin.getWorkspace()
-				.getRoot().getProject("/a")); // TODO retrieve the actual
-		// project ;)
+		IJavaProject project = JavaCore.create(EMFHelper.getIProject(comp
+				.eResource()));
 
 		List<IStatus> statuses = new ArrayList<IStatus>();