Envoyé par
guizzmo
Il existe bien une Classe PackageFragment. J'ai regardé dans la classe et il est indiqué d'utiliser la classe IPackageFragment.
Aircraft n'a pas tort, pourquoi utilise tu "iPackage" alors que dans ton code tu a instancié "packageF". De plus, il y a un truc qui me parait bizarre : d'après la doc getPackageFragmentRoot nécessite un chemin vers le Jar (ou une IResource) :
1 2 3 4
| getPackageFragmentRoot(IResource resource)
Returns a package fragment root for the given resource, which must either be a folder representing the top of a package hierarchy, or a .jar or .zip file.
getPackageFragmentRoot(String jarPath)
Returns a package fragment root for the JAR at the specified file system path. |
, quand je vois ton code j'ai l'impression que tu lui fourni le nom de ton projet.
packageFR = project.getPackageFragmentRoot(Utils.getProjectName(newTypeWizradPage));
.
[EDIT] on s'est croisé avec le résolu, trop lent le Taz
Partager