Project

General

Profile

Revision 2039a37e

ID2039a37e95be70c93bdb8dcdc31d3a7fb227ba1f
Parent 03ab1009
Child 77e3b749

Added by Patrick Plitzner over 2 years ago

ref #6566 Initial import of taxeditor.workbench plugin - moved general menu contributions to this plugin

View differences:

eu.etaxonomy.taxeditor.application/META-INF/MANIFEST.MF
29 29
 org.eclipse.equinox.p2.metadata.repository,
30 30
 org.eclipse.equinox.p2.repository,
31 31
 org.eclipse.e4.ui.workbench,
32
 org.eclipse.e4.core.di.annotations;bundle-version="1.5.0"
32
 org.eclipse.e4.core.di.annotations;bundle-version="1.5.0",
33
 eu.etaxonomy.taxeditor.workbench;bundle-version="1.0.0"
33 34
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
34 35
Bundle-ActivationPolicy: lazy
35 36
Import-Package: eu.etaxonomy.cdm.database,
eu.etaxonomy.taxeditor.application/plugin.xml
63 63
   <extension
64 64
         point="org.eclipse.ui.menus">
65 65
      <menuContribution
66
            allPopups="false"
67
            locationURI="menu:org.eclipse.ui.main.menu.admin">
68
         <dynamic
69
               class="eu.etaxonomy.taxeditor.admin.UserGroupContributionItem"
70
               id="eu.etaxonomy.taxeditor.admin.UserGroupContributionItem">
71
            <visibleWhen
72
                  checkEnabled="true">
73
               <and>
74
                  <reference
75
                        definitionId="hasROLE_PROJECT_MANAGER">
76
                  </reference>
77
                  <reference
78
                        definitionId="isCdmStoreConnected">
79
                  </reference>
80
               </and>
81
            </visibleWhen>
82
         </dynamic>
83
      </menuContribution>
84
      <menuContribution
85 66
            locationURI="menu:org.eclipse.ui.main.menu.help">
86 67
         <command
87 68
               commandId="org.eclipse.ui.help.helpContents"
......
271 252
       </property>
272 253
    </product>
273 254
 </extension>
274
 <extension
275
       id="org.eclipse.e4.legacy.ide.application"
276
       point="org.eclipse.e4.workbench.model">
277
    <fragment
278
          apply="always"
279
          uri="fragment.e4xmi">
280
    </fragment>
281
 </extension>
282 255

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

  
10
package eu.etaxonomy.taxeditor;
11

  
12
import java.net.MalformedURLException;
13
import java.net.URL;
14

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

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

  
29

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

  
34
		try {
35
			PlatformUI.getWorkbench().getBrowserSupport().createBrowser
36
					(IWorkbenchBrowserSupport.AS_EXTERNAL, "aCustomId", "url", "url").openURL(new URL(url));
37
		} catch (PartInitException e) {
38
			logger.error(e);
39
			throw new RuntimeException(e);
40
		} catch (MalformedURLException e) {
41
			logger.error(e);
42
			throw new RuntimeException(e);
43
		}
44

  
45
		return null;
46
	}
47
}
eu.etaxonomy.taxeditor.application/src/main/java/eu/etaxonomy/taxeditor/OpenExternalParserHelpHandler.java
1
/**
2
* Copyright (C) 2007 EDIT
3
* European Distributed Institute of Taxonomy
4
* http://www.e-taxonomy.eu
5
*
6
* The contents of this file are subject to the Mozilla Public License Version 1.1
7
* See LICENSE.TXT at the top of this package for the full license terms.
8
*/
9

  
10
package eu.etaxonomy.taxeditor;
11

  
12
import java.net.MalformedURLException;
13
import java.net.URL;
14

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

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

  
31
	@Execute
32
	/** {@inheritDoc} */
33
	public Object execute() {
34
		String url = "http://dev.e-taxonomy.eu/trac/wiki/NameParserDocumentation";
35

  
36
		try {
37
			PlatformUI.getWorkbench().getBrowserSupport().createBrowser
38
						(IWorkbenchBrowserSupport.AS_EXTERNAL, "aCustomId", "url", "url").openURL(new URL(url));
39
		} catch (PartInitException e) {
40
			logger.error(e);
41
			throw new RuntimeException(e);
42
		} catch (MalformedURLException e) {
43
			logger.error(e);
44
			throw new RuntimeException(e);
45
		}
46

  
47
		return null;
48
	}
