APISonar


com.google.appinventor.client.output.OdeLog.log

> com > google > appinventor > client > output > OdeLog > log
com APIs google APIs appinventor APIs client APIs output APIs OdeLog APIs log APIs

Example 1
public void clearLocation(String componentName) {
    OdeLog.log("ProjectEditor:clearLocation: clearing " + componentName);
    locationHashMap.remove(componentName);
    recomputeLocationPermission();
  }
Example 2
private void loadBackpack() {
    userInfoService.getUserBackpack(new AsyncCallback<String>() {
        @Override
        public void onSuccess(String backpack) {
          BlocklyPanel.setInitialBackpack(backpack);
        }
        @Override
        public void onFailure(Throwable caught) {
          OdeLog.log("Fetching backpack failed");
        }
      });
  }
Example 3
public static void storeSharedBackpack(String backPackId, String content) {
    Ode.getInstance().getUserInfoService().storeSharedBackpack(backPackId, content,
      new AsyncCallback<Void>() {
        @Override
        public void onSuccess(Void v) {
          // Nothing to do
        }
        @Override
        public void onFailure(Throwable caught) {
          OdeLog.log("storeSharedBackpack failed.");
        }
      });
  }
Example 4
public final void recordLocationSetting(String componentName, String newValue) {
    OdeLog.log("ProjectEditor: recordLocationSetting(" + componentName + "," + newValue + ")");
    locationHashMap.put(componentName, newValue);
    recomputeLocationPermission();
  }
Example 5
private final void recomputeLocationPermission() {
    String usesLocation = "False";
    for (String c : locationHashMap.values()) {
      OdeLog.log("ProjectEditor:recomputeLocationPermission: " + c);
      if (c.equals("True")) {
        usesLocation = "True";
        break;
      }
    }
    changeProjectSettingsProperty(SettingsConstants.PROJECT_YOUNG_ANDROID_SETTINGS, SettingsConstants.YOUNG_ANDROID_SETTINGS_USES_LOCATION,
      usesLocation);
  }
Example 6
public void reset1(String formName) {
    OdeLog.log("AssetManager: formName = " + formName + " received reset.");
    for (AssetInfo a: assets.values()) {
      a.loaded = false;
      a.transferred = false;
    }
  }
Example 7
public void showBuiltinBlocks(String drawerName) {
    OdeLog.log("Showing built-in drawer " + drawerName);
    String builtinDrawer = "builtin_" + drawerName;
    if (selectedDrawer == null || !blocksArea.drawerShowing()
        || !selectedDrawer.equals(builtinDrawer)) {
      blocksArea.showBuiltinBlocks(drawerName);
      selectedDrawer = builtinDrawer;
    } else {
      blocksArea.hideDrawer();
      selectedDrawer = null;
    }
  }
Example 8
public void loadSettings() {
    Ode.getInstance().getProjectService().loadProjectSettings(
        project.getProjectId(),
        new OdeAsyncCallback<String>(
            // failure message
            MESSAGES.settingsLoadError()) {
          @Override
          public void onSuccess(String result) {
            OdeLog.log("Loaded project settings: " + result);
            decodeSettings(result);
            changed = false;
          }
        });
  }
Example 9
public boolean onCommentsRequestCompleted(List<GalleryComment> comments) {
      galleryGF.generateAppPageComments(comments, appCommentsList);
      if (comments == null)
        OdeLog.log("comment list was null");
      return false;
  }
Example 10
public void switchToUserProfileView(String userId, int editStatus) {
    hideTutorials();
    currentView = USERPROFILE;
    OdeLog.log("###########" + userId + "||||||" + editStatus);
    ProfileBox.setProfile(userId, editStatus);
    deckPanel.showWidget(userProfileTabIndex);
  }
Example 11
public void onAppListRequestCompleted(GalleryAppListResult appsResult, boolean refreshable)
  {
    List<GalleryApp> apps = appsResult.getApps();
    if (apps != null)
      refreshApps(appsResult, refreshable);
    else
      OdeLog.log("apps was null");
  }
Example 12
protected void onHide() {
    OdeLog.log("YaProjectEditor: got onHide");
    AssetListBox.getAssetListBox().getAssetList().refreshAssetList(0);

    FileEditor selectedFileEditor = getSelectedFileEditor();
    if (selectedFileEditor != null) {
      selectedFileEditor.onHide();
    }
  }
Example 13
public static String getComponentInstancePropertyValue(String formName, String instanceName, String propertyName){
      //use form name to get blocks editor
      YaBlocksEditor blocksEditor = formToBlocksEditor.get(formName);
      Map<String, MockComponent> componentMap = blocksEditor.myFormEditor.getComponents();
      for (String key : componentMap.keySet()) {
        OdeLog.log(key);
      }
      MockComponent mockComponent = componentMap.get(instanceName);
      return mockComponent.getPropertyValue(propertyName);
  }
