OCL

org.topcased.editors.ocleditor.editor
Class OCLEditorDocumentPartitioner

java.lang.Object
  extended by org.topcased.editors.ocleditor.editor.OCLEditorDocumentPartitioner
All Implemented Interfaces:
org.eclipse.jface.text.IDocumentPartitioner

public class OCLEditorDocumentPartitioner
extends java.lang.Object
implements org.eclipse.jface.text.IDocumentPartitioner


Field Summary
static java.lang.String BODY_CONTENT
           
static java.lang.String CONTEXT_CONTENT
           
static java.lang.String DEFINITION_CONTENT
           
static java.lang.String DERIVE_CONTENT
           
static java.lang.String INIT_CONTENT
           
static java.lang.String PACKAGE_CONTENT
           
static java.lang.String POST_CONTENT
           
static java.lang.String PRE_CONTENT
           
static java.lang.String RULE_CONTENT
           
 
Constructor Summary
OCLEditorDocumentPartitioner()
           
 
Method Summary
 org.eclipse.jface.text.ITypedRegion[] computePartitioning(int offset, int length)
          Splits an OCL Document in regions in giving a typed value for each of them.
 void connect(org.eclipse.jface.text.IDocument doc)
           
 void disconnect()
           
 void documentAboutToBeChanged(org.eclipse.jface.text.DocumentEvent event)
           
 boolean documentChanged(org.eclipse.jface.text.DocumentEvent event)
           
 java.lang.String getContentType(int offset)
           
 java.lang.String[] getLegalContentTypes()
           
 org.eclipse.jface.text.ITypedRegion getPartition(int offset)
          Enables to get from the array the region stored at the given position.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PACKAGE_CONTENT

public static final java.lang.String PACKAGE_CONTENT
See Also:
Constant Field Values

CONTEXT_CONTENT

public static final java.lang.String CONTEXT_CONTENT
See Also:
Constant Field Values

RULE_CONTENT

public static final java.lang.String RULE_CONTENT
See Also:
Constant Field Values

PRE_CONTENT

public static final java.lang.String PRE_CONTENT
See Also:
Constant Field Values

POST_CONTENT

public static final java.lang.String POST_CONTENT
See Also:
Constant Field Values

BODY_CONTENT

public static final java.lang.String BODY_CONTENT
See Also:
Constant Field Values

INIT_CONTENT

public static final java.lang.String INIT_CONTENT
See Also:
Constant Field Values

DERIVE_CONTENT

public static final java.lang.String DERIVE_CONTENT
See Also:
Constant Field Values

DEFINITION_CONTENT

public static final java.lang.String DEFINITION_CONTENT
See Also:
Constant Field Values
Constructor Detail

OCLEditorDocumentPartitioner

public OCLEditorDocumentPartitioner()
Method Detail

connect

public void connect(org.eclipse.jface.text.IDocument doc)
Specified by:
connect in interface org.eclipse.jface.text.IDocumentPartitioner
See Also:
IDocumentPartitioner.connect(org.eclipse.jface.text.IDocument)

disconnect

public void disconnect()
Specified by:
disconnect in interface org.eclipse.jface.text.IDocumentPartitioner
See Also:
IDocumentPartitioner.disconnect()

documentAboutToBeChanged

public void documentAboutToBeChanged(org.eclipse.jface.text.DocumentEvent event)
Specified by:
documentAboutToBeChanged in interface org.eclipse.jface.text.IDocumentPartitioner
See Also:
IDocumentPartitioner.documentAboutToBeChanged(org.eclipse.jface.text.DocumentEvent)

documentChanged

public boolean documentChanged(org.eclipse.jface.text.DocumentEvent event)
Specified by:
documentChanged in interface org.eclipse.jface.text.IDocumentPartitioner
See Also:
IDocumentPartitioner.documentChanged(org.eclipse.jface.text.DocumentEvent)

getLegalContentTypes

public java.lang.String[] getLegalContentTypes()
Specified by:
getLegalContentTypes in interface org.eclipse.jface.text.IDocumentPartitioner
See Also:
IDocumentPartitioner.getLegalContentTypes()

getContentType

public java.lang.String getContentType(int offset)
Specified by:
getContentType in interface org.eclipse.jface.text.IDocumentPartitioner
See Also:
IDocumentPartitioner.getContentType(int)

computePartitioning

public org.eclipse.jface.text.ITypedRegion[] computePartitioning(int offset,
                                                                 int length)
Splits an OCL Document in regions in giving a typed value for each of them.
The two majors type are :

Specified by:
computePartitioning in interface org.eclipse.jface.text.IDocumentPartitioner
Parameters:
offset - The begin offset of the OCL document, often set to 0.
length - The total length of the OCL document

getPartition

public org.eclipse.jface.text.ITypedRegion getPartition(int offset)
Enables to get from the array the region stored at the given position.

Specified by:
getPartition in interface org.eclipse.jface.text.IDocumentPartitioner
Parameters:
offset - The starting position corresponding to the begin of the region.
Returns:
Returns a TypedRegion object representing the region.

OCL

Copyright (c) 2005 TOPCASED Contributors 2005 - 2007. All rights reserved.