49
}
eu.etaxonomy.taxeditor.bulkeditor/META-INF/MANIFEST.MF
13 13
 eu.etaxonomy.taxeditor.bulkeditor.input,
14 14
 eu.etaxonomy.taxeditor.bulkeditor.internal,
15 15
 eu.etaxonomy.taxeditor.bulkeditor.referencingobjects
16
Require-Bundle: org.eclipse.ui,
16
Require-Bundle: eu.etaxonomy.taxeditor.workbench,
17
 org.eclipse.ui,
17 18
 org.eclipse.core.runtime,
18 19
 org.eclipse.ui.editors,
19 20
 org.eclipse.core.expressions,
20 21
 eu.etaxonomy.taxeditor.store,
21
 eu.etaxonomy.taxeditor.cdmlib
22
 eu.etaxonomy.taxeditor.cdmlib,
23
 org.eclipse.e4.ui.model.workbench;bundle-version="1.2.0.v20160229-1459",
24
 org.eclipse.e4.ui.workbench
22 25
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
23
Bundle-ActivationPolicy: lazy
24 26
Import-Package: eu.etaxonomy.taxeditor.editor,
25 27
 org.eclipse.core.runtime,
26 28
 org.eclipse.equinox.app,
......
31 33
 org.eclipse.jface.text.source,
32 34
 org.eclipse.ui.views.properties,
33 35
 org.osgi.framework
36
Bundle-ActivationPolicy: lazy
eu.etaxonomy.taxeditor.bulkeditor/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" xmi:id="_i8pkACAyEeeepOgM49meig">
3
  <fragments xsi:type="fragment:StringModelFragment" xmi:id="_HJWmwCAzEeeepOgM49meig" featurename="commands" parentElementId="org.eclipse.e4.legacy.ide.application">
4
    <elements xsi:type="commands:Command" xmi:id="_Kc-ToCAzEeeepOgM49meig" elementId="taxeditor-bulkeditor.dynamicopenmenu" commandName="%command.name.1">
5
      <parameters xmi:id="_PWg1cCAzEeeepOgM49meig" elementId="taxeditor-bulkeditor.commandParameter.inputType" name="Bulk Editor Class" optional="false"/>
6
    </elements>
7
  </fragments>
8
  <fragments xsi:type="fragment:StringModelFragment" xmi:id="_l_8NMCQUEeelPNxAg-e3TA" featurename="children" parentElementId="eu.etaxonomy.taxeditor.workbench.menu.admin">
9
    <elements xsi:type="menu:HandledMenuItem" xmi:id="_pgPrMCQUEeelPNxAg-e3TA" elementId="eu.etaxonomy.taxeditor.bulkeditor.menu.admin.userBulk" label="Users" command="_Kc-ToCAzEeeepOgM49meig">
10
      <parameters xmi:id="_7uF7sCQUEeelPNxAg-e3TA" elementId="eu.etaxonomy.taxeditor.bulkeditor.menu.admin.userBulk.userParam" name="taxeditor-bulkeditor.commandParameter.inputType" value="bulkeditor.input.user"/>
11
    </elements>
12
  </fragments>
13
</fragment:ModelFragments>
eu.etaxonomy.taxeditor.bulkeditor/plugin.xml
589 589
            viewerName="%viewCommandMapping.viewerName.BULK_EDITOR">
590 590
      </viewCommandMapping>
591 591
   </extension>
592
   <extension
593
         id="id1"
594
         point="org.eclipse.e4.workbench.model">
595
      <fragment
596
            apply="always"
597
            uri="fragment.e4xmi">
598
      </fragment>
599
   </extension>
592 600
<!-- start set marker -->
593 601

  
594 602
</plugin>
eu.etaxonomy.taxeditor.feature/feature.xml
135 135
         version="0.0.0"
136 136
         unpack="false"/>
137 137

  
138
   <plugin
139
         id="eu.etaxonomy.taxeditor.workbench"
140
         download-size="0"
141
         install-size="0"
142
         version="0.0.0"
143
         unpack="false"/>
144

  
138 145
</feature>
eu.etaxonomy.taxeditor.store/plugin.xml
442 442
        </dynamic> 
443 443
      </menuContribution>
444 444
      <menuContribution
445
            locationURI="menu:org.eclipse.ui.main.menu.file?after=eu.etaxonomy.taxeditor.application.filemenu.io">
445
            locationURI="menu:eu.etaxonomy.taxeditor.workbench.menu.file">
446 446
         <command
