Exemplo n.º 1
0
 /* (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());
   }
 }
Exemplo n.º 2
0
  /* (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());
    // }

  }