Java 类com.intellij.ui.navigation.Place 实例源码

项目:intellij-ce-playground    文件:OptionsEditor.java   
private ActionCallback initConfigurable(@NotNull final Configurable configurable) {
  final ActionCallback result = new ActionCallback();

  final ConfigurableContent content = new Simple(configurable);

  if (!myConfigurable2Content.containsKey(configurable)) {
    if (configurable instanceof Place.Navigator) {
      ((Place.Navigator)configurable).setHistory(myHistory);
    }
    configurable.reset();
  }

  UIUtil.invokeLaterIfNeeded(new Runnable() {
    @Override
    public void run() {
      if (myDisposed) return;
      myConfigurable2Content.put(configurable, content);
      result.setDone();
    }
  });

  return result;
}
项目:intellij-ce-playground    文件:OptionsEditor.java   
@Override
public ActionCallback navigateTo(@Nullable final Place place, final boolean requestFocus) {
  final Configurable config = (Configurable)place.getPath("configurable");
  final String filter = (String)place.getPath("filter");

  final ActionCallback result = new ActionCallback();

  myFilter.update(filter, false, true).doWhenDone(new Runnable() {
    @Override
    public void run() {
      selectInTree(config).notifyWhenDone(result);
    }
  });

  return result;
}
项目:tools-idea    文件:OptionsEditor.java   
@Override
public ActionCallback navigateTo(@Nullable final Place place, final boolean requestFocus) {
  final Configurable config = (Configurable)place.getPath("configurable");
  final String filter = (String)place.getPath("filter");

  final ActionCallback result = new ActionCallback();

  myFilter.refilterFor(filter, false, true).doWhenDone(new Runnable() {
    @Override
    public void run() {
      myTree.select(config).notifyWhenDone(result);
    }
  });

  return result;
}
项目:consulo    文件:ModuleStructureConfigurable.java   
public ActionCallback selectOrderEntry(@Nonnull final Module module, @Nullable final OrderEntry orderEntry) {
  Place p = new Place();
  p.putPath(ProjectStructureConfigurable.CATEGORY, this);
  Runnable r = null;

  final MasterDetailsComponent.MyNode node = findModuleNode(module);
  if (node != null) {
    p.putPath(TREE_OBJECT, module);
    p.putPath(ModuleEditor.SELECTED_EDITOR_NAME, ClasspathEditor.NAME);
    r = new Runnable() {
      @Override
      public void run() {
        if (orderEntry != null) {
          ModuleEditor moduleEditor = ((ModuleConfigurable)node.getConfigurable()).getModuleEditor();
          ModuleConfigurationEditor editor = moduleEditor.getEditor(ClasspathEditor.NAME);
          if (editor instanceof ClasspathEditor) {
            ((ClasspathEditor)editor).selectOrderEntry(orderEntry);
          }
        }
      }
    };
  }
  final ActionCallback result = ProjectStructureConfigurable.getInstance(myProject).navigateTo(p, true);
  return r != null ? result.doWhenDone(r) : result;
}
项目:intellij-ce-playground    文件:ProjectStructureConfigurable.java   
public ActionCallback select(@Nullable final Facet facetToSelect, final boolean requestFocus) {
  Place place = createModulesPlace();
  if (facetToSelect != null) {
    place = place.putPath(ModuleStructureConfigurable.TREE_OBJECT, facetToSelect);
  }
  return navigateTo(place, requestFocus);
}
项目:intellij-ce-playground    文件:ProjectStructureConfigurable.java   
public Place createArtifactPlace(Artifact artifact) {
  Place place = createPlaceFor(myArtifactsStructureConfigurable);
  if (artifact != null) {
    place.putPath(BaseStructureConfigurable.TREE_NAME, artifact.getName());
  }
  return place;
}
项目:intellij-ce-playground    文件:ProjectStructureConfigurable.java   
public ActionCallback select(@NotNull LibraryOrderEntry libraryOrderEntry, final boolean requestFocus) {
  final Library lib = libraryOrderEntry.getLibrary();
  if (lib == null || lib.getTable() == null) {
    return selectOrderEntry(libraryOrderEntry.getOwnerModule(), libraryOrderEntry);
  }
  Place place = createPlaceFor(getConfigurableFor(lib));
  place.putPath(BaseStructureConfigurable.TREE_NAME, libraryOrderEntry.getLibraryName());
  return navigateTo(place, requestFocus);
}
项目:intellij-ce-playground    文件:ModuleConfigurable.java   
@Override
public void queryPlace(@NotNull final Place place) {
  final ModuleEditor editor = getModuleEditor();
  if (editor != null) {
    editor.queryPlace(place);
  }
}
项目:intellij-ce-playground    文件:ModuleStructureConfigurable.java   
public ActionCallback selectOrderEntry(@NotNull final Module module, @Nullable final OrderEntry orderEntry) {
  for (final ModuleStructureExtension extension : ModuleStructureExtension.EP_NAME.getExtensions()) {
    final ActionCallback callback = extension.selectOrderEntry(module, orderEntry);
    if (callback != null) {
      return callback;
    }
  }

  Place p = new Place();
  p.putPath(ProjectStructureConfigurable.CATEGORY, this);
  Runnable r = null;

  final MasterDetailsComponent.MyNode node = findModuleNode(module);
  if (node != null) {
    p.putPath(TREE_OBJECT, module);
    p.putPath(ModuleEditor.SELECTED_EDITOR_NAME, ClasspathEditor.NAME);
    r = new Runnable() {
      @Override
      public void run() {
        if (orderEntry != null) {
          ModuleEditor moduleEditor = ((ModuleConfigurable)node.getConfigurable()).getModuleEditor();
          ModuleConfigurationEditor editor = moduleEditor.getEditor(ClasspathEditor.NAME);
          if (editor instanceof ClasspathEditor) {
            ((ClasspathEditor)editor).selectOrderEntry(orderEntry);
          }
        }
      }
    };
  }
  final ActionCallback result = ProjectStructureConfigurable.getInstance(myProject).navigateTo(p, true);
  return r != null ? result.doWhenDone(r) : result;
}
项目:intellij-ce-playground    文件:BaseStructureConfigurable.java   
@Override
public void queryPlace(@NotNull final Place place) {
  if (myCurrentConfigurable != null) {
    place.putPath(TREE_OBJECT, myCurrentConfigurable.getEditableObject());
    Place.queryFurther(myCurrentConfigurable, place);
  }
}
项目:intellij-ce-playground    文件:SidePanel.java   
public void addPlace(Place place, @NotNull Presentation presentation) {
  myModel.addElement(place);
  myPlaces.add(place);
  myPlace2Presentation.put(place, presentation);
  revalidate();
  repaint();
}
项目:intellij-ce-playground    文件:HeaderHidingTabbedModuleEditor.java   
@Override
public void queryPlace(@NotNull Place place) {
  ModuleConfigurationEditor singleEditor = getSingleEditor();
  if (singleEditor != null) {
    place.putPath(SELECTED_EDITOR_NAME, singleEditor.getDisplayName());
  }
  else {
    super.queryPlace(place);
  }
}
项目:intellij-ce-playground    文件:TabbedModuleEditor.java   
@Override
public ActionCallback navigateTo(@Nullable final Place place, final boolean requestFocus) {
  if (place != null) {
    selectEditor((String)place.getPath(SELECTED_EDITOR_NAME));
  }
  return ActionCallback.DONE;
}
项目:intellij-ce-playground    文件:OptionsEditor.java   
@Override
public void queryPlace(@NotNull final Place place) {
  final Configurable current = getContext().getCurrentConfigurable();
  place.putPath("configurable", current);
  place.putPath("filter", myFilter.getFilterText());

  if (current instanceof Place.Navigator) {
    ((Place.Navigator)current).queryPlace(place);
  }
}
项目:tools-idea    文件:ProjectStructureConfigurable.java   
public ActionCallback select(@Nullable final Facet facetToSelect, final boolean requestFocus) {
  Place place = createModulesPlace();
  if (facetToSelect != null) {
    place = place.putPath(ModuleStructureConfigurable.TREE_OBJECT, facetToSelect);
  }
  return navigateTo(place, requestFocus);
}
项目:tools-idea    文件:ProjectStructureConfigurable.java   
public Place createArtifactPlace(Artifact artifact) {
  Place place = createPlaceFor(myArtifactsStructureConfigurable);
  if (artifact != null) {
    place.putPath(BaseStructureConfigurable.TREE_NAME, artifact.getName());
  }
  return place;
}
项目:tools-idea    文件:ProjectStructureConfigurable.java   
public ActionCallback select(@NotNull LibraryOrderEntry libraryOrderEntry, final boolean requestFocus) {
  final Library lib = libraryOrderEntry.getLibrary();
  if (lib == null || lib.getTable() == null) {
    return selectOrderEntry(libraryOrderEntry.getOwnerModule(), libraryOrderEntry);
  }
  Place place = createPlaceFor(getConfigurableFor(lib));
  place.putPath(BaseStructureConfigurable.TREE_NAME, libraryOrderEntry.getLibraryName());
  return navigateTo(place, requestFocus);
}
项目:tools-idea    文件:ModuleConfigurable.java   
@Override
public void queryPlace(@NotNull final Place place) {
  final ModuleEditor editor = getModuleEditor();
  if (editor != null) {
    editor.queryPlace(place);
  }
}
项目:tools-idea    文件:ModuleStructureConfigurable.java   
public ActionCallback selectOrderEntry(@NotNull final Module module, @Nullable final OrderEntry orderEntry) {
  for (final ModuleStructureExtension extension : ModuleStructureExtension.EP_NAME.getExtensions()) {
    final ActionCallback callback = extension.selectOrderEntry(module, orderEntry);
    if (callback != null) {
      return callback;
    }
  }

  Place p = new Place();
  p.putPath(ProjectStructureConfigurable.CATEGORY, this);
  Runnable r = null;

  final MasterDetailsComponent.MyNode node = findModuleNode(module);
  if (node != null) {
    p.putPath(TREE_OBJECT, module);
    p.putPath(ModuleEditor.SELECTED_EDITOR_NAME, ClasspathEditor.NAME);
    r = new Runnable() {
      @Override
      public void run() {
        if (orderEntry != null) {
          ModuleEditor moduleEditor = ((ModuleConfigurable)node.getConfigurable()).getModuleEditor();
          ModuleConfigurationEditor editor = moduleEditor.getEditor(ClasspathEditor.NAME);
          if (editor instanceof ClasspathEditor) {
            ((ClasspathEditor)editor).selectOrderEntry(orderEntry);
          }
        }
      }
    };
  }
  final ActionCallback result = ProjectStructureConfigurable.getInstance(myProject).navigateTo(p, true);
  return r != null ? result.doWhenDone(r) : result;
}
项目:tools-idea    文件:BaseStructureConfigurable.java   
@Override
public void queryPlace(@NotNull final Place place) {
  if (myCurrentConfigurable != null) {
    place.putPath(TREE_OBJECT, myCurrentConfigurable.getEditableObject());
    Place.queryFurther(myCurrentConfigurable, place);
  }
}
项目:tools-idea    文件:SidePanel.java   
public void addPlace(Place place, @NotNull Presentation presentation) {
  myModel.addElement(place);
  myPlaces.add(place);
  myPlace2Presentation.put(place, presentation);
  revalidate();
  repaint();
}
项目:tools-idea    文件:HeaderHidingTabbedModuleEditor.java   
@Override
public void queryPlace(@NotNull Place place) {
  ModuleConfigurationEditor singleEditor = getSingleEditor();
  if (singleEditor != null) {
    place.putPath(SELECTED_EDITOR_NAME, singleEditor.getDisplayName());
  }
  else {
    super.queryPlace(place);
  }
}
项目:tools-idea    文件:TabbedModuleEditor.java   
@Override
public ActionCallback navigateTo(@Nullable final Place place, final boolean requestFocus) {
  if (place != null) {
    selectEditor((String)place.getPath(SELECTED_EDITOR_NAME));
  }
  return new ActionCallback.Done();
}
项目:tools-idea    文件:OptionsEditor.java   
private ActionCallback initConfigurable(@NotNull final Configurable configurable) {
  final ActionCallback result = new ActionCallback();

  final ConfigurableContent content;

  if (configurable instanceof MasterDetails) {
    content = new Details((MasterDetails)configurable);
  }
  else {
    content = new Simple(configurable);
  }

  if (!myConfigurable2Content.containsKey(configurable)) {
    if (configurable instanceof Place.Navigator) {
      ((Place.Navigator)configurable).setHistory(myHistory);
    }
    configurable.reset();
  }

  UIUtil.invokeLaterIfNeeded(new Runnable() {
    @Override
    public void run() {
      if (myDisposed) return;
      myConfigurable2Content.put(configurable, content);
      result.setDone();
    }
  });

  return result;
}
项目:tools-idea    文件:OptionsEditor.java   
@Override
public void queryPlace(@NotNull final Place place) {
  final Configurable current = getContext().getCurrentConfigurable();
  place.putPath("configurable", current);
  place.putPath("filter", getFilterText());

  if (current instanceof Place.Navigator) {
    ((Place.Navigator)current).queryPlace(place);
  }
}
项目:consulo    文件:OptionsEditor.java   
@Override
public ActionCallback navigateTo(@Nullable final Place place, final boolean requestFocus) {
  final Configurable config = (Configurable)place.getPath("configurable");
  final String filter = (String)place.getPath("filter");

  final ActionCallback result = new ActionCallback();

  myFilter.refilterFor(filter, false, true).doWhenDone(() -> myTree.select(config).notifyWhenDone(result));

  return result;
}
项目:consulo    文件:OptionsEditor.java   
@Override
public void queryPlace(@Nonnull final Place place) {
  final Configurable current = getContext().getCurrentConfigurable();
  place.putPath("configurable", current);
  place.putPath("filter", getFilterText());

  if (current instanceof Place.Navigator) {
    ((Place.Navigator)current).queryPlace(place);
  }
}
项目:consulo    文件:ProjectStructureConfigurable.java   
public Place createArtifactPlace(Artifact artifact) {
  Place place = createPlaceFor(myArtifactsStructureConfigurable);
  if (artifact != null) {
    place.putPath(BaseStructureConfigurable.TREE_NAME, artifact.getName());
  }
  return place;
}
项目:consulo    文件:ProjectStructureConfigurable.java   
public ActionCallback select(@Nonnull LibraryOrderEntry libraryOrderEntry, final boolean requestFocus) {
  final Library lib = libraryOrderEntry.getLibrary();
  if (lib == null || lib.getTable() == null) {
    return selectOrderEntry(libraryOrderEntry.getOwnerModule(), libraryOrderEntry);
  }
  Place place = createPlaceFor(getConfigurableFor(lib));
  place.putPath(BaseStructureConfigurable.TREE_NAME, libraryOrderEntry.getLibraryName());
  return navigateTo(place, requestFocus);
}
项目:consulo    文件:ProjectStructureConfigurable.java   
@Override
public ActionCallback navigateTo(@Nullable final Place place, final boolean requestFocus) {
  if(myProjectStructureDialog == null) {
    return ActionCallback.REJECTED;
  }
  final Configurable toSelect = (Configurable)place.getPath(CATEGORY);

  if (mySelectedConfigurable != toSelect) {
    if (mySelectedConfigurable instanceof BaseStructureConfigurable) {
      ((BaseStructureConfigurable)mySelectedConfigurable).onStructureUnselected();
    }
    removeSelected();

    if (toSelect != null) {
      myProjectStructureDialog.select(toSelect);
    }

    setSelectedConfigurable(toSelect);

    if (toSelect instanceof MasterDetailsComponent) {
      final MasterDetailsComponent masterDetails = (MasterDetailsComponent)toSelect;

      masterDetails.setHistory(myHistory);
    }

    if (toSelect instanceof BaseStructureConfigurable) {
      ((BaseStructureConfigurable)toSelect).onStructureSelected();
    }
  }

  final ActionCallback result = new ActionCallback();
  Place.goFurther(toSelect, place, requestFocus).notifyWhenDone(result);

  if (!myHistory.isNavigatingNow() && mySelectedConfigurable != null) {
    myHistory.pushQueryPlace();
  }

  return result;
}
项目:consulo    文件:ModuleConfigurable.java   
@Override
public void queryPlace(@Nonnull final Place place) {
  final ModuleEditor editor = getModuleEditor();
  if (editor != null) {
    editor.queryPlace(place);
  }
}
项目:consulo    文件:BaseStructureConfigurable.java   
@Override
public void queryPlace(@Nonnull final Place place) {
  if (myCurrentConfigurable != null) {
    place.putPath(TREE_OBJECT, myCurrentConfigurable.getEditableObject());
    Place.queryFurther(myCurrentConfigurable, place);
  }
}
项目:consulo    文件:HeaderHidingTabbedModuleEditor.java   
@Override
public void queryPlace(@Nonnull Place place) {
  ModuleConfigurationEditor singleEditor = getSingleEditor();
  if (singleEditor != null) {
    place.putPath(ModuleEditor.SELECTED_EDITOR_NAME, singleEditor.getDisplayName());
  }
  else {
    super.queryPlace(place);
  }
}
项目:consulo    文件:TabbedModuleEditor.java   
@Override
public ActionCallback navigateTo(@Nullable final Place place, final boolean requestFocus) {
  if (place != null) {
    selectEditor((String)place.getPath(SELECTED_EDITOR_NAME));
  }
  return new ActionCallback.Done();
}
项目:intellij-ce-playground    文件:SdkEditor.java   
@Override
public ActionCallback navigateTo(@Nullable final Place place, final boolean requestFocus) {
  if (place == null) return ActionCallback.DONE;
  myTabbedPane.setSelectedTitle((String)place.getPath(SDK_TAB));
  return ActionCallback.DONE;
}
项目:intellij-ce-playground    文件:SdkEditor.java   
@Override
public void queryPlace(@NotNull final Place place) {
  place.putPath(SDK_TAB, myTabbedPane.getSelectedTitle());
}
项目:intellij-ce-playground    文件:ProjectStructureConfigurable.java   
@Override
public void queryPlace(@NotNull final Place place) {
  place.putPath(CATEGORY, mySelectedConfigurable);
  Place.queryFurther(mySelectedConfigurable, place);
}
项目:intellij-ce-playground    文件:ProjectStructureConfigurable.java   
public Place createProjectConfigurablePlace() {
  return createPlaceFor(myProjectConfig);
}
项目:intellij-ce-playground    文件:ProjectStructureConfigurable.java   
public Place createModulesPlace() {
  return createPlaceFor(myModulesConfig);
}
项目:intellij-ce-playground    文件:ProjectStructureConfigurable.java   
public Place createModulePlace(@NotNull Module module) {
  return createModulesPlace().putPath(ModuleStructureConfigurable.TREE_OBJECT, module);
}