447 447
               commandId="eu.etaxonomy.taxeditor.store.operations.showRemotingLoginWindow"
448 448
               label="%command.label.CONNECT"
eu.etaxonomy.taxeditor.workbench/META-INF/MANIFEST.MF
1
Manifest-Version: 1.0
2
Bundle-ManifestVersion: 2
3
Bundle-Name: Workbench
4
Bundle-SymbolicName: eu.etaxonomy.taxeditor.workbench;singleton:=true
5
Bundle-Version: 1.0.0.qualifier
6
Bundle-Activator: eu.etaxonomy.taxeditor.workbench.Activator
7
Require-Bundle: org.eclipse.ui,
8
 org.eclipse.core.runtime,
9
 org.eclipse.e4.ui.workbench,
10
 org.eclipse.e4.ui.model.workbench;bundle-version="1.2.0",
11
 org.eclipse.e4.core.di.annotations;bundle-version="1.5.0",
12
 org.apache.log4j;bundle-version="1.2.15"
13
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
14
Bundle-ActivationPolicy: lazy
eu.etaxonomy.taxeditor.workbench/OSGI-INF/l10n/bundle.properties
1
#Properties file for eu.etaxonomy.taxeditor.workbench
2
perspective.name = Taxonomic
3
perspective.name.0 = Polytomous Key
4
perspective.name.1 = Uses
5
perspective.name.2 = Derivatives
6
perspective.name.3 = Checklist
7
menu.label = General
8
menu.label.0 = Edit
9
menu.label.1 = Window
10
menu.label.2 = Help
11
menu.label.3 = New
12
menu.label.4 = Admin
13
command.label = Close
14
command.label.0 = Close All
15
command.label.1 = Save
16
command.label.2 = Save All
17
command.label.3 = Import...
18
command.label.4 = Export...
19
command.label.5 = Exit
20
command.label.6 = Undo
21
command.label.7 = Redo
22
command.label.8 = Cut
23
command.label.9 = Copy
24
command.label.10 = Paste
25
command.label.11 = Delete
26
command.label.12 = Preferences
27
command.label.13 = Help Contents
28
command.label.14 = Search
29
command.label.15 = Dynamic Help
30
command.label.16 = Parser Help Website
31
command.label.17 = Check for Updates
32
command.label.18 = Install New Software...
33
command.label.19 = About Taxonomic Editor
34
command.label.20 = About the EDIT Platform
35
command.label.21 = New
36
command.label.22 = Save
37
command.label.23 = Database Preferences
38
command.label.24 = Database Repair Functionality
39
product.name = EDIT Taxonomic Editor
40
command.name = Parser Help
41
command.name.0 = About the EDIT Platform
42
activity.description = Disable unwanted eclipse UI
43
activity.name = Disable
44
product.name.0 = EDIT Taxonomic Editor
eu.etaxonomy.taxeditor.workbench/OSGI-INF/l10n/bundle_de.properties
1
perspective.name = Taxonomisch
2
perspective.name.0 = Polytomer Schl?ssel
3
perspective.name.1 = Nutzung
4
perspective.name.2 = Derivate
5
perspective.name.3 = Checklisten
6
menu.label = Datei
7
menu.label.0 = Bearbeiten
8
menu.label.1 = Extras
9
menu.label.2 = Hilfe
10
menu.label.3 = Neu
11
menu.label.4 = Admin
12
command.label = Schlie\u00dfen
13
command.label.0 = Schlie\u00dfe alle
14
command.label.1 = Speichern
15
command.label.2 = Speichere alle
16
command.label.3 = Import...
17
command.label.4 = Export...
18
command.label.5 = Beenden
19
command.label.6 = R\u00fcckg\u00e4ngig
20
command.label.7 = Letzen Befehl wiederholen
21
command.label.8 = Ausschneiden
22
command.label.9 = Kopieren
23
command.label.10 = Einf\u00fcgen
24
command.label.11 = L\u00f6schen
25
command.label.12 = Einstellungen
26
command.label.13 = Hilfeinhalt
27
command.label.14 = Suchen
28
command.label.15 = Dynamische Hilfe
29
command.label.16 = Parser Hilfe Webseite (auf Englisch)
30
command.label.17 = Suche nach Updates
31
command.label.18 = Installiere Neue Software...
32
command.label.19 = \u00dcber den Taxonomischen Editor
33
command.label.20 = \u00dcber die EDIT Platform
34
command.label.21 = Neu
35
command.label.22 = Speichern
36
command.label.23 = Datenbank Pr?ferenzen
37
command.label.24 = Datenbank Reparatur Funktionalit?t
38
product.name = EDIT Taxonomischer Editor
39
command.name = Parser Hilfe
40
command.name.0 = \u00dcber die EDIT Platform
41
activity.description = Schalte unerw\u00fcnschte eclipse UI aus
42
activity.name = Ausschalten
43
product.name.0 = EDIT Taxonomischer Editor
eu.etaxonomy.taxeditor.workbench/build.properties
1
source.. = src/
2
output.. = bin/
3
bin.includes = META-INF/,\
4
               .,\
