Bonjour,
J'ai déclaré:
j'utilisais ce type dans la séquence:Code:final IProject project;
dans cette séquence project reste null, j'ai donc rajoutéCode:
1
2
3 project = ProjectsManager.getInstance().getActiveProject(); chain = project.getChains().get(0); chain.setName( fileName);
mais ça ne compile pas, le compilateur me dit :Code:project = new IProject();
si j'essaie de forcer la variable en staticCitation:
Multiple markers at this line
- Cannot instantiate the type IProject
- Cannot make a static reference to the non-
static field projectc
je récupère plus de remarques du compilateur:Code:static project = new IProject();
Quelqu'un saurait-il m'indiquer comment résoudre ce problème ?Citation:
Multiple markers at this line
- Illegal modifier for the variable $missing$; only
final is permitted
- Cannot instantiate the type IProject
- project cannot be resolved to a type
- Cannot make a static reference to the non-
static field project
- Syntax error on token "project",
VariableDeclaratorId expected after this token
Merci d'avance pour votre aide.