Project

General

Profile

« Previous | Next » 

Revision 5559c1b5

Added by Patrick Plitzner about 7 years ago

ref #6566 Migrate org.eclipse.ui.main.menu.file menu

  • Also migrate two help handlers

View differences:

eu.etaxonomy.taxeditor.application/META-INF/MANIFEST.MF
7 7
Bundle-Vendor: EDIT
8 8
Bundle-Localization: OSGI-INF/l10n/plugin
9 9
Export-Package: eu.etaxonomy.taxeditor
10
Bundle-ActivationPolicy: lazy
11
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
12
Import-Package: eu.etaxonomy.cdm.database,
13
 org.apache.log4j,
14
 org.eclipse.equinox.app,
15
 org.eclipse.equinox.p2.repository.metadata,
16
 org.osgi.framework,
17
 org.osgi.service.packageadmin,
18
 org.springframework.remoting
19 10
Require-Bundle: org.eclipse.ui,
20 11
 org.eclipse.core.runtime,
21 12
 eu.etaxonomy.taxeditor.store,
......
36 27
 org.eclipse.equinox.p2.metadata,
37 28
 org.eclipse.equinox.p2.engine,
38 29
 org.eclipse.equinox.p2.metadata.repository,
39
 org.eclipse.equinox.p2.repository
30
 org.eclipse.equinox.p2.repository,
31
 org.eclipse.e4.ui.workbench,
32
 org.eclipse.e4.core.di.annotations;bundle-version="1.5.0"
33
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
34
Bundle-ActivationPolicy: lazy
35
Import-Package: eu.etaxonomy.cdm.database,
36
 javax.annotation;version="1.0.0";resolution:=optional,
37
 javax.inject;version="1.0.0",
38
 org.apache.log4j,
39
 org.eclipse.equinox.app,
40
 org.eclipse.equinox.p2.repository.metadata,
41
 org.osgi.framework,
42
 org.osgi.service.packageadmin,
43
 org.springframework.remoting
eu.etaxonomy.taxeditor.application/build.properties
1
source.. = src/main/java/,\
2
           src/test/java/
3 1
bin.includes = META-INF/,\
4 2
               .,\
5 3
               plugin.xml,\
......
7 5
               icons/,\
8 6
               OSGI-INF/l10n/plugin.properties,\
9 7
               OSGI-INF/l10n/plugin_de.properties,\
10
               splash.bmp,\              
8
               splash.bmp,\
9
               fragment.e4xmi
10
source.. = src/main/java/,\
11
           src/test/java/
eu.etaxonomy.taxeditor.application/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: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" xmlns:ui="http://www.eclipse.org/ui/2010/UIModel/application/ui" xmi:id="_pdAMoB4DEeehWtOSgLepjA">
3
  <fragments xsi:type="fragment:StringModelFragment" xmi:id="_0q2vsB4EEeehWtOSgLepjA" featurename="descriptors" parentElementId="org.eclipse.e4.legacy.ide.application"/>
4
  <fragments xsi:type="fragment:StringModelFragment" xmi:id="_bM7nAB4IEeehWtOSgLepjA" featurename="menuContributions" parentElementId="org.eclipse.e4.legacy.ide.application">
5
    <elements xsi:type="menu:MenuContribution" xmi:id="_hxW2sB6fEeePLJ5to5QrXQ" elementId="eu.etaxonomy.taxeditor.application.menucontribution.help" parentId="org.eclipse.ui.main.menu.help">
6
      <children xsi:type="menu:HandledMenuItem" xmi:id="_6vgg4B6gEeePLJ5to5QrXQ" elementId="id.commandlabel16" label="%command.label.16" command="_ye6jsB6gEeePLJ5to5QrXQ"/>
7
      <children xsi:type="menu:HandledMenuItem" xmi:id="_i-R80B6fEeePLJ5to5QrXQ" elementId="id.commandlabel20" label="%command.label.20" command="_V9LTcB6eEeePLJ5to5QrXQ"/>
8
    </elements>
9
    <elements xsi:type="menu:MenuContribution" xmi:id="_q5WDAB6sEeePLJ5to5QrXQ" elementId="eu.etaxonomy.taxeditor.application.menucontribution.menu" parentId="org.eclipse.ui.main.menu">
