Fix dependencies and model update
authorPatrick Plitzner <p.plitzner@bgbm.org>
Wed, 27 Apr 2016 09:38:32 +0000 (11:38 +0200)
committerPatrick Plitzner <p.plitzner@bgbm.org>
Wed, 27 Apr 2016 09:38:32 +0000 (11:38 +0200)
eu.etaxonomy.taxeditor.molecular.lib/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/editor/AlignmentEditor.java
eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/AlignmentEditorCopyHandler.java
eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/AlignmentEditorPasteHandler.java

index e6c64f01682fa6d4900413d0f37a52de5acf256d..6da060181b155ef65bd2a9dedeabb2f8342dd765 100644 (file)
@@ -44,6 +44,7 @@ Export-Package: info.bioinfweb.commons,
  info.bioinfweb.libralign.dataarea.implementations,
  info.bioinfweb.libralign.dataarea.implementations.charset,
  info.bioinfweb.libralign.dataarea.implementations.pherogram,
+ info.bioinfweb.libralign.dataarea.implementations.sequenceindex,
  info.bioinfweb.libralign.editsettings,
  info.bioinfweb.libralign.model,
  info.bioinfweb.libralign.model.adapters,
@@ -54,13 +55,14 @@ Export-Package: info.bioinfweb.commons,
  info.bioinfweb.libralign.model.factory,
  info.bioinfweb.libralign.model.factory.continuous,
  info.bioinfweb.libralign.model.implementations,
+ info.bioinfweb.libralign.model.implementations.decorate,
  info.bioinfweb.libralign.model.implementations.swingundo,
  info.bioinfweb.libralign.model.implementations.swingundo.edits,
  info.bioinfweb.libralign.model.implementations.swingundo.edits.sequence,
  info.bioinfweb.libralign.model.implementations.swingundo.edits.token,
- info.bioinfweb.libralign.model.implementations.translation,
  info.bioinfweb.libralign.model.tokenset,
  info.bioinfweb.libralign.model.tokenset.continuous,
+ info.bioinfweb.libralign.model.utils,
  info.bioinfweb.libralign.multiplealignments,
  info.bioinfweb.libralign.pherogram,
  info.bioinfweb.libralign.pherogram.distortion,
index 57608d5d8c04625d32347ba0502d6e59f8d5f471..90b98375553efb432e3050ef541784546a5b1426 100644 (file)
@@ -15,13 +15,12 @@ import info.bioinfweb.libralign.alignmentarea.AlignmentArea;
 import info.bioinfweb.libralign.alignmentarea.selection.SelectionModel;
 import info.bioinfweb.libralign.alignmentarea.tokenpainter.NucleotideTokenPainter;
 import info.bioinfweb.libralign.dataarea.implementations.ConsensusSequenceArea;
-import info.bioinfweb.libralign.dataarea.implementations.SequenceIndexArea;
 import info.bioinfweb.libralign.dataarea.implementations.pherogram.PherogramArea;
+import info.bioinfweb.libralign.dataarea.implementations.sequenceindex.SequenceIndexArea;
 import info.bioinfweb.libralign.editsettings.EditSettingsChangeEvent;
 import info.bioinfweb.libralign.editsettings.EditSettingsListener;
 import info.bioinfweb.libralign.model.AlignmentModel;
 import info.bioinfweb.libralign.model.AlignmentModelChangeListener;
-import info.bioinfweb.libralign.model.AlignmentModelUtils;
 import info.bioinfweb.libralign.model.adapters.StringAdapter;
 import info.bioinfweb.libralign.model.events.SequenceChangeEvent;
 import info.bioinfweb.libralign.model.events.SequenceRenamedEvent;
@@ -29,6 +28,7 @@ import info.bioinfweb.libralign.model.events.TokenChangeEvent;
 import info.bioinfweb.libralign.model.implementations.PackedAlignmentModel;
 import info.bioinfweb.libralign.model.tokenset.CharacterTokenSet;
 import info.bioinfweb.libralign.model.tokenset.TokenSet;
+import info.bioinfweb.libralign.model.utils.AlignmentModelUtils;
 import info.bioinfweb.libralign.multiplealignments.AlignmentAreaList;
 import info.bioinfweb.libralign.multiplealignments.MultipleAlignmentsContainer;
 import info.bioinfweb.libralign.pherogram.model.PherogramAreaModel;
