Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2012 JBoss Inc
   *
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
   *
   *       http://www.apache.org/licenses/LICENSE-2.0
   *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
 
 package org.drools.workbench.screens.testscenario.client;
 
 
 
 
     @Inject
     private Path path;
 
     @Inject
 
     @PostConstruct
     public void init() {
         .setPresenter(this);        
     }
     
     public void init(final Path path,
                      final boolean isReadOnly ) {
         this. = path;
         if ( isReadOnly ) {
             .setReadOnly();
         }
     }
 
     private void setTitlefinal String titleText ) {
         if ( titleText == null || titleText.isEmpty() ) {
         } else {
             .setTitleTexttitleText );
         }
     }
 
     public void savefinal String commitMessage,
                       final Command callback,
                       final Metadata metadata ) {
     }
 
     @Override
     public Widget asWidget() {
         return .asWidget();
     }
 
     public String getTitle() {
         return .getTitleWidget();
     }
 
     @Override
     public void onRunAllButton() {
         final FormStylePopup pop = new FormStylePopup();
         final TextBox sessionNameTextBox = new TextBox();        
         pop.addAttribute("session name" + ":"sessionNameTextBox);
 
         Button ok = new Button("OK");
         ok.addClickHandler(new ClickHandler() {
             public void onClick(ClickEvent event) {
                 if(sessionNameTextBox.getText() == null || "".equals(sessionNameTextBox.getText())) {
                     Window.alert(..PleaseInputSessionName());
                     return;
                 }
                 
                BusyPopup.showMessage(..BuildingAndRunningScenario());
                .call(new RemoteCallback<Void>() {
                    @Override
                    public void callback(Void v) {
                        pop.hide();
                        BusyPopup.close();
                    }
                },
                        new HasBusyIndicatorDefaultErrorCallback(BulkRunTestScenarioEditor.this)
                ).runAllScenarios(sessionNameTextBox.getText());                        
            }
        });
        pop.addAttribute""ok);
        pop.show();                
    }
    @Override
    public void showBusyIndicator(String message) {
        BusyPopup.showMessage(message);
    }
    @Override
    public void hideBusyIndicator() {
        BusyPopup.close();
    }
New to GrepCode? Check out our FAQ X