Beispiel #1
0
 public static PlaceRequest getTablesPlace(String project) {
   return new PlaceRequest.Builder()
       .nameToken(Places.PROJECT) //
       .with(ParameterTokens.TOKEN_NAME, project) //
       .with(ParameterTokens.TOKEN_TAB, ProjectPresenter.Display.ProjectTab.TABLES.toString()) //
       .build();
 }
Beispiel #2
0
 public static PlaceRequest getVariablePlace(String datasource, String table, String variable) {
   return new PlaceRequest.Builder()
       .nameToken(Places.PROJECT) //
       .with(ParameterTokens.TOKEN_NAME, datasource) //
       .with(ParameterTokens.TOKEN_TAB, ProjectPresenter.Display.ProjectTab.TABLES.toString()) //
       .with(ParameterTokens.TOKEN_PATH, datasource + "." + table + ":" + variable) //
       .build();
 }
    @Override
    public void onResponseCode(Request request, Response response) {
      fireEvent(NotificationEvent.newBuilder().warn("NoSuchVariable").args(variableName).build());

      PlaceRequest.Builder builder =
          new PlaceRequest.Builder()
              .nameToken(Places.PROJECT)
              .with(ParameterTokens.TOKEN_NAME, datasourceName) //
              .with(
                  ParameterTokens.TOKEN_TAB,
                  ProjectPresenter.Display.ProjectTab.TABLES.toString()) //
              .with(ParameterTokens.TOKEN_PATH, datasourceName + "." + tableName);

      placeManager.revealPlace(builder.build());
    }