<handlers xmi:id="_SQL_wN86Eee9zP45RW4C3A" elementId="eu.etaxonomy.taxeditor.editor.workingSet.handler.OpenWorkingSetEditorHandler" contributionURI="bundleclass://eu.etaxonomy.taxeditor.editor/eu.etaxonomy.taxeditor.editor.workingSet.handler.OpenWorkingSetEditorHandler" command="_xdCSwN85Eee9zP45RW4C3A"/>
<handlers xmi:id="_mjo-gOSjEee9gvnH2Eirpw" elementId="eu.etaxonomy.taxeditor.editor.workingSet.handler.CreateWorkingSetHandler" contributionURI="bundleclass://eu.etaxonomy.taxeditor.editor/eu.etaxonomy.taxeditor.editor.workingSet.handler.CreateWorkingSetHandler" command="_XO7eUOSjEee9gvnH2Eirpw"/>
<handlers xmi:id="_yQHcoOS3EeeKONG__xkGZg" elementId="eu.etaxonomy.taxeditor.editor.workingSet.handler.deleteWorkingSet" contributionURI="bundleclass://eu.etaxonomy.taxeditor.editor/eu.etaxonomy.taxeditor.editor.workingSet.handler.DeleteWorkingSetHandler" command="_uPmNgOS3EeeKONG__xkGZg"/>
+ <handlers xmi:id="_-g9koPycEeeOqKfc2I-67A" elementId="eu.etaxonomy.taxeditor.editor.handler.3" contributionURI="bundleclass://eu.etaxonomy.taxeditor.editor/eu.etaxonomy.taxeditor.editor.workingSet.handler.RefreshWorkingSetNavigator" command="_4k-uYPycEeeOqKfc2I-67A"/>
<menus xsi:type="menu:PopupMenu" xmi:id="__S3vQN87Eee9zP45RW4C3A" elementId="eu.etaxonomy.taxeditor.editor.popupmenu.workingSetNavigator">
<children xsi:type="menu:DynamicMenuContribution" xmi:id="_BRxE4N88Eee9zP45RW4C3A" elementId="eu.etaxonomy.taxeditor.editor.workingSetNavigator.dynamicmenucontribution.cdmViewer" label="Open in..." contributionURI="bundleclass://eu.etaxonomy.taxeditor.store/eu.etaxonomy.taxeditor.view.CdmViewerContextMenuE4"/>
<children xsi:type="menu:HandledMenuItem" xmi:id="_UUfGcOSjEee9gvnH2Eirpw" elementId="eu.etaxonomy.taxeditor.editor.handledmenuitem.newworkingset" label="New Working Set" tooltip="New Working Set" command="_XO7eUOSjEee9gvnH2Eirpw"/>
<children xsi:type="menu:HandledMenuItem" xmi:id="_JSt1kOS4EeeKONG__xkGZg" elementId="eu.etaxonomy.taxeditor.editor.handledmenuitem.deleteWorkingSet" label="Delete Working Set" tooltip="Delete Working Set" command="_uPmNgOS3EeeKONG__xkGZg"/>
</menus>
+ <toolbar xmi:id="_gz3CkPycEeeOqKfc2I-67A" elementId="eu.etaxonomy.taxeditor.editor.toolbar.2">
+ <children xsi:type="menu:HandledToolItem" xmi:id="_hnZYUPycEeeOqKfc2I-67A" elementId="eu.etaxonomy.taxeditor.editor.handledtoolitem.0" iconURI="platform:/plugin/eu.etaxonomy.taxeditor.store/icons/refresh.gif" tooltip="Refresh" command="_4k-uYPycEeeOqKfc2I-67A"/>
+ </toolbar>
</elements>
</fragments>
<fragments xsi:type="fragment:StringModelFragment" xmi:id="__mwtMDVpEee_b7RlBzTDRw" featurename="commands" parentElementId="xpath:/">
<elements xsi:type="commands:Command" xmi:id="_YeWagOPBEeeIH8IplZ0cuA" elementId="eu.etaxonomy.taxeditor.editor.command.characterMatrix.export" commandName="Export Character Matrix"/>
<elements xsi:type="commands:Command" xmi:id="_XO7eUOSjEee9gvnH2Eirpw" elementId="eu.etaxonomy.taxeditor.editor.command.createWorkingSet" commandName="New Working Set"/>
<elements xsi:type="commands:Command" xmi:id="_uPmNgOS3EeeKONG__xkGZg" elementId="eu.etaxonomy.taxeditor.editor.command.deleteWorkingSet" commandName="Delete Working Set"/>
+ <elements xsi:type="commands:Command" xmi:id="_4k-uYPycEeeOqKfc2I-67A" elementId="eu.etaxonomy.taxeditor.editor.command.refresh" commandName="Refresh"/>
</fragments>
<fragments xsi:type="fragment:StringModelFragment" xmi:id="_pZmusEalEeeXMc6kSYO7Xg" featurename="children" parentElementId="eu.etaxonomy.taxeditor.menu.showView" positionInList="after:eu.etaxonomy.taxeditor.workbench.menuseparator.navigation">
<elements xsi:type="menu:HandledMenuItem" xmi:id="_FPIHQKNwEeebGZ23ERGMGw" elementId="eu.etaxonomy.taxeditor.editor.showViewMenu.conceptGraph" label="%view.name.3" iconURI="" tooltip="%view.name.3" command="_WPjpoDSnEeek0dKsFNy--Q">
}
public void refresh(){
+ refresh(false);
+ }
+
+ public void refresh(boolean reloadWorkingSets){
+ if(reloadWorkingSets){
+ cdmEntitySession.dispose();
+ cdmEntitySession = CdmStore.getCurrentSessionManager().newSession(this, true);
+ IWorkingSetService service = CdmStore.getService(IWorkingSetService.class);
+ workingSets = service.list(WorkingSet.class, null, null, null, null);
+ }
viewer.setInput(workingSets);
viewer.refresh();
}
--- /dev/null
+
+package eu.etaxonomy.taxeditor.editor.workingSet.handler;
+
+import javax.inject.Named;
+
+import org.eclipse.e4.core.di.annotations.Execute;
+import org.eclipse.e4.ui.model.application.ui.basic.MPart;
+import org.eclipse.e4.ui.services.IServiceConstants;
+
+import eu.etaxonomy.taxeditor.editor.workingSet.WorkingSetNavigator;
+
+public class RefreshWorkingSetNavigatorHandler {
+
+ @Execute
+ public void execute(@Named(IServiceConstants.ACTIVE_PART)MPart activePart) {
+ if(activePart.getObject() instanceof WorkingSetNavigator){
+ ((WorkingSetNavigator) activePart.getObject()).refresh(true);
+ }
+ }
+
+}
\ No newline at end of file