element = element.getParent();
}
// Once we have a package to process
if(element != null) {
// We will be able to build a model
ClassDiagramBuilder builder =
new ClassDiagramBuilder(
lastSourceWorkbenchWindow,
lastSourceViewId
);
// We can start building the model using a sub-progress monitor
model =
builder.buildModelHandler(
element,
new SubProgressMonitor(monitor, 7)
);
// We get the package location to have the absolute URL
IPath res = element.getResource().getLocation();
String path = res.toOSString();
// We save documents from the processed elements to the package
// URL
builder.save(
path,
builder.getCoffeeName(),
new SubProgressMonitor(monitor, 3)
);
lastSourceWorkbenchWindow = null;
}
}