5
               plugin.xml,\
6
               OSGI-INF/,\
7
               fragment.e4xmi,\
8
               OSGI-INF/l10n/bundle.properties
eu.etaxonomy.taxeditor.workbench/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="_FaGnoCQNEeen_7LZsZSNoA" featurename="menuContributions" parentElementId="org.eclipse.e4.legacy.ide.application">
4
    <elements xsi:type="menu:MenuContribution" xmi:id="_FaGnoSQNEeen_7LZsZSNoA" elementId="eu.etaxonomy.taxeditor.workbench.menu" parentId="org.eclipse.ui.main.menu">
5
      <children xsi:type="menu:Menu" xmi:id="_FaGnoiQNEeen_7LZsZSNoA" elementId="eu.etaxonomy.taxeditor.workbench.menu.file" label="%menu.label">
6
        <children xsi:type="menu:Menu" xmi:id="_FaGnoyQNEeen_7LZsZSNoA" elementId="eu.etaxonomy.navigation.menu.new" label="%menu.label.3"/>
7
        <children xsi:type="menu:MenuSeparator" xmi:id="_FaGnpCQNEeen_7LZsZSNoA" elementId="eu.etaxonomy.taxeditor.application.menuseparator.0"/>
8
        <children xsi:type="menu:HandledMenuItem" xmi:id="_FaGnpSQNEeen_7LZsZSNoA" elementId="eu.etaxonomy.taxeditor.application.handledmenuitem.close" label="%command.label">
9
          <visibleWhen xsi:type="ui:CoreExpression" xmi:id="_FaGnpiQNEeen_7LZsZSNoA" coreExpressionId="isCdmStoreConnected"/>
10
          <command href="../eu.etaxonomy.taxeditor.application/fragment.e4xmi#_LVTo8B62EeePLJ5to5QrXQ"/>
11
        </children>
12
        <children xsi:type="menu:HandledMenuItem" xmi:id="_FaGnpyQNEeen_7LZsZSNoA" elementId="eu.etaxonomy.taxeditor.application.handledmenuitem.closeAll" label="%command.label.0">
13
          <visibleWhen xsi:type="ui:CoreExpression" xmi:id="_FaGnqCQNEeen_7LZsZSNoA" coreExpressionId="isCdmStoreConnected"/>
14
          <command href="../eu.etaxonomy.taxeditor.application/fragment.e4xmi#_MrLPsB62EeePLJ5to5QrXQ"/>
15
        </children>
16
        <children xsi:type="menu:MenuSeparator" xmi:id="_FaGnqSQNEeen_7LZsZSNoA" elementId="eu.etaxonomy.taxeditor.application.menuseparator.3"/>
17
        <children xsi:type="menu:HandledMenuItem" xmi:id="_FaGnqiQNEeen_7LZsZSNoA" elementId="eu.etaxonomy.taxeditor.application.handledmenuitem.import" label="%command.label.3">
18
          <visibleWhen xsi:type="ui:CoreExpression" xmi:id="_FaGnqyQNEeen_7LZsZSNoA" coreExpressionId="isCdmStoreConnected"/>
19
          <command href="../eu.etaxonomy.taxeditor.application/fragment.e4xmi#_dlo3oB60EeePLJ5to5QrXQ"/>
20
        </children>
21
        <children xsi:type="menu:HandledMenuItem" xmi:id="_FaGnrCQNEeen_7LZsZSNoA" elementId="eu.etaxonomy.taxeditor.application.handledmenuitem.export" label="%command.label.4">
22
          <visibleWhen xsi:type="ui:CoreExpression" xmi:id="_FaGnrSQNEeen_7LZsZSNoA" coreExpressionId="isCdmStoreConnected"/>
23
          <command href="../eu.etaxonomy.taxeditor.application/fragment.e4xmi#_CYHrgB62EeePLJ5to5QrXQ"/>
24
        </children>
