cancel = true;
return true;
}
public Project readAll(XMLStreamReader reader, Project project) throws Exception {
ProjectInformationImpl info = project.getLookup().lookup(ProjectInformationImpl.class);
WorkspaceProviderImpl workspaces = project.getLookup().lookup(WorkspaceProviderImpl.class);
this.project = (ProjectImpl) project;
boolean end = false;
while (reader.hasNext() && !end) {
Integer eventType = reader.next();
if (eventType.equals(XMLEvent.START_ELEMENT)) {
String name = reader.getLocalName();
if ("gephiFile".equalsIgnoreCase(name)) {
//Version
String version = reader.getAttributeValue(null, "version");
if (version == null || version.isEmpty() || Double.parseDouble(version) < 0.7) {
throw new GephiFormatException("Gephi project file version must be at least 0.7");
}
} else if ("project".equalsIgnoreCase(name)) {
info.setName(reader.getAttributeValue(null, "name"));
} else if ("workspace".equalsIgnoreCase(name)) {
Workspace workspace = readWorkspace(reader);
//Current workspace
if (workspace.getLookup().lookup(WorkspaceInformationImpl.class).isOpen()) {