@@ -0,0 +1,1051 @@
+package cane.brothers.e4.commander.handlers;%0D%0A%0D%0Aimport java.nio.file.Path;%0D%0Aimport java.util.Map;%0D%0A%0D%0Aimport javax.inject.Inject;%0D%0Aimport javax.inject.Named;%0D%0A%0D%0Aimport org.eclipse.e4.core.di.annotations.Execute;%0D%0Aimport org.eclipse.e4.core.di.annotations.Optional;%0D%0Aimport org.eclipse.e4.ui.di.UIEventTopic;%0D%0Aimport org.eclipse.e4.ui.model.application.ui.basic.MPart;%0D%0Aimport org.eclipse.e4.ui.services.IServiceConstants;%0D%0A%0D%0Aimport cane.brothers.e4.commander.IdStorage;%0D%0Aimport cane.brothers.e4.commander.event.PartEvents;%0D%0A%0D%0Apublic class StoreNewPathHandler %7B%0D%0A%0D%0A    @Inject%0D%0A    @Named(IServiceConstants.ACTIVE_PART)%0D%0A    private MPart activePart;%0D%0A%0D%0A    @Inject%0D%0A    @Optional%0D%0A    @Execute%0D%0A    public void execute(@UIEventTopic(PartEvents.TOPIC_PART_PATH_OPEN) Path newPath) %7B%0D%0A%0D%0A        // Store the root path of opening part%0D%0A        if (activePart != null && newPath != null) %7B%0D%0A            Map%3CString, String%3E state = activePart.getPersistedState();%0D%0A            state.put(IdStorage.STATE_ROOT_PATH, newPath.toString());%0D%0A        %7D%0D%0A    %7D%0D%0A%7D%0D%0A

store new path into state