Skip to content

Commit

Permalink
Merge branch 0.9.1
Browse files Browse the repository at this point in the history
  • Loading branch information
eduramiba committed Apr 1, 2016
2 parents 42c003e + 89d04c1 commit 5ae5ae3
Show file tree
Hide file tree
Showing 4 changed files with 112 additions and 78 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ Development and Distribution License("CDDL") (collectively, the
import java.io.IOException;
import java.io.LineNumberReader;
import java.io.Reader;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
Expand Down Expand Up @@ -126,7 +127,9 @@ private void importData(LineNumberReader reader) throws Exception {

int size = lines.size();
if (size != labels.size()) {
throw new Exception("Inconsistent number of matrix lines compared to the number of labels.");
throw new Exception(
MessageFormat.format("Inconsistent number of matrix lines compared to the number of labels. {0} lines, {1} labels", size, labels.size())
);
}

for (int i = 0; i < size; i++) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ Development and Distribution License("CDDL") (collectively, the
import javax.xml.stream.XMLStreamWriter;
import javax.xml.stream.events.XMLEvent;
import org.gephi.graph.api.GraphController;
import org.gephi.graph.api.GraphModel;
import org.gephi.layout.api.LayoutModel;
import org.gephi.layout.spi.Layout;
import org.gephi.layout.spi.LayoutBuilder;
Expand All @@ -79,7 +80,7 @@ public class LayoutModelImpl implements LayoutModel {
private final Map<LayoutPropertyKey, Object> savedProperties;
private Layout selectedLayout;
private LayoutBuilder selectedBuilder;
private Workspace workspace;
private final Workspace workspace;
//Util
private final LongTaskExecutor executor;

Expand Down Expand Up @@ -116,6 +117,9 @@ public LayoutBuilder getSelectedBuilder() {
@Override
public Layout getLayout(LayoutBuilder layoutBuilder) {
Layout layout = layoutBuilder.buildLayout();
GraphController graphController = Lookup.getDefault().lookup(GraphController.class);
GraphModel graphModel = graphController.getGraphModel(workspace);
layout.setGraphModel(graphModel);
selectedBuilder = layoutBuilder;
layout.resetPropertiesValues();
return layout;
Expand Down
Loading

0 comments on commit 5ae5ae3

Please sign in to comment.