Business Objects
Quark Platform Documentation
Version 1.7.1_0
Business Objects

org.openquark.cal.services
Class AutoCompleteHelper

java.lang.Object
  extended by org.openquark.cal.services.AutoCompleteHelper

public class AutoCompleteHelper
extends Object

Helper class for performing auto-completions in editors of cal source code. This is currently used by the CAL Eclipse plug-in and the GEM cutter.

Author:
Greg McClement

Nested Class Summary
static interface AutoCompleteHelper.Document
           
 
Constructor Summary
AutoCompleteHelper(AutoCompleteHelper.Document doc)
           
 
Method Summary
 org.openquark.util.Pair<String,List<Integer>> getIdentifierScoping(int offset)
          Get the scoping information before the last uncompleted word.
 String getLastIncompleteIdentifier(int offset)
          Get the last uncompleted word.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AutoCompleteHelper

public AutoCompleteHelper(AutoCompleteHelper.Document doc)
Method Detail

getLastIncompleteIdentifier

public String getLastIncompleteIdentifier(int offset)
Get the last uncompleted word. For example "ab" in "Cal.Core.Prelude.ab". This will return "" for strings such as "Cal.Core.Prelude."


getIdentifierScoping

public org.openquark.util.Pair<String,List<Integer>> getIdentifierScoping(int offset)
Get the scoping information before the last uncompleted word. For example, this returns "Cal.Core.Prelude" for the string "Cal.Core.Prelude.abs". The return value is an array. The first value is a string representing the scoping ("Cal.Core.Prelude"), then second value is an array that contains the start offset of each part of the hierarchical name. This is helpful for determine what part of the string to replace during auto-completion.


Business Objects
Quark Platform Documentation
Version 1.7.1_0
Business Objects

Copyright © 2007 Business Objects. All rights reserved.