diff options
Diffstat (limited to 'plugins')
3 files changed, 854 insertions, 802 deletions
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/messages/Messages.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/messages/Messages.java index 188aea4e43a..b51197119fd 100644 --- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/messages/Messages.java +++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/messages/Messages.java @@ -1,339 +1,341 @@ -/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.infra.nattable.messages;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
-
- private static final String BUNDLE_NAME = "org.eclipse.papyrus.infra.nattable.messages.messages"; //$NON-NLS-1$
-
- public static String CellManagerFactory_CellManagerNotFound;
-
- public static String ChooseCategoriesSelectionWidget_EditAlias;
-
- public static String ChooseCategoriesSelectionWidget_EnterAliasToUseForTheCategory;
-
- public static String CompositeAxisManager_DestroyAxisCommand;
-
- public static String AbstractAxisManager_InputDialogMessage;
-
- public static String AbstractAxisManager_InputDialogTitle;
-
- public static String AbstractCreateNattableEditorHandler_EnterTheNameForTheNewTable;
-
- public static String AbstractCreateNattableEditorHandler_PapyrusTableCreation;
-
- public static String AbstractPasteImportInNattableManager_column;
-
- public static String AbstractPasteImportInNattableManager_EnablementStatusForPasteInTheTable;
-
- public static String AbstractPasteImportInNattableManager_INVERTED_MESSAGE;
-
- public static String AbstractPasteImportInNattableManager_NoPasteConfiguration;
-
- public static String AbstractPasteImportInNattableManager_NoPasteConfiguration2;
-
- public static String AbstractPasteImportInNattableManager_NumberOfColumnsAreEquals;
-
- public static String AbstractPasteImportInNattableManager_NumberOfColumnsAreNotEquals;
-
- public static String AbstractPasteImportInNattableManager_PasteColumnsError;
-
- public static String AbstractPasteImportInNattableManager_PasteRowsError;
-
- public static String AbstractPasteImportInNattableManager_row;
-
- public static String AbstractPasteImportInNattableManager_TheContextOfTheTableHasNotTheContainmentFeatureDefinedForThePaste;
-
- public static String AbstractPasteImportInNattableManager_TheContextOfTheTableHasTheContainmentFeatureDefinedForThePaste;
-
- public static String AbstractPasteImportInNattableManager_TheTableCanCreateElement;
-
- public static String AbstractPasteImportInNattableManager_TheTableCantCreateElement;
-
- public static String AbstractPasteImportInNattableManager_TheTableDoesntHaveColumns;
-
- public static String AbstractPasteImportInNattableManager_TheTableHasAConfigurationToPaste;
-
- public static String AbstractPasteImportInNattableManager_TheUserChosesToPasteColumns;
-
- public static String AbstractPasteImportInNattableManager_TheUserChosesToPasteRows;
-
- public static String AbstractPasteImportInNattableManager_WhatAreYouPasting;
-
- public static String AbstractSaveCurrentAxisProvidersHandler_0;
-
- public static String AbstractSaveCurrentAxisProvidersHandler_1;
-
- public static String AbstractSaveCurrentAxisProvidersHandler_2;
-
- public static String AbstractSaveCurrentAxisProvidersHandler_4;
-
- public static String AbstractSaveCurrentAxisProvidersHandler_5;
-
- public static String AbstractTableHandler_CurrentEditorCantBeFound;
-
- public static String AxisManagerFactory_AxisManagerClassCantBeLoaded;
-
- public static String AxisManagerFactory_TheClassCantBeInstanciated;
-
- public static String CompositeAxisManager_AddAxisCommand;
-
- public static String DeleteNatTableContextAdvice_DestroyNattableCommand;
-
- public static String EditConfiguration_ConfigurationFactoryNotFound;
-
- public static String EditConfiguration_ConfigurationNotFound;
-
- public static String EditConfiguration_DeclarationNotYetSupported;
-
- public static String EditConfiguration_FactoryHandlesElementButDoesntProvideEditor;
-
- public static String EObjectManager_AddAxisElement;
-
- public static String NattableConfigurationRegistry_ConfigurationNotFound;
-
- public static String NattableConfigurationRegistry_NoTesterForThisConfiguration;
-
- public static String NattableConfigurationRegistry_NoTypeForAConfiguration;
-
- public static String NattableConfigurationRegistry_ResourceEmpty;
-
- public static String NattableConfigurationRegistry_SeveralConfigurationsWithTheSameType;
-
- public static String NattableConfigurationRegistry_TableConfigurationNotFound;
-
- public static String NattableConfigurationRegistry_TesterNotFound;
-
- public static String NattableConfigurationRegistry_TesterNotManager;
-
- public static String NattableModelManager_ActionNotYetSupported;
-
- public static String NattableModelManager_AddColumnCommand;
-
- public static String NattableModelManager_AddRowCommand;
-
- public static String NattableModelManager_AtLeastOfOneTheAxisManagerMustBeAMaster;
-
- public static String NattableModelManager_CreateDestroyAxis;
-
- public static String NattableModelManager_DisableTheAutomaticAdditionOfColumnsWhenARowIsAdded;
-
- public static String NattableModelManager_DisableTheAutomaticAdditionOfRowsWhenAColumnIsAdded;
-
- public static String NattableModelManager_DisconnectAxisManagerCheckBoxMessage;
-
- public static String NattableModelManager_DisconnectAxisManagerCheckBoxTooltip;
-
- public static String NattableModelManager_DisconnectAxisManagerInformationDialogMessage;
-
- public static String NattableModelManager_DisconnectAxisManagerInformationDialogTitle;
-
- public static String NattableModelManager_DisconnectColumnAxisManager;
-
- public static String NattableModelManager_DisconnectColumnAxisManagerMessageInInformationDialog;
-
- public static String NattableModelManager_DisconnectThisAxisManager;
-
- public static String NattableModelManager_EditingDomainNotFound;
-
- public static String NattableModelManager_SelectColumns;
-
- public static String NattableModelManager_SelectRows;
-
- public static String NattableModelManager_ServiceRegistryNotFound;
-
- public static String NattableModelManager_SwitchLinesAndColumns;
-
- public static String NattableModelManager_TheCheckBoxHasNotBeenCheckedToAvoidAutomaticColumnAddition;
-
- public static String NattableModelManager_TheCheckBoxHasNotBeenCheckedToAvoidAutomaticRowAddition;
-
- public static String PrintTableHandler_PrintCantBeDone;
-
- public static String PrintTableHandler_TablePrint;
-
- public static String ProblemLabelProvider_StringsValuesCanBeResolved;
-
- public static String TableLabelProvider_ErrorGettingIconForTable;
-
- public static String TableTesterRegistry_SeveralTesterAreRegisteredWithTheSameId;
-
- public static String TableTesterRegistry_TheClassCantBeLoaded;
-
- public static String TextDelimiter_DoubleQuote;
-
- public static String TextDelimiter_Quote;
-
- public static String ICellManager_NotAvailable;
-
- public static String ImportCSVConfigurationPage_SelectTheTextDelimiter;
-
- public static String ImportCSVConfigurationPage_Separators;
-
- public static String ImportCSVConfigurationPage_TheCellSeparatorIsNotDefined;
-
- public static String ImportCSVConfigurationPage_TheCellSeparatorMustBeExcatlyOneChar;
-
- public static String ImportFilePage_BeSureThatYourImportFileHasTheSameNumberOfColumns;
-
- public static String ImportFilePage_SelectTheFileToImport;
-
- public static String ImportFilePage_TheImportedElementWillBeAddedTo;
-
- public static String ImportFilePage_YourFileWillBeImported;
-
- public static String ImportTableErrorPage_PleaseOpenAPapyrusEditor;
-
- public static String ImportTableWizard_ConfigureImport;
-
- public static String ImportTableWizard_ImportTable;
-
- public static String ImportTableWizard_ImportTableError;
-
- public static String ImportTableWizard_ImportTableFromFileInPapyrusModel;
-
- public static String AbstractUMLTableEFacetEditor_UMLTableCreationErrorMessage;
-
- public static String ColumnsToShowDialog_AdditionalFeatures;
-
- public static String ColumnsToShowDialog_AdvancedMode;
-
- public static String ColumnsToShowDialog_default_columns;
-
- public static String ColumnsToShowDialog_DeselectAll;
-
- public static String ColumnsToShowDialog_DeselectAllAvailableAdditionalFeatures;
-
- public static String ColumnsToShowDialog_DeselecteAllAvailableFeatures;
-
- public static String ColumnsToShowDialog_DeselectedAll;
-
- public static String ColumnsToShowDialog_DirectFeatures;
-
- public static String ColumnsToShowDialog_SelecColumnsToShow;
-
- public static String ColumnsToShowDialog_SelectAll;
-
- public static String ColumnsToShowDialog_SelectAllAvailableAdditionalFeatures;
-
- public static String ColumnsToShowDialog_SelectAllAvailablesFeatures;
-
- public static String ColumnsToShowDialog_ShowAllPossibilities;
-
- public static String LoadCurrentAxisProvidersDialog_0;
-
- public static String LoadCurrentAxisProvidersDialog_1;
-
- public static String LoadCurrentAxisProvidersDialog_2;
-
- public static String LoadCurrentAxisProvidersDialog_3;
-
- public static String PapyrusPopupMenuAction_ShowCategoriesOnDepth;
-
- public static String PasteConfigurationUtils_ContainementFeatureIsNotAReference;
-
- public static String PasteConfigurationUtils_ContainmentFeatureIsNotAReferenceContainment;
-
- public static String PasteConfigurationUtils_ContainmentFeatureIsNull;
-
- public static String PasteConfigurationUtils_CreatesElementsAreNotCompatibleWithContainmentFeature;
-
- public static String PasteConfigurationUtils_ElementIdNotDefined;
-
- public static String PasteConfigurationUtils_ElementTypeCantBeFound;
-
- public static String PasteConfigurationUtils_PasteConfigurationIsConsistent;
-
- public static String PasteEObjectAxisInTableCommandProvider_AddingElementToTheTable;
-
- public static String PasteEObjectAxisInTableCommandProvider_CommandCreationHasBeenCancelled;
-
- public static String PasteEObjectAxisInTableCommandProvider_CreatingAnumberXonY;
-
- public static String PasteEObjectAxisInTableCommandProvider_DoingAdditionalActions;
-
- public static String PasteEObjectAxisInTableCommandProvider_FinishingThePaste;
-
- public static String PasteEObjectAxisInTableCommandProvider_LinkingReferencesToTheModel;
-
- public static String PasteEObjectAxisInTableCommandProvider_PasteAction;
-
- public static String PasteEObjectAxisInTableCommandProvider_PasteColumns;
-
- public static String PasteEObjectAxisInTableCommandProvider_PasteFromStringCommand;
-
- public static String PasteEObjectAxisInTableCommandProvider_PasteRows;
-
- public static String PasteImportStatusDialog_ImportPasteDialogTitle;
-
- public static String PasteImportStatusDialog_PasteConfigurationMessage;
-
- public static String PasteInPapyrusTableCommandProvider_0;
-
- public static String PasteInPapyrusTableCommandProvider_1;
-
- public static String PasteInPapyrusTableCommandProvider_2;
-
- public static String PasteInPapyrusTableCommandProvider_3;
-
- public static String PasteInPapyrusTableCommandProvider_Pasting;
-
- public static String PasteInPapyrusTableCommandProvider_PastingInTable;
-
- public static String PasteInPapyrusTableCommandProvider_ProblemsToSetPropertyValue;
-
- public static String PasteInPapyrusTableCommandProvider_ProblemToApplyStereotype;
-
- public static String PasteInPapyrusTableCommandProvider_ProblemToSetStereotypeValue;
-
- public static String PasteInPapyrusTableCommandProvider_RequiredStereotypeCantBeFound;
-
- public static String PasteInPapyrusTableCommandProvider_RequiredStereotypeNotApplied;
-
- public static String PasteInPapyrusTableCommandProvider_StereotypePropertyCantBeResolved;
-
- public static String PasteInPapyrusTableCommandProvider_TheEnumerationLiteralCantBeFound;
-
- public static String PasteInPapyrusTableCommandProvider_TheStereotypeCantBeApplied;
-
- public static String PasteInPapyrusTableCommandProvider_TheTextCantBeMappedOnAnExistingElement;
-
- public static String PasteInTableHandler_PasteCancelled;
-
- public static String PasteInTableHandler_PasteCreation;
-
- public static String PasteInTableHandler_ThePasteCommandCantBeExecuted;
- public static String PasteSeparator_Comma;
-
- public static String PasteSeparator_Other;
-
- public static String PasteSeparator_Semicolon;
-
- public static String PasteSeparator_Space;
-
- public static String PasteSeparator_Tabulation;
-
- public static String SelectCategoriesWizardPage_SelectCategoriesPage;
-
- public static String SelectCategoriesWizardPage_SelectCategoriesToListenInTheTreeTable;
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- }
-}
+/***************************************************************************** + * Copyright (c) 2012 CEA LIST. + * + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.nattable.messages; + +import org.eclipse.osgi.util.NLS; + +public class Messages extends NLS { + + private static final String BUNDLE_NAME = "org.eclipse.papyrus.infra.nattable.messages.messages"; //$NON-NLS-1$ + + public static String CellManagerFactory_CellManagerNotFound; + + public static String ChooseCategoriesSelectionWidget_EditAlias; + + public static String ChooseCategoriesSelectionWidget_EnterAliasToUseForTheCategory; + + public static String CompositeAxisManager_DestroyAxisCommand; + + public static String AbstractAxisManager_InputDialogMessage; + + public static String AbstractAxisManager_InputDialogTitle; + + public static String AbstractCreateNattableEditorHandler_EnterTheNameForTheNewTable; + + public static String AbstractCreateNattableEditorHandler_PapyrusTableCreation; + + public static String AbstractPasteImportInNattableManager_column; + + public static String AbstractPasteImportInNattableManager_EnablementStatusForPasteInTheTable; + + public static String AbstractPasteImportInNattableManager_INVERTED_MESSAGE; + + public static String AbstractPasteImportInNattableManager_NoPasteConfiguration; + + public static String AbstractPasteImportInNattableManager_NoPasteConfiguration2; + + public static String AbstractPasteImportInNattableManager_NumberOfColumnsAreEquals; + + public static String AbstractPasteImportInNattableManager_NumberOfColumnsAreNotEquals; + + public static String AbstractPasteImportInNattableManager_PasteColumnsError; + + public static String AbstractPasteImportInNattableManager_PasteRowsError; + + public static String AbstractPasteImportInNattableManager_row; + + public static String AbstractPasteImportInNattableManager_TheContextOfTheTableHasNotTheContainmentFeatureDefinedForThePaste; + + public static String AbstractPasteImportInNattableManager_TheContextOfTheTableHasTheContainmentFeatureDefinedForThePaste; + + public static String AbstractPasteImportInNattableManager_TheTableCanCreateElement; + + public static String AbstractPasteImportInNattableManager_TheTableCantCreateElement; + + public static String AbstractPasteImportInNattableManager_TheTableDoesntHaveColumns; + + public static String AbstractPasteImportInNattableManager_TheTableHasAConfigurationToPaste; + + public static String AbstractPasteImportInNattableManager_TheUserChosesToPasteColumns; + + public static String AbstractPasteImportInNattableManager_TheUserChosesToPasteRows; + + public static String AbstractPasteImportInNattableManager_WhatAreYouPasting; + + public static String AbstractSaveCurrentAxisProvidersHandler_0; + + public static String AbstractSaveCurrentAxisProvidersHandler_1; + + public static String AbstractSaveCurrentAxisProvidersHandler_2; + + public static String AbstractSaveCurrentAxisProvidersHandler_4; + + public static String AbstractSaveCurrentAxisProvidersHandler_5; + + public static String AbstractTableHandler_CurrentEditorCantBeFound; + + public static String AxisManagerFactory_AxisManagerClassCantBeLoaded; + + public static String AxisManagerFactory_TheClassCantBeInstanciated; + + public static String CompositeAxisManager_AddAxisCommand; + + public static String DeleteNatTableContextAdvice_DestroyNattableCommand; + + public static String EditConfiguration_ConfigurationFactoryNotFound; + + public static String EditConfiguration_ConfigurationNotFound; + + public static String EditConfiguration_DeclarationNotYetSupported; + + public static String EditConfiguration_FactoryHandlesElementButDoesntProvideEditor; + + public static String EObjectManager_AddAxisElement; + + public static String NattableConfigurationRegistry_ConfigurationNotFound; + + public static String NattableConfigurationRegistry_NoTesterForThisConfiguration; + + public static String NattableConfigurationRegistry_NoTypeForAConfiguration; + + public static String NattableConfigurationRegistry_ResourceEmpty; + + public static String NattableConfigurationRegistry_SeveralConfigurationsWithTheSameType; + + public static String NattableConfigurationRegistry_TableConfigurationNotFound; + + public static String NattableConfigurationRegistry_TesterNotFound; + + public static String NattableConfigurationRegistry_TesterNotManager; + + public static String NattableModelManager_ActionNotYetSupported; + + public static String NattableModelManager_AddColumnCommand; + + public static String NattableModelManager_AddRowCommand; + + public static String NattableModelManager_AtLeastOfOneTheAxisManagerMustBeAMaster; + + public static String NattableModelManager_CreateDestroyAxis; + + public static String NattableModelManager_DisableTheAutomaticAdditionOfColumnsWhenARowIsAdded; + + public static String NattableModelManager_DisableTheAutomaticAdditionOfRowsWhenAColumnIsAdded; + + public static String NattableModelManager_DisconnectAxisManagerCheckBoxMessage; + + public static String NattableModelManager_DisconnectAxisManagerCheckBoxTooltip; + + public static String NattableModelManager_DisconnectAxisManagerInformationDialogMessage; + + public static String NattableModelManager_DisconnectAxisManagerInformationDialogTitle; + + public static String NattableModelManager_DisconnectColumnAxisManager; + + public static String NattableModelManager_DisconnectColumnAxisManagerMessageInInformationDialog; + + public static String NattableModelManager_DisconnectThisAxisManager; + + public static String NattableModelManager_EditingDomainNotFound; + + public static String NattableModelManager_SelectColumns; + + public static String NattableModelManager_SelectRows; + + public static String NattableModelManager_ServiceRegistryNotFound; + + public static String NattableModelManager_SwitchLinesAndColumns; + + public static String NattableModelManager_TheCheckBoxHasNotBeenCheckedToAvoidAutomaticColumnAddition; + + public static String NattableModelManager_TheCheckBoxHasNotBeenCheckedToAvoidAutomaticRowAddition; + + public static String PrintTableHandler_PrintCantBeDone; + + public static String PrintTableHandler_TablePrint; + + public static String ProblemLabelProvider_StringsValuesCanBeResolved; + + public static String TableLabelProvider_ErrorGettingIconForTable; + + public static String TableTesterRegistry_SeveralTesterAreRegisteredWithTheSameId; + + public static String TableTesterRegistry_TheClassCantBeLoaded; + + public static String TextDelimiter_DoubleQuote; + + public static String TextDelimiter_Quote; + + public static String ICellManager_NotAvailable; + + public static String ImportCSVConfigurationPage_SelectTheTextDelimiter; + + public static String ImportCSVConfigurationPage_Separators; + + public static String ImportCSVConfigurationPage_TheCellSeparatorIsNotDefined; + + public static String ImportCSVConfigurationPage_TheCellSeparatorMustBeExcatlyOneChar; + + public static String ImportFilePage_BeSureThatYourImportFileHasTheSameNumberOfColumns; + + public static String ImportFilePage_SelectTheFileToImport; + + public static String ImportFilePage_TheImportedElementWillBeAddedTo; + + public static String ImportFilePage_YourFileWillBeImported; + + public static String ImportTableErrorPage_PleaseOpenAPapyrusEditor; + + public static String ImportTableWizard_ConfigureImport; + + public static String ImportTableWizard_ImportTable; + + public static String ImportTableWizard_ImportTableError; + + public static String ImportTableWizard_ImportTableFromFileInPapyrusModel; + + public static String AbstractUMLTableEFacetEditor_UMLTableCreationErrorMessage; + + public static String ColumnsToShowDialog_AdditionalFeatures; + + public static String ColumnsToShowDialog_AdvancedMode; + + public static String ColumnsToShowDialog_default_columns; + + public static String ColumnsToShowDialog_DeselectAll; + + public static String ColumnsToShowDialog_DeselectAllAvailableAdditionalFeatures; + + public static String ColumnsToShowDialog_DeselecteAllAvailableFeatures; + + public static String ColumnsToShowDialog_DeselectedAll; + + public static String ColumnsToShowDialog_DirectFeatures; + + public static String ColumnsToShowDialog_SelecColumnsToShow; + + public static String ColumnsToShowDialog_SelectAll; + + public static String ColumnsToShowDialog_SelectAllAvailableAdditionalFeatures; + + public static String ColumnsToShowDialog_SelectAllAvailablesFeatures; + + public static String ColumnsToShowDialog_ShowAllPossibilities; + + public static String LoadCurrentAxisProvidersDialog_0; + + public static String LoadCurrentAxisProvidersDialog_1; + + public static String LoadCurrentAxisProvidersDialog_2; + + public static String LoadCurrentAxisProvidersDialog_3; + + public static String PapyrusPopupMenuAction_ShowCategoriesOnDepth; + + public static String PasteConfigurationUtils_ContainementFeatureIsNotAReference; + + public static String PasteConfigurationUtils_ContainmentFeatureIsNotAReferenceContainment; + + public static String PasteConfigurationUtils_ContainmentFeatureIsNull; + + public static String PasteConfigurationUtils_CreatesElementsAreNotCompatibleWithContainmentFeature; + + public static String PasteConfigurationUtils_ElementIdNotDefined; + + public static String PasteConfigurationUtils_ElementTypeCantBeFound; + + public static String PasteConfigurationUtils_PasteConfigurationIsConsistent; + + public static String PasteEObjectAxisInTableCommandProvider_AddingElementToTheTable; + + public static String PasteEObjectAxisInTableCommandProvider_CommandCreationHasBeenCancelled; + + public static String PasteEObjectAxisInTableCommandProvider_CreatingAnumberXonY; + + public static String PasteEObjectAxisInTableCommandProvider_DoingAdditionalActions; + + public static String PasteEObjectAxisInTableCommandProvider_FinishingThePaste; + + public static String PasteEObjectAxisInTableCommandProvider_LinkingReferencesToTheModel; + + public static String PasteEObjectAxisInTableCommandProvider_PasteAction; + + public static String PasteEObjectAxisInTableCommandProvider_PasteColumns; + + public static String PasteEObjectAxisInTableCommandProvider_PasteFromStringCommand; + + public static String PasteEObjectAxisInTableCommandProvider_PasteRows; + + public static String PasteEObjectTreeAxisInNatTableCommandProvider_CantPasteColumnsInTreeTable; + + public static String PasteImportStatusDialog_ImportPasteDialogTitle; + + public static String PasteImportStatusDialog_PasteConfigurationMessage; + + public static String PasteInPapyrusTableCommandProvider_0; + + public static String PasteInPapyrusTableCommandProvider_1; + + public static String PasteInPapyrusTableCommandProvider_2; + + public static String PasteInPapyrusTableCommandProvider_3; + + public static String PasteInPapyrusTableCommandProvider_Pasting; + + public static String PasteInPapyrusTableCommandProvider_PastingInTable; + + public static String PasteInPapyrusTableCommandProvider_ProblemsToSetPropertyValue; + + public static String PasteInPapyrusTableCommandProvider_ProblemToApplyStereotype; + + public static String PasteInPapyrusTableCommandProvider_ProblemToSetStereotypeValue; + + public static String PasteInPapyrusTableCommandProvider_RequiredStereotypeCantBeFound; + + public static String PasteInPapyrusTableCommandProvider_RequiredStereotypeNotApplied; + + public static String PasteInPapyrusTableCommandProvider_StereotypePropertyCantBeResolved; + + public static String PasteInPapyrusTableCommandProvider_TheEnumerationLiteralCantBeFound; + + public static String PasteInPapyrusTableCommandProvider_TheStereotypeCantBeApplied; + + public static String PasteInPapyrusTableCommandProvider_TheTextCantBeMappedOnAnExistingElement; + + public static String PasteInTableHandler_PasteCancelled; + + public static String PasteInTableHandler_PasteCreation; + + public static String PasteInTableHandler_ThePasteCommandCantBeExecuted; + public static String PasteSeparator_Comma; + + public static String PasteSeparator_Other; + + public static String PasteSeparator_Semicolon; + + public static String PasteSeparator_Space; + + public static String PasteSeparator_Tabulation; + + public static String SelectCategoriesWizardPage_SelectCategoriesPage; + + public static String SelectCategoriesWizardPage_SelectCategoriesToListenInTheTreeTable; + static { + // initialize resource bundle + NLS.initializeMessages(BUNDLE_NAME, Messages.class); + } + + private Messages() { + } +} diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/messages/messages.properties b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/messages/messages.properties index 0609f0da9ec..d10f7e06c45 100644 --- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/messages/messages.properties +++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/messages/messages.properties @@ -1,156 +1,157 @@ -AbstractAxisManager_InputDialogMessage=The real name for the header is: \n\t %s \n \n Alias:
-AbstractAxisManager_InputDialogTitle=Edit Header Alias Dialog
-AbstractCreateNattableEditorHandler_EnterTheNameForTheNewTable=Enter the name for the new table
-AbstractCreateNattableEditorHandler_PapyrusTableCreation=Papyrus Table Creation
-AbstractPasteImportInNattableManager_column=column
-AbstractPasteImportInNattableManager_EnablementStatusForPasteInTheTable=Enablement status for paste {0} in the table
-AbstractPasteImportInNattableManager_INVERTED_MESSAGE=The axis of your table are inverted. This case is not yet managed. You must have elements as rows and features as columns.
-AbstractPasteImportInNattableManager_NoPasteConfiguration=Neither of the row paste configuration and column paste configuration allows to create elements in the table\n.
-AbstractPasteImportInNattableManager_NoPasteConfiguration2=Your table has no paste configuration
-AbstractPasteImportInNattableManager_NumberOfColumnsAreEquals=The number of columns by rows is the same as the number of columns in the table
-AbstractPasteImportInNattableManager_NumberOfColumnsAreNotEquals=The number of columns by rows is not the same as the number of columns in the table.\n You are trying to paste {0} columns in a table which has {1} columns
-AbstractPasteImportInNattableManager_PasteColumnsError=\n Paste column error:\n\t
-AbstractPasteImportInNattableManager_PasteRowsError=\n Paste row error:\n\t
-AbstractPasteImportInNattableManager_row=row
-AbstractPasteImportInNattableManager_TheContextOfTheTableHasNotTheContainmentFeatureDefinedForThePaste=The context of the table doesn't have the containment feature defined for the paste
-AbstractPasteImportInNattableManager_TheContextOfTheTableHasTheContainmentFeatureDefinedForThePaste=The context of the table has the containment feature defined for the paste
-AbstractPasteImportInNattableManager_TheTableCanCreateElement=The table can create {0} as {1}
-AbstractPasteImportInNattableManager_TheTableCantCreateElement=The table can't create {0} as {1}
-AbstractPasteImportInNattableManager_TheTableDoesntHaveColumns=The table doesn't have columns
-AbstractPasteImportInNattableManager_TheTableHasAConfigurationToPaste=The table has a configuration to paste {0}.
-AbstractPasteImportInNattableManager_TheUserChosesToPasteColumns=The user has chosen to paste columns.
-AbstractPasteImportInNattableManager_TheUserChosesToPasteRows=The user has chosen to paste rows.
-AbstractPasteImportInNattableManager_WhatAreYouPasting=I can't find if you are pasting rows elements or columns elements.\n Press "Yes" to paste rows and "No" to paste columns.
-AbstractSaveCurrentAxisProvidersHandler_0=Enter name and description
-AbstractSaveCurrentAxisProvidersHandler_1=Name:
-AbstractSaveCurrentAxisProvidersHandler_2=Description:
-AbstractSaveCurrentAxisProvidersHandler_4=Provider's configuration name must not be empty
-AbstractSaveCurrentAxisProvidersHandler_5=There is an existing axis provider with that name
-AbstractTableHandler_CurrentEditorCantBeFound=Current Editor can't be found
-AxisManagerFactory_AxisManagerClassCantBeLoaded=The AxisManager registered with the id {0} can't be loaded
-AxisManagerFactory_TheClassCantBeInstanciated=The class {0} can't be instanciated
-CellManagerFactory_CellManagerNotFound=Cell manager not found
-ChooseCategoriesSelectionWidget_EditAlias=Edit alias
-ChooseCategoriesSelectionWidget_EnterAliasToUseForTheCategory=Enter alias to use for the category
-CompositeAxisManager_AddAxisCommand=Add Axis Command
-DeleteNatTableContextAdvice_DestroyNattableCommand=Destroy NatTables command
-EditConfiguration_ConfigurationFactoryNotFound=I can't find config factory for {0}
-EditConfiguration_ConfigurationNotFound=I can't find configuration for {0}
-EditConfiguration_DeclarationNotYetSupported=The declaration of celleditor on cell is not yet supported
-EditConfiguration_FactoryHandlesElementButDoesntProvideEditor=The factory {0} handles the element {1} but doesn't provide CellEditor
-EObjectManager_AddAxisElement=Add Axis Element
-NattableConfigurationRegistry_ConfigurationNotFound=Configuration can't be found
-NattableConfigurationRegistry_NoTesterForThisConfiguration=no tester for this configuration
-NattableConfigurationRegistry_NoTypeForAConfiguration=TableConfiguration in {0} has no type.
-NattableConfigurationRegistry_ResourceEmpty=The resource {0} is empty.
-NattableConfigurationRegistry_SeveralConfigurationsWithTheSameType=Several configuration are registered with the same type : {0}. We keep only the first one
-NattableConfigurationRegistry_TableConfigurationNotFound=TableConfiguration not found in {0}.
-NattableConfigurationRegistry_TesterNotFound=tester notfound
-NattableConfigurationRegistry_TesterNotManager=tester not managed
-NattableModelManager_ActionNotYetSupported=This action is not yet supported
-NattableModelManager_AddColumnCommand=Add column command
-CompositeAxisManager_DestroyAxisCommand=Destroy column command
-NattableModelManager_AddRowCommand=Add rows command
-NattableModelManager_AtLeastOfOneTheAxisManagerMustBeAMaster=At least one of the AxisManager must be a Master
-NattableModelManager_CreateDestroyAxis=Create / Destroy Axis
-NattableModelManager_DisableTheAutomaticAdditionOfColumnsWhenARowIsAdded=Disable the automatic addition of columns when a row is added
-NattableModelManager_DisableTheAutomaticAdditionOfRowsWhenAColumnIsAdded=Disable the automatic addition of rows when a column is added
-NattableModelManager_DisconnectAxisManagerCheckBoxMessage=Disconnect this axis manager
-NattableModelManager_DisconnectAxisManagerCheckBoxTooltip=Disable the automatic addition of columns when a row is added.
-NattableModelManager_DisconnectAxisManagerInformationDialogMessage=The checkbox '%s' has not been checked, so the next row addition could be followed by a columns addition, ignoring your current selection of columns. \n \n Do you want to continue?
-NattableModelManager_DisconnectAxisManagerInformationDialogTitle=Axis Selection Question
-NattableModelManager_DisconnectColumnAxisManager=Disable the automatic addition of rows when a column is added.
-NattableModelManager_DisconnectColumnAxisManagerMessageInInformationDialog=The checkbox '%s' has not been checked, so the next row addition could be followed by a columns addition, ignoring your current selection of rows. \n\n Do you want to continue?
-NattableModelManager_DisconnectThisAxisManager=Disconnect this axis manager
-NattableModelManager_EditingDomainNotFound=EditingDomain not found
-NattableModelManager_SelectColumns=Select Columns
-NattableModelManager_SelectRows=Select Rows
-NattableModelManager_ServiceRegistryNotFound=ServiceRegistry not found
-NattableModelManager_SwitchLinesAndColumns=Switch Lines and Columns
-NattableModelManager_TheCheckBoxHasNotBeenCheckedToAvoidAutomaticColumnAddition=The checkbox '%s' has not been checked, so the next row addition could be followed by a columns addition, ignoring your current selection of columns. Do you want to continue?
-NattableModelManager_TheCheckBoxHasNotBeenCheckedToAvoidAutomaticRowAddition=The checkbox '%s' has not been checked, so the next column addition could be followed by a rows addition, ignoring your current selection of rows. Do you want to continue?
-PrintTableHandler_PrintCantBeDone=Print can't be done
-PrintTableHandler_TablePrint=Table Print
-ProblemLabelProvider_StringsValuesCanBeResolved={0} string(s) values can't be resolved:
-TableLabelProvider_ErrorGettingIconForTable=Error getting icon image for tables:
-TableTesterRegistry_SeveralTesterAreRegisteredWithTheSameId=Several classes are registered for the id {0}
-TableTesterRegistry_TheClassCantBeLoaded=Class registrered with id {0} can't be loaded
-TextDelimiter_DoubleQuote=double quote
-TextDelimiter_Quote=quote
-ICellManager_NotAvailable=N/A
-ImportCSVConfigurationPage_SelectTheTextDelimiter=Select the text delimiter used in your file.
-ImportCSVConfigurationPage_Separators=Separators
-ImportCSVConfigurationPage_TheCellSeparatorIsNotDefined=The cell separator is not defined.
-ImportCSVConfigurationPage_TheCellSeparatorMustBeExcatlyOneChar=The cell separator must be exactly 1 character.
-ImportFilePage_BeSureThatYourImportFileHasTheSameNumberOfColumns=Be sure that your imported file has the same number of columns than the current table
-ImportFilePage_SelectTheFileToImport=Select the file to import
-ImportFilePage_TheImportedElementWillBeAddedTo=The imported element will be added to:
-ImportFilePage_YourFileWillBeImported=Your import will be done in the table:
-ImportTableErrorPage_PleaseOpenAPapyrusEditor=Please open a Papyrus table editor before to do the import.
-ImportTableWizard_ConfigureImport=Configure Import
-ImportTableWizard_ImportTable=Import Table
-ImportTableWizard_ImportTableError=Import Table Error
-ImportTableWizard_ImportTableFromFileInPapyrusModel=Import Table From File In Papyrus Model
-AbstractUMLTableEFacetEditor_UMLTableCreationErrorMessage=A UML Table can't be created with a non-UML element as context ({0})
-ColumnsToShowDialog_AdditionalFeatures=Additional Features
-ColumnsToShowDialog_AdvancedMode=Advanced Mode
-ColumnsToShowDialog_default_columns=Default Columns
-ColumnsToShowDialog_DeselectAll=Deselect All
-ColumnsToShowDialog_DeselectAllAvailableAdditionalFeatures=Deselect all available additional features.
-ColumnsToShowDialog_DeselecteAllAvailableFeatures=Deselect all available features.
-ColumnsToShowDialog_DeselectedAll=Deselect All
-ColumnsToShowDialog_DirectFeatures=Direct Features
-ColumnsToShowDialog_SelecColumnsToShow=Select the columns to show
-ColumnsToShowDialog_SelectAll=Select All
-ColumnsToShowDialog_SelectAllAvailableAdditionalFeatures=Select all available additional features.
-ColumnsToShowDialog_SelectAllAvailablesFeatures=Select all available features.
-ColumnsToShowDialog_ShowAllPossibilities=Show all possibilities
-LoadCurrentAxisProvidersDialog_0=Name
-LoadCurrentAxisProvidersDialog_1=Description
-LoadCurrentAxisProvidersDialog_2=Columns
-LoadCurrentAxisProvidersDialog_3=\ (current)
-PapyrusPopupMenuAction_ShowCategoriesOnDepth=Show Categories on depth {0}
-PasteConfigurationUtils_ContainementFeatureIsNotAReference=The containment feature for the pasted elements is not a reference.
-PasteConfigurationUtils_ContainmentFeatureIsNotAReferenceContainment=The containement feature is not a reference in containment.
-PasteConfigurationUtils_ContainmentFeatureIsNull=The containment feature for the pasted elements is null.
-PasteConfigurationUtils_CreatesElementsAreNotCompatibleWithContainmentFeature=The created elements ({0}) are not compatible with the containmment feature {1}.
-PasteConfigurationUtils_ElementIdNotDefined=The element id describing the kind of pasted element is not defined.
-PasteConfigurationUtils_ElementTypeCantBeFound=The element type for {0} can be found.
-PasteConfigurationUtils_PasteConfigurationIsConsistent=The paste configuration is consistent.
-PasteEObjectAxisInTableCommandProvider_AddingElementToTheTable=Adding Elements To The table
-PasteEObjectAxisInTableCommandProvider_CommandCreationHasBeenCancelled=Command creation has been cancelled
-PasteEObjectAxisInTableCommandProvider_CreatingAnumberXonY=\ Creating {0} number {1}/{2}
-PasteEObjectAxisInTableCommandProvider_DoingAdditionalActions=Doing additional actions
-PasteEObjectAxisInTableCommandProvider_FinishingThePaste=Finishing the paste
-PasteEObjectAxisInTableCommandProvider_LinkingReferencesToTheModel=Linking references to the model
-PasteEObjectAxisInTableCommandProvider_PasteAction=Paste Action
-PasteEObjectAxisInTableCommandProvider_PasteColumns=Paste Columns
-PasteEObjectAxisInTableCommandProvider_PasteFromStringCommand=Paste from String Command
-PasteEObjectAxisInTableCommandProvider_PasteRows=Paste Rows
-PasteImportStatusDialog_ImportPasteDialogTitle=Import/Paste In Table
-PasteImportStatusDialog_PasteConfigurationMessage=You can configure the Paste/Import using the Property View of the table.
-PasteInPapyrusTableCommandProvider_0=The String {0} is not valid to create a {1}.
-PasteInPapyrusTableCommandProvider_1=Paste Command In FlowPort Table
-PasteInPapyrusTableCommandProvider_2=Create Paste Action
-PasteInPapyrusTableCommandProvider_3=Launch Progress Monitor Dialog
-PasteInPapyrusTableCommandProvider_Pasting=Pasting
-PasteInPapyrusTableCommandProvider_PastingInTable=Pasting in Table
-PasteInPapyrusTableCommandProvider_ProblemsToSetPropertyValue=Problems to set properties value
-PasteInPapyrusTableCommandProvider_ProblemToApplyStereotype=Problems to apply stereotype
-PasteInPapyrusTableCommandProvider_ProblemToSetStereotypeValue=Problems to set stereotype properties value
-PasteInPapyrusTableCommandProvider_RequiredStereotypeCantBeFound=Stereotype {0} required by the column can' be found
-PasteInPapyrusTableCommandProvider_RequiredStereotypeNotApplied=The required stereotype {0} is not applied on the element {1}.
-PasteInPapyrusTableCommandProvider_StereotypePropertyCantBeResolved=The stereotype property called by {0} can't be resolved
-PasteInPapyrusTableCommandProvider_TheEnumerationLiteralCantBeFound=The enumeration literal {0} can't be found
-PasteInPapyrusTableCommandProvider_TheStereotypeCantBeApplied=The stereotype {0} can' be applied on {1}
-PasteInPapyrusTableCommandProvider_TheTextCantBeMappedOnAnExistingElement=The text {0} can't be mapped to an existing element
-PasteInTableHandler_PasteCancelled=Paste Action Canceled
-PasteInTableHandler_PasteCreation=Paste creation...
-PasteInTableHandler_ThePasteCommandCantBeExecuted=The paste command can't be executed
-PasteSeparator_Comma=Comma
-PasteSeparator_Other=Other
-PasteSeparator_Semicolon=Semicolon
-PasteSeparator_Space=Space
-PasteSeparator_Tabulation=Tabulation
-SelectCategoriesWizardPage_SelectCategoriesPage=Select categories page
-SelectCategoriesWizardPage_SelectCategoriesToListenInTheTreeTable=Select the categories to listen in the tree table.
+AbstractAxisManager_InputDialogMessage=The real name for the header is: \n\t %s \n \n Alias: +AbstractAxisManager_InputDialogTitle=Edit Header Alias Dialog +AbstractCreateNattableEditorHandler_EnterTheNameForTheNewTable=Enter the name for the new table +AbstractCreateNattableEditorHandler_PapyrusTableCreation=Papyrus Table Creation +AbstractPasteImportInNattableManager_column=column +AbstractPasteImportInNattableManager_EnablementStatusForPasteInTheTable=Enablement status for paste {0} in the table +AbstractPasteImportInNattableManager_INVERTED_MESSAGE=The axis of your table are inverted. This case is not yet managed. You must have elements as rows and features as columns. +AbstractPasteImportInNattableManager_NoPasteConfiguration=Neither of the row paste configuration and column paste configuration allows to create elements in the table\n. +AbstractPasteImportInNattableManager_NoPasteConfiguration2=Your table has no paste configuration +AbstractPasteImportInNattableManager_NumberOfColumnsAreEquals=The number of columns by rows is the same as the number of columns in the table +AbstractPasteImportInNattableManager_NumberOfColumnsAreNotEquals=The number of columns by rows is not the same as the number of columns in the table.\n You are trying to paste {0} columns in a table which has {1} columns +AbstractPasteImportInNattableManager_PasteColumnsError=\n Paste column error:\n\t +AbstractPasteImportInNattableManager_PasteRowsError=\n Paste row error:\n\t +AbstractPasteImportInNattableManager_row=row +AbstractPasteImportInNattableManager_TheContextOfTheTableHasNotTheContainmentFeatureDefinedForThePaste=The context of the table doesn't have the containment feature defined for the paste +AbstractPasteImportInNattableManager_TheContextOfTheTableHasTheContainmentFeatureDefinedForThePaste=The context of the table has the containment feature defined for the paste +AbstractPasteImportInNattableManager_TheTableCanCreateElement=The table can create {0} as {1} +AbstractPasteImportInNattableManager_TheTableCantCreateElement=The table can't create {0} as {1} +AbstractPasteImportInNattableManager_TheTableDoesntHaveColumns=The table doesn't have columns +AbstractPasteImportInNattableManager_TheTableHasAConfigurationToPaste=The table has a configuration to paste {0}. +AbstractPasteImportInNattableManager_TheUserChosesToPasteColumns=The user has chosen to paste columns. +AbstractPasteImportInNattableManager_TheUserChosesToPasteRows=The user has chosen to paste rows. +AbstractPasteImportInNattableManager_WhatAreYouPasting=I can't find if you are pasting rows elements or columns elements.\n Press "Yes" to paste rows and "No" to paste columns. +AbstractSaveCurrentAxisProvidersHandler_0=Enter name and description +AbstractSaveCurrentAxisProvidersHandler_1=Name: +AbstractSaveCurrentAxisProvidersHandler_2=Description: +AbstractSaveCurrentAxisProvidersHandler_4=Provider's configuration name must not be empty +AbstractSaveCurrentAxisProvidersHandler_5=There is an existing axis provider with that name +AbstractTableHandler_CurrentEditorCantBeFound=Current Editor can't be found +AxisManagerFactory_AxisManagerClassCantBeLoaded=The AxisManager registered with the id {0} can't be loaded +AxisManagerFactory_TheClassCantBeInstanciated=The class {0} can't be instanciated +CellManagerFactory_CellManagerNotFound=Cell manager not found +ChooseCategoriesSelectionWidget_EditAlias=Edit alias +ChooseCategoriesSelectionWidget_EnterAliasToUseForTheCategory=Enter alias to use for the category +CompositeAxisManager_AddAxisCommand=Add Axis Command +DeleteNatTableContextAdvice_DestroyNattableCommand=Destroy NatTables command +EditConfiguration_ConfigurationFactoryNotFound=I can't find config factory for {0} +EditConfiguration_ConfigurationNotFound=I can't find configuration for {0} +EditConfiguration_DeclarationNotYetSupported=The declaration of celleditor on cell is not yet supported +EditConfiguration_FactoryHandlesElementButDoesntProvideEditor=The factory {0} handles the element {1} but doesn't provide CellEditor +EObjectManager_AddAxisElement=Add Axis Element +NattableConfigurationRegistry_ConfigurationNotFound=Configuration can't be found +NattableConfigurationRegistry_NoTesterForThisConfiguration=no tester for this configuration +NattableConfigurationRegistry_NoTypeForAConfiguration=TableConfiguration in {0} has no type. +NattableConfigurationRegistry_ResourceEmpty=The resource {0} is empty. +NattableConfigurationRegistry_SeveralConfigurationsWithTheSameType=Several configuration are registered with the same type : {0}. We keep only the first one +NattableConfigurationRegistry_TableConfigurationNotFound=TableConfiguration not found in {0}. +NattableConfigurationRegistry_TesterNotFound=tester notfound +NattableConfigurationRegistry_TesterNotManager=tester not managed +NattableModelManager_ActionNotYetSupported=This action is not yet supported +NattableModelManager_AddColumnCommand=Add column command +CompositeAxisManager_DestroyAxisCommand=Destroy column command +NattableModelManager_AddRowCommand=Add rows command +NattableModelManager_AtLeastOfOneTheAxisManagerMustBeAMaster=At least one of the AxisManager must be a Master +NattableModelManager_CreateDestroyAxis=Create / Destroy Axis +NattableModelManager_DisableTheAutomaticAdditionOfColumnsWhenARowIsAdded=Disable the automatic addition of columns when a row is added +NattableModelManager_DisableTheAutomaticAdditionOfRowsWhenAColumnIsAdded=Disable the automatic addition of rows when a column is added +NattableModelManager_DisconnectAxisManagerCheckBoxMessage=Disconnect this axis manager +NattableModelManager_DisconnectAxisManagerCheckBoxTooltip=Disable the automatic addition of columns when a row is added. +NattableModelManager_DisconnectAxisManagerInformationDialogMessage=The checkbox '%s' has not been checked, so the next row addition could be followed by a columns addition, ignoring your current selection of columns. \n \n Do you want to continue? +NattableModelManager_DisconnectAxisManagerInformationDialogTitle=Axis Selection Question +NattableModelManager_DisconnectColumnAxisManager=Disable the automatic addition of rows when a column is added. +NattableModelManager_DisconnectColumnAxisManagerMessageInInformationDialog=The checkbox '%s' has not been checked, so the next row addition could be followed by a columns addition, ignoring your current selection of rows. \n\n Do you want to continue? +NattableModelManager_DisconnectThisAxisManager=Disconnect this axis manager +NattableModelManager_EditingDomainNotFound=EditingDomain not found +NattableModelManager_SelectColumns=Select Columns +NattableModelManager_SelectRows=Select Rows +NattableModelManager_ServiceRegistryNotFound=ServiceRegistry not found +NattableModelManager_SwitchLinesAndColumns=Switch Lines and Columns +NattableModelManager_TheCheckBoxHasNotBeenCheckedToAvoidAutomaticColumnAddition=The checkbox '%s' has not been checked, so the next row addition could be followed by a columns addition, ignoring your current selection of columns. Do you want to continue? +NattableModelManager_TheCheckBoxHasNotBeenCheckedToAvoidAutomaticRowAddition=The checkbox '%s' has not been checked, so the next column addition could be followed by a rows addition, ignoring your current selection of rows. Do you want to continue? +PrintTableHandler_PrintCantBeDone=Print can't be done +PrintTableHandler_TablePrint=Table Print +ProblemLabelProvider_StringsValuesCanBeResolved={0} string(s) values can't be resolved: +TableLabelProvider_ErrorGettingIconForTable=Error getting icon image for tables: +TableTesterRegistry_SeveralTesterAreRegisteredWithTheSameId=Several classes are registered for the id {0} +TableTesterRegistry_TheClassCantBeLoaded=Class registrered with id {0} can't be loaded +TextDelimiter_DoubleQuote=double quote +TextDelimiter_Quote=quote +ICellManager_NotAvailable=N/A +ImportCSVConfigurationPage_SelectTheTextDelimiter=Select the text delimiter used in your file. +ImportCSVConfigurationPage_Separators=Separators +ImportCSVConfigurationPage_TheCellSeparatorIsNotDefined=The cell separator is not defined. +ImportCSVConfigurationPage_TheCellSeparatorMustBeExcatlyOneChar=The cell separator must be exactly 1 character. +ImportFilePage_BeSureThatYourImportFileHasTheSameNumberOfColumns=Be sure that your imported file has the same number of columns than the current table +ImportFilePage_SelectTheFileToImport=Select the file to import +ImportFilePage_TheImportedElementWillBeAddedTo=The imported element will be added to: +ImportFilePage_YourFileWillBeImported=Your import will be done in the table: +ImportTableErrorPage_PleaseOpenAPapyrusEditor=Please open a Papyrus table editor before to do the import. +ImportTableWizard_ConfigureImport=Configure Import +ImportTableWizard_ImportTable=Import Table +ImportTableWizard_ImportTableError=Import Table Error +ImportTableWizard_ImportTableFromFileInPapyrusModel=Import Table From File In Papyrus Model +AbstractUMLTableEFacetEditor_UMLTableCreationErrorMessage=A UML Table can't be created with a non-UML element as context ({0}) +ColumnsToShowDialog_AdditionalFeatures=Additional Features +ColumnsToShowDialog_AdvancedMode=Advanced Mode +ColumnsToShowDialog_default_columns=Default Columns +ColumnsToShowDialog_DeselectAll=Deselect All +ColumnsToShowDialog_DeselectAllAvailableAdditionalFeatures=Deselect all available additional features. +ColumnsToShowDialog_DeselecteAllAvailableFeatures=Deselect all available features. +ColumnsToShowDialog_DeselectedAll=Deselect All +ColumnsToShowDialog_DirectFeatures=Direct Features +ColumnsToShowDialog_SelecColumnsToShow=Select the columns to show +ColumnsToShowDialog_SelectAll=Select All +ColumnsToShowDialog_SelectAllAvailableAdditionalFeatures=Select all available additional features. +ColumnsToShowDialog_SelectAllAvailablesFeatures=Select all available features. +ColumnsToShowDialog_ShowAllPossibilities=Show all possibilities +LoadCurrentAxisProvidersDialog_0=Name +LoadCurrentAxisProvidersDialog_1=Description +LoadCurrentAxisProvidersDialog_2=Columns +LoadCurrentAxisProvidersDialog_3=\ (current) +PapyrusPopupMenuAction_ShowCategoriesOnDepth=Show Categories on depth {0} +PasteConfigurationUtils_ContainementFeatureIsNotAReference=The containment feature for the pasted elements is not a reference. +PasteConfigurationUtils_ContainmentFeatureIsNotAReferenceContainment=The containement feature is not a reference in containment. +PasteConfigurationUtils_ContainmentFeatureIsNull=The containment feature for the pasted elements is null. +PasteConfigurationUtils_CreatesElementsAreNotCompatibleWithContainmentFeature=The created elements ({0}) are not compatible with the containmment feature {1}. +PasteConfigurationUtils_ElementIdNotDefined=The element id describing the kind of pasted element is not defined. +PasteConfigurationUtils_ElementTypeCantBeFound=The element type for {0} can be found. +PasteConfigurationUtils_PasteConfigurationIsConsistent=The paste configuration is consistent. +PasteEObjectAxisInTableCommandProvider_AddingElementToTheTable=Adding Elements To The table +PasteEObjectAxisInTableCommandProvider_CommandCreationHasBeenCancelled=Command creation has been cancelled +PasteEObjectAxisInTableCommandProvider_CreatingAnumberXonY=\ Creating {0} number {1}/{2} +PasteEObjectAxisInTableCommandProvider_DoingAdditionalActions=Doing additional actions +PasteEObjectAxisInTableCommandProvider_FinishingThePaste=Finishing the paste +PasteEObjectAxisInTableCommandProvider_LinkingReferencesToTheModel=Linking references to the model +PasteEObjectAxisInTableCommandProvider_PasteAction=Paste Action +PasteEObjectAxisInTableCommandProvider_PasteColumns=Paste Columns +PasteEObjectAxisInTableCommandProvider_PasteFromStringCommand=Paste from String Command +PasteEObjectAxisInTableCommandProvider_PasteRows=Paste Rows +PasteEObjectTreeAxisInNatTableCommandProvider_CantPasteColumnsInTreeTable=We can't paste columns in a tree table +PasteImportStatusDialog_ImportPasteDialogTitle=Import/Paste In Table +PasteImportStatusDialog_PasteConfigurationMessage=You can configure the Paste/Import using the Property View of the table. +PasteInPapyrusTableCommandProvider_0=The String {0} is not valid to create a {1}. +PasteInPapyrusTableCommandProvider_1=Paste Command In FlowPort Table +PasteInPapyrusTableCommandProvider_2=Create Paste Action +PasteInPapyrusTableCommandProvider_3=Launch Progress Monitor Dialog +PasteInPapyrusTableCommandProvider_Pasting=Pasting +PasteInPapyrusTableCommandProvider_PastingInTable=Pasting in Table +PasteInPapyrusTableCommandProvider_ProblemsToSetPropertyValue=Problems to set properties value +PasteInPapyrusTableCommandProvider_ProblemToApplyStereotype=Problems to apply stereotype +PasteInPapyrusTableCommandProvider_ProblemToSetStereotypeValue=Problems to set stereotype properties value +PasteInPapyrusTableCommandProvider_RequiredStereotypeCantBeFound=Stereotype {0} required by the column can' be found +PasteInPapyrusTableCommandProvider_RequiredStereotypeNotApplied=The required stereotype {0} is not applied on the element {1}. +PasteInPapyrusTableCommandProvider_StereotypePropertyCantBeResolved=The stereotype property called by {0} can't be resolved +PasteInPapyrusTableCommandProvider_TheEnumerationLiteralCantBeFound=The enumeration literal {0} can't be found +PasteInPapyrusTableCommandProvider_TheStereotypeCantBeApplied=The stereotype {0} can' be applied on {1} +PasteInPapyrusTableCommandProvider_TheTextCantBeMappedOnAnExistingElement=The text {0} can't be mapped to an existing element +PasteInTableHandler_PasteCancelled=Paste Action Canceled +PasteInTableHandler_PasteCreation=Paste creation... +PasteInTableHandler_ThePasteCommandCantBeExecuted=The paste command can't be executed +PasteSeparator_Comma=Comma +PasteSeparator_Other=Other +PasteSeparator_Semicolon=Semicolon +PasteSeparator_Space=Space +PasteSeparator_Tabulation=Tabulation +SelectCategoriesWizardPage_SelectCategoriesPage=Select categories page +SelectCategoriesWizardPage_SelectCategoriesToListenInTheTreeTable=Select the categories to listen in the tree table. diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/PasteEObjectTreeAxisInNattableCommandProvider.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/PasteEObjectTreeAxisInNattableCommandProvider.java index eff5b124c5b..ae1afe0fd07 100644 --- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/PasteEObjectTreeAxisInNattableCommandProvider.java +++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/PasteEObjectTreeAxisInNattableCommandProvider.java @@ -38,7 +38,6 @@ import org.eclipse.emf.ecore.EFactory; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EReference; import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.edit.command.AddCommand; import org.eclipse.emf.transaction.TransactionalEditingDomain; import org.eclipse.emf.workspace.EMFCommandOperation; import org.eclipse.gmf.runtime.common.core.command.CommandResult; @@ -56,7 +55,6 @@ import org.eclipse.papyrus.infra.nattable.Activator; import org.eclipse.papyrus.infra.nattable.manager.cell.CellManagerFactory; import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager; import org.eclipse.papyrus.infra.nattable.messages.Messages; -import org.eclipse.papyrus.infra.nattable.model.nattable.NattablePackage; import org.eclipse.papyrus.infra.nattable.model.nattable.Table; import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AbstractHeaderAxisConfiguration; import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.IAxisConfiguration; @@ -69,7 +67,6 @@ import org.eclipse.papyrus.infra.nattable.parsers.CSVParser; import org.eclipse.papyrus.infra.nattable.parsers.CellIterator; import org.eclipse.papyrus.infra.nattable.parsers.RowIterator; import org.eclipse.papyrus.infra.nattable.paste.IValueSetter; -import org.eclipse.papyrus.infra.nattable.paste.PastePostActionRegistry; import org.eclipse.papyrus.infra.nattable.utils.AxisConfigurationUtils; import org.eclipse.papyrus.infra.nattable.utils.CSVPasteHelper; import org.eclipse.papyrus.infra.nattable.utils.Constants; @@ -92,21 +89,12 @@ import org.eclipse.ui.progress.UIJob; */ // TODO : refactor me to create common ancestor with normal paste // TODO : refactor me : This class should be in oep.infra.emf.nattable +// TODO Nicolas FAUVERGUE : This class must be refactor because the detached mode and the attached mode have some duplicated code. public class PasteEObjectTreeAxisInNattableCommandProvider { private static final int MIN_AXIS_FOR_PROGRESS_MONITOR = 5; /** - * the containment feature to use - */ - private EStructuralFeature containmentFeature; - - /** - * the type to create - */ - private IElementType typeToCreate; - - /** * the table manager */ private INattableModelManager tableManager; @@ -139,7 +127,7 @@ public class PasteEObjectTreeAxisInNattableCommandProvider { /** * the converter map */ - private Map<Class<? extends AbstractStringValueConverter>, AbstractStringValueConverter> existingConverters; + private final Map<Class<? extends AbstractStringValueConverter>, AbstractStringValueConverter> existingConverters; private static final String PASTE_ACTION_TASK_NAME = Messages.PasteEObjectAxisInTableCommandProvider_PasteAction; @@ -159,9 +147,14 @@ public class PasteEObjectTreeAxisInNattableCommandProvider { private final int nbOperationsToDo; + /** + * The character of the indentation for the single column. + */ + private static final char INDENTATION_CHARACTER = ' '; // $NON-NLS-1$ + // we refresh the dialog each X read char - private int refreshEachReadChar = 1000; + private final int refreshEachReadChar = 1000; /** * if <code>true</code> the command can't be created and executed @@ -176,11 +169,11 @@ public class PasteEObjectTreeAxisInNattableCommandProvider { /** * the parser to use */ - private CSVParser parser; + private final CSVParser parser; int factor; - private Table table; + private final Table table; final TransactionalEditingDomain tableEditingDomain; @@ -195,11 +188,25 @@ public class PasteEObjectTreeAxisInNattableCommandProvider { */ private final boolean isSingleHeaderColumnTreeTable; - public PasteEObjectTreeAxisInNattableCommandProvider(INattableModelManager tableManager, boolean pasteColumn, Reader reader, CSVPasteHelper pasteHelper2, long totalSize) { + /** + * Constructor. + * + * @param tableManager + * The table manager. + * @param pasteColumn + * Boolean to determinate if the column are pasted. + * @param reader + * The reader of the pasted text. + * @param pasteHelper + * The paste helper. + * @param totalSize + * The total size of element pasted. + */ + public PasteEObjectTreeAxisInNattableCommandProvider(final INattableModelManager tableManager, final boolean pasteColumn, final Reader reader, final CSVPasteHelper pasteHelper, final long totalSize) { this.tableManager = tableManager; // this.pasteMode = status; this.existingConverters = new HashMap<Class<? extends AbstractStringValueConverter>, AbstractStringValueConverter>(); - this.pasteHelper = pasteHelper2; + this.pasteHelper = pasteHelper; this.reader = reader; this.pasteColumn = pasteColumn; this.table = tableManager.getTable(); @@ -224,50 +231,65 @@ public class PasteEObjectTreeAxisInNattableCommandProvider { init(); } - protected List<IPasteConfiguration> getPasteConfigurationFor(int depth) { - List<IPasteConfiguration> pasteConfs = new ArrayList<IPasteConfiguration>(); - for (TreeFillingConfiguration current : FillingConfigurationUtils.getAllTreeFillingConfiguration(table)) { + /** + * Get the paste configuration for the depth. + * + * @param depth + * The depth searched. + * @return The paste configuration for the depth. + */ + protected List<IPasteConfiguration> getPasteConfigurationFor(final int depth) { + final List<IPasteConfiguration> pasteConfs = new ArrayList<IPasteConfiguration>(); + if (depth == 0 && FillingConfigurationUtils.hasTreeFillingConfigurationForDepth(table, depth)) { + final IPasteConfiguration conf = (IPasteConfiguration) AxisConfigurationUtils.getIAxisConfigurationUsedInTable(tableManager.getTable(), NattableaxisconfigurationPackage.eINSTANCE.getPasteEObjectConfiguration(), false); + pasteConfs.add(conf); + } + for (final TreeFillingConfiguration current : FillingConfigurationUtils.getAllTreeFillingConfiguration(table)) { if (current.getDepth() == depth) { - IPasteConfiguration pasteConf = current.getPasteConfiguration(); + final IPasteConfiguration pasteConf = current.getPasteConfiguration(); Assert.isNotNull(pasteConf);// must not be null here! (so must be verified before pasteConfs.add(pasteConf); } } - if (depth == 0 && pasteConfs.size() == 0 && FillingConfigurationUtils.hasTreeFillingConfigurationForDepth(table, depth)) { - final IPasteConfiguration conf = (IPasteConfiguration) AxisConfigurationUtils.getIAxisConfigurationUsedInTable(tableManager.getTable(), NattableaxisconfigurationPackage.eINSTANCE.getPasteEObjectConfiguration(), false); - pasteConfs.add(conf); - } return pasteConfs; } - - protected IPasteConfiguration getPasteConfigurationsFor(int depth, String categoryName) { + /** + * Get the paste configuration for the depth and the category name. + * + * @param depth + * The depth searched. + * @param categoryName + * The category name searched. + * @returnThe paste configuration for the depth and the category name. + */ + protected IPasteConfiguration getPasteConfigurationsFor(final int depth, final String categoryName) { if (depth == 0 && !FillingConfigurationUtils.hasTreeFillingConfigurationForDepth(table, 0)) { AbstractHeaderAxisConfiguration conf = table.getLocalRowHeaderAxisConfiguration(); if (conf != null) { conf = table.getTableConfiguration().getRowHeaderAxisConfiguration(); } - List<TreeFillingConfiguration> filling = FillingConfigurationUtils.getAllTreeFillingConfigurationForDepth(table, depth); - List<IAxisConfiguration> referencedPasteConf = new ArrayList<IAxisConfiguration>(); - for (TreeFillingConfiguration tmp : filling) { + final List<TreeFillingConfiguration> filling = FillingConfigurationUtils.getAllTreeFillingConfigurationForDepth(table, depth); + final List<IAxisConfiguration> referencedPasteConf = new ArrayList<IAxisConfiguration>(); + for (final TreeFillingConfiguration tmp : filling) { if (tmp.getPasteConfiguration() != null) { referencedPasteConf.add(tmp.getPasteConfiguration()); } } - for (IAxisConfiguration axisConf : conf.getOwnedAxisConfigurations()) { + for (final IAxisConfiguration axisConf : conf.getOwnedAxisConfigurations()) { if (axisConf instanceof IPasteConfiguration && !referencedPasteConf.contains(axisConf)) { return (IPasteConfiguration) axisConf; } } } - for (TreeFillingConfiguration curr : FillingConfigurationUtils.getAllTreeFillingConfiguration(table)) { + for (final TreeFillingConfiguration curr : FillingConfigurationUtils.getAllTreeFillingConfiguration(table)) { if (curr.getDepth() == depth) { if (categoryName == null || categoryName.isEmpty()) { return curr.getPasteConfiguration(); } else { String featureName = curr.getAxisUsedAsAxisProvider().getAlias(); if (featureName == null || "".equals(featureName)) { - Object element = curr.getAxisUsedAsAxisProvider().getElement(); + final Object element = curr.getAxisUsedAsAxisProvider().getElement(); // TODO : doesn't work for stereotype propertyes // TODO : use label provider if (element instanceof EStructuralFeature) { @@ -275,7 +297,7 @@ public class PasteEObjectTreeAxisInNattableCommandProvider { } } if (categoryName.equals(featureName)) { - return (IPasteConfiguration) curr.getPasteConfiguration(); + return curr.getPasteConfiguration(); } } @@ -285,9 +307,16 @@ public class PasteEObjectTreeAxisInNattableCommandProvider { return null; } - protected boolean pasteInDetachedMode(Table table) { - List<IPasteConfiguration> confs = getPasteConfigurationFor(0); - for (IPasteConfiguration current : confs) { + /** + * Returns <code>true</code> if the configuration is in the detached mode, <code>false</code> otherwise. + * + * @param table + * The table. + * @return <code>true</code> if the configuration is in the detached mode, <code>false</code> otherwise. + */ + protected boolean isPasteInDetachedMode(final Table table) { + final List<IPasteConfiguration> confs = getPasteConfigurationFor(0); + for (final IPasteConfiguration current : confs) { if (current.isDetachedMode()) { return true; } @@ -295,34 +324,24 @@ public class PasteEObjectTreeAxisInNattableCommandProvider { return false; } - /** - * inits the field of this class + * Initialize the fields of this class. */ private void init() { - this.detachedMode = pasteInDetachedMode(table); - // PasteEObjectConfiguration configuration = null; - // if (this.pasteColumn) { - // configuration = (PasteEObjectConfiguration) AxisConfigurationUtils.getIAxisConfigurationUsedInTable(this.table, NattableaxisconfigurationPackage.eINSTANCE.getPasteEObjectConfiguration(), true); - // this.secondAxis = tableManager.getRowElementsList(); - // } else { - // - // configuration = (PasteEObjectConfiguration) AxisConfigurationUtils.getIAxisConfigurationUsedInTable(this.table, NattableaxisconfigurationPackage.eINSTANCE.getPasteEObjectConfiguration(), false); + final boolean bool = isPasteInDetachedMode(this.table); + final PasteEObjectConfiguration configuration = (PasteEObjectConfiguration) AxisConfigurationUtils.getIAxisConfigurationUsedInTable(this.table, NattableaxisconfigurationPackage.eINSTANCE.getPasteEObjectConfiguration(), false); this.secondAxis = tableManager.getColumnElementsList(); - // } - // if (configuration != null) { - // this.containmentFeature = configuration.getPasteElementContainementFeature(); - // this.typeToCreate = ElementTypeRegistry.getInstance().getType(configuration.getPastedElementId()); - // this.postActions = configuration.getPostActions(); - // this.detachedMode = configuration.isDetachedMode(); - // } + if (configuration != null) { + this.postActions = configuration.getPostActions(); + this.detachedMode = configuration.isDetachedMode(); + } } /** + * This allows to execute the paste from string command. * * @param useProgressMonitor * boolean indicating that we must do the paste with a progress monitor - * TODO : post actions are not yet supported in the in the detached mode */ public void executePasteFromStringCommand(final boolean useProgressMonitor) { // if (this.pasteColumn) {// not yet supported @@ -337,18 +356,21 @@ public class PasteEObjectTreeAxisInNattableCommandProvider { // } else { pasteJobName = PASTE_ROWS_JOB_NAME; // } - // if (this.detachedMode) { - // executePasteFromStringCommandInDetachedMode(useProgressMonitor, pasteJobName); - // } else { - executePasteFromStringCommandInAttachedMode(useProgressMonitor, pasteJobName); - // } + if (this.detachedMode) { + executePasteFromStringCommandInDetachedMode(useProgressMonitor, pasteJobName); + } else { + executePasteFromStringCommandInAttachedMode(useProgressMonitor, pasteJobName); + } } /** - * + * This allows to execute the paste from String command in the detached mode. + * * @param useProgressMonitor - * boolean indicating that we must do the paste with a progress monitor + * boolean indicating that we must do the paste with a progress monitor. + * @param pasteJobName + * The name of the paste job. */ private void executePasteFromStringCommandInDetachedMode(final boolean useProgressMonitor, final String pasteJobName) { // the map used to share objects between the paste action and the cell value managers @@ -367,7 +389,7 @@ public class PasteEObjectTreeAxisInNattableCommandProvider { final ICommand pasteCommand = getPasteFromStringCommandInDetachedMode(contextEditingDomain, tableEditingDomain, new NullProgressMonitor(), sharedMap); try { CheckedOperationHistory.getInstance().execute(pasteCommand, new NullProgressMonitor(), null); - } catch (ExecutionException e) { + } catch (final ExecutionException e) { Activator.log.error(e); } sharedMap.clear(); @@ -376,7 +398,7 @@ public class PasteEObjectTreeAxisInNattableCommandProvider { final UIJob job = new UIJob(pasteJobName) { @Override - public IStatus runInUIThread(IProgressMonitor monitor) { + public IStatus runInUIThread(final IProgressMonitor monitor) { final ICommand pasteCommand = getPasteFromStringCommandInDetachedMode(contextEditingDomain, tableEditingDomain, monitor, sharedMap); if (pasteCommand == null) { @@ -386,7 +408,7 @@ public class PasteEObjectTreeAxisInNattableCommandProvider { if (pasteCommand.canExecute()) { try { CheckedOperationHistory.getInstance().execute(pasteCommand, monitor, null); - } catch (ExecutionException e) { + } catch (final ExecutionException e) { return new Status(IStatus.ERROR, Activator.PLUGIN_ID, "An exception occured during the paste", e); //$NON-NLS-1$ } finally { sharedMap.clear(); @@ -405,16 +427,19 @@ public class PasteEObjectTreeAxisInNattableCommandProvider { } /** + * This allows to execute the paste from String command in the attached mode. * * @param useProgressMonitor * boolean indicating that we must do the paste with a progress monitor + * @param pasteJobName + * The name of the paste job. */ private void executePasteFromStringCommandInAttachedMode(final boolean useProgressMonitor, final String pasteJobName) { if (!useProgressMonitor) { final ICommand pasteCommand = getPasteFromStringCommandInAttachedMode(contextEditingDomain, tableEditingDomain, new NullProgressMonitor()); try { CheckedOperationHistory.getInstance().execute(pasteCommand, new NullProgressMonitor(), null); - } catch (ExecutionException e) { + } catch (final ExecutionException e) { Activator.log.error(e); } } else { @@ -422,7 +447,7 @@ public class PasteEObjectTreeAxisInNattableCommandProvider { final UIJob job = new UIJob(pasteJobName) { @Override - public IStatus runInUIThread(IProgressMonitor monitor) { + public IStatus runInUIThread(final IProgressMonitor monitor) { final ICommand pasteCommand = getPasteFromStringCommandInAttachedMode(contextEditingDomain, tableEditingDomain, monitor); if (pasteCommand == null) { @@ -433,10 +458,10 @@ public class PasteEObjectTreeAxisInNattableCommandProvider { try { - EMFCommandOperation op = new EMFCommandOperation(contextEditingDomain, new GMFtoEMFCommandWrapper(pasteCommand)); + final EMFCommandOperation op = new EMFCommandOperation(contextEditingDomain, new GMFtoEMFCommandWrapper(pasteCommand)); // EMFOperationCommand c = new EMFOperationCommand(contextEditingDomain, pasteCommand); CheckedOperationHistory.getInstance().execute(op, monitor, null); - } catch (Exception e) { + } catch (final Exception e) { return new Status(IStatus.ERROR, Activator.PLUGIN_ID, "An exception occured during the paste", e); //$NON-NLS-1$ } monitor.done(); @@ -451,217 +476,245 @@ public class PasteEObjectTreeAxisInNattableCommandProvider { } } - private ICommand getPasteRowFromStringCommandInDetachedMode(final TransactionalEditingDomain contextEditingDomain, final TransactionalEditingDomain tableEditingDomain, final IProgressMonitor progressMonitor, final Map<Object, Object> sharedMap) { - if (progressMonitor != null) { - progressMonitor.beginTask(PASTE_ACTION_TASK_NAME, this.nbOperationsToDo);// +1 to add the created elements to the table + /** + * Create the paste row from string command for the detached mode. + * + * @param contextEditingDomain + * The context editing domain. + * @param tableEditingDomain + * The table editing domain. + * @param progressMonitor + * The progress monitor. + * @param sharedMap + * The shared map. + * @return The created command for the paste in detached mode. + */ + private ICommand getPasteRowFromStringInDetachedModeCommand(final TransactionalEditingDomain contextEditingDomain, final TransactionalEditingDomain tableEditingDomain, final IProgressMonitor progressMonitor, final Map<Object, Object> sharedMap) { + // initialize the progress monitor + if (null != progressMonitor) { + progressMonitor.beginTask(PASTE_ACTION_TASK_NAME, this.nbOperationsToDo); } - // the list of the created elements - final List<Object> createdElements = new ArrayList<Object>(); + + final boolean isSingleHeaderColumnTreeTable = TableHelper.isSingleColumnTreeTable(table); // 2.2 create the creation request and find the command provider - final EClass eClassToCreate = this.typeToCreate.getEClass(); - final EFactory eFactory = eClassToCreate.getEPackage().getEFactoryInstance(); - - // 2.3 create the axis - int nbCreatedElements = 0; - - // we refresh the dialog each X read char - long readChar = 0; - long previousreadChar = 0; - final RowIterator rowIter = this.parser.parse(); - while (rowIter.hasNext()) { - final CellIterator cellIter = rowIter.next(); - if (!cellIter.hasNext()) { - continue;// to avoid blank line - } - if ((progressMonitor != null) && progressMonitor.isCanceled()) { - // the user click on the cancel button - return null; - } + final ICommand pasteAllCommand = new AbstractTransactionalCommand(contextEditingDomain, PASTE_COMMAND_NAME, null) { - readChar = readChar + (parser.getReadCharacters() - previousreadChar); - previousreadChar = parser.getReadCharacters(); + /** + * + * @see org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand#doExecuteWithResult(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable) + * + * @param monitor + * @param info + * @return + * @throws ExecutionException + */ + @SuppressWarnings("unchecked") + @Override + protected CommandResult doExecuteWithResult(final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException { + final List<IStatus> resultStatus = new ArrayList<IStatus>(); + long readChar = 0; + long previousreadChar = 0; - if (progressMonitor != null && readChar > refreshEachReadChar) { - readChar = 0; - progressMonitor.subTask(NLS.bind("{0} {1} have been created.", new Object[] { nbCreatedElements, typeToCreate.getEClass().getName() })); //$NON-NLS-1$ - progressMonitor.worked(refreshEachReadChar); - } - nbCreatedElements++; + // this map stores the last created object to a depth. + // its allows us to find easily the context to use for each created element + final Map<Integer, EObject> contextMap = new HashMap<Integer, EObject>(); + contextMap.put(Integer.valueOf(-1), table.getContext()); - // 2.3.3 we create the element itself - final EObject createdElement = eFactory.create(eClassToCreate); + // 2. create a map with the last paste configuration used by depth + final Map<Integer, PasteEObjectConfiguration> confMap = new HashMap<Integer, PasteEObjectConfiguration>(); - createdElements.add(createdElement); - nbCreatedElements++; - for (final String currentPostActions : this.postActions) { - PastePostActionRegistry.INSTANCE.doPostAction(this.tableManager, currentPostActions, tableContext, createdElement, sharedMap, null);// TODO : remove this parameter - } + final RowIterator rowIter = parser.parse(); + int nbReadLine = 0; + // Manage the rows paste + while (rowIter.hasNext()) { + final CellIterator cellIter = rowIter.next(); + nbReadLine++; + if (!cellIter.hasNext()) { + continue;// to avoid blank line + } + // Check if the progress monitor catch a cancel click + if (null != progressMonitor && progressMonitor.isCanceled()) { + progressMonitor.done(); + localDispose(); + return CommandResult.newCancelledCommandResult(); + } + readChar = readChar + (parser.getReadCharacters() - previousreadChar); + previousreadChar = parser.getReadCharacters(); - // 2.3.4 we set these properties values - final Iterator<Object> secondAxisIterator = secondAxis.iterator(); - while (secondAxisIterator.hasNext() && cellIter.hasNext()) { - final Object currentAxis = secondAxisIterator.next(); - final String valueAsString = cellIter.next(); - final Object columnObject; - final Object rowObject; - if (this.pasteColumn) { - columnObject = createdElement; - rowObject = currentAxis; - } else { - columnObject = currentAxis; - rowObject = createdElement; - } + if (null != progressMonitor && readChar > refreshEachReadChar) { + readChar = 0; + progressMonitor.worked(refreshEachReadChar); + } + // the iterator on columns + final Iterator<?> secondAxisIterator = secondAxis.iterator(); - boolean isEditable = CellManagerFactory.INSTANCE.isCellEditable(columnObject, rowObject, sharedMap); - if (isEditable) { - final AbstractStringValueConverter converter = CellManagerFactory.INSTANCE.getOrCreateStringValueConverterClass(columnObject, rowObject, tableManager, existingConverters, this.pasteHelper.getMultiValueSeparator()); - CellManagerFactory.INSTANCE.setStringValue(columnObject, rowObject, valueAsString, converter, tableManager, sharedMap); - } - } + // Manage the first column of the row + while (cellIter.hasNext()) { + String valueAsString = cellIter.next(); + int nbReadCell = 1; - // TODO : do something to say that the number of cell is not correct! - while (cellIter.hasNext()) { - cellIter.next();// required! - } - } + if (isSingleHeaderColumnTreeTable && !valueAsString.isEmpty()) { + // If the table is a single header column, parse the value string to manage the correct depth + // (manage each separator character as empty cell) + while (INDENTATION_CHARACTER == valueAsString.charAt(0)) { + nbReadCell++; + valueAsString = valueAsString.substring(1); + } + } else { + // test if the value is empty (we are in the tree header) + while (cellIter.hasNext() && valueAsString.isEmpty()) { + valueAsString = cellIter.next(); + nbReadCell++; + } + // Remove the whitespace on beginning + if (isSingleHeaderColumnTreeTable && !valueAsString.isEmpty()) { + while (INDENTATION_CHARACTER == valueAsString.charAt(0)) { + valueAsString = valueAsString.substring(1); + } + } + } - // 2.4 we add the created elements to the table - final AbstractTransactionalCommand pasteCommand = new AbstractTransactionalCommand(tableEditingDomain, PASTE_COMMAND_NAME, null) { + final int depth = getDepth(nbReadCell); + final boolean isCategory = isCategory(nbReadCell); - @Override - protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException { - // initialize lists - final Collection<String> postActions = getPostActions(); - - // we add the post actions added by cell manager - // see bug 431691: [Table 2] Paste from Spreadsheet must be able to apply required stereotypes for column properties in all usecases - // https://bugs.eclipse.org/bugs/show_bug.cgi?id=431691 - @SuppressWarnings("unchecked") - final Collection<String> postActionsAddedByCellManagers = (Collection<String>) sharedMap.get(Constants.ADDITIONAL_POST_ACTIONS_TO_CONCLUDE_PASTE_KEY); - postActions.addAll(postActionsAddedByCellManagers); - - @SuppressWarnings("unchecked") - final List<Cell> cells = (List<Cell>) sharedMap.get(Constants.CELLS_TO_ADD_KEY); - @SuppressWarnings("unchecked") - final List<IValueSetter> valueToSet = (List<IValueSetter>) sharedMap.get(Constants.REFERENCES_TO_SET_KEY); - - int nbTasks = 1; // to add created elements to the model - nbTasks = nbTasks + 1; // to add createds elements to the table - nbTasks = nbTasks + postActions.size();// to do post actions after the attachment to the model - nbTasks = nbTasks + 1; // to attach the cells to the model - nbTasks = nbTasks + valueToSet.size(); // to set the references values - - if (progressMonitor != null) { - if (progressMonitor.isCanceled()) { - localDispose(); - return CommandResult.newCancelledCommandResult(); - } - progressMonitor.beginTask(Messages.PasteEObjectAxisInTableCommandProvider_FinishingThePaste, nbTasks); - } + if (isCategory) { + confMap.put(Integer.valueOf(depth), (PasteEObjectConfiguration) getPasteConfigurationsFor(depth, valueAsString)); + // lastConfiguration = (PasteEObjectConfiguration) getPasteConfigurationsFor(depth, valueAsString); + while (cellIter.hasNext()) { + cellIter.next(); + } + break; + } - // 1. Add the elements to the context - AddCommand.create(contextEditingDomain, tableContext, containmentFeature, createdElements).execute(); + // we get the paste configuration to use + PasteEObjectConfiguration pasteConfToUse = confMap.get(Integer.valueOf(depth)); + if (null == pasteConfToUse) { + pasteConfToUse = (PasteEObjectConfiguration) getPasteConfigurationsFor(depth, null); + if (null != pasteConfToUse) { + confMap.put(Integer.valueOf(depth), pasteConfToUse); + } else { + final IStatus status = new Status(IStatus.ERROR, Activator.PLUGIN_ID, PasteSeverityCode.PASTE_ERROR__NO_PASTE_CONFIGURATION, NLS.bind("No paste configuration found for the depth {0}", depth), null); + return new CommandResult(status); + } + } - if (progressMonitor != null) { - if (progressMonitor.isCanceled()) { - return CommandResult.newCancelledCommandResult(); - } - progressMonitor.worked(1); - progressMonitor.subTask(Messages.PasteEObjectAxisInTableCommandProvider_AddingElementToTheTable); - } + // get the element type to use to create the element + final IElementType typeToCreate = ElementTypeRegistry.getInstance().getType(pasteConfToUse.getPastedElementId()); - Command cmd = null; - if (pasteColumn) { - cmd = tableManager.getAddColumnElementCommand(createdElements); // TODO remove one of these 2 lines - } else { - cmd = tableManager.getAddRowElementCommand(createdElements); - } - if (cmd != null) {// could be null - cmd.execute(); - } + // Get the class type to create and get its factory + final EClass eClassToCreate = typeToCreate.getEClass(); + final EFactory eFactory = eClassToCreate.getEPackage().getEFactoryInstance(); - if (progressMonitor != null) { - if (progressMonitor.isCanceled()) { - return CommandResult.newCancelledCommandResult(); - } - progressMonitor.worked(1); - progressMonitor.subTask(Messages.PasteEObjectAxisInTableCommandProvider_DoingAdditionalActions); - } + // get the element type to use to create the element + final Object createdElement = eFactory.create(eClassToCreate); + // 4. we use the label to do a set name command on the created element + if (createdElement instanceof EObject) { + final EObject eobject = (EObject) createdElement; - for (final String currentPostActions : postActions) { - PastePostActionRegistry.INSTANCE.concludePostAction(tableManager, currentPostActions, sharedMap); - progressMonitor.worked(1); - } + // add the created element to the context map + contextMap.put(Integer.valueOf(depth), (EObject) createdElement); + // get the context to use + final EObject context = contextMap.get(depth - 1); + final EStructuralFeature containmentFeature = pasteConfToUse.getPasteElementContainementFeature(); + if (containmentFeature.isMany()) { + ((Collection<EObject>) context.eGet(containmentFeature)).add(eobject); + } else { + context.eSet(containmentFeature, createdElement); + } - if (progressMonitor != null) { - if (progressMonitor.isCanceled()) { - return CommandResult.newCancelledCommandResult(); - } - progressMonitor.worked(1); - progressMonitor.subTask(Messages.PasteEObjectAxisInTableCommandProvider_LinkingReferencesToTheModel); - } + // get the feature used as ID for the element + final EStructuralFeature nameFeature = ((EObject) createdElement).eClass().getEStructuralFeature("name"); //$NON-NLS-1$ + if (nameFeature != null) { + eobject.eSet(nameFeature, valueAsString); + } + // we add the created element to the table, only if its parent is the context of the table and if the table is filled by DnD + if (!FillingConfigurationUtils.hasTreeFillingConfigurationForDepth(table, 0) && ((EObject) createdElement).eContainer() == tableContext) { + final Command addCommand = tableManager.getAddRowElementCommand(Collections.singleton(createdElement)); + + if (addCommand != null) {// can be null + addCommand.execute(); + addCommand.dispose(); + } + } + } + + crossCellIteratorToFirstBodyCell(cellIter, nbReadCell); + + while (secondAxisIterator.hasNext() && cellIter.hasNext()) { + // we must exit of the header part! + valueAsString = cellIter.next(); + // Remove the whitespace on beginning + if (isSingleHeaderColumnTreeTable && !valueAsString.isEmpty()) { + while (INDENTATION_CHARACTER == valueAsString.charAt(0)) { + valueAsString = valueAsString.substring(1); + } + } - // we set the references + final Object currentAxis = secondAxisIterator.next(); + if (!valueAsString.isEmpty()) { + final Object columnObject = currentAxis; + final Object rowObject = createdElement; - if (valueToSet.size() > 0) { - for (final IValueSetter current : valueToSet) { - current.doSetValue(contextEditingDomain); - if (progressMonitor != null) { - if (progressMonitor.isCanceled()) { - return CommandResult.newCancelledCommandResult(); + final boolean isEditable = CellManagerFactory.INSTANCE.isCellEditable(columnObject, rowObject, sharedMap); + if (isEditable) { + final AbstractStringValueConverter converter = CellManagerFactory.INSTANCE.getOrCreateStringValueConverterClass(columnObject, rowObject, tableManager, existingConverters, pasteHelper.getMultiValueSeparator()); + CellManagerFactory.INSTANCE.setStringValue(columnObject, rowObject, valueAsString, converter, tableManager, sharedMap); + } } - progressMonitor.worked(1); } - } - } - // the cells must be attached at the end (in order to update properly the cell map in the table manager - if (progressMonitor != null) { - if (progressMonitor.isCanceled()) { - return CommandResult.newCancelledCommandResult(); + int tooManyCellOnRow = 0; + while (cellIter.hasNext()) { + cellIter.next();// required + tooManyCellOnRow++; + } + + if (tooManyCellOnRow != 0) { + final String message = NLS.bind("There are too many cells on the rows number {0}", nbReadLine); //$NON-NLS-1$ + final IStatus status = new Status(IStatus.WARNING, Activator.PLUGIN_ID, PasteSeverityCode.PASTE_WARNING__TOO_MANY_CELLS_ON_ROWS, message, null); + resultStatus.add(status); + } } - progressMonitor.worked(1); } - // add the created cells to the table - AddCommand.create(tableEditingDomain, table, NattablePackage.eINSTANCE.getTable_Cells(), cells).execute(); - - if (progressMonitor != null) { - progressMonitor.done(); - } + progressMonitor.done(); localDispose(); - return CommandResult.newOKCommandResult(); + if (resultStatus.isEmpty()) { + return CommandResult.newOKCommandResult(); + } else { + final IStatus resultingStatus = new MultiStatus(Activator.PLUGIN_ID, IStatus.OK, resultStatus.toArray(new IStatus[resultStatus.size()]), "The paste has been done, but we found some problems", null); + return new CommandResult(resultingStatus); + } } }; - - return pasteCommand; + return pasteAllCommand; } - /** + * Get the paste command for the detached mode. * - * + * @param contextEditingDomain + * The context editing domain. + * @param tableEditingDomain + * The table editing domain. + * @param progressMonitor + * The progress monitor used. * @param sharedMap * a map used to share objects and informations during the paste between this class and the cell value manager - * @param commandCreationCancelProvider - * the creation command progress monitor - * @param commandExecutionProgressMonitor - * the command execution progress monitor * @return - * the command to use to finish the paste (the main part of the paste is directly done here) + * the command to use to finish the paste (the main part of the paste is directly done here) */ private ICommand getPasteFromStringCommandInDetachedMode(final TransactionalEditingDomain contextEditingDomain, final TransactionalEditingDomain tableEditingDomain, final IProgressMonitor progressMonitor, final Map<Object, Object> sharedMap) { - if (!this.pasteColumn) { - return getPasteRowFromStringCommandInDetachedMode(contextEditingDomain, tableEditingDomain, progressMonitor, sharedMap); + if (this.pasteColumn) { + return new UnexecutableCommand(new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.PasteEObjectTreeAxisInNatTableCommandProvider_CantPasteColumnsInTreeTable)); } else { - // return getPasteColumnFromStringCommandInDetachedMode(contextEditingDomain, tableEditingDomain, progressMonitor, sharedMap); + return getPasteRowFromStringInDetachedModeCommand(contextEditingDomain, tableEditingDomain, progressMonitor, sharedMap); } - return null; } @@ -717,7 +770,7 @@ public class PasteEObjectTreeAxisInNattableCommandProvider { // previousreadChar = parser.getReadCharacters(); // if (progressMonitor != null && readChar > refreshEachReadChar) { // readChar = 0; - // progressMonitor.subTask(NLS.bind("{0} {1} have been created.", new Object[] { typeToCreate.getEClass().getName(), nbCreatedElements })); //$NON-NLS-1$ + // progressMonitor.subTask(NLS.bind("{0} {1} have been created.", new Object[] { typeToCreate.getEClass().getName(), nbCreatedElements })); //$NON-NLS-1$ // progressMonitor.worked(refreshEachReadChar); // } // nbCreatedElements++; @@ -784,27 +837,36 @@ public class PasteEObjectTreeAxisInNattableCommandProvider { // return pasteAllCommand; // } - - - - - private boolean isCategory(int nbReadCell) { + /** + * Check if this is a category. + * + * @param nbReadCell + * The number of cells read. + * @return <code>true</code> if this is a category, <code>false</code> otherwise. + */ + private boolean isCategory(final int nbReadCell) { return PasteTreeUtils.isCategory(nbReadCell, FillingConfigurationUtils.getMaxDepthForTree(table), StyleUtils.getHiddenDepths(table), FillingConfigurationUtils.hasTreeFillingConfigurationForDepth(table, 0)); } - - private int getDepth(int nbReadCell) { + /** + * Get the depth corresponding to the number of cells read + * + * @param nbReadCell + * The number of cell read. + * @return The depth number. + */ + private int getDepth(final int nbReadCell) { return PasteTreeUtils.getDepth(nbReadCell, FillingConfigurationUtils.getMaxDepthForTree(table), StyleUtils.getHiddenDepths(table), FillingConfigurationUtils.hasTreeFillingConfigurationForDepth(table, 0)); } /** * - * @param iterator - * the cellIterator + * @param cellIter + * The cellIterator * @param nbReadCell - * + * The number of cells read. */ - protected void crossCellIteratorToFirstBodyCell(CellIterator cellIter, int nbReadCell) { + protected void crossCellIteratorToFirstBodyCell(final CellIterator cellIter, int nbReadCell) { // If this is a single column header tree table, we don't need to do anything, only the first column is used for the header in the excel spearsheet if (!TableHelper.isSingleColumnTreeTable(table)) { int nbColumns = (FillingConfigurationUtils.getMaxDepthForTree(table) + 1) * 2; @@ -813,8 +875,8 @@ public class PasteEObjectTreeAxisInNattableCommandProvider { } // exit of the header part - List<Integer> hiddenDepth = StyleUtils.getHiddenDepths(table); - int nbVisibleColumns = nbColumns - hiddenDepth.size(); + final List<Integer> hiddenDepth = StyleUtils.getHiddenDepths(table); + final int nbVisibleColumns = nbColumns - hiddenDepth.size(); while (nbReadCell < nbVisibleColumns) { cellIter.next(); @@ -826,11 +888,14 @@ public class PasteEObjectTreeAxisInNattableCommandProvider { /** * - * @param commandCreationCancelProvider - * the creation command progress monitor - * @param commandExecutionProgressMonitor - * the command execution progress monitor - * @return + * + * @param contextEditingDomain + * The context editing domain. + * @param tableEditingDomain + * The table editing domain. + * @param progressMonitor + * The progress monitor. + * @return The paste command for the attached mode. */ private ICommand getPasteRowFromStringInAttachedModeCommand(final TransactionalEditingDomain contextEditingDomain, final TransactionalEditingDomain tableEditingDomain, final IProgressMonitor progressMonitor) { // initialize the progress monitor @@ -844,11 +909,6 @@ public class PasteEObjectTreeAxisInNattableCommandProvider { final ICommand pasteAllCommand = new AbstractTransactionalCommand(contextEditingDomain, PASTE_COMMAND_NAME, null) { /** - * The character of the indentation for the single column. - */ - private static final char INDENTATION_CHARACTER = ' '; // $NON-NLS-1$ - - /** * * @see org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand#doExecuteWithResult(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable) * @@ -858,22 +918,21 @@ public class PasteEObjectTreeAxisInNattableCommandProvider { * @throws ExecutionException */ @Override - protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException { - List<IStatus> resultStatus = new ArrayList<IStatus>(); + protected CommandResult doExecuteWithResult(final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException { + final List<IStatus> resultStatus = new ArrayList<IStatus>(); long readChar = 0; long previousreadChar = 0; // this map stores the last created object to a depth. // its allows us to find easily the context to use for each created element - Map<Integer, EObject> contextMap = new HashMap<Integer, EObject>(); + final Map<Integer, EObject> contextMap = new HashMap<Integer, EObject>(); contextMap.put(Integer.valueOf(-1), table.getContext()); // 2. create a map with the last paste configuration used by depth - Map<Integer, PasteEObjectConfiguration> confMap = new HashMap<Integer, PasteEObjectConfiguration>(); + final Map<Integer, PasteEObjectConfiguration> confMap = new HashMap<Integer, PasteEObjectConfiguration>(); final RowIterator rowIter = parser.parse(); - int nbCreatedElements = 0; int nbReadLine = 0; while (rowIter.hasNext()) { final CellIterator cellIter = rowIter.next(); @@ -918,7 +977,7 @@ public class PasteEObjectTreeAxisInNattableCommandProvider { nbReadCell++; } // Remove the whitespace on beginning - if(isSingleHeaderColumnTreeTable && !valueAsString.isEmpty()){ + if (isSingleHeaderColumnTreeTable && !valueAsString.isEmpty()) { while (INDENTATION_CHARACTER == valueAsString.charAt(0)) { valueAsString = valueAsString.substring(1); } @@ -949,25 +1008,25 @@ public class PasteEObjectTreeAxisInNattableCommandProvider { } // we get the paste configuration to use - PasteEObjectConfiguration pasteConfToUse = (PasteEObjectConfiguration) confMap.get(Integer.valueOf(depth)); + PasteEObjectConfiguration pasteConfToUse = confMap.get(Integer.valueOf(depth)); if (pasteConfToUse == null) { pasteConfToUse = (PasteEObjectConfiguration) getPasteConfigurationsFor(depth, null); if (pasteConfToUse != null) { confMap.put(Integer.valueOf(depth), pasteConfToUse); } else { - IStatus status = new Status(IStatus.ERROR, Activator.PLUGIN_ID, PasteSeverityCode.PASTE_ERROR__NO_PASTE_CONFIGURATION, NLS.bind("No paste configuration found for the depth {0}", depth), null); + final IStatus status = new Status(IStatus.ERROR, Activator.PLUGIN_ID, PasteSeverityCode.PASTE_ERROR__NO_PASTE_CONFIGURATION, NLS.bind("No paste configuration found for the depth {0}", depth), null); return new CommandResult(status); } } // get the paste configuration to use // get the element type to use to create the element - IElementType typeToCreate = ElementTypeRegistry.getInstance().getType(pasteConfToUse.getPastedElementId()); + final IElementType typeToCreate = ElementTypeRegistry.getInstance().getType(pasteConfToUse.getPastedElementId()); - EStructuralFeature containmentFeature = pasteConfToUse.getPasteElementContainementFeature(); + final EStructuralFeature containmentFeature = pasteConfToUse.getPasteElementContainementFeature(); // get the context to use - EObject context = contextMap.get(depth - 1); + final EObject context = contextMap.get(depth - 1); final CreateElementRequest createRequest1 = new CreateElementRequest(contextEditingDomain, context, typeToCreate, (EReference) containmentFeature); final IElementEditService creationContextCommandProvider = ElementEditServiceUtils.getCommandProvider(context); @@ -976,7 +1035,6 @@ public class PasteEObjectTreeAxisInNattableCommandProvider { // 1. we create the element commandCreation.execute(monitor, info); - nbCreatedElements++; // 2. we get the result of the command final CommandResult res = commandCreation.getCommandResult(); @@ -991,14 +1049,14 @@ public class PasteEObjectTreeAxisInNattableCommandProvider { // TODO : this class should be in oep.infra.emf.nattable if (createdElement instanceof EObject) { // TODO : this past must be specific for EMF AND for UML - EObject eobject = (EObject) createdElement; + final EObject eobject = (EObject) createdElement; // get the feature used as ID for the element - EStructuralFeature nameFeature = ((EObject) createdElement).eClass().getEStructuralFeature("name"); //$NON-NLS-1$ + final EStructuralFeature nameFeature = eobject.eClass().getEStructuralFeature("name"); //$NON-NLS-1$ if (nameFeature != null) { - SetRequest setNameRequest = new SetRequest(contextEditingDomain, (EObject) createdElement, nameFeature, valueAsString); + final SetRequest setNameRequest = new SetRequest(contextEditingDomain, eobject, nameFeature, valueAsString); final IElementEditService createdElementCommandProvider = ElementEditServiceUtils.getCommandProvider(createdElement); if (createdElementCommandProvider != null) { - ICommand setName = createdElementCommandProvider.getEditCommand(setNameRequest); + final ICommand setName = createdElementCommandProvider.getEditCommand(setNameRequest); if (setName != null && setName.canExecute()) { setName.execute(monitor, info); } @@ -1022,7 +1080,7 @@ public class PasteEObjectTreeAxisInNattableCommandProvider { // we must exit of the header part! valueAsString = cellIter.next(); // Remove the whitespace on beginning - if(isSingleHeaderColumnTreeTable && !valueAsString.isEmpty()){ + if (isSingleHeaderColumnTreeTable && !valueAsString.isEmpty()) { while (INDENTATION_CHARACTER == valueAsString.charAt(0)) { valueAsString = valueAsString.substring(1); } @@ -1041,7 +1099,7 @@ public class PasteEObjectTreeAxisInNattableCommandProvider { // } - boolean isEditable = CellManagerFactory.INSTANCE.isCellEditable(columnObject, rowObject); + final boolean isEditable = CellManagerFactory.INSTANCE.isCellEditable(columnObject, rowObject); if (isEditable) { final AbstractStringValueConverter converter = CellManagerFactory.INSTANCE.getOrCreateStringValueConverterClass(columnObject, rowObject, tableManager, existingConverters, pasteHelper.getMultiValueSeparator()); @@ -1049,7 +1107,7 @@ public class PasteEObjectTreeAxisInNattableCommandProvider { if (setValueCommand != null && setValueCommand.canExecute()) { try { setValueCommand.execute(); - } catch (Exception e) { + } catch (final Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } @@ -1065,8 +1123,8 @@ public class PasteEObjectTreeAxisInNattableCommandProvider { } if (tooManyCellOnRow != 0) { - String message = NLS.bind("There are too many cells on the rows number {0}", nbReadLine); - IStatus status = new Status(IStatus.WARNING, Activator.PLUGIN_ID, PasteSeverityCode.PASTE_WARNING__TOO_MANY_CELLS_ON_ROWS, message, null); + final String message = NLS.bind("There are too many cells on the rows number {0}", nbReadLine); + final IStatus status = new Status(IStatus.WARNING, Activator.PLUGIN_ID, PasteSeverityCode.PASTE_WARNING__TOO_MANY_CELLS_ON_ROWS, message, null); resultStatus.add(status); } } @@ -1077,8 +1135,7 @@ public class PasteEObjectTreeAxisInNattableCommandProvider { if (resultStatus.isEmpty()) { return CommandResult.newOKCommandResult(); } else { - // TODO : use me - IStatus resultingStatus = new MultiStatus(Activator.PLUGIN_ID, IStatus.OK, resultStatus.toArray(new IStatus[resultStatus.size()]), "The paste has been done, but we found some problems", null); + final IStatus resultingStatus = new MultiStatus(Activator.PLUGIN_ID, IStatus.OK, resultStatus.toArray(new IStatus[resultStatus.size()]), "The paste has been done, but we found some problems", null); return new CommandResult(resultingStatus); } } @@ -1086,56 +1143,48 @@ public class PasteEObjectTreeAxisInNattableCommandProvider { return pasteAllCommand; } - protected boolean useDetachedMode() { - // TODO - return false; - } - - protected Command getSetNameCommandusingLabel(Object createdElement, String label) { - - return null; - } - /** + * Get the paste command for the attached mode. * - * @param commandCreationCancelProvider - * the creation command progress monitor - * @param commandExecutionProgressMonitor - * the command execution progress monitor - * @return + * @param contextEditingDomain + * The context editing domain + * @param tableEditingDomain + * The table editing domain + * @param progressMonitor + * The progress monitor + * @return the command to use to finish the paste (the main part of the paste is directly done here) */ private ICommand getPasteFromStringCommandInAttachedMode(final TransactionalEditingDomain contextEditingDomain, final TransactionalEditingDomain tableEditingDomain, final IProgressMonitor progressMonitor) { if (this.pasteColumn) { - return new UnexecutableCommand(new Status(IStatus.ERROR, Activator.PLUGIN_ID, "We can't paste columns in a tree table")); + return new UnexecutableCommand(new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.PasteEObjectTreeAxisInNatTableCommandProvider_CantPasteColumnsInTreeTable)); } else { return getPasteRowFromStringInAttachedModeCommand(contextEditingDomain, tableEditingDomain, progressMonitor); } } /** - * + * Get the post actions. + * * @return - * the list of the post actions to do + * the list of the post actions to do */ private Collection<String> getPostActions() { return this.postActions; } /** - * dispose fields of the class + * Dispose fields of the class */ private void localDispose() { this.isDisposed = true; this.tableManager = null; - this.typeToCreate = null; - this.containmentFeature = null; for (final AbstractStringValueConverter current : existingConverters.values()) { current.dispose(); } this.existingConverters.clear(); try { this.reader.close(); - } catch (IOException e) { + } catch (final IOException e) { Activator.log.error(e); } } |