10
      <children xsi:type="menu:Menu" xmi:id="_0MhekB6sEeePLJ5to5QrXQ" elementId="org.eclipse.ui.main.menu.file" label="%menu.label">
11
        <children xsi:type="menu:Menu" xmi:id="_zznkcB6uEeePLJ5to5QrXQ" elementId="eu.etaxonomy.navigation.menu.new" label="%menu.label.3"/>
12
        <children xsi:type="menu:MenuSeparator" xmi:id="_5ETa8B6uEeePLJ5to5QrXQ" elementId="eu.etaxonomy.taxeditor.application.menuseparator.0"/>
13
        <children xsi:type="menu:HandledMenuItem" xmi:id="_ubXMsB62EeePLJ5to5QrXQ" elementId="eu.etaxonomy.taxeditor.application.handledmenuitem.close" label="%command.label" command="_LVTo8B62EeePLJ5to5QrXQ"/>
14
        <children xsi:type="menu:HandledMenuItem" xmi:id="_yGpysB62EeePLJ5to5QrXQ" elementId="eu.etaxonomy.taxeditor.application.handledmenuitem.closeAll" label="%command.label.0" command="_MrLPsB62EeePLJ5to5QrXQ"/>
15
        <children xsi:type="menu:MenuSeparator" xmi:id="_BmuOUB63EeePLJ5to5QrXQ" elementId="eu.etaxonomy.taxeditor.application.menuseparator.3"/>
16
        <children xsi:type="menu:HandledMenuItem" xmi:id="_jE5VoB60EeePLJ5to5QrXQ" elementId="eu.etaxonomy.taxeditor.application.handledmenuitem.import" label="%command.label.3" command="_dlo3oB60EeePLJ5to5QrXQ">
17
          <visibleWhen xsi:type="ui:CoreExpression" xmi:id="_0UicAB61EeePLJ5to5QrXQ" coreExpressionId="isCdmStoreConnected"/>
18
        </children>
19
        <children xsi:type="menu:HandledMenuItem" xmi:id="_xT7KsB61EeePLJ5to5QrXQ" elementId="eu.etaxonomy.taxeditor.application.handledmenuitem.export" label="%command.label.4" command="_CYHrgB62EeePLJ5to5QrXQ">
20
          <visibleWhen xsi:type="ui:CoreExpression" xmi:id="_21J-oB61EeePLJ5to5QrXQ" coreExpressionId="isCdmStoreConnected"/>
21
        </children>
22
        <children xsi:type="menu:MenuSeparator" xmi:id="_XE1yMB62EeePLJ5to5QrXQ" elementId="eu.etaxonomy.taxeditor.application.menuseparator.1"/>
23
        <children xsi:type="menu:HandledMenuItem" xmi:id="_YM8CsB62EeePLJ5to5QrXQ" elementId="eu.etaxonomy.taxeditor.application.handledmenuitem.save" label="%command.label.1" command="_PkWcQB62EeePLJ5to5QrXQ"/>
24
        <children xsi:type="menu:HandledMenuItem" xmi:id="_czNDMB62EeePLJ5to5QrXQ" elementId="eu.etaxonomy.taxeditor.application.handledmenuitem.saveAll" label="%command.label.2" command="_RWLmQB62EeePLJ5to5QrXQ"/>
25
        <children xsi:type="menu:MenuSeparator" xmi:id="_gBC4MB62EeePLJ5to5QrXQ" elementId="eu.etaxonomy.taxeditor.application.filemenu.io"/>
26
        <children xsi:type="menu:HandledMenuItem" xmi:id="_jC1OMB62EeePLJ5to5QrXQ" elementId="eu.etaxonomy.taxeditor.application.handledmenuitem.exit" label="%command.label.5" command="_TvLd8B62EeePLJ5to5QrXQ"/>
27
      </children>
28
      <children xsi:type="menu:Menu" xmi:id="__9a5wB6sEeePLJ5to5QrXQ" elementId="org.eclipse.ui.main.menu.edit" label="%menu.label.0"/>
29
      <children xsi:type="menu:Menu" xmi:id="_BFCCEB6tEeePLJ5to5QrXQ" elementId="org.eclipse.ui.main.menu.window" label="%menu.label.1"/>
