for (int i=0 ; i<fields.length ; i++) {
// We add a tool to the list
addPropertyService(new PropertyService(fields[i], this));
// And a dependency
dependenciesServices.add(
new CompositionService(fields[i], this)
);
}
// If this class has a super class,
if(syntaxTreeNode.getSuperclassType()!=null) {
// We resolve this super class
ITypeBinding binding =
syntaxTreeNode.getSuperclassType().resolveBinding();
// And try to get its name
if(binding!=null) {
superClassName = binding.getQualifiedName();
int smtIdx = superClassName.indexOf('<');
if(smtIdx>=0) {
superClassName =
superClassName.substring(0, smtIdx);
}
}
}
}
else if(javaElement!=null) {
// We get all the fields
try {
IField[] fields = javaElement.getFields();
// For each field of the class,
for (int i=0 ; i<fields.length ; i++) {
// We add a tool to the list
addPropertyService(
new PropertyService(fields[i], this)
);
// And a dependency
dependenciesServices.add(
new CompositionService(fields[i], this)
);
}
// If this class has a super class,
if(javaElement.getSuperclassName()!=null) {
// The we note its name