Example 14
public final void insertFileEditor(FileEditor fileEditor, int beforeIndex) {
    String fileId = fileEditor.getFileId();
    openFileEditors.put(fileId, fileEditor);
    fileIds.add(beforeIndex, fileId);
    deckPanel.insert(fileEditor, beforeIndex);
    OdeLog.log("Inserted file editor for " + fileEditor.getFileId() + " at pos " + beforeIndex);

  }
Example 15
public void sendComponentData(String formJson, String packageName) throws YailGenerationException {
    if (!currentForm.equals(formName)) { // Not working on the current form...
      OdeLog.log("Not working on " + currentForm + " (while sending for " + formName + ")");
      return;
    }
    try {
      doSendJson(formJson, packageName);
    } catch (JavaScriptException e) {
      throw new YailGenerationException(e.getDescription(), formName);
    }
  }
Example 16
public void addProject(long projectId, String projectName) {
    if (!projectMap.containsKey(projectId)) {
      projectMap.put(projectId, new DesignProject(projectName, projectId));
      OdeLog.log("DesignToolbar added project " + projectName + " with id " + projectId);
    } else {
      OdeLog.wlog("DesignToolbar ignoring addProject for existing project " + projectName
          + " with id " + projectId);
    }
  }
Example 17
public void execute(final ProjectNode node) {
    // Display a barcode for an url pointing at our server's download servlet
    String barcodeUrl = GWT.getHostPageBaseURL()
      + "b/" + Ode.getInstance().getNonce();
    OdeLog.log("Barcode url is: " + barcodeUrl);
    new BarcodeDialogBox(node.getName(), barcodeUrl).center();
  }
Example 18
private void addBlocksEditor(YoungAndroidBlocksNode blocksNode) {
    final YaBlocksEditor newBlocksEditor = new YaBlocksEditor(this, blocksNode);
    final String formName = blocksNode.getFormName();
    OdeLog.log("Adding blocks editor for " + formName);
    if (editorMap.containsKey(formName)) {
      // This happens if the form editor was already added.
      editorMap.get(formName).blocksEditor = newBlocksEditor;
    } else {
      EditorSet editors = new EditorSet();
      editors.blocksEditor = newBlocksEditor;
      editorMap.put(formName, editors);
    }
  }
Example 19
public boolean onAppListRequestCompleted(GalleryAppListResult appResults, int requestId, boolean refreshable)   {
   if (appResults != null && appResults.getApps() != null)
      refreshApps(appResults, requestId, refreshable);
    else
      OdeLog.log("apps was null");
   return false;
  }
Example 20
public void onProjectLoaded(Project project) {
    if (DEBUG)
      OdeLog.log("AssetManager: got onProjectLoaded for " + project.getProjectId() + ", current project is " + projectId);
    loadAssets(project.getProjectId());
  }
Example 21
public ProjectEditor show(ProjectRootNode projectRootNode) {
    ProjectEditor projectEditor = Ode.getInstance().getEditorManager().openProject(projectRootNode);
    OdeLog.log("ViewerBox: switching the content in the viewer box");
    setContent(projectEditor);
    Ode.getInstance().switchToDesignView();
    return projectEditor;
  }
Example 22
public void onProjectNodeRemoved(Project project, ProjectNode node) {
    // remove blocks and/or form editor if applicable. Remove screen from 
    // DesignToolbar. If the partner node to this one (blocks or form) was already 
    // removed, calling DesignToolbar.removeScreen a second time will be a no-op.
    OdeLog.log("YaProjectEditor: got onProjectNodeRemoved for project "
            + project.getProjectId() + ", node " + node.getFileId());
    String formName = null;
    if (node instanceof YoungAndroidFormNode) {
      formName = ((YoungAndroidFormNode) node).getFormName();
      removeFormEditor(formName);
    } else if (node instanceof YoungAndroidBlocksNode) {
      formName = ((YoungAndroidBlocksNode) node).getFormName();
      removeBlocksEditor(formName);
    }
  }
Example 23
public void scheduleAutoSave(FileEditor fileEditor) {
    // Add the file editor to the dirtyFileEditors list.
    if (!fileEditor.isDamaged()) { // Don't save damaged files
      dirtyFileEditors.add(fileEditor);
    } else {
      OdeLog.log("Not saving blocks for " + fileEditor.getFileId() + " because it is damaged.");
    }
    scheduleAutoSaveTimer();
  }
Example 24
protected void onUnload() {
    // onUnload is called immediately before a widget becomes detached from the browser's document.
    Ode ode = Ode.getInstance();
    ode.setTutorialVisible(false);
    ode.getDesignToolbar().setTutorialToggleVisible(false);
    OdeLog.log("ProjectEditor: got onUnload for project " + projectId);
    super.onUnload();
    onHide();
  }