25
        <children xsi:type="menu:MenuSeparator" xmi:id="_FaGnriQNEeen_7LZsZSNoA" elementId="eu.etaxonomy.taxeditor.application.menuseparator.1"/>
26
        <children xsi:type="menu:HandledMenuItem" xmi:id="_FaGnryQNEeen_7LZsZSNoA" elementId="eu.etaxonomy.taxeditor.application.handledmenuitem.save" label="%command.label.1">
27
          <visibleWhen xsi:type="ui:CoreExpression" xmi:id="_FaGnsCQNEeen_7LZsZSNoA" coreExpressionId="isCdmStoreConnected"/>
28
          <command href="../eu.etaxonomy.taxeditor.application/fragment.e4xmi#_PkWcQB62EeePLJ5to5QrXQ"/>
29
        </children>
30
        <children xsi:type="menu:HandledMenuItem" xmi:id="_FaGnsSQNEeen_7LZsZSNoA" elementId="eu.etaxonomy.taxeditor.application.handledmenuitem.saveAll" label="%command.label.2">
31
          <visibleWhen xsi:type="ui:CoreExpression" xmi:id="_FaGnsiQNEeen_7LZsZSNoA" coreExpressionId="isCdmStoreConnected"/>
32
          <command href="../eu.etaxonomy.taxeditor.application/fragment.e4xmi#_RWLmQB62EeePLJ5to5QrXQ"/>
33
        </children>
34
        <children xsi:type="menu:MenuSeparator" xmi:id="_FaGnsyQNEeen_7LZsZSNoA" elementId="eu.etaxonomy.taxeditor.application.filemenu.io"/>
35
        <children xsi:type="menu:HandledMenuItem" xmi:id="_FaGntCQNEeen_7LZsZSNoA" elementId="eu.etaxonomy.taxeditor.application.handledmenuitem.exit" label="%command.label.5">
36
          <visibleWhen xsi:type="ui:CoreExpression" xmi:id="_FaGntSQNEeen_7LZsZSNoA" coreExpressionId="isCdmStoreConnected"/>
37
          <command href="../eu.etaxonomy.taxeditor.application/fragment.e4xmi#_TvLd8B62EeePLJ5to5QrXQ"/>
38
        </children>
39
      </children>
40
      <children xsi:type="menu:Menu" xmi:id="_FaGntiQNEeen_7LZsZSNoA" elementId="eu.etaxonomy.taxeditor.workbench.menu.edit" toBeRendered="false" visible="false" label="%menu.label.0"/>
41
      <children xsi:type="menu:Menu" xmi:id="_FaGntyQNEeen_7LZsZSNoA" elementId="eu.etaxonomy.taxeditor.workbench.menu.window" label="%menu.label.1">
42
        <children xsi:type="menu:MenuSeparator" xmi:id="_FaGnuCQNEeen_7LZsZSNoA" elementId="eu.etaxonomy.taxeditor.application.windowMenu.last"/>
43
        <children xsi:type="menu:HandledMenuItem" xmi:id="_FaGnuSQNEeen_7LZsZSNoA" elementId="org.eclipse.ui.main.menu.window.preferences" label="%command.label.12">
44
          <command href="../eu.etaxonomy.taxeditor.application/fragment.e4xmi#_l9kXoB7PEeeC-JvycL9ysA"/>
45
        </children>
46
      </children>
47
      <children xsi:type="menu:Menu" xmi:id="_FaGnuiQNEeen_7LZsZSNoA" elementId="eu.etaxonomy.taxeditor.workbench.menu.admin" label="%menu.label.4">
48
        <children xsi:type="menu:HandledMenuItem" xmi:id="_b4RFsCQsEeeq76l4saMAFQ" elementId="eu.etaxonomy.taxeditor.workbench.menu.admin.dbpreferences" label="%command.label.23" command="_VawPsCQsEeeq76l4saMAFQ">
49
          <visibleWhen xsi:type="ui:CoreExpression" xmi:id="_b4RFsSQsEeeq76l4saMAFQ" coreExpressionId="hasROLE_PROJECT_MANAGER_AND_isCdmStoreConnected"/>
50
        </children>
51
        <children xsi:type="menu:HandledMenuItem" xmi:id="_cWhvACQsEeeq76l4saMAFQ" elementId="eu.etaxonomy.taxeditor.workbench.menu.admin.dbrepair" label="%command.label.24" command="_Va29YCQsEeeq76l4saMAFQ">
