.getContainingPackage();
eu.admire.dispel.containers.DispelFunction fnc = call
.getContainingMethod();
LocalVariable var = getContainedLocalVariable(call);
if ((call.getTypeReference() instanceof DispelTypeReference)
&& var != null) {
DispelTypeReference ref = (DispelTypeReference) call
.getTypeReference();
if (!(ref.getTarget() instanceof ProcessingElementDefinition)) {
resource.addProblem(new IDispelProblem() {
public DispelEProblemType getType() {
return DispelEProblemType.ANALYSIS_PROBLEM;
}
public String getMessage() {
return "Only Processing Element can be instantiated";
}
public Collection<IDispelQuickFix> getQuickFixes() {
return null;
}
public DispelEProblemSeverity getSeverity() {
return DispelEProblemSeverity.ERROR;
}
}, call);
}
if (ref != null
&& ref.getTarget() instanceof ProcessingElementDefinition) {
ProcessingElementDefinition pe = (ProcessingElementDefinition) ref
.getTarget();
if (pe != null && !pe.eIsProxy()) {
ProcessingElementInstance instance = pe
.createInstance();
var.setValue(instance);
if (!instance.getNamespaces().isEmpty()) {
if (fnc != null)
fnc.getProcessingElementInstances().add(