Codota Logo
RuleModeller
Code IndexAdd Codota to your IDE (free)

How to use
RuleModeller
in
org.kie.guvnor.guided.rule.client.editor

Best Java code snippets using org.kie.guvnor.guided.rule.client.editor.RuleModeller (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Dictionary d =
  • Codota Iconnew Hashtable()
  • Codota IconBundle bundle;bundle.getHeaders()
  • Codota Iconnew Properties()
  • Smart code suggestions by Codota
}
origin: org.kie.guvnor/guvnor-guided-rule-editor-client

@Override
public void setContent( final Path path,
            final RuleModel model,
            final DataModelOracle dataModel,
            final boolean isReadOnly,
            final boolean isDSLEnabled ) {
  modeller = new RuleModeller( path,
                 model,
                 dataModel,
                 new RuleModellerWidgetFactory(),
                 localBus,
                 isReadOnly,
                 isDSLEnabled );
  panel.add( this.modeller );
}
origin: org.kie.guvnor/guvnor-guided-rule-editor-client

private void clearLinesIcons( int col ) {
  for ( int i = 0; i < layout.getRowCount(); i++ ) {
    this.clearLineIcons( i,
               col );
  }
}
origin: org.kie.guvnor/guvnor-guided-rule-editor-client

public RuleModeller( final Path path,
           final RuleModel model,
           final DataModelOracle dataModel,
           final ModellerWidgetFactory widgetFactory,
           final RuleModellerConfiguration configuration,
           final EventBus eventBus,
           final boolean isReadOnly ) {
  this.path = path;
  this.model = model;
  this.dataModel = dataModel;
  this.widgetFactory = widgetFactory;
  this.configuration = configuration;
  this.eventBus = eventBus;
  this.isReadOnly = isReadOnly;
  doLayout();
}
origin: org.kie.guvnor/guvnor-guided-rule-editor-client

@Override
public boolean isDirty() {
  //The Modeller widget isn't set until after the content has been loaded from an asynchronous call to
  //the server. It is therefore possible that the User attempts to close the tab before Modeller is set
  return ( modeller == null ) ? false : modeller.getRuleModeller().isDirty();
}
origin: org.kie.guvnor/guvnor-guided-rule-editor-client

private boolean isLHSFieldTypeEquivalent( String boundVariable ) {
  String boundFieldType = modeller.getModel().getLHSBindingType( boundVariable );
  //If the fieldTypes are SuggestionCompletionEngine.TYPE_COMPARABLE check the enums are equivalent
  if ( boundFieldType.equals( DataType.TYPE_COMPARABLE ) ) {
    if ( !this.variableType.equals( DataType.TYPE_COMPARABLE ) ) {
      return false;
    }
    FieldConstraint fc = this.modeller.getModel().getLHSBoundField( boundVariable );
    if ( fc instanceof SingleFieldConstraint ) {
      String fieldName = ( (SingleFieldConstraint) fc ).getFieldName();
      String parentFactTypeForBinding = this.modeller.getModel().getLHSParentFactPatternForBinding( boundVariable ).getFactType();
      String[] dd = this.modeller.getSuggestionCompletions().getEnumValues( parentFactTypeForBinding,
                                         fieldName );
      return isEnumEquivalent( dd );
    }
    return false;
  }
  //If the fieldTypes are identical (and not SuggestionCompletionEngine.TYPE_COMPARABLE) then return true
  if ( boundFieldType.equals( this.variableType ) ) {
    return true;
  }
  return false;
}
origin: org.kie.guvnor/guvnor-guided-rule-editor-client

  public void onClick( ClickEvent event ) {
    if ( Window.confirm( Constants.INSTANCE.RemoveThisItem() ) ) {
      model.removeField( idx );
      setModified( true );
      getModeller().refreshWidget();
      //Signal possible change in Template variables
      TemplateVariablesChangedEvent tvce = new TemplateVariablesChangedEvent( getModeller().getModel() );
      getEventBus().fireEventFromSource( tvce,
                        getModeller().getModel() );
    }
  }
} );
origin: org.kie.guvnor/guvnor-guided-rule-editor-client