52
          <visibleWhen xsi:type="ui:CoreExpression" xmi:id="_cWhvASQsEeeq76l4saMAFQ" coreExpressionId="hasROLE_PROJECT_MANAGER_AND_isCdmStoreConnected"/>
53
        </children>
54
      </children>
55
      <children xsi:type="menu:Menu" xmi:id="_FaGnvyQNEeen_7LZsZSNoA" elementId="eu.etaxonomy.taxeditor.workbench.menu.help" label="%menu.label.2">
56
        <children xsi:type="menu:HandledMenuItem" xmi:id="_dTyBcCQsEeeq76l4saMAFQ" elementId="id.commandlabel16" label="%command.label.16" command="_UZ_WQCQsEeeq76l4saMAFQ"/>
57
        <children xsi:type="menu:HandledMenuItem" xmi:id="_d0m2kCQsEeeq76l4saMAFQ" elementId="id.commandlabel20" label="%command.label.20" command="_UZ2zYCQsEeeq76l4saMAFQ"/>
58
      </children>
59
    </elements>
60
  </fragments>
61
  <fragments xsi:type="fragment:StringModelFragment" xmi:id="_nOhPoB9zEeeIA_2gwq7JKg" featurename="trimContributions" parentElementId="org.eclipse.e4.legacy.ide.application">
62
    <elements xsi:type="menu:TrimContribution" xmi:id="_FIbzwB92EeeIA_2gwq7JKg" elementId="eu.etaxonomy.taxeditor.workbench.trimcontribution.0" parentId="org.eclipse.ui.main.toolbar" positionInParent="after=additions">
63
      <children xsi:type="menu:ToolBar" xmi:id="_KDVngB92EeeIA_2gwq7JKg" elementId="eu.etaxonomy.taxeditor.workbench.menu.toolbar.0">
64
        <children xsi:type="menu:HandledToolItem" xmi:id="_KvxPsB92EeeIA_2gwq7JKg" elementId="eu.etaxonomy.taxeditor.workbench.menu.toolbar.new" label="%command.label.21" iconURI="platform:/plugin/org.eclipse.ui/icons/full/etool16/new_wiz.png" command="_hooiQB7QEeeC-JvycL9ysA"/>
65
        <children xsi:type="menu:HandledToolItem" xmi:id="_ARn5AB96EeeIA_2gwq7JKg" elementId="eu.etaxonomy.taxeditor.workbench.menu.toolbar.save" label="%command.label.22" iconURI="platform:/plugin/eu.etaxonomy.taxeditor.store/icons/save_edit.gif" command="_PkWcQB62EeePLJ5to5QrXQ"/>
66
      </children>
67
    </elements>
68
  </fragments>
69
  <fragments xsi:type="fragment:StringModelFragment" xmi:id="_1jM6sB4JEeehWtOSgLepjA" featurename="commands" parentElementId="org.eclipse.e4.legacy.ide.application">
70
    <elements xsi:type="commands:Command" xmi:id="_dlo3oB60EeePLJ5to5QrXQ" elementId="org.eclipse.ui.file.import" commandName="%command.label.3"/>
71
    <elements xsi:type="commands:Command" xmi:id="_CYHrgB62EeePLJ5to5QrXQ" elementId="org.eclipse.ui.file.export" commandName="%command.label.4"/>
72
    <elements xsi:type="commands:Command" xmi:id="_LVTo8B62EeePLJ5to5QrXQ" elementId="org.eclipse.ui.file.close" commandName="%command.label"/>
73
    <elements xsi:type="commands:Command" xmi:id="_MrLPsB62EeePLJ5to5QrXQ" elementId="org.eclipse.ui.file.closeAll" commandName="%command.label.0"/>
74
    <elements xsi:type="commands:Command" xmi:id="_PkWcQB62EeePLJ5to5QrXQ" elementId="org.eclipse.ui.file.save" commandName="%command.label.1"/>
75
    <elements xsi:type="commands:Command" xmi:id="_RWLmQB62EeePLJ5to5QrXQ" elementId="org.eclipse.ui.file.saveAll" commandName="%command.label.2"/>
76
    <elements xsi:type="commands:Command" xmi:id="_TvLd8B62EeePLJ5to5QrXQ" elementId="org.eclipse.ui.file.exit" commandName="%command.label.5"/>
77
    <elements xsi:type="commands:Command" xmi:id="_5pfmIB7DEeeRW_RHu3JLqQ" elementId="org.eclipse.ui.edit.undo" commandName="%command.label.6"/>
