Project

General

Profile

« Previous | Next » 

Revision 0f8746c6

Added by Patrick Plitzner almost 7 years ago

ref #6566 Migrate Sessions view

View differences:

eu.etaxonomy.taxeditor.store/META-INF/MANIFEST.MF
5 5
Bundle-Version: 4.7.0.qualifier
6 6
Bundle-Activator: eu.etaxonomy.taxeditor.store.internal.TaxeditorStorePlugin
7 7
Bundle-Vendor: EDIT
8
Bundle-Localization: OSGI-INF/l10n/bundle
8 9
Export-Package: eu.etaxonomy.cdm,
9 10
 eu.etaxonomy.cdm.database,
10 11
 eu.etaxonomy.taxeditor.datasource,
......
71 72
 org.eclipse.core.databinding.observable,
72 73
 org.eclipse.core.databinding.property,
73 74
 org.eclipse.jface.databinding,
74
 org.eclipse.e4.core.di.annotations;bundle-version="1.5.0"
75
 org.eclipse.jdt.annotation;bundle-version="1.1.100",
76
 eu.etaxonomy.taxeditor.workbench,
77
 org.eclipse.e4.core.di.annotations;bundle-version="1.5.0",
78
 org.eclipse.e4.ui.di;bundle-version="1.1.100",
79
 org.eclipse.e4.ui.workbench,
80
 org.eclipse.e4.core.di,
81
 org.eclipse.e4.core.commands;bundle-version="0.11.100",
82
 org.eclipse.e4.ui.services;bundle-version="1.2.100",
83
 org.eclipse.e4.ui.model.workbench;bundle-version="1.2.0",
84
 org.eclipse.e4.core.contexts;bundle-version="1.5.1"
85
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
86
Bundle-ActivationPolicy: lazy
75 87
Import-Package: eu.etaxonomy.taxeditor.webapp,
88
 javax.annotation;version="1.0.0";resolution:=optional,
89
 javax.inject;version="1.0.0",
76 90
 org.eclipse.core.commands,
77 91
 org.eclipse.core.commands.operations,
78 92
 org.eclipse.core.expressions,
......
94 108
 org.eclipse.ui.ide.undo,
95 109
 org.osgi.framework,
96 110
 org.osgi.service.prefs;version="1.1.1"
97
Bundle-ActivationPolicy: lazy
98
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
99
Bundle-Localization: OSGI-INF/l10n/bundle
eu.etaxonomy.taxeditor.store/build.properties
11 11
               OSGI-INF/l10n/bundle.properties,\
12 12
               OSGI-INF/l10n/bundle_de.properties,\
13 13
               src/main/java/eu/etaxonomy/taxeditor/l10n/messages.properties,\
14
               src/main/java/eu/etaxonomy/taxeditor/l10n/messages_de.properties
14
               src/main/java/eu/etaxonomy/taxeditor/l10n/messages_de.properties,\
15
               fragment.e4xmi
15 16

  
eu.etaxonomy.taxeditor.store/fragment.e4xmi
1
<?xml version="1.0" encoding="ASCII"?>
2
<fragment:ModelFragments xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:basic="http://www.eclipse.org/ui/2010/UIModel/application/descriptor/basic" xmlns:commands="http://www.eclipse.org/ui/2010/UIModel/application/commands" xmlns:fragment="http://www.eclipse.org/ui/2010/UIModel/fragment" xmlns:menu="http://www.eclipse.org/ui/2010/UIModel/application/ui/menu" xmi:id="_OhwnQCTfEeeiN5lBIuqN3g">
3
  <imports xsi:type="commands:Command" xmi:id="_bnVKsCZxEeeQLpuomSmVoQ" elementId="eu.etaxonomy.taxeditor.command.openPart"/>
4
  <fragments xsi:type="fragment:StringModelFragment" xmi:id="_xVa1wCXXEeex9MwMOgUeWw" featurename="descriptors" parentElementId="org.eclipse.e4.legacy.ide.application">
5
    <elements xsi:type="basic:PartDescriptor" xmi:id="_2xmxoCXXEeex9MwMOgUeWw" elementId="eu.etaxonomy.taxeditor.store.partdescriptor.sessionsView" label="%view.name.SESSIONS" closeable="true" contributionURI="bundleclass://eu.etaxonomy.taxeditor.store/eu.etaxonomy.taxeditor.view.sessions.SessionsViewPart"/>
6
  </fragments>
7
  <fragments xsi:type="fragment:StringModelFragment" xmi:id="_3rW8wCXaEeex9MwMOgUeWw" featurename="children" parentElementId="eu.etaxonomy.taxeditor.workbench.menu.window">
8
    <elements xsi:type="menu:Menu" xmi:id="_RaxPUCXdEeex9MwMOgUeWw" elementId="eu.etaxonomy.taxeditor.menu.showViewXX" label="%menu.label">
