Search in sources :

Example 1 with ProjectPrefixDeclarationsPlace

use of edu.stanford.bmir.protege.web.shared.place.ProjectPrefixDeclarationsPlace 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();
}
Also used : ProjectPrefixDeclarationsPlace(edu.stanford.bmir.protege.web.shared.place.ProjectPrefixDeclarationsPlace) Place(com.google.gwt.place.shared.Place) ProjectPrefixDeclarationsPlace(edu.stanford.bmir.protege.web.shared.place.ProjectPrefixDeclarationsPlace)

Example 2 with ProjectPrefixDeclarationsPlace

use of edu.stanford.bmir.protege.web.shared.place.ProjectPrefixDeclarationsPlace in project webprotege by protegeproject.

the class EditProjectPrefixDeclarationsHandlerImpl method handleEditProjectPrefixes.

@Override
public void handleEditProjectPrefixes() {
    Place currentPlace = placeController.getWhere();
    if (currentPlace instanceof HasProjectId) {
        ProjectId projectId = ((HasProjectId) currentPlace).getProjectId();
        ProjectPrefixDeclarationsPlace prefixesPlace = new ProjectPrefixDeclarationsPlace(projectId, Optional.ofNullable(currentPlace));
        placeController.goTo(prefixesPlace);
    }
}
Also used : HasProjectId(edu.stanford.bmir.protege.web.shared.project.HasProjectId) ProjectPrefixDeclarationsPlace(edu.stanford.bmir.protege.web.shared.place.ProjectPrefixDeclarationsPlace) ProjectId(edu.stanford.bmir.protege.web.shared.project.ProjectId) HasProjectId(edu.stanford.bmir.protege.web.shared.project.HasProjectId) Place(com.google.gwt.place.shared.Place) ProjectPrefixDeclarationsPlace(edu.stanford.bmir.protege.web.shared.place.ProjectPrefixDeclarationsPlace)

Aggregations

Place (com.google.gwt.place.shared.Place)2 ProjectPrefixDeclarationsPlace (edu.stanford.bmir.protege.web.shared.place.ProjectPrefixDeclarationsPlace)2 HasProjectId (edu.stanford.bmir.protege.web.shared.project.HasProjectId)1 ProjectId (edu.stanford.bmir.protege.web.shared.project.ProjectId)1