78
    <elements xsi:type="commands:Command" xmi:id="_EarQwB7EEeeRW_RHu3JLqQ" elementId="org.eclipse.ui.edit.redo" commandName="%command.label.7"/>
79
    <elements xsi:type="commands:Command" xmi:id="_PhIAwB7EEeeRW_RHu3JLqQ" elementId="org.eclipse.ui.edit.cut" commandName="%command.label.8"/>
80
    <elements xsi:type="commands:Command" xmi:id="_RxxNsB7EEeeRW_RHu3JLqQ" elementId="org.eclipse.ui.edit.copy" commandName="%command.label.9"/>
81
    <elements xsi:type="commands:Command" xmi:id="_TmIHQB7EEeeRW_RHu3JLqQ" elementId="org.eclipse.ui.edit.paste" commandName="%command.label.10"/>
82
    <elements xsi:type="commands:Command" xmi:id="_WOTDYB7EEeeRW_RHu3JLqQ" elementId="org.eclipse.ui.edit.delete" commandName="%command.label.11"/>
83
    <elements xsi:type="commands:Command" xmi:id="_l9kXoB7PEeeC-JvycL9ysA" elementId="org.eclipse.ui.window.preferences" commandName="%command.label.12"/>
84
    <elements xsi:type="commands:Command" xmi:id="_hooiQB7QEeeC-JvycL9ysA" elementId="org.eclipse.ui.newWizard" commandName="%command.label.21"/>
85
    <elements xsi:type="commands:Command" xmi:id="_UZ2zYCQsEeeq76l4saMAFQ" elementId="eu.etaxonomy.taxeditor.workbench.help.aboutPlatform" commandName="%command.name.0"/>
86
    <elements xsi:type="commands:Command" xmi:id="_UZ_WQCQsEeeq76l4saMAFQ" elementId="eu.etaxonomy.taxeditor.workbench.help.parser" commandName="%command.name"/>
87
    <elements xsi:type="commands:Command" xmi:id="_VawPsCQsEeeq76l4saMAFQ" elementId="eu.etaxonomy.taxeditor.workbench.DatabaseSettings" commandName="%command.label.23"/>
88
    <elements xsi:type="commands:Command" xmi:id="_Va29YCQsEeeq76l4saMAFQ" elementId="eu.etaxonomy.taxeditor.workbench.DatabaseRepairFunctionality" commandName="%command.label.24"/>
89
  </fragments>
90
  <fragments xsi:type="fragment:StringModelFragment" xmi:id="_WLNcQCQsEeeq76l4saMAFQ" featurename="handlers" parentElementId="org.eclipse.e4.legacy.ide.application">
91
    <elements xsi:type="commands:Handler" xmi:id="_WLNcQSQsEeeq76l4saMAFQ" elementId="eu.etaxonomy.taxeditor.OpenExternalAboutPlatformHandler" contributionURI="bundleclass://eu.etaxonomy.taxeditor.workbench/eu.etaxonomy.taxeditor.workbench.OpenExternalAboutPlatformHandler" command="_UZ2zYCQsEeeq76l4saMAFQ"/>
92
    <elements xsi:type="commands:Handler" xmi:id="_WLNcQiQsEeeq76l4saMAFQ" elementId="eu.etaxonomy.taxeditor.OpenExternalParserHelpHandler" contributionURI="bundleclass://eu.etaxonomy.taxeditor.workbench/eu.etaxonomy.taxeditor.workbench.OpenExternalParserHelpHandler" command="_UZ_WQCQsEeeq76l4saMAFQ"/>
93
    <elements xsi:type="commands:Handler" xmi:id="_WLNcQyQsEeeq76l4saMAFQ" elementId="eu.etaxonomy.taxeditor.handler.OpenDatabaseRepairWizardHandler" contributionURI="bundleclass://eu.etaxonomy.taxeditor.store/eu.etaxonomy.taxeditor.handler.OpenDatabaseRepairWizardHandler" command="_Va29YCQsEeeq76l4saMAFQ"/>
94
    <elements xsi:type="commands:Handler" xmi:id="_WLNcRCQsEeeq76l4saMAFQ" elementId="eu.etaxonomy.taxeditor.handler.OpenDatabasePreferencesWizardHandler" contributionURI="bundleclass://eu.etaxonomy.taxeditor.store/eu.etaxonomy.taxeditor.handler.OpenDatabasePreferencesWizardHandler" command="_VawPsCQsEeeq76l4saMAFQ"/>