Boolean readOnly = this.lockRHS() ? true : null;
RuleModellerWidget w = getWidgetFactory().getWidget( this,
                           eventBus,
                           action,
w.addOnModifiedCommand( this.onWidgetModifiedCommand );
widget.add( wrapRHSWidget( model,
              i,
              w ) );
widget.add( spacerWidget() );
         this.wrapLineNumber( i + 1,
                    false ) );
layout.getFlexCellFormatter().setHorizontalAlignment( currentLayoutRow,
  final Image image = GuidedRuleEditorImages508.INSTANCE.Error();
  image.setTitle( Constants.INSTANCE.InvalidPatternSectionDisabled() );
  this.addLineIcon( currentLayoutRow,
           0,
           image );
if ( !( this.lockRHS() || w.isReadOnly() ) ) {
  this.addActionsButtonsToLayout( Constants.INSTANCE.AddAnActionBelow(),
                  new ClickHandler() {
origin: org.kie.guvnor/guvnor-guided-rule-editor-client

Boolean readOnly = this.lockLHS() ? true : null;
RuleModellerWidget w = getWidgetFactory().getWidget( this,
                           eventBus,
                           pattern,
w.addOnModifiedCommand( this.onWidgetModifiedCommand );
vert.add( wrapLHSWidget( model,
             i,
             w ) );
vert.add( spacerWidget() );
         this.wrapLineNumber( i + 1,
                    true ) );
layout.getFlexCellFormatter().setHorizontalAlignment( currentLayoutRow,
  final Image image = GuidedRuleEditorImages508.INSTANCE.Error();
  image.setTitle( Constants.INSTANCE.InvalidPatternSectionDisabled() );
  this.addLineIcon( currentLayoutRow,
           0,
           image );
if ( !( this.lockLHS() || w.isReadOnly() ) ) {
  this.addActionsButtonsToLayout( Constants.INSTANCE.AddAConditionBelow(),
                  new ClickHandler() {
origin: org.kie.guvnor/guvnor-guided-rule-editor-client

/**
 * Returns the completions.
 */
public DataModelOracle getCompletions() {
  return this.modeller.getSuggestionCompletions();
}
origin: org.kie.guvnor/guvnor-guided-rule-editor-client

@Override
public RuleModel getContent() {
  return modeller.getModel();
}
origin: org.kie.guvnor/guvnor-guided-rule-editor-client

final CustomFormConfiguration customFormConfiguration = getWorkingSetManager().getCustomFormConfiguration( this.getModeller().getPath(),
                                                      factType,
                                                      field );
  editorReadOnly = !this.getModeller().getSuggestionCompletions().isFactTypeRecognized( factType );
origin: org.kie.guvnor/guvnor-guided-rule-editor-client

             final BaseSingleFieldConstraint con ) {
CustomFormConfiguration customFormConfiguration = getWorkingSetManager().getCustomFormConfiguration( modeller.getPath(),
                                                   factType,
                                                   fieldName );
if ( modeller.isTemplate() ) {
  String templateKeyLabel = Constants.INSTANCE.TemplateKey();
  Button templateKeyButton = new Button( templateKeyLabel );
origin: org.kie.guvnor/guvnor-guided-rule-editor-client

private void renderOptions( final int optionsRowIndex ) {
  layout.setWidget( optionsRowIndex,
           2,
           new SmallLabel( Constants.INSTANCE.optionsRuleModeller() ) );
  if ( !isReadOnly ) {
    layout.setWidget( optionsRowIndex,
             4,
             getAddAttribute() );
  }
  layout.setWidget( optionsRowIndex + 1,
           3,
           new RuleAttributeWidget( this,
                        this.model,
                        isReadOnly ) );
}
origin: org.kie.guvnor/guvnor-guided-rule-editor-client

CustomFormConfiguration customFormConfiguration = getWorkingSetManager().getCustomFormConfiguration( modeller.getPath(),
                                                   factType,
                                                   fieldName );
origin: org.kie.guvnor/guvnor-guided-rule-editor-client

private boolean isLHSFactTypeEquivalent( String boundVariable ) {
  String boundFactType = modeller.getModel().getLHSBoundFact( boundVariable ).getFactType();
  //If the types are SuggestionCompletionEngine.TYPE_COMPARABLE check the enums are equivalent
  if ( boundFactType.equals( DataType.TYPE_COMPARABLE ) ) {
    if ( !this.variableType.equals( DataType.TYPE_COMPARABLE ) ) {
      return false;
    }
    String[] dd = this.modeller.getSuggestionCompletions().getEnumValues( boundFactType,
                                       this.value.getField() );
    return isEnumEquivalent( dd );
  }
  //If the types are identical (and not SuggestionCompletionEngine.TYPE_COMPARABLE) then return true
  if ( boundFactType.equals( this.variableType ) ) {
    return true;
  }
  return false;
}
origin: org.kie.guvnor/guvnor-guided-rule-editor-client

private DataModelOracle getCompletionEngine() {
  return this.getModeller().getSuggestionCompletions();
}
origin: org.kie.guvnor/guvnor-guided-rule-editor-client

  public void onClick( ClickEvent event ) {
    if ( Window.confirm( Constants.INSTANCE.RemoveThisItem() ) ) {
      model.removeField( idx );
      setModified( true );
      getModeller().refreshWidget();
      //Signal possible change in Template variables
      TemplateVariablesChangedEvent tvce = new TemplateVariablesChangedEvent( getModeller().getModel() );
      getEventBus().fireEventFromSource( tvce,
                        getModeller().getModel() );
    }
  }
} );
origin: org.kie.guvnor/guvnor-guided-rule-editor-client

private RuleModel getRuleModel() {
  return this.getModeller().getModel();
}
origin: org.kie.guvnor/guvnor-guided-rule-editor-client

private boolean isRHSFieldTypeEquivalent( String boundVariable ) {
  String boundFactType = modeller.getModel().getRHSBoundFact( boundVariable ).getFactType();
  if ( boundFactType == null ) {
    return false;
  }
  if ( this.variableType == null ) {
    return false;
  }
  //If the types are SuggestionCompletionEngine.TYPE_COMPARABLE check the enums are equivalent
  if ( boundFactType.equals( DataType.TYPE_COMPARABLE ) ) {
    if ( !this.variableType.equals( DataType.TYPE_COMPARABLE ) ) {
      return false;
    }
    String[] dd = this.modeller.getSuggestionCompletions().getEnumValues( boundFactType,
                                       this.value.getField() );
    return isEnumEquivalent( dd );
  }
  //If the types are identical (and not SuggestionCompletionEngine.TYPE_COMPARABLE) then return true
  if ( boundFactType.equals( this.variableType ) ) {
    return true;
  }
  return false;
}
origin: org.kie.guvnor/guvnor-guided-rule-editor-client

/**
 * Pops up the fact selector.
 */
protected void showConditionSelector( Integer position ) {
  RuleModellerConditionSelectorPopup popup = new RuleModellerConditionSelectorPopup( model,
                                            this,
                                            position,
                                            getSuggestionCompletions() );
  popup.show();
}
org.kie.guvnor.guided.rule.client.editorRuleModeller

Javadoc

This is the parent widget that contains the model based rule builder.

Most used methods

  • <init>
  • addActionsButtonsToLayout
  • addLineIcon
  • clearLineIcons
  • doLayout
  • getAddAttribute
  • getModel
  • getPath
  • getRuleModeller
  • getSuggestionCompletions
  • getWidgetFactory
  • initWidget
  • getWidgetFactory,
  • initWidget,
  • isDSLEnabled,
  • isDirty,
  • isLock,
  • isReadOnly,
  • isTemplate,
  • isVariableNameUsed,
  • lockLHS,
  • lockRHS

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getApplicationContext (Context)
  • getSharedPreferences (Context)
  • getSystemService (Context)
  • BufferedInputStream (java.io)
    Wraps an existing InputStream and buffers the input. Expensive interaction with the underlying input
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • JComboBox (javax.swing)
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now