9
      <children xsi:type="menu:HandledMenuItem" xmi:id="_jFskQCZyEeeQLpuomSmVoQ" elementId="eu.etaxonomy.taxeditor.store.handledmenuitem.viewnamesessions" label="%view.name.SESSIONS" command="_bnVKsCZxEeeQLpuomSmVoQ">
10
        <parameters xmi:id="_BylIUCZzEeeQLpuomSmVoQ" elementId="eu.etaxonomy.taxeditor.store.showView.parameter.sessionView" name="eu.etaxonomy.taxeditor.workbench.commandparameter.partName" value="eu.etaxonomy.taxeditor.store.partdescriptor.sessionsView"/>
11
      </children>
12
    </elements>
13
  </fragments>
14
</fragment:ModelFragments>
eu.etaxonomy.taxeditor.store/plugin.xml
1488 1488
         viewerName="%viewCommandMapping.viewerName.TAXON_NODE_WIZARD">
1489 1489
   </viewCommandMapping>
1490 1490
</extension>
1491
<extension
1492
      id="id1"
1493
      point="org.eclipse.e4.workbench.model">
1494
   <fragment
1495
         apply="always"
1496
         uri="fragment.e4xmi">
1497
   </fragment>
1498
</extension>
1491 1499
</plugin>
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/sessions/SessionsViewPart.java
11 11
import java.text.DecimalFormat;
12 12
import java.util.Collection;
13 13

  
14
import net.sf.ehcache.Cache;
15
import net.sf.ehcache.CacheManager;
16
import net.sf.ehcache.statistics.LiveCacheStatistics;
14
import javax.annotation.PostConstruct;
15
import javax.inject.Inject;
17 16

  
18
import org.eclipse.jface.action.IMenuManager;
19
import org.eclipse.jface.action.IToolBarManager;
20 17
import org.eclipse.swt.SWT;
21 18
import org.eclipse.swt.events.SelectionAdapter;
22 19
import org.eclipse.swt.events.SelectionEvent;
......
29 26
import org.eclipse.swt.widgets.TableColumn;
30 27
import org.eclipse.swt.widgets.TableItem;
31 28
import org.eclipse.swt.widgets.Text;
32
import org.eclipse.ui.part.ViewPart;
33 29
import org.eclipse.wb.swt.SWTResourceManager;
34 30

  
35 31
import eu.etaxonomy.cdm.api.cache.CdmCacher;
......
40 36
import eu.etaxonomy.taxeditor.session.ICdmEntitySessionManagerObserver;
41 37
import eu.etaxonomy.taxeditor.session.NullSession;
42 38
import eu.etaxonomy.taxeditor.store.CdmStore;
39
import net.sf.ehcache.Cache;
40
import net.sf.ehcache.CacheManager;
41
import net.sf.ehcache.statistics.LiveCacheStatistics;
43 42

  
44 43
/**
45 44
 * @author cmathew
46 45
 * @date 16 Feb 2015
47 46
 *
48 47
 */
49
public class SessionsViewPart extends ViewPart implements ICdmEntitySessionManagerObserver {
48
public class SessionsViewPart implements ICdmEntitySessionManagerObserver {
50 49

  
51 50
    public static final String ID = "eu.etaxonomy.taxeditor.view.sessions.SessionsViewPart"; //$NON-NLS-1$
52 51
    public static final String OPEN_INSPECT_SESSIONS_DIALOG_ID =  "eu.etaxonomy.taxeditor.store.open.InspectSessionsDialog";
......
62 61
    private Text txtCdmModelOnDisk;
63 62
    private Text txtDefaultOnDisk;
64 63

  
64
    @Inject
65 65
    public SessionsViewPart() {
66 66
        this.cdmEntitySessionManager = CdmStore.getCurrentSessionManager();
67 67
        if(cdmEntitySessionManager != null) {
......
73 73
     * Create contents of the view part.
74 74
     * @param parent
75 75
     */
76
    @Override
76
    @PostConstruct
77 77
    public void createPartControl(Composite parent) {
78 78
        Composite container = new Composite(parent, SWT.NONE);
79 79
        container.setLayout(new GridLayout(5, false));
......
229 229
        }
230 230

  
231 231
        createActions();
232
        initializeToolBar();
233
        initializeMenu();
234 232
    }
235 233

  
236 234
    /**
......
340 338
        return "";
341 339
    }
342 340

  
343
    /**
344
     * Initialize the toolbar.
345
     */
346
    private void initializeToolBar() {
347
        IToolBarManager toolbarManager = getViewSite().getActionBars().getToolBarManager();
348
    }
349

  
350
    /**
351
     * Initialize the menu.
352
     */
353
    private void initializeMenu() {
354
        IMenuManager menuManager = getViewSite().getActionBars().getMenuManager();
355
    }
356

  
357
    @Override
358
    public void setFocus() {
359
        // Set the focus
360
    }
361 341

  
362 342
}

Also available in: Unified diff