30
      <children xsi:type="menu:Menu" xmi:id="_KDFiMB6tEeePLJ5to5QrXQ" elementId="org.eclipse.ui.main.menu.admin" label="%menu.label.4"/>
31
      <children xsi:type="menu:Menu" xmi:id="_MG8QUB6tEeePLJ5to5QrXQ" elementId="org.eclipse.ui.main.menu.help" label="%menu.label.2"/>
32
    </elements>
33
  </fragments>
34
  <fragments xsi:type="fragment:StringModelFragment" xmi:id="_vvQmIB4JEeehWtOSgLepjA" featurename="handlers" parentElementId="org.eclipse.e4.legacy.ide.application">
35
    <elements xsi:type="commands:Handler" xmi:id="_haDmcB6eEeePLJ5to5QrXQ" elementId="eu.etaxonomy.taxeditor.OpenExternalAboutPlatformHandler" contributionURI="bundleclass://eu.etaxonomy.taxeditor.application/eu.etaxonomy.taxeditor.OpenExternalAboutPlatformHandler" command="_V9LTcB6eEeePLJ5to5QrXQ"/>
36
    <elements xsi:type="commands:Handler" xmi:id="_3wxe4B6gEeePLJ5to5QrXQ" elementId="eu.etaxonomy.taxeditor.OpenExternalParserHelpHandler" contributionURI="bundleclass://eu.etaxonomy.taxeditor.application/eu.etaxonomy.taxeditor.OpenExternalParserHelpHandler" command="_ye6jsB6gEeePLJ5to5QrXQ"/>
37
  </fragments>
38
  <fragments xsi:type="fragment:StringModelFragment" xmi:id="_1jM6sB4JEeehWtOSgLepjA" featurename="commands" parentElementId="org.eclipse.e4.legacy.ide.application">
39
    <elements xsi:type="commands:Command" xmi:id="_V9LTcB6eEeePLJ5to5QrXQ" elementId="eu.etaxonomy.taxeditor.application.help.aboutPlatform" commandName="%command.name.0"/>
40
    <elements xsi:type="commands:Command" xmi:id="_ye6jsB6gEeePLJ5to5QrXQ" elementId="eu.etaxonomy.taxeditor.application.help.parser" commandName="%command.name"/>
41
    <elements xsi:type="commands:Command" xmi:id="_dlo3oB60EeePLJ5to5QrXQ" elementId="org.eclipse.ui.file.import" commandName="%command.label.3"/>
42
    <elements xsi:type="commands:Command" xmi:id="_CYHrgB62EeePLJ5to5QrXQ" elementId="org.eclipse.ui.file.export" commandName="%command.label.4"/>
43
    <elements xsi:type="commands:Command" xmi:id="_LVTo8B62EeePLJ5to5QrXQ" elementId="org.eclipse.ui.file.close" commandName="%command.label"/>
44
    <elements xsi:type="commands:Command" xmi:id="_MrLPsB62EeePLJ5to5QrXQ" elementId="org.eclipse.ui.file.closeAll" commandName="%command.label.0"/>
45
    <elements xsi:type="commands:Command" xmi:id="_PkWcQB62EeePLJ5to5QrXQ" elementId="org.eclipse.ui.file.save" commandName="%command.label.1"/>
46
    <elements xsi:type="commands:Command" xmi:id="_RWLmQB62EeePLJ5to5QrXQ" elementId="org.eclipse.ui.file.saveAll" commandName="%command.label.2"/>
47
    <elements xsi:type="commands:Command" xmi:id="_TvLd8B62EeePLJ5to5QrXQ" elementId="org.eclipse.ui.file.exit" commandName="%command.label.5"/>
48
  </fragments>
49
</fragment:ModelFragments>
eu.etaxonomy.taxeditor.application/plugin.xml
62 62
   </extension-->
63 63
   <extension
64 64
         point="org.eclipse.ui.menus">
65
      <menuContribution
66
            locationURI="menu:org.eclipse.ui.main.menu">
67
         <menu
68
               id="org.eclipse.ui.main.menu.file"
69
               label="%menu.label">
70
         </menu>
71
         <menu
72
               id="org.eclipse.ui.main.menu.edit"
73
               label="%menu.label.0">
74
         </menu>
75
         <menu
76
               id="org.eclipse.ui.main.menu.window"
77
               label="%menu.label.1">
