label.loading_file = Loading File: {0}
label.edit_params = Edit {0}
label.as_percentage = As Percentage
+error.database_id_has_letters = Database identifier ({0}) should contain only digits
+error.phyloxml_validation = phyloXML XSD-based validation is turned off (enable with line 'validate_against_phyloxml_xsd_schem: true' in configuration file)
error.not_implemented = Not implemented
error.no_such_method_as_clone1_for = No such method as clone1 for {0}
error.null_from_clone1 = Null from clone1!
package jalview.ext.archaeopteryx;
+import jalview.analysis.AlignmentSorter;
import jalview.analysis.Conservation;
import jalview.api.AlignViewportI;
import jalview.commands.CommandI;
+import jalview.commands.OrderCommand;
import jalview.datamodel.ColumnSelection;
import jalview.datamodel.HiddenColumns;
import jalview.datamodel.SequenceGroup;
public CommandI sortAlignmentIn(AlignmentPanel ap)
{
- // // TODO: move to alignment view controller
- // AlignmentViewport viewport = ap.av;
- // SequenceI[] oldOrder = viewport.getAlignment().getSequencesArray();
- // AlignmentSorter.sortByTree(viewport.getAlignment(), tree);
- // CommandI undo;
- // undo = new OrderCommand("Tree Sort", oldOrder, viewport.getAlignment());
- //
- // ap.paintAlignment(true, false);
- // return undo;
- return null;
+ // TODO: move to alignment view controller
+ AlignmentViewport viewport = ap.av;
+ SequenceI[] oldOrder = viewport.getAlignment().getSequencesArray();
+ AlignmentSorter.sortByTree(viewport.getAlignment(),
+ treeView.getPhylogeny());
+ CommandI undo;
+ undo = new OrderCommand("Tree Sort", oldOrder, viewport.getAlignment());
+
+ ap.paintAlignment(true, false);
+ return undo;
}