|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ix.iview.util.IVUtil
public class IVUtil
Class for useful static methods.
Field Summary | |
---|---|
static java.lang.String |
TYPE_STRING_a
|
static java.lang.String |
TYPE_STRING_b
|
Constructor Summary | |
---|---|
IVUtil()
|
Method Summary | |
---|---|
static boolean |
bothEmpty(java.util.Collection list,
java.util.Collection otherList)
|
static boolean |
bothEmpty(java.util.Map map,
java.util.Map otherMap)
|
static boolean |
checkCopyObject(java.lang.String thing,
UIObject uio,
java.lang.String name)
Check if the object should be overwritten or copied. |
static boolean |
checkNodeRefConsistency(UIRefinement uir,
Ordering o)
This should be a method within Orderings and Constraints! |
static void |
enableVars(VarSpecifier parent,
javax.swing.text.JTextComponent jtc)
Enables the use of declarations when a question-mark is typed in a text componenet. |
static java.lang.String |
ensureVarName(java.lang.String name)
|
static java.lang.Object |
extractType(Constraint tConstraint)
|
static java.lang.Object |
extractType(Constraint tConstraint,
UIDomain domain)
|
static java.util.List |
filterClassConstraints(java.util.List constraints)
Looks through constraints and finds all most likely class info. |
static java.util.List |
filterProperty(java.lang.String property,
java.util.List constraints)
Looks through constraints and finds those for given property. |
static java.util.List |
filterVariableProperty(ItemVar var,
java.lang.String property,
java.util.List constraints)
Looks through constraints and finds the most likely for class info. |
static Constraint |
findClassConstraint(ItemVar var,
java.util.List constraints)
Looks through constraints and finds the most likely for class info. |
static java.util.Set |
findNameMatches(java.lang.String pattern,
java.util.List namedThings)
Finds objects in the given list whose names match the given string. |
static int |
findString(java.lang.String pattern,
java.lang.String text)
|
static java.lang.Object |
findVariableClass(ItemVar var,
java.util.List constraints)
Looks through constraints and finds the most likely for class info. |
static java.lang.Object |
getConstraintValue(Constraint constr)
|
static java.lang.String |
getPropertyFromPattern(LList pattern)
Looks at the first element in the list and compares it to the given property. |
static java.lang.String |
getRelativeName(java.lang.Object relative)
|
static java.lang.String |
getSubjectInPattern(LList pattern)
Looks at the second element in the list returns it as a string. |
static java.lang.String |
ideReleaseToString()
|
static boolean |
isClassConstraint(Constraint c)
Looks through constraints and finds the most likely for class info. |
static boolean |
isClassConstraint(ItemVar var,
Constraint c)
Looks through constraints and finds the most likely for class info. |
static boolean |
isEmptyConstraint(Constraint constraint)
|
static boolean |
isInPattern(ItemVar var,
LList pattern)
|
static boolean |
isPropertyPattern(ObjectProperty prop,
LList pattern)
Looks at the first element in the list and compares it to the given property. |
static boolean |
isSimplePropertyAssignment(PatternAssignment ass,
ObjectProperty prop,
ItemVar var)
Looks at the second element in the list and compares it to the given variable. |
static boolean |
isSubjectInPattern(ItemVar var,
LList pattern)
Looks at the second element in the list and compares it to the given variable. |
static java.util.List |
makeObjectClassTree(UIDomain uid,
java.util.List classList)
Turn the given list of object classes into a list that shows the tree (root first) |
static VariableDeclaration |
makeVariableDeclaration(java.lang.String name)
|
static java.util.List |
makeVariableDeclarations(java.util.Collection vars)
Turns the given collection of variables (names or ItemVars) into a list of variable declarations |
static java.lang.String |
namedListToDisplay(java.util.Collection l)
|
static void |
offerVars(VarSpecifier parent,
javax.swing.text.JTextComponent jtc,
java.util.List decs,
java.awt.Point location,
int position)
Offers the declared variables (if any) for completion, splices in selection (if any) NOTE: the "?" |
static java.lang.String |
printCondition(Constraint cond)
|
static java.lang.String |
printConstraint(Constraint constraint)
|
static java.lang.String |
printConstraintParameters(Constraint constraint)
|
static java.lang.String |
printConstraints(java.util.Collection constraints)
|
static void |
printIDEReleaseGreeting()
|
static java.lang.String |
printNode(NodeSpec node)
|
static java.lang.String |
printNodes(java.util.Collection nodes)
|
static java.lang.String |
printOrdering(Ordering ordering)
|
static java.lang.String |
printOrderings(java.util.Collection orderings)
|
static java.lang.String |
printUIObjects(java.util.Collection objects)
|
static java.lang.String |
printVarDec(VariableDeclaration varDec)
|
static java.lang.String |
printVarDecs(java.util.Collection varDecs)
|
static java.lang.String |
propertyFromConstraint(Constraint c)
Looks at the pattern of the given constraint and returns the string that is the first element of that pattern, i.e. the place where a property would be. |
static ObjectProperty |
propertyFromConstraint(UIObjectClass oClass,
Constraint c)
Looks at the pattern of the given constraint and returns the string that is the first element of that pattern, i.e. the place where a property would be. |
static ObjectProperty |
propertyFromPattern(java.util.List pattern,
UIObjectClass oClass)
Looks for an ObjectProperty in the given pattern that is defined for the given UIObjectClass. |
static ObjectProperty |
propertyFromString(java.lang.String s,
UIObjectClass oc)
Finds a property of the given class whose name matches the given string. |
static Constraint |
readCondition(Symbol type,
Symbol rel,
java.lang.String text)
|
static java.lang.String |
releaseToString()
|
static java.util.Set |
removeConstraint(java.util.Set cSet,
Constraint c)
|
static LList |
replaceInPattern(ItemVar oldVar,
ItemVar newVar,
LList pattern)
Replace each variable in each given constraint with the new one propertiesMap (property-constraintSet) |
static java.util.HashMap |
replaceVarInConstraints(ItemVar oldVar,
ItemVar newVar,
java.util.HashMap constraintsMap)
Replace each variable in each given constraint with the new one propertiesMap (property-constraintSet) |
static boolean |
sameConstraint(Constraint one,
Constraint other)
Determines whether the two constraints are the same. |
static boolean |
sameList(java.util.List list,
java.util.List otherList)
|
static boolean |
sameMap(java.util.Map m1,
java.util.Map m2)
|
static boolean |
sameObject(java.lang.Object thing,
java.lang.Object other)
|
static boolean |
sameObjectConstraint(Constraint c,
Constraint otherC)
Determines whether the two constraints are on the same thing. |
static boolean |
sameSet(java.util.Collection list,
java.util.Collection otherList)
|
static boolean |
sameStableMap(java.util.Map m1,
java.util.Map m2)
|
static boolean |
sameString(java.lang.String thing,
java.lang.String other)
|
static boolean |
sameSymbol(java.lang.Object thing,
java.lang.Object other)
|
static Constraint |
setConstraintValue(Constraint constr,
java.lang.Object val)
|
static Constraint |
setConstraintValue(UIObjectClass oClass,
Constraint constr,
java.lang.Object val)
|
static java.util.List |
sortConstraintCollection(java.util.Collection col)
|
static java.util.Collection |
sortNamedCollection(java.util.Collection c)
|
static java.util.List |
sortNodeCollection(java.util.Collection c)
|
static java.util.List |
sortTICollection(java.util.Collection c)
|
java.lang.String |
textDerenderPatterns(java.util.List specs)
|
static java.lang.String |
textRenderPatterns(java.util.Collection specs)
|
static void |
useVar(javax.swing.text.JTextComponent jtc,
int position,
java.lang.String var)
|
static ItemVar |
variableFromConstraint(Constraint c)
Looks for an ObjectProperty in the given pattern that is defined for the given UIObjectClass. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String TYPE_STRING_a
public static java.lang.String TYPE_STRING_b
Constructor Detail |
---|
public IVUtil()
Method Detail |
---|
public static java.lang.String ideReleaseToString()
public static java.lang.String releaseToString()
public static void printIDEReleaseGreeting()
public static int findString(java.lang.String pattern, java.lang.String text)
public static java.util.Set findNameMatches(java.lang.String pattern, java.util.List namedThings)
public static java.util.Collection sortNamedCollection(java.util.Collection c)
public static java.util.List sortNodeCollection(java.util.Collection c)
public static java.util.List sortConstraintCollection(java.util.Collection col)
public static java.util.List sortTICollection(java.util.Collection c)
public static boolean sameList(java.util.List list, java.util.List otherList)
public static boolean sameMap(java.util.Map m1, java.util.Map m2)
public static boolean sameStableMap(java.util.Map m1, java.util.Map m2)
public static boolean sameSet(java.util.Collection list, java.util.Collection otherList)
public static boolean sameObject(java.lang.Object thing, java.lang.Object other)
public static boolean sameString(java.lang.String thing, java.lang.String other)
public static boolean sameSymbol(java.lang.Object thing, java.lang.Object other)
public static boolean bothEmpty(java.util.Collection list, java.util.Collection otherList)
public static boolean bothEmpty(java.util.Map map, java.util.Map otherMap)
public static boolean checkCopyObject(java.lang.String thing, UIObject uio, java.lang.String name)
public static java.util.List makeObjectClassTree(UIDomain uid, java.util.List classList)
public static java.lang.String getRelativeName(java.lang.Object relative)
public static boolean isEmptyConstraint(Constraint constraint)
public static Constraint setConstraintValue(Constraint constr, java.lang.Object val)
public static Constraint setConstraintValue(UIObjectClass oClass, Constraint constr, java.lang.Object val)
public static java.lang.Object getConstraintValue(Constraint constr)
public static java.lang.Object findVariableClass(ItemVar var, java.util.List constraints)
public static java.util.Set removeConstraint(java.util.Set cSet, Constraint c)
public static java.util.List filterClassConstraints(java.util.List constraints)
public static boolean isClassConstraint(ItemVar var, Constraint c)
public static boolean isClassConstraint(Constraint c)
public static Constraint findClassConstraint(ItemVar var, java.util.List constraints)
public static java.lang.Object extractType(Constraint tConstraint)
public static java.lang.Object extractType(Constraint tConstraint, UIDomain domain)
public static java.lang.String propertyFromConstraint(Constraint c)
public static ObjectProperty propertyFromConstraint(UIObjectClass oClass, Constraint c)
public static ItemVar variableFromConstraint(Constraint c)
public static ObjectProperty propertyFromPattern(java.util.List pattern, UIObjectClass oClass)
public static ObjectProperty propertyFromString(java.lang.String s, UIObjectClass oc)
public static java.util.List filterProperty(java.lang.String property, java.util.List constraints)
public static java.util.List filterVariableProperty(ItemVar var, java.lang.String property, java.util.List constraints)
public static LList replaceInPattern(ItemVar oldVar, ItemVar newVar, LList pattern)
public static java.util.HashMap replaceVarInConstraints(ItemVar oldVar, ItemVar newVar, java.util.HashMap constraintsMap)
public static boolean isInPattern(ItemVar var, LList pattern)
public static boolean isSubjectInPattern(ItemVar var, LList pattern)
public static java.lang.String getSubjectInPattern(LList pattern)
public static boolean isPropertyPattern(ObjectProperty prop, LList pattern)
public static java.lang.String getPropertyFromPattern(LList pattern)
public static boolean isSimplePropertyAssignment(PatternAssignment ass, ObjectProperty prop, ItemVar var)
public static boolean sameConstraint(Constraint one, Constraint other)
public static boolean sameObjectConstraint(Constraint c, Constraint otherC)
public static Constraint readCondition(Symbol type, Symbol rel, java.lang.String text) throws SyntaxException
SyntaxException
public static boolean checkNodeRefConsistency(UIRefinement uir, Ordering o)
public static java.lang.String namedListToDisplay(java.util.Collection l)
public static java.lang.String textRenderPatterns(java.util.Collection specs)
public java.lang.String textDerenderPatterns(java.util.List specs)
public static java.lang.String printNodes(java.util.Collection nodes)
public static java.lang.String printOrderings(java.util.Collection orderings)
public static java.lang.String printVarDecs(java.util.Collection varDecs)
public static java.lang.String printNode(NodeSpec node)
public static java.lang.String printVarDec(VariableDeclaration varDec)
public static java.lang.String printOrdering(Ordering ordering)
public static java.lang.String printCondition(Constraint cond)
public static java.lang.String printConstraints(java.util.Collection constraints)
public static java.lang.String printConstraint(Constraint constraint)
public static java.lang.String printConstraintParameters(Constraint constraint)
public static java.lang.String printUIObjects(java.util.Collection objects)
public static void useVar(javax.swing.text.JTextComponent jtc, int position, java.lang.String var)
public static void enableVars(VarSpecifier parent, javax.swing.text.JTextComponent jtc)
public static void offerVars(VarSpecifier parent, javax.swing.text.JTextComponent jtc, java.util.List decs, java.awt.Point location, int position)
public static java.lang.String ensureVarName(java.lang.String name)
public static java.util.List makeVariableDeclarations(java.util.Collection vars)
public static VariableDeclaration makeVariableDeclaration(java.lang.String name)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |