X-Git-Url: https://dev.e-taxonomy.eu/gitweb/taxeditor.git/blobdiff_plain/6dbc63846d543b463f600f07a60f0a9233d5142f..bd176faf53f878b04368f04e825f04db40a1f939:/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/FeatureTreeSelectionDialog.java diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/FeatureTreeSelectionDialog.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/FeatureTreeSelectionDialog.java index f8a410932..813bf0a3d 100644 --- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/FeatureTreeSelectionDialog.java +++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/FeatureTreeSelectionDialog.java @@ -1,9 +1,9 @@ // $Id$ /** * Copyright (C) 2007 EDIT -* European Distributed Institute of Taxonomy +* European Distributed Institute of Taxonomy * http://www.e-taxonomy.eu -* +* * The contents of this file are subject to the Mozilla Public License Version 1.1 * See LICENSE.TXT at the top of this package for the full license terms. */ @@ -41,7 +41,7 @@ import eu.etaxonomy.taxeditor.store.CdmStore; */ public class FeatureTreeSelectionDialog extends AbstractFilteredCdmResourceSelectionDialog { - + /** * Creates a filtered selection dialog to select a named area. * @@ -56,7 +56,7 @@ public class FeatureTreeSelectionDialog extends "Choose a feature tree", false, featureTree); return getSelectionFromDialog(dialog); } - + /** *

Constructor for FilteredFeatureTreeSelectionDialog.

* @@ -71,7 +71,7 @@ public class FeatureTreeSelectionDialog extends FeatureTree cdmObject) { super(shell, conversation, title, multi, FeatureTreeSelectionDialog.class.getCanonicalName(), cdmObject); } - + /* (non-Javadoc) * @see eu.etaxonomy.taxeditor.dialogs.filteredSelection.AbstractFilteredCdmResourceSelectionDialog#getPersistentObject(java.util.UUID) */ @@ -88,13 +88,13 @@ public class FeatureTreeSelectionDialog extends @Override protected void initModel() { List featureTrees = CdmStore.getService(IFeatureTreeService.class).list(FeatureTree.class, null, null, null, null); - + if(model == null){ model = new ArrayList>(); } model.clear(); for(FeatureTree featureTree : featureTrees){ - UuidAndTitleCache element = new UuidAndTitleCache(FeatureTree.class, featureTree.getUuid(), featureTree.getTitleCache()); + UuidAndTitleCache element = new UuidAndTitleCache(FeatureTree.class, featureTree.getUuid(), featureTree.getTitleCache()); model.add(element); } } @@ -108,12 +108,13 @@ public class FeatureTreeSelectionDialog extends Link link = new Link(parent, SWT.NONE); link.setText(getNewWizardLinkText()); link.addListener (SWT.Selection, new Listener () { - public void handleEvent(Event event) { - + @Override + public void handleEvent(Event event) { + FeatureTreeEditorWizard wizard = new FeatureTreeEditorWizard(); WizardDialog dialog = new WizardDialog(getShell(), wizard); int status = dialog.open(); - + if (status == IStatus.OK) { refresh(); } @@ -121,14 +122,14 @@ public class FeatureTreeSelectionDialog extends }); return link; } - + /* (non-Javadoc) * @see eu.etaxonomy.taxeditor.dialogs.filteredSelection.AbstractFilteredCdmResourceSelectionDialog#getNewWizardLinkText() */ /** {@inheritDoc} */ @Override protected String getNewWizardLinkText() { - return "Click here to create or edit a feature tree."; + return String.format("Create a new %1s" , "Feature tree "); } /* (non-Javadoc)