Exemplo n.º 1
0
 /** As we want to refresh the suggestion completion engine. */
 public void onAfterSave() {
   LoadingPopup.showMessage(((Constants) GWT.create(Constants.class)).RefreshingModel());
   SuggestionCompletionCache.getInstance()
       .loadPackage(
           packageName,
           new Command() {
             public void execute() {
               LoadingPopup.close();
             }
           });
 }
Exemplo n.º 2
0
  /**
   * Creates the main view of Guvnor. The path used to invoke guvnor is used to identify the view to
   * show: If the path contains "StandaloneEditor.html" then the StandaloneGuidedEditorManager is
   * used to render the view. If not, the default view is shown.
   */
  private void createMain() {
    EventBus eventBus = new SimpleEventBus();
    SuggestionCompletionCache.getInstance().setEventBus(eventBus);
    ClientFactory clientFactory = new ClientFactoryImpl(eventBus);
    appController = new AppController(clientFactory, eventBus);

    if (Window.Location.getPath().contains("StandaloneEditor.html")) {
      RootLayoutPanel.get()
          .add(new StandaloneEditorManager(clientFactory, eventBus).getBaseLayout());
    } else {

      RootLayoutPanel.get().add(appController.getMainPanel());
    }
  }