/* (non-Javadoc) * @see fr.istic.aco.editor.core.MiniEditorEngine#editorCopy() */ @Override public void editorCopy() { if (selection.getStart() == 0 && selection.getStop() == 0) { System.out.println("<<<<ALERT : No Range selected to do copy operation>>>>"); } else { clipboard.setLine(buffer.read(selection.getStart(), selection.getStop())); System.out.println("DEBUG: Copy Operation done : Now we have " + clipboard.getLine()); } }
/* (non-Javadoc) * @see fr.istic.aco.editor.core.MiniEditorEngine#editorCut() */ @Override public void editorCut() { /*if(selection.getStart()==0 && selection.getStop()==0) { System.out.println("<<<<ALERT : No Range selected to do cut operation>>>>"); } else {*/ clipboard.setLine(buffer.read(selection.getStart(), selection.getStop())); buffer.write(selection.getStart(), selection.getStop(), ""); System.out.println("DEBUG: Cut Operation done : Now we have " + clipboard.getLine()); // } }
/* (non-Javadoc) * @see fr.istic.aco.editor.core.MiniEditorEngine#editorPaste() */ @Override public void editorPaste() { if (clipboard.getLine() != null) buffer.write(selection.getStart(), selection.getStop(), clipboard.getLine()); else System.out.println("<<<<ALERT : Nothing to Paste from ClipBoard>>>>"); }