78
         </menu>
79
          <menu
80
               id="org.eclipse.ui.main.menu.admin"
81
               label="%menu.label.4">
82
         </menu>
83
         <menu
84
               id="org.eclipse.ui.main.menu.help"
85
               label="%menu.label.2">
86
         </menu>
87
        
88
      </menuContribution>
89
      <menuContribution
90
            locationURI="menu:org.eclipse.ui.main.menu.file">
91
         <menu
92
               id="eu.etaxonomy.navigation.menu.new"
93
               label="%menu.label.3">
94
         </menu>
95
         <separator
96
               name="eu.etaxonomy.taxeditor.application.filemenu.new"
97
               visible="true">
98
         </separator>
99
         <command
100
               commandId="org.eclipse.ui.file.close"
101
               label="%command.label"
102
               style="push">
103
         </command>
104
         <command
105
               commandId="org.eclipse.ui.file.closeAll"
106
               label="%command.label.0"
107
               style="push">
108
         </command>
109
         <separator
110
               name="eu.etaxonomy.taxeditor.application.filemenu.close"
111
               visible="true">
112
         </separator>
113
         <command
114
               commandId="org.eclipse.ui.file.save"
115
               label="%command.label.1"
116
               style="push">
117
         </command>
118
         <command
119
               commandId="org.eclipse.ui.file.saveAll"
120
               label="%command.label.2"
121
               style="push">
122
         </command>
123
         <separator
124
               name="eu.etaxonomy.taxeditor.application.filemenu.save"
125
               visible="true">
126
         </separator>
127
         <command
128
               commandId="org.eclipse.ui.file.import"
129
               label="%command.label.3"
130
               style="push">
131
            <visibleWhen
132
                  checkEnabled="true">
133
               <reference
134
                     definitionId="isCdmStoreConnected">
135
               </reference>
136
            </visibleWhen>
137
         </command>
138
         <command
139
               commandId="org.eclipse.ui.file.export"
140
               label="%command.label.4"
141
               style="push">
142
            <visibleWhen
143
                  checkEnabled="true">
144
               <reference
145
                     definitionId="isCdmStoreConnected">
146
               </reference>
147
            </visibleWhen>
148
         </command>
149
         <separator
150
               name="eu.etaxonomy.taxeditor.application.filemenu.io"
151
               visible="true">
152
         </separator>
153
         <command
154
               commandId="org.eclipse.ui.file.exit"
155
               id="eu.etaxonomy.taxeditor.application.menu.exit"
156
               label="%command.label.5"
157
               style="push">
158
         </command>
159
      </menuContribution>
160 65
      <menuContribution
161 66
            locationURI="menu:org.eclipse.ui.main.menu.edit">
162 67
         <command
......
281 186
               label="%command.label.15"
282 187
               style="push">
283 188
         </command>
284
         <command
285
               commandId="eu.etaxonomy.taxeditor.application.help.parser"
286
               label="%command.label.16"
287
               style="push">
288
         </command>
289 189
         <separator
290 190
               name="eu.etaxonomy.taxeditor.ui.help.separator1"
291 191
               visible="true">
......
306 206
               commandId="org.eclipse.ui.help.aboutAction"
307 207
               label="%command.label.19">
308 208
         </command>
309
         <command
310
               commandId="eu.etaxonomy.taxeditor.application.help.aboutPlatform"
311
               label="%command.label.20"
312
               style="push">
313
         </command>
314 209
      </menuContribution>
315 210
            <menuContribution
316 211
            locationURI="toolbar:org.eclipse.ui.main.toolbar">
......
374 269
   </extension>
375 270
   <extension
376 271
         point="org.eclipse.ui.commands">
377
      <command
378
            defaultHandler="eu.etaxonomy.taxeditor.OpenExternalParserHelpHandler"
379
            id="eu.etaxonomy.taxeditor.application.help.parser"
380
            name="%command.name">
381
      </command>
382
      <command
383
            defaultHandler="eu.etaxonomy.taxeditor.OpenExternalAboutPlatformHandler"
384
            id="eu.etaxonomy.taxeditor.application.help.aboutPlatform"
385
            name="%command.name.0">
386
      </command>
387 272
      <command
388 273
            defaultHandler="eu.etaxonomy.taxeditor.update.UpdateHandler"
