From d83cedf27df0edbf25dc18cfc53854d64d1f3aff Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andreas=20M=C3=BCller?= Date: Tue, 4 Sep 2007 17:39:11 +0000 Subject: [PATCH] with cdmLibrary --- META-INF/MANIFEST.MF | 3 +- plugin.xml | 2 +- src/eu/etaxonomy/taxeditor/SimpleModel.java | 60 +++++++++++++-------- taxeditor.product | 8 +-- 4 files changed, 46 insertions(+), 27 deletions(-) diff --git a/META-INF/MANIFEST.MF b/META-INF/MANIFEST.MF index 2fd835a87..604f3873e 100644 --- a/META-INF/MANIFEST.MF +++ b/META-INF/MANIFEST.MF @@ -6,6 +6,7 @@ Bundle-Version: 1.0.0 Bundle-Activator: eu.etaxonomy.taxeditor.Activator Require-Bundle: org.eclipse.ui, org.eclipse.core.runtime, - org.eclipse.ui.forms + org.eclipse.ui.forms, + eu.etaxonomy.cdmLibrary Eclipse-LazyStart: true Export-Package: eu.etaxonomy.taxeditor diff --git a/plugin.xml b/plugin.xml index 2ecd498b1..3a9a4fd96 100644 --- a/plugin.xml +++ b/plugin.xml @@ -120,7 +120,7 @@ name="Taxonomic Editor"> + value="Taxonomic Editor (c) 2007 European Distributed Institute of Taxonomy Thanks to our worldwide fan community."> (); - TaxonName tn = new TaxonName(); - NameService ns = new NameService(); - objects.add(ns.getTaxonNameById(1)); - objects.add(ns.getTaxonNameById(5)); - objects.add(ns.getTaxonNameById(28));*/ - - objects = new ArrayList(); - NamedObject[] objects = { - new Name("Pilosella piloselloides (Vill.) Soják", "Pilosella", "piloselloides"), - new Name("Pilosella pavichii (Heuff.) Arv.-Touv.", "Pilosella", "pavichii"), - new Name("Pilosella vahlii (Froel.) F. W. Schultz & Sch. Bip.", "Pilosella", "vahlii") - /*new TypeOne(Messages.getString("SimpleModel.t1_i1"), 2, true, Messages.getString("SimpleModel.text1")), //$NON-NLS-1$ //$NON-NLS-2$ - new TypeOne(Messages.getString("SimpleModel.t1_i2"), 1, false, Messages.getString("SimpleModel.text2")), //$NON-NLS-1$ //$NON-NLS-2$ - new TypeOne(Messages.getString("SimpleModel.t1_i3"), 3, true, Messages.getString("SimpleModel.text3")), //$NON-NLS-1$ //$NON-NLS-2$ - new TypeOne(Messages.getString("SimpleModel.t1_i4"), 0, false, Messages.getString("SimpleModel.text4")), //$NON-NLS-1$ //$NON-NLS-2$ - new TypeOne(Messages.getString("SimpleModel.t1_i5"), 1, true, Messages.getString("SimpleModel.text5")), //$NON-NLS-1$ //$NON-NLS-2$ - new TypeTwo(Messages.getString("SimpleModel.t2_i1"), false, true), //$NON-NLS-1$ - new TypeTwo(Messages.getString("SimpleModel.t2_i2"), true, false)*/}; //$NON-NLS-1$ - add(objects, false); + try { + //TODO Andreas + List tnList = new ArrayList(); + TaxonName tn = new TaxonName(); + CdmApplicationController app = new CdmApplicationController(); + NameService ns = app.getNameService(); + tnList.add(ns.getTaxonNameById(1)); + tnList.add(ns.getTaxonNameById(4)); + tnList.add(ns.getTaxonNameById(28)); + + objects = new ArrayList(); + NamedObject[] objects = { + new Name(tnList.get(0).getName(), tnList.get(0).getGenus(),tnList.get(0).getInfraSpecificEpithet()), + new Name(tnList.get(1).getName(), tnList.get(1).getGenus(),tnList.get(1).getInfraSpecificEpithet()), + new Name(tnList.get(2).getName(), tnList.get(2).getGenus(),tnList.get(2).getInfraSpecificEpithet()), + + new Name("Pilosella piloselloides (Vill.) Soják", "Pilosella", "piloselloides"), + new Name("Pilosella pavichii (Heuff.) Arv.-Touv.", "Pilosella", "pavichii"), + new Name("Pilosella vahlii (Froel.) F. W. Schultz & Sch. Bip.", "Pilosella", "vahlii") + /*new TypeOne(Messages.getString("SimpleModel.t1_i1"), 2, true, Messages.getString("SimpleModel.text1")), //$NON-NLS-1$ //$NON-NLS-2$ + new TypeOne(Messages.getString("SimpleModel.t1_i2"), 1, false, Messages.getString("SimpleModel.text2")), //$NON-NLS-1$ //$NON-NLS-2$ + new TypeOne(Messages.getString("SimpleModel.t1_i3"), 3, true, Messages.getString("SimpleModel.text3")), //$NON-NLS-1$ //$NON-NLS-2$ + new TypeOne(Messages.getString("SimpleModel.t1_i4"), 0, false, Messages.getString("SimpleModel.text4")), //$NON-NLS-1$ //$NON-NLS-2$ + new TypeOne(Messages.getString("SimpleModel.t1_i5"), 1, true, Messages.getString("SimpleModel.text5")), //$NON-NLS-1$ //$NON-NLS-2$ + new TypeTwo(Messages.getString("SimpleModel.t2_i1"), false, true), //$NON-NLS-1$ + new TypeTwo(Messages.getString("SimpleModel.t2_i2"), true, false)*/ + }; //$NON-NLS-1$ + add(objects, false); + } catch (RuntimeException e) { + //logger.error("Error when initializing SimpleModel"); + // TODO Auto-generated catch block + System.out.println(e.getMessage()); + e.printStackTrace(); + } } public void add(NamedObject[] objs, boolean notify) { for (int i = 0; i < objs.length; i++) { diff --git a/taxeditor.product b/taxeditor.product index ba76be2e5..6e8a25445 100644 --- a/taxeditor.product +++ b/taxeditor.product @@ -6,9 +6,9 @@ - Taxonomic Editor -(c) 2007 European Distributed Institute of Taxonomy - + Taxonomic Editor +(c) 2007 European Distributed Institute of Taxonomy + Thanks to our worldwide fan community. @@ -35,12 +35,12 @@ Thanks to our worldwide fan community. - + -- 2.34.1