95
  </fragments>
96
</fragment:ModelFragments>
eu.etaxonomy.taxeditor.workbench/plugin.xml
1
<?xml version="1.0" encoding="UTF-8"?>
2
<?eclipse version="3.4"?>
3
<plugin>
4
   <extension
5
         id="id2"
6
         point="org.eclipse.e4.workbench.model">
7
      <fragment
8
            apply="always"
9
            uri="fragment.e4xmi">
10
      </fragment>
11
   </extension>
12

  
13
</plugin>
eu.etaxonomy.taxeditor.workbench/src/eu/etaxonomy/taxeditor/workbench/Activator.java
1
package eu.etaxonomy.taxeditor.workbench;
2

  
3
import org.eclipse.ui.plugin.AbstractUIPlugin;
4
import org.osgi.framework.BundleContext;
5

  
6
/**
7
 * The activator class controls the plug-in life cycle
8
 */
9
public class Activator extends AbstractUIPlugin {
10

  
11
	// The plug-in ID
12
	public static final String PLUGIN_ID = "eu.etaxonomy.taxeditor.workbench"; //$NON-NLS-1$
13

  
14
	// The shared instance
15
	private static Activator plugin;
16
	
17
	/**
18
	 * The constructor
19
	 */
20
	public Activator() {
21
	}
22

  
23
	/*
24
	 * (non-Javadoc)
25
	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
26
	 */
27
	public void start(BundleContext context) throws Exception {
28
		super.start(context);
29
		plugin = this;
30
	}
31

  
32
	/*
33
	 * (non-Javadoc)
34
	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
35
	 */
36
	public void stop(BundleContext context) throws Exception {
37
		plugin = null;
38
		super.stop(context);
39
	}
40

  
41
	/**
42
	 * Returns the shared instance
43
	 *
44
	 * @return the shared instance
45
	 */
46
	public static Activator getDefault() {
47
		return plugin;
48
	}
49

  
50
}
eu.etaxonomy.taxeditor.workbench/src/eu/etaxonomy/taxeditor/workbench/OpenExternalAboutPlatformHandler.java
1
/**
2
* Copyright (C) 2007 EDIT
3
* European Distributed Institute of Taxonomy
4
* http://www.e-taxonomy.eu
5
*
6
* The contents of this file are subject to the Mozilla Public License Version 1.1
7
* See LICENSE.TXT at the top of this package for the full license terms.
8
*/
9

  
10
package eu.etaxonomy.taxeditor.workbench;
11

  
12
import java.net.MalformedURLException;
13
import java.net.URL;
14

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

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

  
29

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

  
34
		try {
35
			PlatformUI.getWorkbench().getBrowserSupport().createBrowser
36
					(IWorkbenchBrowserSupport.AS_EXTERNAL, "aCustomId", "url", "url").openURL(new URL(url));
37
		} catch (PartInitException e) {
38
			logger.error(e);
39
			throw new RuntimeException(e);
40
		} catch (MalformedURLException e) {
41
			logger.error(e);
42
			throw new RuntimeException(e);
43
		}
44

  
45
		return null;
46
	}
47
}
eu.etaxonomy.taxeditor.workbench/src/eu/etaxonomy/taxeditor/workbench/OpenExternalParserHelpHandler.java
1
/**
2
* Copyright (C) 2007 EDIT
3
* European Distributed Institute of Taxonomy
4
* http://www.e-taxonomy.eu
5
*
6
* The contents of this file are subject to the Mozilla Public License Version 1.1
7
* See LICENSE.TXT at the top of this package for the full license terms.
8
*/
9

  
10
package eu.etaxonomy.taxeditor.workbench;
11

  
12
import java.net.MalformedURLException;
13
import java.net.URL;
14

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

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

  
31
	@Execute
32
	/** {@inheritDoc} */
33
	public Object execute() {
34
		String url = "http://dev.e-taxonomy.eu/trac/wiki/NameParserDocumentation";
35

  
36
		try {
37
			PlatformUI.getWorkbench().getBrowserSupport().createBrowser
38
						(IWorkbenchBrowserSupport.AS_EXTERNAL, "aCustomId", "url", "url").openURL(new URL(url));
39
		} catch (PartInitException e) {
40
			logger.error(e);
41
			throw new RuntimeException(e);
42
		} catch (MalformedURLException e) {
43
			logger.error(e);
44
			throw new RuntimeException(e);
45
		}
46

  
47
		return null;
48
	}
49
}

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)