389 274
            id="eu.etaxonomy.taxeditor.update"
......
489 374
       </property>
490 375
    </product>
491 376
 </extension>
377
 <extension
378
       id="org.eclipse.e4.legacy.ide.application"
379
       point="org.eclipse.e4.workbench.model">
380
    <fragment
381
          apply="always"
382
          uri="fragment.e4xmi">
383
    </fragment>
384
 </extension>
492 385

  
493 386
</plugin>
eu.etaxonomy.taxeditor.application/src/main/java/eu/etaxonomy/taxeditor/OpenExternalAboutPlatformHandler.java
1 1
/**
2 2
* Copyright (C) 2007 EDIT
3
* European Distributed Institute of Taxonomy 
3
* European Distributed Institute of Taxonomy
4 4
* http://www.e-taxonomy.eu
5
* 
5
*
6 6
* The contents of this file are subject to the Mozilla Public License Version 1.1
7 7
* See LICENSE.TXT at the top of this package for the full license terms.
8 8
*/
......
13 13
import java.net.URL;
14 14

  
15 15
import org.apache.log4j.Logger;
16
import org.eclipse.core.commands.AbstractHandler;
17
import org.eclipse.core.commands.ExecutionEvent;
18
import org.eclipse.core.commands.ExecutionException;
16
import org.eclipse.e4.core.di.annotations.Execute;
19 17
import org.eclipse.ui.PartInitException;
20 18
import org.eclipse.ui.PlatformUI;
21 19
import org.eclipse.ui.browser.IWorkbenchBrowserSupport;
22 20

  
23 21
/**
24
 * <p>OpenExternalAboutPlatformHandler class.</p>
25
 *
26 22
 * @author p.ciardelli
27 23
 * @created 04.09.2009
28 24
 * @version 1.0
29 25
 */
30
public class OpenExternalAboutPlatformHandler extends AbstractHandler {
26
public class OpenExternalAboutPlatformHandler {
31 27
	private static final Logger logger = Logger.getLogger(OpenExternalAboutPlatformHandler.class);
32 28

  
33
	/* (non-Javadoc)
34
	 * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
35
	 */
36
	/** {@inheritDoc} */
37
	public Object execute(ExecutionEvent event) throws ExecutionException {
29

  
30
	@Execute
31
	public Object execute() {
38 32
		String url = "http://wp5.e-taxonomy.eu/";
39 33

  
40 34
		try {
eu.etaxonomy.taxeditor.application/src/main/java/eu/etaxonomy/taxeditor/OpenExternalParserHelpHandler.java
1 1
/**
2 2
* Copyright (C) 2007 EDIT
3
* European Distributed Institute of Taxonomy 
3
* European Distributed Institute of Taxonomy
4 4
* http://www.e-taxonomy.eu
5
* 
5
*
6 6
* The contents of this file are subject to the Mozilla Public License Version 1.1
7 7
* See LICENSE.TXT at the top of this package for the full license terms.
8 8
*/
......
13 13
import java.net.URL;
14 14

  
15 15
import org.apache.log4j.Logger;
16
import org.eclipse.core.commands.AbstractHandler;
17
import org.eclipse.core.commands.ExecutionEvent;
18
import org.eclipse.core.commands.ExecutionException;
16
import org.eclipse.e4.core.di.annotations.Execute;
19 17
import org.eclipse.ui.PartInitException;
20 18
import org.eclipse.ui.PlatformUI;
21 19
import org.eclipse.ui.browser.IWorkbenchBrowserSupport;
......
27 25
 * @created 04.09.2009
28 26
 * @version 1.0
29 27
 */
30
public class OpenExternalParserHelpHandler extends AbstractHandler {
28
public class OpenExternalParserHelpHandler {
31 29
	private static final Logger logger = Logger.getLogger(OpenExternalParserHelpHandler.class);
32 30

  
33
	/* (non-Javadoc)
34
	 * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
35
	 */
31
	@Execute
36 32
	/** {@inheritDoc} */
37
	public Object execute(ExecutionEvent event) throws ExecutionException {
33
	public Object execute() {
38 34
		String url = "http://dev.e-taxonomy.eu/trac/wiki/NameParserDocumentation";
39 35

  
40 36
		try {

Also available in: Unified diff