[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[List Home]
|
[jdt-core-dev] Execute JUnitLaunchShortcut with several Class Tests
|
- From: Josà Carlos de Campos <zecapistolas@xxxxxxxxxxxxxx>
- Date: Fri, 11 Nov 2011 20:02:56 +0000
- Delivered-to: jdt-core-dev@eclipse.org
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=935TRx3shq/t8Sx65Y+wp8svRENJ5dPoqGzM2kHu7JE=; b=lnoAUoxeVtjkyXZT+zLZz+m6xMzpRD+UFeLhqWH4fgd85MkZb/Hpr9HUp3HoA1inTu iynSHTemDib/nQINOpsyaiWjs7MI0rQLI6IEMFDcGEKVcbxXpnwqrifPUvmDtmxiq96c dZUFqMGsgHA+1H0DE0ypsGCnOuczyFR+NtHN8=
Hi,
I create a JUnitLaunchShortcut and send a JAVA_PROJECT the
JUnitLaunchShortcut execute all Test present in project.
JUnitLaunchShortcut j = new JUnitLaunchShortcut();
j.launch(new StructuredSelection(/* the IJavaProject */),
ILaunchManager.RUN_MODE);
If I send a PACKAGE_FRAGMENT the JUnitLaunchShortcut execute only the
Tests in present in package.
j.launch(new StructuredSelection(/* the IPackageFragment */),
ILaunchManager.RUN_MODE);
But if I send a set of COMPILATION_UNIT (this is what I want)
JUnitLaunchShortcut only execute the last Class of set...
j.launch(new StructuredSelection(/* Set of ICompilationUnit */),
ILaunchManager.RUN_MODE);
I check the original JUnitLaunchShortcut source code and found that
method launch, cast the /* Set of ICompilationUnit */ above to a
IStructuredSelection, so the Set of ICompilationUnit is transform is
one element, the last element of Set. :-(
This is a bug or a functionality?!
I need to execute JUnitLaunchShortcut with several ICompilationUnits
from several packages in the same Project, how can I do this?
--
Thanks in advance,
ZÃ Carlos