org.openoffice.ide.eclipse.core.editors.idl
Class UnoidlDoubleClickStrategy

java.lang.Object
  extended by org.openoffice.ide.eclipse.core.editors.idl.UnoidlDoubleClickStrategy
All Implemented Interfaces:
org.eclipse.jface.text.ITextDoubleClickStrategy

public class UnoidlDoubleClickStrategy
extends java.lang.Object
implements org.eclipse.jface.text.ITextDoubleClickStrategy

This class is responsible for the selection of words using double-clics in the UNO-IDL editor.

Author:
cbosdonnat

Field Summary
protected  org.eclipse.jface.text.ITextViewer mText
           
 
Constructor Summary
UnoidlDoubleClickStrategy()
           
 
Method Summary
 void doubleClicked(org.eclipse.jface.text.ITextViewer pPart)
          
protected  boolean selectComment(int pCaretPos)
          Test if the caret is positioned in a comment partition.
protected  boolean selectWord(int pCaretPos)
          Test if the caret is positioned in a word partition.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mText

protected org.eclipse.jface.text.ITextViewer mText
Constructor Detail

UnoidlDoubleClickStrategy

public UnoidlDoubleClickStrategy()
Method Detail

doubleClicked

public void doubleClicked(org.eclipse.jface.text.ITextViewer pPart)

Specified by:
doubleClicked in interface org.eclipse.jface.text.ITextDoubleClickStrategy

selectComment

protected boolean selectComment(int pCaretPos)
Test if the caret is positioned in a comment partition.

Parameters:
pCaretPos - the caret position
Returns:
true if the cursor is in a comment, false otherwise

selectWord

protected boolean selectWord(int pCaretPos)
Test if the caret is positioned in a word partition.

Parameters:
pCaretPos - the caret position
Returns:
true if the cursor is in a word, false ortherwise