use of org.talend.core.model.properties.Information in project tdi-studio-se by Talend.
the class Problems method addRoutineFile.
public static List<Information> addRoutineFile(IFile file, final Property property, boolean... fromJob) {
if (file == null) {
return Collections.emptyList();
}
String routineFileName = null;
String version = null;
if (property == null) {
routineFileName = getFileName(file);
} else {
routineFileName = property.getLabel();
version = property.getVersion();
}
ProblemType type = ProblemType.NONE;
if (property.getItem() instanceof RoutineItem) {
type = ProblemType.ROUTINE;
} else if (property.getItem() instanceof ProcessItem) {
type = ProblemType.JOB;
}
List<Information> listInfos = addRoutineFile(file, type, routineFileName, version, fromJob);
if (property == null || listInfos == null) {
return Collections.emptyList();
}
return listInfos;
}
Aggregations