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,
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,
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;
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;
}
// 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()) {
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;
* 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
*/
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()});
}
}
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
\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
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
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
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
}\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