@@ -437,7 +437,7 @@ public class AlignmentEditor extends EditorPart {
                }
 
                // Write single reads:
-               stringProvider.setUnderlyingProvider(getReadsArea().getAlignmentModel());
+               stringProvider.setUnderlyingModel(getReadsArea().getAlignmentModel());
                sequenceNode.getSingleReadAlignments().retainAll(cdmMap.values());  // Remove all reads that are not in the alignment anymore.
                Iterator<Integer> iterator = getReadsArea().getAlignmentModel().sequenceIDIterator();
                while (iterator.hasNext()) {
index 381cf3536caee1cbd0ae9b8176629c96866b225a..95418e5b2d6e061fae3bbf29f0923eab6d27f20f 100644 (file)
@@ -1,11 +1,11 @@
 package eu.etaxonomy.taxeditor.molecular.handler;
 
 
-import java.util.Map;
-
 import info.bioinfweb.libralign.alignmentarea.AlignmentArea;
 import info.bioinfweb.libralign.alignmentarea.selection.SelectionModel;
-import info.bioinfweb.libralign.model.AlignmentModelUtils;
+import info.bioinfweb.libralign.model.utils.AlignmentModelUtils;
+
+import java.util.Map;
 
 import org.eclipse.core.commands.ExecutionEvent;
 import org.eclipse.swt.dnd.TextTransfer;
@@ -25,8 +25,8 @@ import eu.etaxonomy.taxeditor.molecular.editor.AlignmentEditor;
  * nothing will be copied, even if nucleotides are currently selected.
  * <p>
  * If the selection contains parts of multiple sequence, these are separated by the line separator
- * of the current operating system.  
- * 
+ * of the current operating system.
+ *
  * @author Ben Stöver
  * @date 25.08.2015
  */
@@ -36,7 +36,7 @@ public class AlignmentEditorCopyHandler extends AbstractFocusedAlignmentAreaHand
        protected void doExecute2(ExecutionEvent event, AlignmentEditor editor, AlignmentArea focusedArea) {
        SelectionModel selection = focusedArea.getSelection();
        if (!selection.isEmpty()) {
-               editor.CLIPBOARD.setContents(new Object[]{AlignmentModelUtils.selectionAsString(focusedArea, false)}, 
+               editor.CLIPBOARD.setContents(new Object[]{AlignmentModelUtils.selectionAsString(focusedArea, false)},
                        new Transfer[]{TextTransfer.getInstance()});
        }
        }
index ca037657c263cad3c1c493b9e643d16fe4de7128..590aab56cda513d4684b25da531f4949cf16aea3 100644 (file)
@@ -1,16 +1,16 @@
 package eu.etaxonomy.taxeditor.molecular.handler;\r
 \r
 \r
-import java.util.ArrayList;\r
-import java.util.List;\r
-import java.util.Map;\r
-import java.util.Scanner;\r
-\r
 import info.bioinfweb.libralign.alignmentarea.AlignmentArea;\r
 import info.bioinfweb.libralign.alignmentarea.order.SequenceOrder;\r
 import info.bioinfweb.libralign.alignmentarea.selection.SelectionModel;\r
 import info.bioinfweb.libralign.model.AlignmentModel;\r
-import info.bioinfweb.libralign.model.AlignmentModelUtils;\r
+import info.bioinfweb.libralign.model.utils.AlignmentModelUtils;\r
+\r
+import java.util.ArrayList;\r
+import java.util.List;\r
+import java.util.Map;\r
+import java.util.Scanner;\r
 \r
 import org.eclipse.core.commands.ExecutionEvent;\r
 import org.eclipse.jface.dialogs.MessageDialog;\r
@@ -25,7 +25,7 @@ import eu.etaxonomy.taxeditor.molecular.editor.AlignmentEditor;
 \r
 /**\r
  * Handler that pastes the current contents of the clipboard into an active instance of {@link AlignmentEditor}.\r
- * \r
+ *\r
  * @author Ben Stöver\r
  * @date 26.08.2015\r
  */\r
@@ -35,12 +35,12 @@ public class AlignmentEditorPasteHandler extends AbstractFocusedAlignmentAreaHan
                area.getActionProvider().elongateSequence(sequenceID, area.getSelection().getCursorColumn());\r
 \r
                AlignmentModel<Object> alignmentModel = (AlignmentModel<Object>)area.getAlignmentModel();\r
-               alignmentModel.insertTokensAt(sequenceID, area.getSelection().getCursorColumn(), \r
+               alignmentModel.insertTokensAt(sequenceID, area.getSelection().getCursorColumn(),\r
                                AlignmentModelUtils.charSequenceToTokenList(content, alignmentModel.getTokenSet(),\r
                                                true, alignmentModel.getTokenSet().getGapToken()));\r
        }\r
-       \r
-       \r
+\r
+\r
        @Override\r
        protected void doExecute2(ExecutionEvent event, AlignmentEditor editor, AlignmentArea focusedArea) {\r
                SelectionModel selection = focusedArea.getSelection();\r
@@ -59,7 +59,7 @@ public class AlignmentEditorPasteHandler extends AbstractFocusedAlignmentAreaHan
                        finally {\r
                                scanner.close();\r
                        }\r
-                       \r
+\r
                        if (!lines.isEmpty()) { //TODO Can lines be empty? (Can an empty string "" be copied to the clipboard?)\r
                                if (selection.getCursorHeight() == 1) {  // If the consensus sequence is focused, this is the only possible case.\r
                                        int sequenceID = focusedArea.getSequenceOrder().idByIndex(selection.getCursorRow());\r
@@ -67,16 +67,16 @@ public class AlignmentEditorPasteHandler extends AbstractFocusedAlignmentAreaHan
                                                pasteString(focusedArea, sequenceID, lines.get(0));\r
                                        }\r
                                        else {\r
-                                               MessageDialog dialog = new MessageDialog(HandlerUtil.getActiveWorkbenchWindow(event).getShell(),  //TODO Can the window be null? \r
+                                               MessageDialog dialog = new MessageDialog(HandlerUtil.getActiveWorkbenchWindow(event).getShell(),  //TODO Can the window be null?\r
                                                                "Pasting multiple lines", null,\r
-                                                               "The text to be pasted contains mutlitple lines (" + lines.size() + \r
-                                                               ") although the current cursor height is one. What do you want to do?", \r
-                                                               MessageDialog.QUESTION, \r
-                                                               new String[]{"Ingnore line breaks and paste as one sequence", \r
-                                                                               "Only paste the first line from the clipboard", "Cancel"}, \r
+                                                               "The text to be pasted contains mutlitple lines (" + lines.size() +\r
+                                                               ") although the current cursor height is one. What do you want to do?",\r
+                                                               MessageDialog.QUESTION,\r
+                                                               new String[]{"Ingnore line breaks and paste as one sequence",\r
+                                                                               "Only paste the first line from the clipboard", "Cancel"},\r
                                                                0);\r
                                                //TODO Does the dialog have to be disposed in some way?\r
-                                               \r
+\r
                                                switch (dialog.open()) {\r
                                                        case 0:  // Paste all lines in one sequence.\r
                                                                pasteString(focusedArea, sequenceID, clipboardText);\r
@@ -96,10 +96,10 @@ public class AlignmentEditorPasteHandler extends AbstractFocusedAlignmentAreaHan
                                        }\r
                                        else {\r
                                                MessageDialog.openError(HandlerUtil.getActiveWorkbenchWindow(event).getShell(),  //TODO Can the window be null?\r
-                                                               "Unable to paste multiple lines", \r
-                                                               "The current cursor height (" + selection.getCursorHeight() + \r
-                                                               ") does not match the number of lines to be pasted (" + lines.size() + ")." + \r
-                                                               System.getProperty("line.separator") + System.getProperty("line.separator") + \r
+                                                               "Unable to paste multiple lines",\r
+                                                               "The current cursor height (" + selection.getCursorHeight() +\r
+                                                               ") does not match the number of lines to be pasted (" + lines.size() + ")." +\r
+                                                               System.getProperty("line.separator") + System.getProperty("line.separator") +\r
                                                                "You can either change the cursor height accordingly or set the cursor height to one "\r
                                                                + "allowing you to paste all lines from the clipboad into one sequence.");\r
                                        }\r