From: Patrick Plitzner Date: Wed, 19 Apr 2017 09:23:56 +0000 (+0200) Subject: ref #6566 Migrate SearchBar X-Git-Tag: 4.7.0^2~60 X-Git-Url: https://dev.e-taxonomy.eu/gitweb/taxeditor.git/commitdiff_plain/15d272aa1545f7211ef2d2609f454d944d959fe5 ref #6566 Migrate SearchBar --- diff --git a/eu.etaxonomy.taxeditor.navigation/META-INF/MANIFEST.MF b/eu.etaxonomy.taxeditor.navigation/META-INF/MANIFEST.MF index acae2c9f1..45456099c 100644 --- a/eu.etaxonomy.taxeditor.navigation/META-INF/MANIFEST.MF +++ b/eu.etaxonomy.taxeditor.navigation/META-INF/MANIFEST.MF @@ -3,6 +3,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: Navigation Bundle Bundle-SymbolicName: eu.etaxonomy.taxeditor.navigation;singleton:=true Bundle-Version: 4.7.0.qualifier +Bundle-Activator: eu.etaxonomy.taxeditor.navigation.internal.TaxeditorNavigationPlugin Bundle-Vendor: EDIT Export-Package: eu.etaxonomy.cdm, eu.etaxonomy.taxeditor.navigation, @@ -18,8 +19,9 @@ Require-Bundle: org.eclipse.ui, org.eclipse.core.expressions, eu.etaxonomy.taxeditor.cdmlib, eu.etaxonomy.taxeditor.store, - eu.etaxonomy.taxeditor.editor -Bundle-ActivationPolicy: lazy + eu.etaxonomy.taxeditor.editor, + org.eclipse.e4.ui.model.workbench;bundle-version="1.2.0.v20160229-1459" +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Import-Package: org.eclipse.core.resources, org.eclipse.core.runtime, org.eclipse.core.runtime.jobs, @@ -27,5 +29,4 @@ Import-Package: org.eclipse.core.resources, org.eclipse.osgi.util;version="1.1.0", org.eclipse.ui.forms.widgets, org.osgi.framework -Bundle-Activator: eu.etaxonomy.taxeditor.navigation.internal.TaxeditorNavigationPlugin -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-ActivationPolicy: lazy diff --git a/eu.etaxonomy.taxeditor.navigation/build.properties b/eu.etaxonomy.taxeditor.navigation/build.properties index 69ef8f507..a91e33bdd 100644 --- a/eu.etaxonomy.taxeditor.navigation/build.properties +++ b/eu.etaxonomy.taxeditor.navigation/build.properties @@ -1,6 +1,3 @@ -source.. = src/main/java/,\ - src/test/java/,\ - src/test/resources/ output.. = target/classes/ bin.includes = META-INF/,\ .,\ @@ -10,7 +7,8 @@ bin.includes = META-INF/,\ OSGI-INF/l10n/bundle.properties,\ OSGI-INF/l10n/bundle_de.properties,\ src/main/java/eu/etaxonomy/taxeditor/navigation/l10n/messages.properties,\ - src/main/java/eu/etaxonomy/taxeditor/navigation/l10n/messages_de.properties - - - + src/main/java/eu/etaxonomy/taxeditor/navigation/l10n/messages_de.properties,\ + fragment.e4xmi +source.. = src/main/java/,\ + src/test/java/,\ + src/test/resources/ diff --git a/eu.etaxonomy.taxeditor.navigation/fragment.e4xmi b/eu.etaxonomy.taxeditor.navigation/fragment.e4xmi new file mode 100644 index 000000000..8b4287e7e --- /dev/null +++ b/eu.etaxonomy.taxeditor.navigation/fragment.e4xmi @@ -0,0 +1,6 @@ + + + + + + diff --git a/eu.etaxonomy.taxeditor.navigation/plugin.xml b/eu.etaxonomy.taxeditor.navigation/plugin.xml index 1cd97c66f..fcea5f9b2 100644 --- a/eu.etaxonomy.taxeditor.navigation/plugin.xml +++ b/eu.etaxonomy.taxeditor.navigation/plugin.xml @@ -331,15 +331,6 @@ - - - - - - + + + + diff --git a/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/search/SearchBar.java b/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/search/SearchBar.java index 9d4c93f61..ee748ada0 100644 --- a/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/search/SearchBar.java +++ b/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/search/SearchBar.java @@ -9,6 +9,8 @@ package eu.etaxonomy.taxeditor.navigation.search; +import javax.annotation.PostConstruct; + import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.swt.SWT; import org.eclipse.swt.events.FocusEvent; @@ -32,7 +34,6 @@ import org.eclipse.ui.IViewPart; import org.eclipse.ui.IWorkbenchPage; import org.eclipse.ui.PartInitException; import org.eclipse.ui.PlatformUI; -import org.eclipse.ui.menus.WorkbenchWindowControlContribution; import org.eclipse.ui.swt.IFocusService; import eu.etaxonomy.cdm.api.service.config.IFindTaxaAndNamesConfigurator; @@ -52,7 +53,7 @@ import eu.etaxonomy.taxeditor.store.CdmStore; * @created 15.04.2009 * @version 1.0 */ -public class SearchBar extends WorkbenchWindowControlContribution implements IContextListener{ +public class SearchBar implements IContextListener{ private Text text_search; private String secondaryId; private ToolBar toolBar; @@ -62,7 +63,7 @@ public class SearchBar extends WorkbenchWindowControlContribution implements ICo final private ConfigurationSelectionListener configurationListener = new ConfigurationSelectionListener(); /** {@inheritDoc} */ - @Override + @PostConstruct protected Control createControl(Composite parent) { Composite composite = new Composite(parent, SWT.NONE); @@ -81,7 +82,7 @@ public class SearchBar extends WorkbenchWindowControlContribution implements ICo */ private void registerAtFocusService() { IFocusService focusService = - (IFocusService) PlatformUI.getWorkbench().getService(IFocusService.class); + PlatformUI.getWorkbench().getService(IFocusService.class); if (focusService != null) { focusService.addFocusTracker(text_search, "navigation.textControlId"); }