use of com.google.gwt.place.shared.Place in project webprotege by protegeproject.
the class ShowProjectDetailsHandlerImpl method handleShowProjectDetails.
@Override
public void handleShowProjectDetails() {
Place currentPlace = placeController.getWhere();
placeController.goTo(new ProjectSettingsPlace(projectId, Optional.ofNullable(currentPlace)));
}
use of com.google.gwt.place.shared.Place in project webprotege by protegeproject.
the class ProjectPrefixDeclarationsPresenter method getNextPlace.
/**
* Gets the next place
* @return The next place to go to. Possibly empty inidicating the next place is not specified.
*/
private Optional<Place> getNextPlace() {
Place place = placeController.getWhere();
if (!(place instanceof ProjectPrefixDeclarationsPlace)) {
return Optional.empty();
}
ProjectPrefixDeclarationsPlace prefixesPlace = (ProjectPrefixDeclarationsPlace) place;
return prefixesPlace.getNextPlace();
}
use of com.google.gwt.place.shared.Place in project webprotege by protegeproject.
the class ActiveProjectManagerImpl method getActiveProjectId.
@Nonnull
@Override
public Optional<ProjectId> getActiveProjectId() {
Place place = placeController.getWhere();
if (!(place instanceof HasProjectId)) {
return Optional.empty();
}
HasProjectId projectViewPlace = (HasProjectId) place;
return Optional.of(projectViewPlace.getProjectId());
}
use of com.google.gwt.place.shared.Place in project webprotege by protegeproject.
the class SelectionModel method getSelection.
public Optional<OWLEntity> getSelection() {
Place place = placeController.getWhere();
if (!(place instanceof ProjectViewPlace)) {
return Optional.empty();
}
ProjectViewPlace projectViewPlace = (ProjectViewPlace) place;
return extractEntityFromItem(projectViewPlace.getItemSelection());
}
use of com.google.gwt.place.shared.Place in project webprotege by protegeproject.
the class SelectionModel method clearSelection.
public void clearSelection() {
Place place = placeController.getWhere();
if (!(place instanceof ProjectViewPlace)) {
return;
}
ProjectViewPlace projectViewPlace = (ProjectViewPlace) place;
if (projectViewPlace.getItemSelection().isEmpty()) {
return;
}
Place nextPlace = projectViewPlace.builder().clearSelection().build();
placeController.goTo(nextPlace);
}
Aggregations