Search in sources :

Example 1 with Name

use of org.whole.lang.queries.model.Name in project whole by wholeplatform.

the class QueriesContentAssistVisitor method allFeatureNames.

private boolean allFeatureNames(SortedSet<String> fNames, String actualFName) {
    ActionsUIEntityFactory aef = ActionsUIEntityFactory.instance;
    QueriesEntityFactory qef = QueriesEntityFactory.instance;
    GroupAction featurenamesGroup = aef.createGroupAction();
    featurenamesGroup.setFillStrategy(aef.createHierarchical(aef.createDistinctPrefix(), aef.createSize(10)));
    featurenamesGroup.getText().setValue("queries.featurenames");
    Actions actions = aef.createActions(0);
    for (String fName : fNames) {
        if (fName.equals(actualFName))
            continue;
        Name prototype = qef.createName(fName);
        actions.wAdd(aef.createReplaceDifferentTemplateAction(prototype, fName));
    }
    featurenamesGroup.setActions(actions);
    return mergeResult(featurenamesGroup);
}
Also used : GroupAction(org.whole.lang.actions.model.GroupAction) Actions(org.whole.lang.actions.model.Actions) QueriesEntityFactory(org.whole.lang.queries.factories.QueriesEntityFactory) ActionsUIEntityFactory(org.whole.lang.actions.ui.factories.ActionsUIEntityFactory) Name(org.whole.lang.queries.model.Name)

Aggregations

Actions (org.whole.lang.actions.model.Actions)1 GroupAction (org.whole.lang.actions.model.GroupAction)1 ActionsUIEntityFactory (org.whole.lang.actions.ui.factories.ActionsUIEntityFactory)1 QueriesEntityFactory (org.whole.lang.queries.factories.QueriesEntityFactory)1 Name (org.whole.lang.queries.model.Name)1