Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus')
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/PapyrusParsersPlugin.java173
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/messages/NFPMessages.java209
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/messages/messages_en.properties120
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/modelgenerator/CollaborationUseGenerator.java131
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/modelgenerator/ParameterGenerator.java125
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/modelgenerator/PropertyGenerator.java162
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/preferences/IPreferencesConstants.java53
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/CompletionFilterSourceViewerConfiguration.java81
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/ILabelColorConstants.java72
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/LabelColorProvider.java116
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/LabelCompletionProcessor.java272
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/LabelContextType.java50
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/WhitespaceDetector.java43
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/WordDetector.java57
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/collaborationuselabel/CollaborationUseConfigurationForUML.java102
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/collaborationuselabel/CollaborationUseLabelColorProvider.java114
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/collaborationuselabel/CollaborationUseLabelCompletionProcessor.java173
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/collaborationuselabel/CollaborationUseLabelScanner.java97
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/collaborationuselabel/CollaborationUseLabelSourceViewerConfiguration.java136
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/collaborationuselabel/ICollaborationUseLabelColorConstants.java52
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/collaborationuselabel/IContext.java37
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/CollaborationCompletionProposalComputer.java123
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/DefaultValueCompletionProposal.java76
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/DerivedPropertyCompletionProposal.java76
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/DirectionCompletionProposal.java77
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/ICompletionProposalComputer.java40
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/MultiplicityCompletionProposal.java89
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/NameCompletionProposal.java74
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/ParameterModifierProposal.java102
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/ParameterModifiersProposal.java63
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/PropertyModifierProposal.java112
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/PropertyModifiersProposal.java63
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/PropertyRedefineProposal.java96
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/PropertySubsetsProposal.java96
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/TypeCompletionProposalComputer.java180
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_BooleanValue_CompletionProposal.java63
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_DefaultValue_CompletionProposal.java61
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_EnumerationLiteral_CompletionProposal.java92
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_Integer_CompletionProposal.java65
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_NFP_VS_CompletionProposal.java63
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_NullValue_CompletionProposal.java61
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_NumberLiteral_CompletionProposal.java62
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_Real_CompletionProposal.java64
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_StringLiteral_CompletionProposal.java60
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_Tuple_CompletionProposal.java101
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_UnlimitedNatural_CompletionProposal.java65
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VisibilityCompletionProposal.java77
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/IContext.java81
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/IParameterLabelColorConstants.java53
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/ParameterConfigurationForUML.java116
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/ParameterLabelColorProvider.java109
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/ParameterLabelCompletionProcessor.java249
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/ParameterLabelPartitionScanner.java52
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/ParameterLabelScanner.java105
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/ParameterLabelSourceViewerConfiguration.java155
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/ParameterWordDetector.java89
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/IContext.java90
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/IPropertyLabelColorConstants.java72
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyConfigurationForUML.java115
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyLabelColorProvider.java120
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyLabelCompletionProcessor.java244
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyLabelContextType.java50
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyLabelPartitionScanner.java51
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyLabelScanner.java112
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyLabelSourceViewerConfiguration.java154
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyLabelTemplateUI.java149
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyWordDetector.java88
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/Assert.java67
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/AssertionFailedException.java37
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/IErrorReporter.java29
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/Messages.java43
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/MultiplicityException.java33
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/NameException.java35
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/SimpleStringErrorReporter.java50
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/TypeRecognitionException.java46
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/UnboundTemplateRecognitionException.java48
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/messages.properties3
77 files changed, 0 insertions, 7121 deletions
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/PapyrusParsersPlugin.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/PapyrusParsersPlugin.java
deleted file mode 100644
index d5af3dff79c..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/PapyrusParsersPlugin.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.ImageRegistry;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle.
- */
-public class PapyrusParsersPlugin extends AbstractUIPlugin {
-
- // The plug-in ID
- /**
- *
- */
- public static final String PLUGIN_ID = "org.eclipse.papyrus.classdiagram.parsers";
-
- // path to the default image
- /**
- *
- */
- public static final String DEFAULT_IMAGE = "resources/icons/default.gif";
-
- // The shared instance
- /**
- *
- */
- private static PapyrusParsersPlugin plugin;
-
- /**
- * The constructor.
- */
- public PapyrusParsersPlugin() {
- plugin = this;
-
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- /**
- *
- *
- * @param context
- *
- * @throws Exception
- */
- @Override
- public void start(BundleContext context) throws Exception {
- super.start(context);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- /**
- *
- *
- * @param context
- *
- * @throws Exception
- */
- @Override
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance.
- *
- * @return the shared instance
- */
- public static PapyrusParsersPlugin getDefault() {
- return plugin;
- }
-
- /**
- * Returns an image descriptor for the image file at the given plug-in relative path.
- *
- * @param path
- * the path
- *
- * @return the image descriptor
- */
- public static ImageDescriptor getImageDescriptor(String path) {
- return imageDescriptorFromPlugin(PLUGIN_ID, path);
- }
-
- /**
- * Returns an <code>org.eclipse.swt.graphics.Image</code> identified by its key.<BR>
- * By default, it returns a default image. This image is the image placed in the directory <em>resources/icons/default.gif</em>
- *
- * @param key
- * the key of the image
- *
- * @return the Image
- */
- public static Image getImage(String key) {
- ImageRegistry registry = PapyrusParsersPlugin.getDefault().getImageRegistry();
- Image image = registry.get(key);
- if (image == null) {
- ImageDescriptor desc = AbstractUIPlugin.imageDescriptorFromPlugin(PapyrusParsersPlugin.PLUGIN_ID, key);
- registry.put(key, desc);
- image = registry.get(key);
- }
- if ((image == null) && !key.equals(DEFAULT_IMAGE)) {
- image = getImage(DEFAULT_IMAGE);
- }
- return image;
- }
-
- /**
- * Logs an error message in the Plugin's Log
- *
- * @param message
- * the message to log
- */
- public static void logError(String message) {
- getDefault().getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, message));
- }
-
- /**
- * Logs a warning message in the Plugin's Log
- *
- * @param message
- * the message to log
- */
- public static void logWarning(String message) {
- getDefault().getLog().log(new Status(IStatus.WARNING, PLUGIN_ID, message));
- }
-
- /**
- * Logs an information message in the Plugin's Log
- *
- * @param message
- * the message to log
- */
- public static void logInfo(String message) {
- getDefault().getLog().log(new Status(IStatus.INFO, PLUGIN_ID, message));
- }
-
- /**
- * Logs an exception in the Plugin's Log
- *
- * @param message
- * the message to log
- */
- public static void logException(Exception e) {
- getDefault().getLog().log(new Status(IStatus.INFO, PLUGIN_ID, e.getLocalizedMessage(), e));
- }
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/messages/NFPMessages.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/messages/NFPMessages.java
deleted file mode 100644
index aa1d27b9bde..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/messages/NFPMessages.java
+++ /dev/null
@@ -1,209 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.parsers.messages;
-
-import org.eclipse.osgi.util.NLS;
-
-public class NFPMessages extends NLS {
-
- public static String Integer_Decimal_StringsInfo;
-
- public static String Integer_Hexadecimal_StringsInfo;
-
- public static String Integer_Decimal_StringName;
-
- public static String Integer_Hexadecimal_StringName;
-
- public static String UnlimitedNatural_Decimal_StringsInfo;
-
- public static String UnlimitedNatural_Hexadecimal_StringsInfo;
-
- public static String UnlimitedNatural_Decimal_StringName;
-
- public static String UnlimitedNatural_Hexadecimal_StringName;
-
- public static String UnlimitedNatural_Star_StringsInfo;
-
- public static String UnlimitedNatural_Star_StringName;
-
- public static String Collection_StringsInfo;
-
- public static String Collection_StringName;
-
- public static String BooleanValue_True_StringName;
-
- public static String BooleanValue_False_StringName;
-
- public static String BooleanValue_True_StringsInfo;
-
- public static String BooleanValue_False_StringsInfo;
-
- public static String Interval_11_StringsInfo;
-
- public static String Interval_01_StringsInfo;
-
- public static String Interval_10_StringsInfo;
-
- public static String Interval_00_StringsInfo;
-
- public static String Interval_11_StringName;
-
- public static String Interval_01_StringName;
-
- public static String Interval_10_StringName;
-
- public static String Interval_00_StringName;
-
- public static String NFP_VS_Literal_StringsInfo;
-
- public static String NFP_VS_Interval_StringsInfo;
-
- public static String NFP_VS_Literal_StringName;
-
- public static String NFP_VS_Interval_StringName;
-
- public static String NullValue_StringsInfo;
-
- public static String NullValue_StringName;
-
- public static String DefaultValue_StringsInfo;
-
- public static String DefaultValue_StringName;
-
- public static String NumberLiteral_Integer_StringsInfo;
-
- public static String NumberLiteral_Integer_StringName;
-
- public static String NumberLiteral_Real_StringsInfo;
-
- public static String NumberLiteral_Real_StringName;
-
- public static String StringLiteral_StringsInfo;
-
- public static String StringLiteral_StringName;
-
- public static String Tuple_StringsInfo;
-
- public static String Tuple_StringName;
-
- public static String Choice_StringsInfo;
-
- public static String Choice_StringName;
-
- public static String Enumeration_StringsInfo;
-
- public static String Enumeration_StringName;
-
- public static String Variable_Scalar_StringsInfo;
-
- public static String Variable_Scalar_StringName;
-
- public static String Variable_Collection_StringsInfo;
-
- public static String Variable_Collection_StringName;
-
- public static String RealPoint_StringsInfo;
-
- public static String RealPoint_StringsName;
-
- public static String RealExpo_StringsInfo;
-
- public static String RealExpo_StringsName;
-
- public static String TimeStr_StringsInfo;
-
- public static String TimeStr_StringName;
-
- public static String DateStr_StringsInfo;
-
- public static String DateStr_StringName;
-
- public static String DateTime_StringsInfo;
-
- public static String DateTime_StringName;
-
- public static String DayStr_StringsInfo;
-
- public static String DayStr_Monday_StringName;
-
- public static String DayStr_Tuesday_StringName;
-
- public static String DayStr_Wednesday_StringName;
-
- public static String DayStr_Thursday_StringName;
-
- public static String DayStr_Friday_StringName;
-
- public static String DayStr_Saturday_StringName;
-
- public static String DayStr_Sunday_StringName;
-
- public static String VarCallExpr_StringName;
-
- public static String VarCallExpr_StringsInfo;
-
- public static String VarDeclExpr_StringName;
-
- public static String VarDeclExpr_StringsInfo;
-
- public static String PropCallExpr_StringName;
-
- public static String PropCallExpr_StringsInfo;
-
- public static String OpeCallExpr_StringName;
-
- public static String OpeCallExpr_StringsInfo;
-
- public static String CondExpr_StringName;
-
- public static String CondExpr_StringsInfo;
-
- public static String VariableName_StringsInfo;
-
- public static String VariableName_StringName;
-
- public static String TypeName_StringsInfo;
-
- public static String TypeName_StringName;
-
- public static String InstantExpr_StringsInfo;
-
- public static String DurationExpr_StringsInfo;
-
- public static String JitterExpr_StringsInfo;
-
- public static String InstantExpr_StringName;
-
- public static String DurationExpr_StringName;
-
- public static String JitterExpr_StringName;
-
- public static String SimpleObsExpr_StringsInfo;
-
- public static String SimpleObsExpr_StringName;
-
- public static String OccObsExpr_StringsInfo;
-
- public static String OccObsExpr_StringName;
-
- public static String WhenObsExpr_StringsInfo;
-
- public static String WhenObsExpr_StringName;
-
- static {
- NLS.initializeMessages("com.cea.papyrus.classdiagram.parsers.messages.messages_en", NFPMessages.class); //$NON-NLS-1$
- }
-
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/messages/messages_en.properties b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/messages/messages_en.properties
deleted file mode 100644
index cde7a47ad1f..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/messages/messages_en.properties
+++ /dev/null
@@ -1,120 +0,0 @@
-
-
-# Labels for completion proposals
-
-
-Integer_Decimal_StringsInfo=decimal integer (e.g. -2, 0, 256)\nor\ndecimal long (e.g. 1201452L)
-Integer_Decimal_StringName=<decimalInteger>
-Integer_Hexadecimal_StringsInfo=hexadecimal integer (e.g. 0xFFFF)\nor\nhexadecimal long (e.g. 0xAFFFFD9L)
-Integer_Hexadecimal_StringName=<hexadecimalInteger>
-
-UnlimitedNatural_Decimal_StringsInfo=unlimited natural(e.g. 1, 2, 3)\nor\ndecimal long (e.g. 120452L)
-UnlimitedNatural_Decimal_StringName=<decimalNatural>
-UnlimitedNatural_Hexadecimal_StringsInfo=hexadecimal unlimited natural (e.g. 0xFFFF)\nor\nhexadecimal long (e.g. 0xAFFFFD9L)
-UnlimitedNatural_Hexadecimal_StringName=<hexadecimalNatural>
-UnlimitedNatural_Star_StringsInfo=infinite symbol
-UnlimitedNatural_Star_StringName=*
-
-Collection_StringName=<collection>
-Collection_StringsInfo=collection: elements between\nbrackets separated \nby commas (e.g. {1, 2, 4})
-
-
-BooleanValue_True_StringName=true
-BooleanValue_False_StringName=false
-BooleanValue_True_StringsInfo=true
-BooleanValue_False_StringsInfo=false
-Interval_11_StringsInfo=Interval: [min..max]
-Interval_01_StringsInfo=Interval: ]min..max]
-Interval_10_StringsInfo=Interval: [min..max[
-Interval_00_StringsInfo=Interval: ]min..max[
-Interval_11_StringName=[min..max]
-Interval_01_StringName=]min..max]
-Interval_10_StringName=[min..max[
-Interval_00_StringName=]min..max[
-NFP_VS_Literal_StringsInfo=Literal
-NFP_VS_Interval_StringsInfo=Interval
-NFP_VS_Literal_StringName=<literal>
-NFP_VS_Interval_StringName=<interval>
-
-NullValue_StringsInfo=null value
-NullValue_StringName=null
-
-DefaultValue_StringsInfo=default value: "-"
-DefaultValue_StringName=default
-
-NumberLiteral_Integer_StringsInfo=Number literal: integer
-NumberLiteral_Integer_StringName=<integer>
-NumberLiteral_Real_StringsInfo=Number literal: real
-NumberLiteral_Real_StringName=<real>
-StringLiteral_StringsInfo=\'String literal\'
-StringLiteral_StringName=<stringLiteral>
-Tuple_StringsInfo=Tuple items separated with commas (e.g. (item1,item2,item3))
-Tuple_StringName=(<tupleitems>)
-Choice_StringsInfo=Choice alternative name (item1, item2, item3)
-Choice_StringName=(<choice alternative>)
-Enumeration_StringsInfo=Enumeration literal
-Enumeration_StringName=(<enumeration>)
-
-
-Variable_Scalar_StringsInfo=Scalar Variable
-Variable_Scalar_StringName=$<ident>
-Variable_Collection_StringsInfo=Collection Variable
-Variable_Collection_StringName=@<ident>
-
-RealPoint_StringsInfo=real: with decimal point (e.g. 12.6)
-RealPoint_StringsName=<real>
-RealExpo_StringsInfo=real: with exponent (e.g. 1.2E-9)
-RealExpo_StringsName=<scientific real>
-
-TimeStr_StringsInfo=time with second precision: #hr:min:sec# (e.g. #12:15:45#)\nor\ntime with centisecond precision: #hr:min:sec:csec# (e.g. #12:15:45:89#)\n\n00<=hr<=23\n00<=min<=59\n00<=sec<=59\n00<=csec<=99
-TimeStr_StringName=<time>
-DateStr_StringsInfo=date without time: #year/month/day# (e.g. #2006/12/01#)\nor\ndate with time (e.g. #2006/12/01 12:15:45#)\n\n0<month<13\n0<day<32
-DateStr_StringName=<date>
-DateTime_StringsInfo=date\nor\ntime\nor\day
-DateTime_StringName=<dateTime>
-DayStr_StringsInfo=day without time (e.g. #Mon#) \nor\nday with time (e.g. #Mon 12:15:56#)
-DayStr_Monday_StringName=Monday
-DayStr_Tuesday_StringName=Tuesday
-DayStr_Wednesday_StringName=Wednesday
-DayStr_Thursday_StringName=Thursday
-DayStr_Friday_StringName=Friday
-DayStr_Saturday_StringName=Saturday
-DayStr_Sunday_StringName=Sunday
-
-VarCallExpr_StringName=<variableCallExpr>
-VarCallExpr_StringsInfo=Variable call expression:\n\n<variable-name>
-VarDeclExpr_StringName=<variableDeclExpr>
-VarDeclExpr_StringsInfo=Variable declaration expression:\n\n<variable-direction>$<variable-name>:<type-name>\n\n<variable-direction>::= in | out | inout
-PropCallExpr_StringName=<propertyCallExpr>
-PropCallExpr_StringsInfo=Property call expression
-OpeCallExpr_StringName=<operationCallExpr>
-OpeCallExpr_StringsInfo=Operation call expression
-CondExpr_StringName=<conditionalExpr>
-CondExpr_StringsInfo=Conditional expression (e.g. (a>6)?true:false )
-
-VariableName_StringsInfo=Identifier
-VariableName_StringName=<variableName>
-
-TypeName_StringsInfo=variable type name
-TypeName_StringName=<TypeName>
-
-InstantExpr_StringsInfo=instant-expression:\n <instant-obs-expr>\n| (<instant-obs-expr> + <duration-obs-expr>)
-InstantExpr_StringName=<instant-expr>
-
-DurationExpr_StringsInfo=duration-epxression:\n <duration-obs-expr>\n| (<instant-obs-expr> - <instant-obs-expr>)
-DurationExpr_StringName=<duration-expr>
-
-JitterExpr_StringsInfo=jitter expression:\n jitter(<instant-obs-expr>)\n| jitter(<instant-obs-expr>,<instant-obs-expr>)
-JitterExpr_StringName=<jitter-expr>
-
-SimpleObsExpr_StringsInfo=<obs-name> (identifier)
-SimpleObsExpr_StringName=<obs-name>
-
-OccObsExpr_StringsInfo=<obs-name>[<index>] (e.g. myObs[10])
-OccObsExpr_StringName=<obs-name>[<index>]
-
-WhenObsExpr_StringsInfo=<obs-name> ([<index>])? when <condition-expr>
-WhenObsExpr_StringName=<obs-name> ([<index>])? when <condition-expr> (e.g. t1 when (x>6))
-
-
-
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/modelgenerator/CollaborationUseGenerator.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/modelgenerator/CollaborationUseGenerator.java
deleted file mode 100644
index 04a305768d1..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/modelgenerator/CollaborationUseGenerator.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - customization for CollaborationUse
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.modelgenerator;
-
-import org.antlr.runtime.ANTLRStringStream;
-import org.antlr.runtime.CommonTokenStream;
-import org.antlr.runtime.MismatchedTokenException;
-import org.antlr.runtime.RecognitionException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.papyrus.parsers.PapyrusParsersPlugin;
-import org.eclipse.papyrus.parsers.antlr.CollaborationUseLabelLexer;
-import org.eclipse.papyrus.parsers.antlr.CollaborationUseLabelParser;
-import org.eclipse.papyrus.parsers.util.SimpleStringErrorReporter;
-import org.eclipse.papyrus.parsers.util.TypeRecognitionException;
-import org.eclipse.uml2.uml.CollaborationUse;
-
-public class CollaborationUseGenerator {
-
- /** The CollaborationUse to modify */
- private CollaborationUse collaborationUse;
-
- /** Error reporter for lexer and parser generated by antlr */
- private SimpleStringErrorReporter reporter;
-
- /**
- * Default Constructor.
- *
- * @param collaborationUse
- * the CollaborationUse to modify
- */
- public CollaborationUseGenerator(CollaborationUse collaborationUse) {
- this.collaborationUse = collaborationUse;
- this.reporter = new SimpleStringErrorReporter();
- }
-
- /**
- * Parse the label of the CollaborationUse and modify CollaborationUse attributes.
- *
- * @param label
- * the label that defines the CollaborationUse
- */
- public void parseAndModifyCollaborationUse(String label) {
- try {
- CollaborationUseLabelLexer lexer = new CollaborationUseLabelLexer(new ANTLRStringStream(label));
- CommonTokenStream tokens = new CommonTokenStream(lexer);
- CollaborationUseLabelParser parser = new CollaborationUseLabelParser(tokens, collaborationUse,
- new SimpleStringErrorReporter());
- parser.label();
- } catch (RecognitionException e) {
- PapyrusParsersPlugin.getDefault().getLog().log(
- new Status(IStatus.ERROR, PapyrusParsersPlugin.PLUGIN_ID, IStatus.OK,
- "could not parse the property label: " + label, e));
- } catch (RuntimeException e) {
- PapyrusParsersPlugin.getDefault().getLog().log(
- new Status(IStatus.ERROR, PapyrusParsersPlugin.PLUGIN_ID, IStatus.OK,
- "could not parse the property label: " + label, e));
- }
- }
-
- /**
- * Parse the label of the CollaborationUse and validate it.
- *
- * @param label
- * the label that defines the CollaborationUse
- *
- * @return null if label is valid, else return the message that describes the error.
- */
- public String parseAndValidateCollaborationUse(String label) {
-
- // To validate the message : parse it.
- // If no errors are detected, it is ok. If exceptions : not ok.
- // Returns the exception message
- CollaborationUseLabelLexer lexer = new CollaborationUseLabelLexer(new ANTLRStringStream(label));
- CommonTokenStream tokens = new CommonTokenStream(lexer);
- CollaborationUseLabelParser parser = new CollaborationUseLabelParser(tokens, collaborationUse, reporter);
- parser.setValidation(true);
- try {
- parser.label();
- } catch (MismatchedTokenException e) {
- PapyrusParsersPlugin.logError("context:" + parser.getContext());
- } catch (RecognitionException e) {
- reporter.setMessage(e.getLocalizedMessage());
- } catch (RuntimeException e) {
- reporter.setMessage(e.getLocalizedMessage());
- }
- return reporter.getMessage();
- }
-
- /**
- * Parse the label of the CollaborationUse, and generates an exception if does not validate.
- *
- * @param label
- * the label that defines the CollaborationUse
- *
- * @return null if label is valid, else return the message that describes the error.
- */
- public String parseUndefinedCollaborationUseType(String label) {
-
- // To validate the message : parse it.
- // If no errors are detected, it is ok. If exceptions are detected : not ok.
- // Returns the exception message
- CollaborationUseLabelLexer lexer = new CollaborationUseLabelLexer(new ANTLRStringStream(label));
- CommonTokenStream tokens = new CommonTokenStream(lexer);
- CollaborationUseLabelParser parser = new CollaborationUseLabelParser(tokens, collaborationUse,
- new SimpleStringErrorReporter());
- parser.setValidation(true);
- try {
- parser.label();
- } catch (RecognitionException re) {
-
- } catch (RuntimeException tse) {
- if (tse instanceof TypeRecognitionException) {
- return ((TypeRecognitionException) tse).getTypeName();
- }
- }
- return null;
- }
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/modelgenerator/ParameterGenerator.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/modelgenerator/ParameterGenerator.java
deleted file mode 100644
index 8fafdd2e62c..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/modelgenerator/ParameterGenerator.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - customization for Parameter
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.modelgenerator;
-
-import org.antlr.runtime.ANTLRStringStream;
-import org.antlr.runtime.CommonTokenStream;
-import org.antlr.runtime.MismatchedTokenException;
-import org.antlr.runtime.RecognitionException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.papyrus.parsers.PapyrusParsersPlugin;
-import org.eclipse.papyrus.parsers.antlr.ParameterLabelLexer;
-import org.eclipse.papyrus.parsers.antlr.ParameterLabelParser;
-import org.eclipse.papyrus.parsers.util.SimpleStringErrorReporter;
-import org.eclipse.papyrus.parsers.util.TypeRecognitionException;
-import org.eclipse.uml2.uml.Parameter;
-
-public class ParameterGenerator {
-
- /** The Parameter to modify */
- private Parameter parameter;
-
- /** Error reporter for lexer and parser generated by antlr */
- private SimpleStringErrorReporter reporter;
-
- /**
- * Default Constructor.
- *
- * @param parameter
- * the Parameter to modify
- */
- public ParameterGenerator(Parameter parameter) {
- this.parameter = parameter;
- this.reporter = new SimpleStringErrorReporter();
- }
-
- /**
- * Parse the label of the Parameter and modify Parameter attributes.
- *
- * @param label
- * the label that defines the Parameter
- */
- public void parseAndModifyParameter(String label) {
- try {
- ParameterLabelLexer lexer = new ParameterLabelLexer(new ANTLRStringStream(label));
- CommonTokenStream tokens = new CommonTokenStream(lexer);
- ParameterLabelParser parser = new ParameterLabelParser(tokens, parameter, new SimpleStringErrorReporter());
- parser.label();
- } catch (RecognitionException e) {
- PapyrusParsersPlugin.getDefault().getLog().log(new Status(IStatus.ERROR, PapyrusParsersPlugin.PLUGIN_ID, IStatus.OK, "could not parse the parameter label: " + label, e));
- } catch (RuntimeException e) {
- PapyrusParsersPlugin.getDefault().getLog().log(new Status(IStatus.ERROR, PapyrusParsersPlugin.PLUGIN_ID, IStatus.OK, "could not parse the parameter label: " + label, e));
- }
- }
-
- /**
- * Parse the label of the Parameter and validate it.
- *
- * @param label
- * the label that defines the Parameter
- *
- * @return null if label is valid, else return the message that describes the error.
- */
- public String parseAndValidateParameter(String label) {
-
- // To validate the message : parse it.
- // If no errors are detected, it is ok. If exceptions : not ok.
- // Returns the exception message
- ParameterLabelLexer lexer = new ParameterLabelLexer(new ANTLRStringStream(label));
- CommonTokenStream tokens = new CommonTokenStream(lexer);
- ParameterLabelParser parser = new ParameterLabelParser(tokens, parameter, reporter);
- parser.setValidation(true);
- try {
- parser.label();
- } catch (MismatchedTokenException e) {
- PapyrusParsersPlugin.logError("context:" + parser.getContext());
- } catch (RecognitionException e) {
- reporter.setMessage(e.getLocalizedMessage());
- } catch (RuntimeException e) {
- reporter.setMessage(e.getLocalizedMessage());
- }
- return reporter.getMessage();
- }
-
- /**
- * Parse the label of the Parameter, and generates an exception if does not validate.
- *
- * @param label
- * the label that defines the Parameter
- *
- * @return null if label is valid, else return the message that describes the error.
- */
- public String parseUndefinedParameterType(String label) {
-
- // To validate the message : parse it.
- // If no errors are detected, it is ok. If exceptions are detected : not ok.
- // Returns the exception message
- ParameterLabelLexer lexer = new ParameterLabelLexer(new ANTLRStringStream(label));
- CommonTokenStream tokens = new CommonTokenStream(lexer);
- ParameterLabelParser parser = new ParameterLabelParser(tokens, parameter, new SimpleStringErrorReporter());
- parser.setValidation(true);
- try {
- parser.label();
- } catch (RecognitionException re) {
-
- } catch (RuntimeException tse) {
- if (tse instanceof TypeRecognitionException) {
- return ((TypeRecognitionException) tse).getTypeName();
- }
- }
- return null;
- }
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/modelgenerator/PropertyGenerator.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/modelgenerator/PropertyGenerator.java
deleted file mode 100644
index 85f300d04db..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/modelgenerator/PropertyGenerator.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.modelgenerator;
-
-import org.antlr.runtime.ANTLRStringStream;
-import org.antlr.runtime.CommonTokenStream;
-import org.antlr.runtime.MismatchedTokenException;
-import org.antlr.runtime.RecognitionException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.papyrus.parsers.PapyrusParsersPlugin;
-import org.eclipse.papyrus.parsers.antlr.PropertyLabelLexer;
-import org.eclipse.papyrus.parsers.antlr.PropertyLabelParser;
-import org.eclipse.papyrus.parsers.util.SimpleStringErrorReporter;
-import org.eclipse.papyrus.parsers.util.TypeRecognitionException;
-import org.eclipse.papyrus.parsers.util.UnboundTemplateRecognitionException;
-import org.eclipse.uml2.uml.Property;
-import org.eclipse.uml2.uml.TemplateableElement;
-
-/**
- *
- *
- * @author Remi SCHNEKENBURGER CEA-List
- */
-public class PropertyGenerator {
-
- /**
- *
- */
- private Property property;
-
- /** Error reporter for lexer and parser generated by antlr */
- private SimpleStringErrorReporter reporter;
-
- /**
- * Default Constructor.
- *
- * @param property
- * the property to modify
- */
- public PropertyGenerator(Property property) {
- this.property = property;
- this.reporter = new SimpleStringErrorReporter();
- }
-
- /**
- * Parse the label of the property and modify property attributes.
- *
- * @param label
- * the label that defines the property
- */
- public void parseAndModifyProperty(String label) {
- try {
- PropertyLabelLexer lexer = new PropertyLabelLexer(new ANTLRStringStream(label));
- CommonTokenStream tokens = new CommonTokenStream(lexer);
- PropertyLabelParser parser = new PropertyLabelParser(tokens, property, new SimpleStringErrorReporter());
- parser.label();
- } catch (RecognitionException e) {
- PapyrusParsersPlugin.getDefault().getLog().log(
- new Status(IStatus.ERROR, PapyrusParsersPlugin.PLUGIN_ID, IStatus.OK,
- "could not parse the property label: " + label, e));
- } catch (RuntimeException e) {
- PapyrusParsersPlugin.getDefault().getLog().log(
- new Status(IStatus.ERROR, PapyrusParsersPlugin.PLUGIN_ID, IStatus.OK,
- "could not parse the property label: " + label, e));
- }
- }
-
- /**
- * Parse the label of the property and validate it.
- *
- * @param label
- * the label that defines the property
- *
- * @return null if label is valid, else return the message that describes the error.
- */
- public String parseAndValidateProperty(String label) {
- // to validate the message : parse it. If no errors, it is ok. If exceptions : not ok.
- // Returns the exception message
- PropertyLabelLexer lexer = new PropertyLabelLexer(new ANTLRStringStream(label));
- CommonTokenStream tokens = new CommonTokenStream(lexer);
- PropertyLabelParser parser = new PropertyLabelParser(tokens, property, reporter);
- parser.setValidation(true);
- try {
- parser.label();
- } catch (MismatchedTokenException e) {
- // System.err.println("context:" + parser.getContext());
- } catch (RecognitionException e) {
- reporter.setMessage(e.getLocalizedMessage());
- } catch (RuntimeException e) {
- reporter.setMessage(e.getLocalizedMessage());
- }
- return reporter.getMessage();
- }
-
- /**
- * Parse the label of the property, and generates an exception if does not validate.
- *
- * @param label
- * the label that defines the property
- *
- * @return null if label is valid, else return the message that describes the error.
- */
- public String parseUndefinedPropertyType(String label) {
-
- // to validate the message : parse it. If no errors, it is ok. If exceptions : not ok.
- // Returns the exception message
- PropertyLabelLexer lexer = new PropertyLabelLexer(new ANTLRStringStream(label));
- CommonTokenStream tokens = new CommonTokenStream(lexer);
- PropertyLabelParser parser = new PropertyLabelParser(tokens, property, new SimpleStringErrorReporter());
- parser.setValidation(true);
- try {
- parser.label();
- } catch (RecognitionException re) {
-
- } catch (RuntimeException tse) {
- if (tse instanceof TypeRecognitionException) {
- return ((TypeRecognitionException) tse).getTypeName();
- }
- }
- return null;
- }
-
- /**
- * Parse the label of the property, and generates an exception if does not validate.
- *
- * @param label
- * the label that defines the property
- *
- * @return null if label is valid, else return the message that describes the error.
- */
- public TemplateableElement parseUnboundPropertyType(String label) {
-
- // to validate the message : parse it. If no errors, it is ok. If exceptions : not ok.
- // Returns the exception message
- PropertyLabelLexer lexer = new PropertyLabelLexer(new ANTLRStringStream(label));
- CommonTokenStream tokens = new CommonTokenStream(lexer);
- PropertyLabelParser parser = new PropertyLabelParser(tokens, property, new SimpleStringErrorReporter());
- parser.setValidation(true);
- try {
- parser.label();
- } catch (RecognitionException re) {
-
- } catch (RuntimeException re) {
- if (re instanceof UnboundTemplateRecognitionException) {
- return ((UnboundTemplateRecognitionException) re).getTemplate();
- }
- }
- return null;
- }
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/preferences/IPreferencesConstants.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/preferences/IPreferencesConstants.java
deleted file mode 100644
index 687b3a721db..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/preferences/IPreferencesConstants.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.preferences;
-
-import org.eclipse.papyrus.parsers.PapyrusParsersPlugin;
-import org.eclipse.papyrus.parsers.texteditor.propertylabel.IPropertyLabelColorConstants;
-
-/**
- * Defines constants which are used to refer to values in the plugin's preference bundle.
- */
-public interface IPreferencesConstants {
-
- /**
- * ui plugin id.
- */
- String PREFIX = PapyrusParsersPlugin.PLUGIN_ID + ".";
-
- /**
- * color prefix.
- */
- String PREFIX_COLOR = PREFIX + "color.";
-
- /**
- * color for basic grammar text.
- */
- String COLOR_DEFAULT = PREFIX_COLOR + IPropertyLabelColorConstants.DEFAULT;
-
- /**
- * color for grammar keyword text.
- */
- String COLOR_KEYWORD = PREFIX_COLOR + IPropertyLabelColorConstants.KEYWORD;
-
- /**
- * color for grammar string text.
- */
- String COLOR_STRING = PREFIX_COLOR + IPropertyLabelColorConstants.STRING;
-
- /**
- * color for grammar symbol text.
- */
- String COLOR_SYMBOL = PREFIX_COLOR + IPropertyLabelColorConstants.SYMBOL;
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/CompletionFilterSourceViewerConfiguration.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/CompletionFilterSourceViewerConfiguration.java
deleted file mode 100644
index 529e52229d0..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/CompletionFilterSourceViewerConfiguration.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 Atos Origin.
- *
- *
- * 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:
- * Emilien Perico (Atos Origin) emilien.perico@atosorigin.com - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.jface.text.source.SourceViewerConfiguration;
-
-/**
- * The Class CompletionFilterSourceViewerConfiguration.
- */
-public class CompletionFilterSourceViewerConfiguration extends SourceViewerConfiguration {
-
- ICompletionFilter filter = null;
-
- /**
- * Instantiates a new completion filter source viewer configuration without active filter
- */
- public CompletionFilterSourceViewerConfiguration() {
- filter = new NullCompletionFilter();
- }
-
- /**
- * Instantiates a new completion filter source viewer configuration with active filter
- *
- * @param filter
- * the filter
- */
- public CompletionFilterSourceViewerConfiguration(ICompletionFilter filter) {
- this.filter = filter;
- }
-
- /**
- * The Interface ICompletionFilter to set up the filter
- */
- public interface ICompletionFilter {
-
- /**
- * Filter.
- *
- * @param context
- * @param e
- *
- * @return true if object is filtered, false if it is not
- */
- public boolean filter(int context, EObject e);
- }
-
- /**
- * NullCompletionFilter to disable filter as default behavior
- */
- public static class NullCompletionFilter implements ICompletionFilter {
-
- /**
- * @see org.eclipse.papyrus.parsers.texteditor.CompletionFilterSourceViewerConfiguration.ICompletionFilter#filter(int, org.eclipse.emf.ecore.EObject)
- */
- public boolean filter(int context, EObject e) {
- return false;
- }
- }
-
- /**
- * Gets the filter.
- *
- * @return the filter
- */
- protected ICompletionFilter getFilter() {
- return filter;
- }
-
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/ILabelColorConstants.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/ILabelColorConstants.java
deleted file mode 100644
index 09a6fb970f7..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/ILabelColorConstants.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor;
-
-import org.eclipse.swt.graphics.RGB;
-
-/**
- *
- */
-public interface ILabelColorConstants {
-
- /**
- *
- */
- public final String DEFAULT = "default";
-
- /**
- *
- */
- public final String KEYWORD = "keyword";
-
- /**
- *
- */
- public final String STRING = "string";
-
- /**
- *
- */
- public final String SYMBOL = "symbol";
-
- /**
- *
- */
- public final RGB RGB_DEFAULT = new RGB(0, 0, 0);
-
- /**
- *
- */
- public final RGB RGB_CONSTANT = new RGB(120, 120, 120);
-
- /**
- *
- */
- public final RGB RGB_BACKGROUND = new RGB(255, 255, 255);
-
- /**
- *
- */
- public final RGB RGB_KEYWORD = new RGB(127, 0, 85);
-
- /**
- *
- */
- public final RGB RGB_STRING = new RGB(85, 200, 85);
-
- /**
- *
- */
- public final RGB RGB_SYMBOL = new RGB(42, 0, 255);
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/LabelColorProvider.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/LabelColorProvider.java
deleted file mode 100644
index 696c1cf76e0..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/LabelColorProvider.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.papyrus.parsers.PapyrusParsersPlugin;
-import org.eclipse.papyrus.parsers.preferences.IPreferencesConstants;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.swt.widgets.Display;
-
-/**
- * Color provider for syntax highlight.
- */
-public class LabelColorProvider implements ILabelColorConstants {
-
- /**
- * singleton instance of this class.
- */
- private static LabelColorProvider instance;
-
- /**
- * Default constructor (private for singleton pattern).
- */
- private LabelColorProvider() {
- // private constructor for singleton pattern
- }
-
- /**
- * Returns the singleton instance.
- *
- * @return the singleton instance
- */
- public static LabelColorProvider getDefault() {
- if (instance == null) {
- instance = new LabelColorProvider();
- }
- return instance;
- }
-
- /**
- * Hashmap that stores a list of colors, given an identifier.
- */
- protected Map<String, Color> fColorTable = new HashMap<String, Color>(10);
-
- /**
- * Set default colors in given preference store.
- *
- * @param aStore
- * the pref store
- */
- public static void initializeDefaults(IPreferenceStore aStore) {
- PreferenceConverter.setDefault(aStore, IPreferencesConstants.COLOR_DEFAULT, ILabelColorConstants.RGB_DEFAULT);
- PreferenceConverter.setDefault(aStore, IPreferencesConstants.COLOR_KEYWORD, ILabelColorConstants.RGB_KEYWORD);
- PreferenceConverter.setDefault(aStore, IPreferencesConstants.COLOR_STRING, ILabelColorConstants.RGB_STRING);
- PreferenceConverter.setDefault(aStore, IPreferencesConstants.COLOR_SYMBOL, ILabelColorConstants.RGB_SYMBOL);
- }
-
- /**
- * Returns specified color that is stored in the color table. If color not found in color table
- * then a new instance is created from according preferences value and stored in color table.
- *
- * @param aName
- * the name of the color
- *
- * @return the color instance
- */
- public Color getColor(String aName) {
-
- Color color = this.fColorTable.get(aName);
- if (color == null) {
- IPreferenceStore store = PapyrusParsersPlugin.getDefault().getPreferenceStore();
-
- // PreferenceConverter.setValue(store, IPreferencesConstants.COLOR_KEYWORD,
- // ILabelColorConstants.RGB_KEYWORD);
- PreferenceConverter.setValue(store, IPreferencesConstants.COLOR_SYMBOL, ILabelColorConstants.RGB_SYMBOL);
-
- RGB rgb = PreferenceConverter.getColor(store, IPreferencesConstants.PREFIX_COLOR + aName);
- if (rgb != null) {
- color = new Color(Display.getCurrent(), rgb);
- } else {
- color = Display.getCurrent().getSystemColor(SWT.COLOR_LIST_FOREGROUND);
- PapyrusParsersPlugin.logError("Undefined color '" + aName + "'"); //$NON-NLS-1$//$NON-NLS-2$
- }
- this.fColorTable.put(aName, color);
- }
- return color;
- }
-
- /**
- * Release all of the color resources held onto by the color provider.
- */
- public void dispose() {
- Iterator<Color> colors = this.fColorTable.values().iterator();
- while (colors.hasNext()) {
- colors.next().dispose();
- }
- }
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/LabelCompletionProcessor.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/LabelCompletionProcessor.java
deleted file mode 100644
index 6a8efecbc47..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/LabelCompletionProcessor.java
+++ /dev/null
@@ -1,272 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor;
-
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Vector;
-
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.jface.text.contentassist.CompletionProposal;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.text.contentassist.IContextInformation;
-import org.eclipse.jface.text.contentassist.IContextInformationValidator;
-
-/**
- * Completion processor for action language. <BR>
- * Main class to process the different completions given by the texteditor to its user
- *
- * @author Remi SCHNEKENBURGER
- * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor
- * @see com.cea.actionlanguage.sharedresources.texteditor.IPortLabelKeywords
- */
-public class LabelCompletionProcessor implements IContentAssistProcessor {
-
- /**
- *
- */
- protected Map<String, Boolean> modifiersUsed;
-
- /**
- *
- */
- public LabelCompletionProcessor() {
- modifiersUsed = new HashMap<String, Boolean>();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.jface.text.contentassist.IContentAssistProcessor#computeCompletionProposals(org
- * .eclipse.jface.text.ITextViewer, int)
- */
- /**
- *
- *
- * @param viewer
- * @param documentOffset
- *
- * @return
- */
- public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int documentOffset) {
- return new ICompletionProposal[0];
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.jface.text.contentassist.IContentAssistProcessor#computeContextInformation(org
- * .eclipse.jface.text.ITextViewer, int)
- */
- /**
- *
- *
- * @param viewer
- * @param documentOffset
- *
- * @return
- */
- public IContextInformation[] computeContextInformation(ITextViewer viewer, int documentOffset) {
- return new IContextInformation[0];
- }
-
- /*
- * (non-Javadoc) Method declared on IContentAssistProcessor
- */
- /**
- *
- *
- * @return
- */
- public char[] getCompletionProposalAutoActivationCharacters() {
- return new char[] { ':' };
- }
-
- /*
- * (non-Javadoc) Method declared on IContentAssistProcessor
- */
- /**
- *
- *
- * @return
- */
- public char[] getContextInformationAutoActivationCharacters() {
- return new char[] { '#' };
- }
-
- /*
- * (non-Javadoc) Method declared on IContentAssistProcessor
- */
- /**
- *
- *
- * @return
- */
- public IContextInformationValidator getContextInformationValidator() {
- return null;
- }
-
- /*
- * (non-Javadoc) Method declared on IContentAssistProcessor
- */
- /**
- *
- *
- * @return
- */
- public String getErrorMessage() {
- return null;
- }
-
- /**
- * when computing completion proposals, this method retrieves the string on which the user is
- * computing proposals it checks recursively if the character at the precedent offset is also a
- * part of the string (is a Java identifier).
- *
- * @param viewer
- * the text viewer where the current document is shown
- * @param documentOffset
- * the offset on which the end of the calculated string is
- *
- * @return the string that will be completed
- */
- public String getPrefix(ITextViewer viewer, int documentOffset) {
- try {
- if (documentOffset != 0) {
- char c = viewer.getDocument().getChar(documentOffset - 1);
- if (Character.isJavaIdentifierPart(c) || (c == '\'')) {
- return getPrefix(viewer, documentOffset - 1) + c;
- }
- }
- } catch (BadLocationException e) {
- return "";
- }
- return "";
- }
-
-/**
- * when computing completion proposals, this method retrieves the string on
- * which the user is computing proposals it checks recursively if the
- * character at the precedent offset is also a part of the string (is a Java
- * identifier or '<' for Undefined type).
- *
- * @param viewer the text viewer where the current document is shown
- * @param documentOffset the offset on which the end of the calculated string is
- *
- * @return the string that will be completed
- */
- public String getPrefixForType(ITextViewer viewer, int documentOffset) {
- try {
- if (documentOffset != 0) {
- char c = viewer.getDocument().getChar(documentOffset - 1);
- if (Character.isJavaIdentifierPart(c) || (c == '<')) {
- return getPrefixForType(viewer, documentOffset - 1) + c;
- }
- }
- } catch (BadLocationException e) {
- return "";
- }
- return "";
- }
-
- /**
- *
- *
- * @param viewer
- * @param documentOffset
- *
- * @return
- */
- public String getPrefixForMultiplicity(ITextViewer viewer, int documentOffset) {
- try {
- if (documentOffset != 0) {
- char c = viewer.getDocument().getChar(documentOffset - 1);
- if (Character.isJavaIdentifierPart(c) || (c == '[') || (c == '.')) {
- return getPrefixForMultiplicity(viewer, documentOffset - 1) + c;
- }
- }
- } catch (BadLocationException e) {
- return "";
- }
- return "";
- }
-
- /**
- *
- *
- * @param viewer
- * @param selectionRange
- * @param context
- * @param documentOffset
- *
- * @return
- */
- public Collection<ICompletionProposal> computeCompletions(ITextViewer viewer, int context, int documentOffset,
- int selectionRange) {
- return new Vector<ICompletionProposal>();
- }
-
- /**
- *
- *
- * @param proposals
- * @param prefix
- * @param proposalsInfo
- * @param documentOffset
- *
- * @return
- */
- public Collection<ICompletionProposal> createCompletionProposals(String[] proposals, String[] proposalsInfo,
- String prefix, int documentOffset) {
- Vector<ICompletionProposal> v = new Vector<ICompletionProposal>();
- for (int i = 0; i < proposals.length; i++) {
- // test if the proposal starts with the prefix given in parameter
- if (proposals[i].startsWith(prefix)) {
- v.add(new CompletionProposal(proposals[i], documentOffset - prefix.length(), prefix.length(),
- proposals[i].length(), null, proposals[i], null, proposalsInfo[i]));
- }
- }
- return v;
- }
-
- /**
- *
- *
- * @param proposals
- * @param proposalsName
- * @param prefix
- * @param proposalsInfo
- * @param documentOffset
- *
- * @return
- */
- public Collection<ICompletionProposal> createCompletionProposalsWithDifferentName(String[] proposals,
- String[] proposalsInfo, String[] proposalsName, String prefix, int documentOffset) {
- Vector<ICompletionProposal> v = new Vector<ICompletionProposal>();
- for (int i = 0; i < proposals.length; i++) {
- // test if the proposal starts with the prefix given in parameter
- if (proposals[i].startsWith(prefix)) {
-
- v.add(new CompletionProposal(proposals[i], documentOffset - prefix.length(), prefix.length(),
- proposals[i].length(), null, proposalsName[i], null, proposalsInfo[i]));
- }
- }
- return v;
- }
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/LabelContextType.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/LabelContextType.java
deleted file mode 100644
index e933426e369..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/LabelContextType.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor;
-
-import org.eclipse.jface.text.templates.GlobalTemplateVariables;
-import org.eclipse.jface.text.templates.TemplateContextType;
-
-/**
- * A simple context type for PropertyUtil label.
- */
-public class LabelContextType extends TemplateContextType {
-
- /**
- * This context's id.
- */
- public static final String PROPERTYLABEL_CONTEXT_TYPE = "com.cea.papyrus.classdiagram.parsers.texteditor.propertylabel.type";
-
- /**
- * The constructor. Creates a new PROPERTY LABEL context type.
- */
- public LabelContextType() {
- addGlobalResolvers();
- }
-
- /**
- * adds a variable resolver to the context type.
- */
- private void addGlobalResolvers() {
- addResolver(new GlobalTemplateVariables.Cursor());
- addResolver(new GlobalTemplateVariables.WordSelection());
- addResolver(new GlobalTemplateVariables.LineSelection());
- addResolver(new GlobalTemplateVariables.Dollar());
- addResolver(new GlobalTemplateVariables.Date());
- addResolver(new GlobalTemplateVariables.Year());
- addResolver(new GlobalTemplateVariables.Time());
- addResolver(new GlobalTemplateVariables.User());
- }
-
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/WhitespaceDetector.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/WhitespaceDetector.java
deleted file mode 100644
index 4fb72cdb56c..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/WhitespaceDetector.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor;
-
-import org.eclipse.jface.text.rules.IWhitespaceDetector;
-
-/**
- * Basic whitespace detector for the scanner.<BR>
- * It defines the class by which WhitespaceRule determines whether a given character is to be
- * considered whitespace in the current context.
- *
- * @author Remi SCHNEKENBURGER
- * @see org.eclipse.jface.text.rules.IWhitespaceDetector
- */
-public class WhitespaceDetector implements IWhitespaceDetector {
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.text.rules.IWhitespaceDetector#isWhitespace(char)
- */
- /**
- *
- *
- * @param character
- *
- * @return
- */
- public boolean isWhitespace(char character) {
- return Character.isWhitespace(character);
- }
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/WordDetector.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/WordDetector.java
deleted file mode 100644
index a8c1ba8c1cb..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/WordDetector.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor;
-
-import org.eclipse.jface.text.rules.IWordDetector;
-
-/**
- * Basic word detector for the scanner.<BR>
- *
- * @author Remi SCHNEKENBURGER
- * @see org.eclipse.jface.text.rules.IWordDetector
- */
-public class WordDetector implements IWordDetector {
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.text.rules.IWordDetector#isWordPart(char)
- */
- /**
- *
- *
- * @param character
- *
- * @return
- */
- public boolean isWordPart(char character) {
- return Character.isLetter(character);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.text.rules.IWordDetector#isWordStart(char)
- */
- /**
- *
- *
- * @param character
- *
- * @return
- */
- public boolean isWordStart(char character) {
- return Character.isLetter(character);
- }
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/collaborationuselabel/CollaborationUseConfigurationForUML.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/collaborationuselabel/CollaborationUseConfigurationForUML.java
deleted file mode 100644
index e73f310aae4..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/collaborationuselabel/CollaborationUseConfigurationForUML.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - customization for CollaborationUse
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.parsers.texteditor.collaborationuselabel;
-
-import org.eclipse.jface.dialogs.IInputValidator;
-import org.eclipse.jface.text.source.SourceViewerConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.DefaultDirectEditorConfiguration;
-import org.eclipse.papyrus.parsers.modelgenerator.CollaborationUseGenerator;
-import org.eclipse.papyrus.uml.tools.utils.CollaborationUseUtil;
-import org.eclipse.uml2.uml.CollaborationUse;
-
-/**
- * Configuration Class for the direct edition of a UML property
- */
-public class CollaborationUseConfigurationForUML extends DefaultDirectEditorConfiguration {
-
- /** Configuration of the source viewer */
- final private CollaborationUseLabelSourceViewerConfiguration configuration;
-
- /**
- * Creates a new CollaborationUseConfigurationForUML.
- */
- public CollaborationUseConfigurationForUML() {
- configuration = new CollaborationUseLabelSourceViewerConfiguration();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public SourceViewerConfiguration getSourceViewerConfiguration() {
- return configuration;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String getTextToEdit(Object editedObject) {
- if (editedObject instanceof CollaborationUse) {
- return CollaborationUseUtil.getLabel((CollaborationUse) editedObject);
- }
- return "not a CollaborationUse";
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Object preEditAction(Object objectToEdit) {
- if (objectToEdit instanceof CollaborationUse) {
- configuration.setCollaborationUse((CollaborationUse) objectToEdit);
- }
- return super.preEditAction(objectToEdit);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Object postEditAction(Object editedObject, String text) {
- // Should undo the various creations done in the property edition
- // (template binding, etc...)
- if (editedObject instanceof CollaborationUse) {
- CollaborationUseGenerator generator = new CollaborationUseGenerator(((CollaborationUse) editedObject));
- generator.parseAndModifyCollaborationUse(text);
- }
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public IInputValidator getInputValidator() {
- return new IInputValidator() {
-
- public String isValid(String newText) {
- if (getObjectToEdit() instanceof CollaborationUse) {
- CollaborationUseGenerator generator = new CollaborationUseGenerator(
- ((CollaborationUse) getObjectToEdit()));
- return generator.parseAndValidateCollaborationUse(newText);
- }
- return null;
- }
- };
- }
-
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/collaborationuselabel/CollaborationUseLabelColorProvider.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/collaborationuselabel/CollaborationUseLabelColorProvider.java
deleted file mode 100644
index d7379e4be40..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/collaborationuselabel/CollaborationUseLabelColorProvider.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - customization for CollaborationUse
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.parsers.texteditor.collaborationuselabel;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.papyrus.parsers.PapyrusParsersPlugin;
-import org.eclipse.papyrus.parsers.preferences.IPreferencesConstants;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.swt.widgets.Display;
-
-/**
- * Color provider to syntax highlight.
- */
-public class CollaborationUseLabelColorProvider implements ICollaborationUseLabelColorConstants {
-
- /** Default instance */
- private static CollaborationUseLabelColorProvider instance;
-
- /** Default constructor */
- private CollaborationUseLabelColorProvider() {
- }
-
- /**
- * Get singleton instance
- *
- * @return the default instance
- */
- public static CollaborationUseLabelColorProvider getDefault() {
- if (instance == null) {
- instance = new CollaborationUseLabelColorProvider();
- }
- return instance;
- }
-
- /** Used color table */
- protected Map<String, Color> fColorTable = new HashMap<String, Color>(10);
-
- /**
- * Set default colors in given preference store.
- *
- * @param aStore
- * the preference store
- */
- public static void initializeDefaults(IPreferenceStore aStore) {
- PreferenceConverter.setDefault(aStore, IPreferencesConstants.COLOR_DEFAULT,
- ICollaborationUseLabelColorConstants.RGB_DEFAULT);
- PreferenceConverter.setDefault(aStore, IPreferencesConstants.COLOR_KEYWORD,
- ICollaborationUseLabelColorConstants.RGB_KEYWORD);
- PreferenceConverter.setDefault(aStore, IPreferencesConstants.COLOR_STRING,
- ICollaborationUseLabelColorConstants.RGB_STRING);
- PreferenceConverter.setDefault(aStore, IPreferencesConstants.COLOR_SYMBOL,
- ICollaborationUseLabelColorConstants.RGB_SYMBOL);
- }
-
- /**
- * Returns specified color that is stored in the color table. If color not found in color table
- * then a new instance is created from according preferences value and stored in color table.
- *
- * @param aName
- * the name of the color
- *
- * @return the color instance
- */
- public Color getColor(String aName) {
-
- Color color = fColorTable.get(aName);
- if (color == null) {
- IPreferenceStore store = PapyrusParsersPlugin.getDefault().getPreferenceStore();
-
- PreferenceConverter.setValue(store, IPreferencesConstants.COLOR_SYMBOL,
- ICollaborationUseLabelColorConstants.RGB_SYMBOL);
-
- RGB rgb = PreferenceConverter.getColor(store, IPreferencesConstants.PREFIX_COLOR + aName);
- if (rgb != null) {
- color = new Color(Display.getCurrent(), rgb);
- } else {
- color = Display.getCurrent().getSystemColor(SWT.COLOR_LIST_FOREGROUND);
- PapyrusParsersPlugin.logError("Undefined color '" + aName + "'");
- }
- fColorTable.put(aName, color);
- }
- return color;
- }
-
- /**
- * Release all of the color resources held onto by the color provider.
- */
- public void dispose() {
- Iterator<Color> colors = fColorTable.values().iterator();
- while (colors.hasNext()) {
- colors.next().dispose();
- }
- }
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/collaborationuselabel/CollaborationUseLabelCompletionProcessor.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/collaborationuselabel/CollaborationUseLabelCompletionProcessor.java
deleted file mode 100644
index 59558e9ab49..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/collaborationuselabel/CollaborationUseLabelCompletionProcessor.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - customization for CollaborationUse
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.collaborationuselabel;
-
-import java.util.Collection;
-import java.util.Vector;
-
-import org.antlr.runtime.ANTLRStringStream;
-import org.antlr.runtime.CommonTokenStream;
-import org.antlr.runtime.RecognitionException;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.papyrus.parsers.antlr.CollaborationUseLabelLexer;
-import org.eclipse.papyrus.parsers.antlr.CollaborationUseLabelParser;
-import org.eclipse.papyrus.parsers.texteditor.LabelCompletionProcessor;
-import org.eclipse.papyrus.parsers.texteditor.completionproposals.CollaborationCompletionProposalComputer;
-import org.eclipse.papyrus.parsers.texteditor.completionproposals.NameCompletionProposal;
-import org.eclipse.papyrus.parsers.texteditor.completionproposals.VisibilityCompletionProposal;
-import org.eclipse.papyrus.parsers.util.SimpleStringErrorReporter;
-import org.eclipse.uml2.uml.CollaborationUse;
-
-/**
- * Completion processor for action language. <BR>
- * Main class to process the different completions given by the texteditor to its user
- *
- * @author Remi SCHNEKENBURGER
- * @see org.eclipse.jface.text.templates.TemplateCompletionProcessor
- * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor
- * @see com.cea.actionlanguage.sharedresources.texteditor.IPropertyLabelKeywords
- */
-public class CollaborationUseLabelCompletionProcessor extends LabelCompletionProcessor implements IContext {
-
- /** The {@link CollaborationUse} to modify */
- private CollaborationUse collaborationUse;
-
- /**
- * Constructor
- *
- * @param collaborationUse
- * the parsed {@link CollaborationUse}
- */
- public CollaborationUseLabelCompletionProcessor(CollaborationUse collaborationUse) {
- this.collaborationUse = collaborationUse;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.cea.papyrus.classdiagram.parsers.texteditor.LabelCompletionProcessor
- * #computeCompletionProposals(org.eclipse.jface.text.ITextViewer, int)
- */
- /**
- * This method computes completion proposal for currently edited CollaborationUse label.
- *
- * @param viewer
- * @param documentOffset
- *
- * @return completion proposals
- */
- @Override
- public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int documentOffset) {
- String text;
- CollaborationUseLabelLexer lexer = null;
- CollaborationUseLabelParser parser = null;
- Collection<ICompletionProposal> result = null;
- int selectionRange = 0;
-
- try {
- text = viewer.getDocument().get(0, documentOffset);
-
- lexer = new CollaborationUseLabelLexer(new ANTLRStringStream(text));
- CommonTokenStream tokens = new CommonTokenStream(lexer);
-
- parser = new CollaborationUseLabelParser(tokens, collaborationUse, new SimpleStringErrorReporter());
- parser.setValidation(true);
- selectionRange = viewer.getSelectedRange().y;
- parser.label();
-
- result = computeCompletions(viewer, parser.getContext(), documentOffset, selectionRange);
- } catch (BadLocationException e) {
-
- } catch (RuntimeException e) {
- result = computeCompletions(viewer, parser.getContext(), documentOffset, selectionRange);
- } catch (RecognitionException e) {
- result = computeCompletions(viewer, parser.getContext(), documentOffset, selectionRange);
- }
-
- return result.toArray(new ICompletionProposal[] {});
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.cea.papyrus.classdiagram.parsers.texteditor.LabelCompletionProcessor
- * #computeCompletions(org.eclipse.jface.text.ITextViewer, int, int, int)
- */
- /**
- * Compute completion possibilities depending on existing edited label (prefix, it may not be
- * complete).
- *
- * @param viewer
- * @param selectionRange
- * @param context
- * @param documentOffset
- *
- * @return
- */
- @Override
- public Collection<ICompletionProposal> computeCompletions(ITextViewer viewer, int context, int documentOffset,
- int selectionRange) {
- Vector<ICompletionProposal> v = new Vector<ICompletionProposal>();
-
- String prefix = getPrefix(viewer, documentOffset);
- switch (context) {
-
- // DEFAULT : visibility or name
- case IContext.DEFAULT:
- v.addAll(new VisibilityCompletionProposal().generateCompletionProposals(documentOffset, selectionRange,
- prefix));
- v.addAll(new NameCompletionProposal().generateCompletionProposals(documentOffset, selectionRange, prefix));
- break;
-
- // VISIBILITY : name
- case IContext.VISIBILITY:
- v.addAll(new NameCompletionProposal().generateCompletionProposals(documentOffset, selectionRange, prefix));
- break;
-
- // NAME: either ':' or ":undefined"
- case IContext.NAME:
- v.addAll(createCompletionProposalsWithDifferentName(new String[] { ": ", ": <Undefined>" }, new String[] {
- "CollaborationUse type", "Undefined CollaborationUse type" }, new String[] {
- ": <Collaboration Name>", ": <Undefined>" }, "", documentOffset));
- break;
-
- // PROPERTY TYPE (after ":") model types or undefined
- case IContext.AFTER_COLON:
- // create properties visible in the model
- // specific prefix for type... ('<' possible at the beginning)
- prefix = getPrefixForType(viewer, documentOffset);
- // generate completion for TypeUtil
- CollaborationCompletionProposalComputer computer = new CollaborationCompletionProposalComputer();
- computer.setElement(collaborationUse);
- v.addAll(computer.generateCompletionProposals(documentOffset, selectionRange, prefix));
- break;
-
- // MULTIPLICITY: multiplicity or default value or property modifiers
- case IContext.COLLABORATION_USE_TYPE:
- // specific prefix for type... ('<' possible at the beginning)
- prefix = getPrefixForType(viewer, documentOffset);
- computer = new CollaborationCompletionProposalComputer();
- computer.setElement(collaborationUse);
- v.addAll(computer.generateCompletionProposals(documentOffset, selectionRange, prefix));
- break;
- default:
- break;
- }
-
- return v;
- }
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/collaborationuselabel/CollaborationUseLabelScanner.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/collaborationuselabel/CollaborationUseLabelScanner.java
deleted file mode 100644
index 4c4a2a70b88..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/collaborationuselabel/CollaborationUseLabelScanner.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - customization for CollaborationUse
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.collaborationuselabel;
-
-import org.eclipse.jface.text.TextAttribute;
-import org.eclipse.jface.text.rules.IRule;
-import org.eclipse.jface.text.rules.IToken;
-import org.eclipse.jface.text.rules.RuleBasedScanner;
-import org.eclipse.jface.text.rules.Token;
-import org.eclipse.jface.text.rules.WhitespaceRule;
-import org.eclipse.jface.text.rules.WordRule;
-import org.eclipse.papyrus.parsers.texteditor.WhitespaceDetector;
-import org.eclipse.papyrus.parsers.texteditor.completionproposals.VisibilityCompletionProposal;
-import org.eclipse.papyrus.parsers.texteditor.propertylabel.PropertyWordDetector;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * Scanner for the action language.<BR>
- * It implements the interface IALKeywords, which contains the different keywords available in the
- * action language
- *
- * @author Remi SCHNEKENBURGER
- * @see org.eclipse.jface.text.rules.RuleBasedScanner
- * @see com.cea.actionlanguage.sharedresources.texteditor.IRTActionKeywords
- */
-public class CollaborationUseLabelScanner extends RuleBasedScanner implements ICollaborationUseLabelColorConstants {
-
- /** Color for the default token */
- private Color defaultColor;
-
- /** Color for keywords */
- // private Color keywordColor;
-
- /** Color for special chars */
- private Color symbolColor;
-
- /**
- * Creates a new rule based scanner.
- */
- public CollaborationUseLabelScanner() {
- defaultColor = CollaborationUseLabelColorProvider.getDefault().getColor(DEFAULT);
- // keywordColor = CollaborationUseLabelColorProvider.getDefault().getColor(KEYWORD);
- symbolColor = CollaborationUseLabelColorProvider.getDefault().getColor(SYMBOL);
-
- IToken other = new Token(new TextAttribute(defaultColor));
- // IToken keyword = new Token(new TextAttribute(keywordColor, null, SWT.BOLD));
- IToken symbol = new Token(new TextAttribute(symbolColor, null, SWT.BOLD));
-
- IRule[] rules = new IRule[2];
-
- WordRule wordRule = new WordRule(new PropertyWordDetector(), other);
- for (int i = 0; i < VisibilityCompletionProposal.visibilityStrings.length; i++) {
- // wordRule.addWord(getWordWithoutQuotes(visibilityStrings[i]), keyword);
- }
-
- wordRule.addWord("+", symbol);
- wordRule.addWord("-", symbol);
- wordRule.addWord("#", symbol);
- wordRule.addWord("~", symbol);
- wordRule.addWord("/", symbol);
- wordRule.addWord("+/", symbol);
- wordRule.addWord("-/", symbol);
- wordRule.addWord("#/", symbol);
- wordRule.addWord(":", symbol);
-
- rules[0] = wordRule;
- rules[1] = new WhitespaceRule(new WhitespaceDetector());
-
- setRules(rules);
- }
-
- /**
- * returns the word for the scanner, without quotes.
- *
- * @param word
- *
- * @return
- */
- public static String getWordWithoutQuotes(String word) {
- String tmp = "";
- tmp = word.replaceAll("'", "");
- return tmp;
- }
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/collaborationuselabel/CollaborationUseLabelSourceViewerConfiguration.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/collaborationuselabel/CollaborationUseLabelSourceViewerConfiguration.java
deleted file mode 100644
index 88362e0df8b..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/collaborationuselabel/CollaborationUseLabelSourceViewerConfiguration.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - customization for CollaborationUse
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.collaborationuselabel;
-
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.TextAttribute;
-import org.eclipse.jface.text.contentassist.ContentAssistant;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.text.contentassist.IContentAssistant;
-import org.eclipse.jface.text.presentation.IPresentationReconciler;
-import org.eclipse.jface.text.presentation.PresentationReconciler;
-import org.eclipse.jface.text.rules.BufferedRuleBasedScanner;
-import org.eclipse.jface.text.rules.DefaultDamagerRepairer;
-import org.eclipse.jface.text.rules.Token;
-import org.eclipse.jface.text.source.ISourceViewer;
-import org.eclipse.jface.text.source.SourceViewerConfiguration;
-import org.eclipse.papyrus.parsers.texteditor.propertylabel.PropertyLabelPartitionScanner;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.uml2.uml.CollaborationUse;
-
-/**
- * This class bundles the configuration space of the action language source viewer. Instances of
- * this class are passed to the configure method of <code>SourceViewer</code>.
- *
- * @see org.eclipse.jface.text.source.SourceViewerConfiguration
- */
-public class CollaborationUseLabelSourceViewerConfiguration extends SourceViewerConfiguration {
-
- /** Edited {@link CollaborationUse} */
- private CollaborationUse collaborationUse;
-
- /**
- * Creates a new CollaborationUseLabelSourceViewerConfiguration
- *
- * @param collaborationUse
- * the {@link CollaborationUse} to edit
- */
- public CollaborationUseLabelSourceViewerConfiguration(CollaborationUse collaborationUse) {
- setCollaborationUse(collaborationUse);
- }
-
- /**
- * Creates a new CollaborationUseLabelSourceViewerConfiguration
- */
- public CollaborationUseLabelSourceViewerConfiguration() {
- this(null);
- }
-
- /**
- * Token scanner
- */
- static class SingleTokenScanner extends BufferedRuleBasedScanner {
-
- /**
- * Constructor
- *
- * @param attribute
- */
- public SingleTokenScanner(TextAttribute attribute) {
- setDefaultReturnToken(new Token(attribute));
- }
- };
-
- /**
- * {@inheritDoc}
- */
- @Override
- public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {
- PresentationReconciler reconciler = new PresentationReconciler();
-
- // creating damager/repairer for single line comments
- Color colorString = CollaborationUseLabelColorProvider.getDefault().getColor(
- ICollaborationUseLabelColorConstants.STRING);
- DefaultDamagerRepairer dr = new DefaultDamagerRepairer(new SingleTokenScanner(new TextAttribute(colorString)));
-
- reconciler.setDamager(dr, PropertyLabelPartitionScanner.PROPERTY_MODIFIERS_STRING);
- reconciler.setRepairer(dr, PropertyLabelPartitionScanner.PROPERTY_MODIFIERS_STRING);
-
- // creating damager/repairer for other zones (action language zone)
- dr = new DefaultDamagerRepairer(new CollaborationUseLabelScanner());
- reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE);
- reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE);
-
- return reconciler;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {
- ContentAssistant assistant = new ContentAssistant();
-
- IContentAssistProcessor processor = new CollaborationUseLabelCompletionProcessor(collaborationUse);
- assistant.setContentAssistProcessor(processor, IDocument.DEFAULT_CONTENT_TYPE);
-
- // IInformationControlCreator
- assistant.setInformationControlCreator(getInformationControlCreator(sourceViewer));
-
- assistant.enableAutoActivation(true);
- assistant.setAutoActivationDelay(500);
-
- return assistant;
- }
-
- /**
- * Returns the edited {@link CollaborationUse}
- *
- * @return the {@link CollaborationUse} to edit
- */
- public CollaborationUse getCollaborationUse() {
- return collaborationUse;
- }
-
- /**
- * Sets the {@link CollaborationUse} to Edit
- *
- * @param collaborationUse
- * the {@link CollaborationUse} to edit
- */
- public void setCollaborationUse(CollaborationUse collaborationUse) {
- this.collaborationUse = collaborationUse;
- }
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/collaborationuselabel/ICollaborationUseLabelColorConstants.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/collaborationuselabel/ICollaborationUseLabelColorConstants.java
deleted file mode 100644
index deb33fa1270..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/collaborationuselabel/ICollaborationUseLabelColorConstants.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.collaborationuselabel;
-
-import org.eclipse.swt.graphics.RGB;
-
-/**
- * Used colors constants definitions.
- */
-public interface ICollaborationUseLabelColorConstants {
-
- /** DEFAULT definition */
- public final String DEFAULT = "default";
-
- /** KEYWORD definition */
- public final String KEYWORD = "keyword";
-
- /** STRING definition */
- public final String STRING = "string";
-
- /** SYMBOL definition */
- public final String SYMBOL = "symbol";
-
- /** DEFAULT color value definition */
- public final RGB RGB_DEFAULT = new RGB(0, 0, 0);
-
- /** CONSTANT color value definition */
- public final RGB RGB_CONSTANT = new RGB(120, 120, 120);
-
- /** BACKGROUND color value definition */
- public final RGB RGB_BACKGROUND = new RGB(255, 255, 255);
-
- /** KEYWORD color value definition */
- public final RGB RGB_KEYWORD = new RGB(127, 0, 85);
-
- /** STRING color value definition */
- public final RGB RGB_STRING = new RGB(85, 200, 85);
-
- /** SYMBOL color value definition */
- public final RGB RGB_SYMBOL = new RGB(42, 0, 255);
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/collaborationuselabel/IContext.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/collaborationuselabel/IContext.java
deleted file mode 100644
index 1ffff588902..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/collaborationuselabel/IContext.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - customization for CollaborationUse
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.collaborationuselabel;
-
-/**
- * Definitions for the parsing context.
- */
-public abstract interface IContext {
-
- /** Default position */
- public static final int DEFAULT = 0;
-
- /** Parsing Visibility */
- public static final int VISIBILITY = 1;
-
- /** Parsing Name */
- public static final int NAME = 2;
-
- /** Parsing before CollaborationUse type */
- public static final int AFTER_COLON = 3;
-
- /** Parsing CollaborationUse type */
- public static final int COLLABORATION_USE_TYPE = 4;
-
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/CollaborationCompletionProposalComputer.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/CollaborationCompletionProposalComputer.java
deleted file mode 100644
index f63c63d8e44..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/CollaborationCompletionProposalComputer.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008, 2009 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- * Yann TANGUY (CEA LIST) yann.tanguy@cea.fr
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.completionproposals;
-
-import java.util.Iterator;
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.Set;
-import java.util.Vector;
-
-import org.eclipse.jface.text.contentassist.CompletionProposal;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.papyrus.uml.tools.utils.PackageUtil;
-import org.eclipse.papyrus.uml.tools.utils.TypeUtil;
-import org.eclipse.uml2.uml.Collaboration;
-import org.eclipse.uml2.uml.Element;
-
-/**
- *
- */
-public class CollaborationCompletionProposalComputer implements ICompletionProposalComputer {
-
- /**
- *
- */
- private Element element;
-
- /**
- *
- */
- private static final String UNDEFINED_TYPE = "<Undefined>";
-
- /**
- *
- *
- * @return the element
- */
- public Element getElement() {
- return element;
- }
-
- /**
- *
- *
- * @param element
- * the element to set
- */
- public void setElement(Element element) {
- this.element = element;
- }
-
- /**
- *
- *
- * @param selectionRange
- * @param prefix
- * @param documentOffset
- *
- * @return
- */
- public List<ICompletionProposal> generateCompletionProposals(int documentOffset, int selectionRange, String prefix) {
- Vector<ICompletionProposal> v = new Vector<ICompletionProposal>();
-
- // adds each Completion proposal
- ICompletionProposal proposal = null;
-
- // first, add <Undefined>
- if (UNDEFINED_TYPE.startsWith(prefix)) {
- proposal = new CompletionProposal(UNDEFINED_TYPE, documentOffset - prefix.length(), prefix.length()
- + selectionRange, UNDEFINED_TYPE.length(), null, UNDEFINED_TYPE, null, "Undefined Type");
- v.add(proposal);
- }
-
- if (element != null) {
- // then, all accessible types, by alphabetic order...
- Set<Collaboration> types = computeAccessibleCollaborationList(element);
- // generate the list of types, in alphabetical order
- Iterator<Collaboration> it = types.iterator();
- while (it.hasNext()) {
- Collaboration type = it.next();
- String name = type.getName();
- if (name.startsWith(prefix)) {
- // create a completion processor for the type if prefix
- // corresponds
- proposal = new CompletionProposal(name, documentOffset - prefix.length(), prefix.length()
- + selectionRange, name.length(), null, TypeUtil.getInfoString(type), null, "");
- v.add(proposal);
- }
- }
- }
- return v;
- }
-
- /**
- *
- *
- * @param element
- *
- * @return
- */
- public Set<Collaboration> computeAccessibleCollaborationList(Element element) {
- LinkedHashSet<Collaboration> list = new LinkedHashSet<Collaboration>();
- // adds directly accessible elements
- list.addAll(PackageUtil.getAccessibleCollaborations(element.getNearestPackage()));
-
- // adds all elements
- list.addAll(PackageUtil.getAllCollaborations(element.getNearestPackage()));
-
- return list;
- }
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/DefaultValueCompletionProposal.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/DefaultValueCompletionProposal.java
deleted file mode 100644
index bf587ebe025..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/DefaultValueCompletionProposal.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.completionproposals;
-
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.jface.text.contentassist.CompletionProposal;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-
-/**
- * Completion proposal computer for names.
- */
-public class DefaultValueCompletionProposal implements ICompletionProposalComputer {
-
- /**
- * Text inserted in the editor.
- */
- final static private String[] defaultValueStrings = { "= ", };
-
- /**
- * Text displayed in the information window.
- */
- final static private String[] defaultValueStringsInfo = { "Default value", };
-
- /**
- * Text displayed in the completion area window.
- */
- final static private String[] defaultValueStringsName = { "= <Expression>", };
-
- /*
- * (non-Javadoc)
- *
- * @see
- * com.cea.papyrus.classdiagram.parsers.texteditor.completionproposals.ICompletionProposalComputer
- * #generateCompletionProposals(int, int, java.lang.String)
- */
- /**
- *
- *
- * @param selectionRange
- * @param prefix
- * @param documentOffset
- *
- * @return
- */
- public List<ICompletionProposal> generateCompletionProposals(int documentOffset, int selectionRange, String prefix) {
- Vector<ICompletionProposal> v = new Vector<ICompletionProposal>();
-
- // adds each Completion proposal
- ICompletionProposal proposal = null;
-
- // adds all name (static strings...)
- for (int i = 0; i < defaultValueStrings.length; i++) {
- if (defaultValueStrings[i].startsWith(prefix)) {
- proposal = new CompletionProposal(defaultValueStrings[i], documentOffset - prefix.length(), prefix
- .length()
- + selectionRange, defaultValueStrings[i].length(), null, defaultValueStringsName[i], null,
- defaultValueStringsInfo[i]);
- v.add(proposal);
- }
- }
- return v;
- }
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/DerivedPropertyCompletionProposal.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/DerivedPropertyCompletionProposal.java
deleted file mode 100644
index d9fc5e36205..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/DerivedPropertyCompletionProposal.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.completionproposals;
-
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.jface.text.contentassist.CompletionProposal;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-
-/**
- * Completion proposal computer for visibilities.
- */
-public class DerivedPropertyCompletionProposal implements ICompletionProposalComputer {
-
- /**
- * Text inserted in the editor.
- */
- final static public String[] derivedPropertyStrings = { "/", };
-
- /**
- * Text displayed in the information window.
- */
- final static public String[] derivedPropertyStringsInfo = { "Derived Property", };
-
- /**
- * Text displayed in the completion area window.
- */
- final static public String[] derivedPropertyStringsName = { "/", };
-
- /*
- * (non-Javadoc)
- *
- * @see
- * com.cea.papyrus.classdiagram.parsers.texteditor.completionproposals.ICompletionProposalComputer
- * #generateCompletionProposals(int, int, java.lang.String)
- */
- /**
- *
- *
- * @param selectionRange
- * @param prefix
- * @param documentOffset
- *
- * @return
- */
- public List<ICompletionProposal> generateCompletionProposals(int documentOffset, int selectionRange, String prefix) {
- Vector<ICompletionProposal> v = new Vector<ICompletionProposal>();
-
- // adds each Completion proposal
- ICompletionProposal proposal = null;
-
- // adds all standard multiplicities (static strings...)
- for (int i = 0; i < derivedPropertyStrings.length; i++) {
- if (derivedPropertyStrings[i].startsWith(prefix)) {
- proposal = new CompletionProposal(derivedPropertyStrings[i], documentOffset - prefix.length(), prefix
- .length()
- + selectionRange, derivedPropertyStrings[i].length(), null, derivedPropertyStringsName[i],
- null, derivedPropertyStringsInfo[i]);
- v.add(proposal);
- }
- }
- return v;
- }
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/DirectionCompletionProposal.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/DirectionCompletionProposal.java
deleted file mode 100644
index 0043c20191b..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/DirectionCompletionProposal.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.completionproposals;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.jface.text.contentassist.CompletionProposal;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-
-/**
- * Completion proposal computer for direction.
- */
-public class DirectionCompletionProposal implements ICompletionProposalComputer {
-
- /**
- * Text inserted in the editor.
- */
- final static public String[] directionStrings = { "in", "out", "inout", "return", };
-
- /**
- * Text displayed in the information window.
- */
- final static public String[] directionStringsInfo = { "in direction", "out direction", "inout direction",
- "return direction", };
-
- /**
- * Text displayed in the completion area window.
- */
- final static public String[] directionStringsName = { "in", "out", "inout", "return", };
-
- /*
- * (non-Javadoc)
- *
- * @see
- * com.cea.papyrus.classdiagram.parsers.texteditor.completionproposals.ICompletionProposalComputer
- * #generateCompletionProposals(int, int, java.lang.String)
- */
- /**
- *
- *
- * @param selectionRange
- * @param prefix
- * @param documentOffset
- *
- * @return
- */
- public List<ICompletionProposal> generateCompletionProposals(int documentOffset, int selectionRange, String prefix) {
- List<ICompletionProposal> list = new ArrayList<ICompletionProposal>();
-
- // adds each Completion proposal
- ICompletionProposal proposal = null;
-
- // adds all standard multiplicities (static strings...)
- for (int i = 0; i < directionStrings.length; i++) {
- if (directionStrings[i].startsWith(prefix)) {
- proposal = new CompletionProposal(directionStrings[i], documentOffset - prefix.length(), prefix
- .length()
- + selectionRange, directionStrings[i].length(), null, directionStringsName[i], null,
- directionStringsInfo[i]);
- list.add(proposal);
- }
- }
- return list;
- }
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/ICompletionProposalComputer.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/ICompletionProposalComputer.java
deleted file mode 100644
index 9c287e129da..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/ICompletionProposalComputer.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.completionproposals;
-
-import java.util.List;
-
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-
-/**
- *
- */
-public interface ICompletionProposalComputer {
-
- /** set of text completions */
- /** set of text completions information */
- /**
- * set of text completions text.
- *
- * @param selectionRange
- * @param prefix
- * @param documentOffset
- *
- * @return
- */
-
- // String[] proposals, String[] proposalsInfo, String prefix,
- public List<ICompletionProposal> generateCompletionProposals(int documentOffset, int selectionRange, String prefix);
-
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/MultiplicityCompletionProposal.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/MultiplicityCompletionProposal.java
deleted file mode 100644
index d166bc6d955..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/MultiplicityCompletionProposal.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.completionproposals;
-
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.jface.text.contentassist.CompletionProposal;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-
-/**
- * Completion proposal computer for multiplicity strings.
- */
-public class MultiplicityCompletionProposal implements ICompletionProposalComputer {
-
- /**
- *
- */
- private static final String EMPTY_MULTIPLICITY = "[]";
-
- /**
- * Text inserted in the editor.
- */
- final static private String[] multiplicityStrings = { "[0..1] ", "[0..*] ", "[1] ", "[1..*] ", };
-
- /**
- * Text displayed in the information window.
- */
- final static private String[] multiplicityStringsInfo = { "Multiplicity: [0..1]", "Multiplicity: [0..*]",
- "Multiplicity: [1]", "Multiplicity: [1..*]", };
-
- /**
- * Text displayed in the completion area window.
- */
- final static private String[] multiplicityStringName = { "[0..1]", "[0..*]", "[1]", "[1..*]", };
-
- /*
- * (non-Javadoc)
- *
- * @see
- * com.cea.papyrus.classdiagram.parsers.texteditor.completionproposals.ICompletionProposalComputer
- * #generateCompletionProposals(int, int, java.lang.String)
- */
- /**
- *
- *
- * @param selectionRange
- * @param prefix
- * @param documentOffset
- *
- * @return
- */
- public List<ICompletionProposal> generateCompletionProposals(int documentOffset, int selectionRange, String prefix) {
- Vector<ICompletionProposal> v = new Vector<ICompletionProposal>();
-
- // adds each Completion proposal
- ICompletionProposal proposal = null;
-
- // first, add [] ans set the cursor after left curly
- if (EMPTY_MULTIPLICITY.startsWith(prefix)) {
- proposal = new CompletionProposal(EMPTY_MULTIPLICITY, documentOffset - prefix.length(), prefix.length()
- + selectionRange, 1, null, "[m..n]", null, "Multiplicity");
- v.add(proposal);
- }
-
- // adds all standard multiplicities (static strings...)
- for (int i = 0; i < multiplicityStrings.length; i++) {
- if (multiplicityStrings[i].startsWith(prefix)) {
- proposal = new CompletionProposal(multiplicityStrings[i], documentOffset - prefix.length(), prefix
- .length()
- + selectionRange, multiplicityStrings[i].length(), null, multiplicityStringName[i], null,
- multiplicityStringsInfo[i]);
- v.add(proposal);
- }
- }
- return v;
- }
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/NameCompletionProposal.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/NameCompletionProposal.java
deleted file mode 100644
index 7b737a1bd24..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/NameCompletionProposal.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.completionproposals;
-
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.jface.text.contentassist.CompletionProposal;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-
-/**
- * Completion proposal computer for names.
- */
-public class NameCompletionProposal implements ICompletionProposalComputer {
-
- /**
- * Text inserted in the editor.
- */
- final static private String[] nameStrings = { "", };
-
- /**
- * Text displayed in the information window.
- */
- final static private String[] nameStringsInfo = { "Name of the element", };
-
- /**
- * Text displayed in the completion area window.
- */
- final static private String[] nameStringsName = { "<Name>", };
-
- /*
- * (non-Javadoc)
- *
- * @see
- * com.cea.papyrus.classdiagram.parsers.texteditor.completionproposals.ICompletionProposalComputer
- * #generateCompletionProposals(int, int, java.lang.String)
- */
- /**
- *
- *
- * @param selectionRange
- * @param prefix
- * @param documentOffset
- *
- * @return
- */
- public List<ICompletionProposal> generateCompletionProposals(int documentOffset, int selectionRange, String prefix) {
- Vector<ICompletionProposal> v = new Vector<ICompletionProposal>();
-
- // adds each Completion proposal
- ICompletionProposal proposal = null;
-
- // adds all name (static strings...)
- for (int i = 0; i < nameStrings.length; i++) {
- if (nameStrings[i].startsWith(prefix)) {
- proposal = new CompletionProposal(nameStrings[i], documentOffset - prefix.length(), prefix.length()
- + selectionRange, nameStrings[i].length(), null, nameStringsName[i], null, nameStringsInfo[i]);
- v.add(proposal);
- }
- }
- return v;
- }
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/ParameterModifierProposal.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/ParameterModifierProposal.java
deleted file mode 100644
index 5b8ebcbf12c..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/ParameterModifierProposal.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.completionproposals;
-
-import java.util.List;
-import java.util.Map;
-import java.util.Vector;
-
-import org.eclipse.jface.text.contentassist.CompletionProposal;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-
-/**
- * Completion proposal computer for parameter modifiers strings.
- */
-public class ParameterModifierProposal implements ICompletionProposalComputer {
-
- // vector that keeps modifiers already used (used for completion)
- /**
- *
- */
- public Map<String, Boolean> modifiersUsed;
-
- /**
- *
- *
- * @return the modifiersUsed
- */
- public Map<String, Boolean> getModifiersUsed() {
- return modifiersUsed;
- }
-
- /**
- *
- *
- * @param modifiersUsed
- * the modifiersUsed to set
- */
- public void setModifiersUsed(Map<String, Boolean> modifiersUsed) {
- this.modifiersUsed = modifiersUsed;
- }
-
- /**
- * Text inserted in the editor.
- */
- final static public String[] modifiersStrings = { "ordered", "unique", "nonunique", "exception", "stream", };
-
- /**
- * Text displayed in the information window.
- */
- final static public String[] modifiersStringsInfo = { "Ordered collection property", "No duplicates allowed in the collection", "Duplicates allowed in the collection", "Exception parameter", "Stream parameter", };
-
- /**
- * Text displayed in the completion area window.
- */
- final static public String[] modifiersStringsName = { "ordered", "unique", "nonunique", "exception", "stream", };
-
- /*
- * (non-Javadoc)
- *
- * @see
- * com.cea.papyrus.classdiagram.parsers.texteditor.completionproposals.ICompletionProposalComputer
- * #generateCompletionProposals(int, int, java.lang.String)
- */
- /**
- *
- *
- * @param selectionRange
- * @param prefix
- * @param documentOffset
- *
- * @return
- */
- public List<ICompletionProposal> generateCompletionProposals(int documentOffset, int selectionRange, String prefix) {
- Vector<ICompletionProposal> v = new Vector<ICompletionProposal>();
-
- // adds each Completion proposal
- ICompletionProposal proposal = null;
-
- // adds all standard multiplicities (static strings...)
- for (int i = 0; i < modifiersStrings.length; i++) {
- // test if this modifier is valid (already used or othe contrary has alreday been used.
- if (!getModifiersUsed().get(modifiersStrings[i])) {
- if (modifiersStrings[i].startsWith(prefix)) {
- proposal = new CompletionProposal(modifiersStrings[i], documentOffset - prefix.length(), prefix.length() + selectionRange, modifiersStrings[i].length(), null, modifiersStringsName[i], null, modifiersStringsInfo[i]);
- v.add(proposal);
- }
- }
- }
- return v;
- }
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/ParameterModifiersProposal.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/ParameterModifiersProposal.java
deleted file mode 100644
index 852ee134db3..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/ParameterModifiersProposal.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.completionproposals;
-
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.jface.text.contentassist.CompletionProposal;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-
-/**
- * Completion proposal computer for parameter modifiers strings.
- */
-public class ParameterModifiersProposal implements ICompletionProposalComputer {
-
- /**
- *
- */
- private static final String EMPTY_MODIFIERS = "{}";
-
- /*
- * (non-Javadoc)
- *
- * @see
- * com.cea.papyrus.classdiagram.parsers.texteditor.completionproposals.ICompletionProposalComputer
- * #generateCompletionProposals(int, int, java.lang.String)
- */
- /**
- *
- *
- * @param selectionRange
- * @param prefix
- * @param documentOffset
- *
- * @return
- */
- public List<ICompletionProposal> generateCompletionProposals(int documentOffset, int selectionRange, String prefix) {
- Vector<ICompletionProposal> v = new Vector<ICompletionProposal>();
-
- // adds each Completion proposal
- ICompletionProposal proposal = null;
-
- // first, add [] ans set the cursor after left curly
- if (EMPTY_MODIFIERS.startsWith(prefix)) {
- proposal = new CompletionProposal(EMPTY_MODIFIERS, documentOffset - prefix.length(), prefix.length()
- + selectionRange, 1, null, "{ <ParameterModifiers> }", null, "Parameter modifiers");
- v.add(proposal);
- }
-
- return v;
- }
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/PropertyModifierProposal.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/PropertyModifierProposal.java
deleted file mode 100644
index f7de3b6e652..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/PropertyModifierProposal.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.completionproposals;
-
-import java.util.List;
-import java.util.Map;
-import java.util.Vector;
-
-import org.eclipse.jface.text.contentassist.CompletionProposal;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-
-/**
- * Completion proposal computer for property modifiers strings.
- */
-public class PropertyModifierProposal implements ICompletionProposalComputer {
-
- // vector that keeps modifiers already used (used for completion)
- /**
- *
- */
- public Map<String, Boolean> modifiersUsed;
-
- /**
- *
- *
- * @return the modifiersUsed
- */
- public Map<String, Boolean> getModifiersUsed() {
- return modifiersUsed;
- }
-
- /**
- *
- *
- * @param modifiersUsed
- * the modifiersUsed to set
- */
- public void setModifiersUsed(Map<String, Boolean> modifiersUsed) {
- this.modifiersUsed = modifiersUsed;
- }
-
- /**
- * Text inserted in the editor.
- */
- final static public String[] modifiersStrings = { "readOnly", "union", "ordered", "unique", "nonunique",
- "subsets ", "redefines ", };
-
- /**
- * Text displayed in the information window.
- */
- final static public String[] modifiersStringsInfo = {
- "ReadOnly property",
- "Specifies whether the property is derived as\n " + "the union of all of the properties that are\n"
- + "constrained to subset it. ", "ordered collection property",
- "No duplicates allowed in the collection", "Duplicates allowed in the collection", "Property subset",
- "Property redefinition", };
-
- /**
- * Text displayed in the completion area window.
- */
- final static public String[] modifiersStringsName = { "readOnly", "union", "ordered", "unique", "nonunique",
- "subsets <PropertyName>", "redefines <PropertyName>", };
-
- /*
- * (non-Javadoc)
- *
- * @see
- * com.cea.papyrus.classdiagram.parsers.texteditor.completionproposals.ICompletionProposalComputer
- * #generateCompletionProposals(int, int, java.lang.String)
- */
- /**
- *
- *
- * @param selectionRange
- * @param prefix
- * @param documentOffset
- *
- * @return
- */
- public List<ICompletionProposal> generateCompletionProposals(int documentOffset, int selectionRange, String prefix) {
- Vector<ICompletionProposal> v = new Vector<ICompletionProposal>();
-
- // adds each Completion proposal
- ICompletionProposal proposal = null;
-
- // adds all standard multiplicities (static strings...)
- for (int i = 0; i < modifiersStrings.length; i++) {
- // test if this modifier is valid (already used or othe contrary has alreday been used.
- if (!modifiersUsed.get(modifiersStrings[i])) {
- if (modifiersStrings[i].startsWith(prefix)) {
- proposal = new CompletionProposal(modifiersStrings[i], documentOffset - prefix.length(), prefix
- .length()
- + selectionRange, modifiersStrings[i].length(), null, modifiersStringsName[i], null,
- modifiersStringsInfo[i]);
- v.add(proposal);
- }
- }
- }
- return v;
- }
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/PropertyModifiersProposal.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/PropertyModifiersProposal.java
deleted file mode 100644
index 4ae94e44d00..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/PropertyModifiersProposal.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.completionproposals;
-
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.jface.text.contentassist.CompletionProposal;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-
-/**
- * Completion proposal computer for property modifiers strings.
- */
-public class PropertyModifiersProposal implements ICompletionProposalComputer {
-
- /**
- *
- */
- private static final String EMPTY_MODIFIERS = "{}";
-
- /*
- * (non-Javadoc)
- *
- * @see
- * com.cea.papyrus.classdiagram.parsers.texteditor.completionproposals.ICompletionProposalComputer
- * #generateCompletionProposals(int, int, java.lang.String)
- */
- /**
- *
- *
- * @param selectionRange
- * @param prefix
- * @param documentOffset
- *
- * @return
- */
- public List<ICompletionProposal> generateCompletionProposals(int documentOffset, int selectionRange, String prefix) {
- Vector<ICompletionProposal> v = new Vector<ICompletionProposal>();
-
- // adds each Completion proposal
- ICompletionProposal proposal = null;
-
- // first, add [] ans set the cursor after left curly
- if (EMPTY_MODIFIERS.startsWith(prefix)) {
- proposal = new CompletionProposal(EMPTY_MODIFIERS, documentOffset - prefix.length(), prefix.length()
- + selectionRange, 1, null, "{ <PropertyModifiers> }", null, "Property modifiers");
- v.add(proposal);
- }
-
- return v;
- }
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/PropertyRedefineProposal.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/PropertyRedefineProposal.java
deleted file mode 100644
index 0f201d3942f..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/PropertyRedefineProposal.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008, 2009 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- * Yann TANGUY (CEA LIST) yann.tanguy@cea.fr
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.completionproposals;
-
-import java.util.Iterator;
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.jface.text.contentassist.CompletionProposal;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.papyrus.uml.tools.utils.PropertyUtil;
-import org.eclipse.uml2.uml.Property;
-
-/**
- * Completion proposal computer for multiplicity strings.
- */
-public class PropertyRedefineProposal implements ICompletionProposalComputer {
-
- /**
- *
- *
- * @param property
- */
- public PropertyRedefineProposal(Property property) {
- this.property = property;
- }
-
- /**
- *
- */
- private Property property;
-
- /**
- *
- *
- * @return the property
- */
- public Property getProperty() {
- return property;
- }
-
- /**
- *
- *
- * @param property
- * the property to set
- */
- public void setProperty(Property property) {
- this.property = property;
- }
-
- /*
- * (non-Javadoc)
- *
- * @seecom.cea.papyrus.classdiagram.parsers.texteditor.completionproposals.
- * ICompletionProposalComputer#generateCompletionProposals(int, int, java.lang.String)
- */
- /**
- *
- *
- * @param selectionRange
- * @param prefix
- * @param documentOffset
- *
- * @return
- */
- public List<ICompletionProposal> generateCompletionProposals(int documentOffset, int selectionRange, String prefix) {
- Vector<ICompletionProposal> v = new Vector<ICompletionProposal>();
-
- Iterator<Property> it = PropertyUtil.getRedefinableProperties(property).iterator();
- while (it.hasNext()) {
- Property prop = it.next();
- String name = prop.getName();
-
- if (name.startsWith(prefix)) {
- v
- .add(new CompletionProposal(prop.getName(), documentOffset - prefix.length(), prefix.length()
- + selectionRange, prop.getName().length(), null, prop.getName(), null, prop
- .getQualifiedName()));
- }
- }
- return v;
- }
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/PropertySubsetsProposal.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/PropertySubsetsProposal.java
deleted file mode 100644
index f05de9265c9..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/PropertySubsetsProposal.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008, 2009 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- * Yann TANGUY (CEA LIST) yann.tanguy@cea.fr
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.completionproposals;
-
-import java.util.Iterator;
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.jface.text.contentassist.CompletionProposal;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.papyrus.uml.tools.utils.PropertyUtil;
-import org.eclipse.uml2.uml.Property;
-
-/**
- * Completion proposal computer for multiplicity strings.
- */
-public class PropertySubsetsProposal implements ICompletionProposalComputer {
-
- /**
- *
- *
- * @param property
- */
- public PropertySubsetsProposal(Property property) {
- this.property = property;
- }
-
- /**
- *
- */
- private Property property;
-
- /**
- *
- *
- * @return the property
- */
- public Property getProperty() {
- return property;
- }
-
- /**
- *
- *
- * @param property
- * the property to set
- */
- public void setProperty(Property property) {
- this.property = property;
- }
-
- /*
- * (non-Javadoc)
- *
- * @seecom.cea.papyrus.classdiagram.parsers.texteditor.completionproposals.
- * ICompletionProposalComputer#generateCompletionProposals(int, int, java.lang.String)
- */
- /**
- *
- *
- * @param selectionRange
- * @param prefix
- * @param documentOffset
- *
- * @return
- */
- public List<ICompletionProposal> generateCompletionProposals(int documentOffset, int selectionRange, String prefix) {
- Vector<ICompletionProposal> v = new Vector<ICompletionProposal>();
-
- Iterator<Property> it = PropertyUtil.getSubsettablesProperties(property, true).iterator();
- while (it.hasNext()) {
- Property prop = it.next();
- String name = prop.getName();
-
- if (name.startsWith(prefix)) {
- v
- .add(new CompletionProposal(prop.getName(), documentOffset - prefix.length(), prefix.length()
- + selectionRange, prop.getName().length(), null, prop.getName(), null, prop
- .getQualifiedName()));
- }
- }
- return v;
- }
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/TypeCompletionProposalComputer.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/TypeCompletionProposalComputer.java
deleted file mode 100644
index 0a9465c05ef..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/TypeCompletionProposalComputer.java
+++ /dev/null
@@ -1,180 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008, 2009 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- * Yann TANGUY (CEA LIST) yann.tanguy@cea.fr
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.completionproposals;
-
-import java.util.Comparator;
-import java.util.Iterator;
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.Set;
-import java.util.Vector;
-
-import org.eclipse.jface.text.contentassist.CompletionProposal;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.papyrus.parsers.texteditor.CompletionFilterSourceViewerConfiguration;
-import org.eclipse.papyrus.parsers.texteditor.CompletionFilterSourceViewerConfiguration.ICompletionFilter;
-import org.eclipse.papyrus.uml.tools.utils.PackageUtil;
-import org.eclipse.papyrus.uml.tools.utils.TemplateSignatureUtil;
-import org.eclipse.papyrus.uml.tools.utils.TypeUtil;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.TemplateableElement;
-import org.eclipse.uml2.uml.Type;
-
-/**
- *
- */
-public class TypeCompletionProposalComputer implements ICompletionProposalComputer {
-
- private static final String UNDEFINED_TYPE = "<Undefined>";
-
- private Element element;
-
- /** set up a filter for choice of values */
- private ICompletionFilter completionFilter;
-
- /** Type of the filtered property */
- private final int propertyType;
-
- /**
- * Instantiates a new type completion proposal computer without active filter
- */
- public TypeCompletionProposalComputer() {
- this.completionFilter = new CompletionFilterSourceViewerConfiguration.NullCompletionFilter();
- this.propertyType = -1;
- }
-
- /**
- * Instantiates a new type completion proposal computer with active filter on property
- *
- * @param completionFilter
- * the i completion filter
- * @param propertyType
- * the property type
- */
- public TypeCompletionProposalComputer(ICompletionFilter completionFilter, int propertyType) {
- this.completionFilter = completionFilter == null ? new CompletionFilterSourceViewerConfiguration.NullCompletionFilter()
- : completionFilter;
- this.propertyType = propertyType;
- }
-
- /**
- *
- *
- * @return the element
- */
- public Element getElement() {
- return element;
- }
-
- /**
- *
- *
- * @param element
- * the element to set
- */
- public void setElement(Element element) {
- this.element = element;
- }
-
- /**
- *
- *
- * @param selectionRange
- * @param prefix
- * @param documentOffset
- *
- * @return
- */
- public List<ICompletionProposal> generateCompletionProposals(int documentOffset, int selectionRange, String prefix) {
- Vector<ICompletionProposal> v = new Vector<ICompletionProposal>();
-
- // adds each Completion proposal
- ICompletionProposal proposal = null;
-
- // first, add <Undefined>
- if (UNDEFINED_TYPE.startsWith(prefix)) {
- proposal = new CompletionProposal(UNDEFINED_TYPE, documentOffset - prefix.length(), prefix.length()
- + selectionRange, UNDEFINED_TYPE.length(), null, UNDEFINED_TYPE, null, "Undefined Type");
- v.add(proposal);
- }
-
- if (element != null) {
- // then, all accessible types, by alphabetic order...
- Set<Type> types = computeAccessibleTypeList(element);
- // generate the list of types, in alphabetical order
- Iterator<Type> it = types.iterator();
- while (it.hasNext()) {
- Type type = it.next();
- if (!completionFilter.filter(propertyType, type)) {
- String name = type.getName();
- if (name != null && name.startsWith(prefix)) {
- // create a completion processor for the type if prefix
- // corresponds
- proposal = new CompletionProposal(name, documentOffset - prefix.length(), prefix.length()
- + selectionRange, name.length(), null, TypeUtil.getInfoString(type), null, "");
- v.add(proposal);
- }
- }
- }
- }
- return v;
- }
-
- /**
- *
- *
- * @param element
- *
- * @return
- */
- public Set<Type> computeAccessibleTypeList(Element element) {
- LinkedHashSet<Type> list = new LinkedHashSet<Type>();
- // adds directly accessible elements
- list.addAll(PackageUtil.getAccessibleTypes(element.getNearestPackage()));
-
- // In the context where element is owned by a template,
- // types declared in the context of the template must also be added
- if (element.getOwner() != null && element.getOwner() instanceof TemplateableElement) {
- TemplateableElement template = (TemplateableElement) element.getOwner();
- if (template.isTemplate()) {
- list.addAll(TemplateSignatureUtil.getAccessibleTypes(template.getOwnedTemplateSignature()));
- }
- }
-
- // adds all elements
- list.addAll(PackageUtil.getAllTypes(element.getNearestPackage()));
-
- return list;
- }
-
- /**
- * Simple comparator for types, based on their names.
- */
- private class TypeNameComparator implements Comparator<Type> {
-
- /**
- *
- *
- * @param o2
- * @param o1
- *
- * @return
- */
- public int compare(Type o1, Type o2) {
- return o1.getName().compareTo(o2.getName());
- }
-
- }
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_BooleanValue_CompletionProposal.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_BooleanValue_CompletionProposal.java
deleted file mode 100644
index f918eddc75b..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_BooleanValue_CompletionProposal.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.parsers.texteditor.completionproposals;
-
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.jface.text.contentassist.CompletionProposal;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.papyrus.parsers.messages.NFPMessages;
-
-public class VSL_BooleanValue_CompletionProposal implements ICompletionProposalComputer {
-
- /** Text inserted in the editor */
- final static private String[] TVL_BooleanValue_Strings = { "true", "false", };
-
- /** Text displayed in the information window */
- final static private String[] TVL_BooleanValue_StringsInfo = { NFPMessages.BooleanValue_True_StringsInfo,
- NFPMessages.BooleanValue_False_StringsInfo, };
-
- /** Text displayed in the completion area window */
- final static private String[] TVL_BooleanValue_StringName = { NFPMessages.BooleanValue_True_StringName,
- NFPMessages.BooleanValue_False_StringName, };
-
- /*
- * (non-Javadoc)
- *
- * @see
- * com.cea.papyrus.classdiagram.parsers.texteditor.completionproposals.ICompletionProposalComputer
- * #generateCompletionProposals(int, int, java.lang.String)
- */
- public List<ICompletionProposal> generateCompletionProposals(int documentOffset, int selectionRange, String prefix) {
- Vector<ICompletionProposal> v = new Vector<ICompletionProposal>();
-
- // adds each Completion proposal
- ICompletionProposal proposal = null;
-
- // adds all name (static strings...)
- for (int i = 0; i < TVL_BooleanValue_Strings.length; i++) {
- if (TVL_BooleanValue_Strings[i].startsWith(prefix)) {
- proposal = new CompletionProposal(TVL_BooleanValue_Strings[i], documentOffset - prefix.length(), prefix
- .length()
- + selectionRange, TVL_BooleanValue_Strings[i].length(), null, TVL_BooleanValue_StringName[i],
- null, TVL_BooleanValue_StringsInfo[i]);
- v.add(proposal);
- }
- }
-
- return v;
- }
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_DefaultValue_CompletionProposal.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_DefaultValue_CompletionProposal.java
deleted file mode 100644
index a0e2e112f0c..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_DefaultValue_CompletionProposal.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.parsers.texteditor.completionproposals;
-
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.jface.text.contentassist.CompletionProposal;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.papyrus.parsers.messages.NFPMessages;
-
-public class VSL_DefaultValue_CompletionProposal implements ICompletionProposalComputer {
-
- /** Text inserted in the editor */
- final static private String[] TVL_DefaultValue_Strings = { "-", };
-
- /** Text displayed in the information window */
- final static private String[] TVL_DefaultValue_StringsInfo = { NFPMessages.DefaultValue_StringsInfo, };
-
- /** Text displayed in the completion area window */
- final static private String[] TVL_DefaultValue_StringName = { NFPMessages.DefaultValue_StringName, };
-
- /*
- * (non-Javadoc)
- *
- * @see
- * com.cea.papyrus.classdiagram.parsers.texteditor.completionproposals.ICompletionProposalComputer
- * #generateCompletionProposals(int, int, java.lang.String)
- */
- public List<ICompletionProposal> generateCompletionProposals(int documentOffset, int selectionRange, String prefix) {
- Vector<ICompletionProposal> v = new Vector<ICompletionProposal>();
-
- // adds each Completion proposal
- ICompletionProposal proposal = null;
-
- // adds all name (static strings...)
- for (int i = 0; i < TVL_DefaultValue_Strings.length; i++) {
- if (TVL_DefaultValue_Strings[i].startsWith(prefix)) {
- proposal = new CompletionProposal(TVL_DefaultValue_Strings[i], documentOffset - prefix.length(), prefix
- .length()
- + selectionRange, TVL_DefaultValue_Strings[i].length(), null, TVL_DefaultValue_StringName[i],
- null, TVL_DefaultValue_StringsInfo[i]);
- v.add(proposal);
- }
- }
-
- return v;
- }
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_EnumerationLiteral_CompletionProposal.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_EnumerationLiteral_CompletionProposal.java
deleted file mode 100644
index 23edb6414df..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_EnumerationLiteral_CompletionProposal.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.parsers.texteditor.completionproposals;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.jface.text.contentassist.CompletionProposal;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.papyrus.parsers.messages.NFPMessages;
-import org.eclipse.uml2.uml.DataType;
-import org.eclipse.uml2.uml.Enumeration;
-import org.eclipse.uml2.uml.EnumerationLiteral;
-
-public class VSL_EnumerationLiteral_CompletionProposal implements ICompletionProposalComputer {
-
- private static ArrayList<String> enumLiterals;
-
- private static Enumeration enumeration;
-
- public void setDataType(DataType datatype) {
- enumeration = (Enumeration) datatype;
- }
-
- // /** Text inserted in the editor */
- // final static private String[] TVL_EnumLiteral_Strings = {
- // "true",
- // "false",
- // };
-
- /** Text displayed in the information window */
- final static private String[] TVL_Enumeration_StringsInfo = { NFPMessages.Enumeration_StringsInfo, };
-
- /** Text displayed in the completion area window */
- final static private String[] TVL_Enumeration_StringName = { NFPMessages.Enumeration_StringName, };
-
- public static void computeTVL_Enumeration_String() {
- enumLiterals = new ArrayList<String>();
-
- if (enumeration != null) {
- Iterator<EnumerationLiteral> iter = enumeration.getOwnedLiterals().iterator();
- while (iter.hasNext()) {
- EnumerationLiteral enumLiteral = iter.next();
- enumLiterals.add(enumLiteral.getName());
- }
- } else {
- enumLiterals.add("<EnumerationLiteral>");
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * com.cea.papyrus.classdiagram.parsers.texteditor.completionproposals.ICompletionProposalComputer
- * #generateCompletionProposals(int, int, java.lang.String)
- */
- public List<ICompletionProposal> generateCompletionProposals(int documentOffset, int selectionRange, String prefix) {
- Vector<ICompletionProposal> v = new Vector<ICompletionProposal>();
-
- // adds each Completion proposal
- ICompletionProposal proposal = null;
- computeTVL_Enumeration_String();
-
- // adds all name (static strings...)
- for (int i = 0; i < enumLiterals.size(); i++) {
- if (enumLiterals.get(i).startsWith(prefix)) {
- proposal = new CompletionProposal(enumLiterals.get(i), documentOffset - prefix.length(), prefix
- .length()
- + selectionRange, enumLiterals.get(i).length(), null, enumLiterals.get(i), null,
- TVL_Enumeration_StringsInfo[0]);
- v.add(proposal);
- }
- }
-
- return v;
- }
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_Integer_CompletionProposal.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_Integer_CompletionProposal.java
deleted file mode 100644
index 0352d8b23bd..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_Integer_CompletionProposal.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.parsers.texteditor.completionproposals;
-
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.jface.text.contentassist.CompletionProposal;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.papyrus.parsers.messages.NFPMessages;
-
-// TODO: DONE: add (+/-) to the grammar in order to be able to handle positive and negative integers. this remark applies to real as well
-// TODO: Integers accept ".". We have to fix this error in the grammar.
-public class VSL_Integer_CompletionProposal implements ICompletionProposalComputer {
-
- /** Text inserted in the editor */
- final static private String[] TVL_Integer_Strings = { "", "0x", };
-
- /** Text displayed in the information window */
- final static private String[] TVL_Integer_StringsInfo = { NFPMessages.Integer_Decimal_StringsInfo,
- NFPMessages.Integer_Hexadecimal_StringsInfo, };
-
- /** Text displayed in the completion area window */
- final static private String[] TVL_Integer_StringName = { NFPMessages.Integer_Decimal_StringName,
- NFPMessages.Integer_Hexadecimal_StringName, };
-
- /*
- * (non-Javadoc)
- *
- * @see
- * com.cea.papyrus.classdiagram.parsers.texteditor.completionproposals.ICompletionProposalComputer
- * #generateCompletionProposals(int, int, java.lang.String)
- */
- public List<ICompletionProposal> generateCompletionProposals(int documentOffset, int selectionRange, String prefix) {
- Vector<ICompletionProposal> v = new Vector<ICompletionProposal>();
-
- // adds each Completion proposal
- ICompletionProposal proposal = null;
-
- // adds all name (static strings...)
- for (int i = 0; i < TVL_Integer_Strings.length; i++) {
- if (TVL_Integer_Strings[i].startsWith(prefix)) {
- proposal = new CompletionProposal(TVL_Integer_Strings[i], documentOffset - prefix.length(), prefix
- .length()
- + selectionRange, TVL_Integer_Strings[i].length(), null, TVL_Integer_StringName[i], null,
- TVL_Integer_StringsInfo[i]);
- v.add(proposal);
- }
- }
-
- return v;
- }
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_NFP_VS_CompletionProposal.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_NFP_VS_CompletionProposal.java
deleted file mode 100644
index 4ed75311a6f..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_NFP_VS_CompletionProposal.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.parsers.texteditor.completionproposals;
-
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.jface.text.contentassist.CompletionProposal;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.papyrus.parsers.messages.NFPMessages;
-
-public class VSL_NFP_VS_CompletionProposal implements ICompletionProposalComputer {
-
- /** Text inserted in the editor */
- final static private String[] TVL_NFP_VS_Strings = { "literal ", "interval ", };
-
- /** Text displayed in the information window */
- final static private String[] TVL_NFP_VS_StringsInfo = { NFPMessages.NFP_VS_Literal_StringsInfo,
- NFPMessages.NFP_VS_Interval_StringsInfo, };
-
- /** Text displayed in the completion area window */
- final static private String[] TVL_NFP_VS_StringName = { NFPMessages.NFP_VS_Literal_StringName,
- NFPMessages.NFP_VS_Interval_StringName, };
-
- /*
- * (non-Javadoc)
- *
- * @see
- * com.cea.papyrus.classdiagram.parsers.texteditor.completionproposals.ICompletionProposalComputer
- * #generateCompletionProposals(int, int, java.lang.String)
- */
- public List<ICompletionProposal> generateCompletionProposals(int documentOffset, int selectionRange, String prefix) {
- Vector<ICompletionProposal> v = new Vector<ICompletionProposal>();
-
- // adds each Completion proposal
- ICompletionProposal proposal = null;
-
- // adds all name (static strings...)
- for (int i = 0; i < TVL_NFP_VS_Strings.length; i++) {
- if (TVL_NFP_VS_Strings[i].startsWith(prefix)) {
- proposal = new CompletionProposal(TVL_NFP_VS_Strings[i], documentOffset - prefix.length(), prefix
- .length()
- + selectionRange, TVL_NFP_VS_Strings[i].length(), null, TVL_NFP_VS_StringName[i], null,
- TVL_NFP_VS_StringsInfo[i]);
- v.add(proposal);
- }
- }
-
- return v;
- }
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_NullValue_CompletionProposal.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_NullValue_CompletionProposal.java
deleted file mode 100644
index 3122e6a4e55..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_NullValue_CompletionProposal.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.parsers.texteditor.completionproposals;
-
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.jface.text.contentassist.CompletionProposal;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.papyrus.parsers.messages.NFPMessages;
-
-public class VSL_NullValue_CompletionProposal implements ICompletionProposalComputer {
-
- /** Text inserted in the editor */
- final static private String[] TVL_NullValue_Strings = { "null", };
-
- /** Text displayed in the information window */
- final static private String[] TVL_NullValue_StringsInfo = { NFPMessages.NullValue_StringsInfo, };
-
- /** Text displayed in the completion area window */
- final static private String[] TVL_NullValue_StringName = { NFPMessages.NullValue_StringName, };
-
- /*
- * (non-Javadoc)
- *
- * @see
- * com.cea.papyrus.classdiagram.parsers.texteditor.completionproposals.ICompletionProposalComputer
- * #generateCompletionProposals(int, int, java.lang.String)
- */
- public List<ICompletionProposal> generateCompletionProposals(int documentOffset, int selectionRange, String prefix) {
- Vector<ICompletionProposal> v = new Vector<ICompletionProposal>();
-
- // adds each Completion proposal
- ICompletionProposal proposal = null;
-
- // adds all name (static strings...)
- for (int i = 0; i < TVL_NullValue_Strings.length; i++) {
- if (TVL_NullValue_Strings[i].startsWith(prefix)) {
- proposal = new CompletionProposal(TVL_NullValue_Strings[i], documentOffset - prefix.length(), prefix
- .length()
- + selectionRange, TVL_NullValue_Strings[i].length(), null, TVL_NullValue_StringName[i], null,
- TVL_NullValue_StringsInfo[i]);
- v.add(proposal);
- }
- }
-
- return v;
- }
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_NumberLiteral_CompletionProposal.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_NumberLiteral_CompletionProposal.java
deleted file mode 100644
index c3a39baf4ef..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_NumberLiteral_CompletionProposal.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.parsers.texteditor.completionproposals;
-
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.jface.text.contentassist.CompletionProposal;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.papyrus.parsers.messages.NFPMessages;
-
-public class VSL_NumberLiteral_CompletionProposal implements ICompletionProposalComputer {
-
- /** Text inserted in the editor */
- final static private String[] TVL_NumberLiteral_Strings = { "", "", };
-
- /** Text displayed in the information window */
- final static private String[] TVL_NumberLiteral_StringsInfo = { NFPMessages.NumberLiteral_Integer_StringsInfo,
- NFPMessages.NumberLiteral_Real_StringsInfo, };
-
- /** Text displayed in the completion area window */
- final static private String[] TVL_NumberLiteral_StringName = { NFPMessages.NumberLiteral_Integer_StringName,
- NFPMessages.NumberLiteral_Real_StringName, };
-
- /*
- * (non-Javadoc)
- *
- * @see
- * com.cea.papyrus.classdiagram.parsers.texteditor.completionproposals.ICompletionProposalComputer
- * #generateCompletionProposals(int, int, java.lang.String)
- */
- public List<ICompletionProposal> generateCompletionProposals(int documentOffset, int selectionRange, String prefix) {
- Vector<ICompletionProposal> v = new Vector<ICompletionProposal>();
-
- // adds each Completion proposal
- ICompletionProposal proposal = null;
-
- // adds all name (static strings...)
- for (int i = 0; i < TVL_NumberLiteral_Strings.length; i++) {
- if (TVL_NumberLiteral_Strings[i].startsWith(prefix)) {
- proposal = new CompletionProposal(TVL_NumberLiteral_Strings[i], documentOffset - prefix.length(),
- prefix.length() + selectionRange, TVL_NumberLiteral_Strings[i].length(), null,
- TVL_NumberLiteral_StringName[i], null, TVL_NumberLiteral_StringsInfo[i]);
- v.add(proposal);
- }
- }
-
- return v;
- }
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_Real_CompletionProposal.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_Real_CompletionProposal.java
deleted file mode 100644
index ccb3edd5ad9..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_Real_CompletionProposal.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.parsers.texteditor.completionproposals;
-
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.jface.text.contentassist.CompletionProposal;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.papyrus.parsers.messages.NFPMessages;
-
-// TODO: handle cases of float and double types
-
-public class VSL_Real_CompletionProposal implements ICompletionProposalComputer {
-
- /** Text inserted in the editor */
- final static private String[] TVL_Real_Strings = { ".", "E-", };
-
- /** Text displayed in the information window */
- final static private String[] TVL_Real_StringsInfo = { NFPMessages.RealPoint_StringsInfo,
- NFPMessages.RealExpo_StringsInfo, };
-
- /** Text displayed in the completion area window */
- final static private String[] TVL_Real_StringsName = { NFPMessages.RealPoint_StringsName,
- NFPMessages.RealExpo_StringsName, };
-
- /*
- * (non-Javadoc)
- *
- * @see
- * com.cea.papyrus.classdiagram.parsers.texteditor.completionproposals.ICompletionProposalComputer
- * #generateCompletionProposals(int, int, java.lang.String)
- */
- public List<ICompletionProposal> generateCompletionProposals(int documentOffset, int selectionRange, String prefix) {
- Vector<ICompletionProposal> v = new Vector<ICompletionProposal>();
-
- // adds each Completion proposal
- ICompletionProposal proposal = null;
- // adds all name (static strings...)
- for (int i = 0; i < TVL_Real_Strings.length; i++) {
- if (TVL_Real_Strings[i].startsWith(prefix)) {
- proposal = new CompletionProposal(TVL_Real_Strings[i], documentOffset - prefix.length(), prefix
- .length()
- + selectionRange, TVL_Real_Strings[i].length(), null, TVL_Real_StringsName[i], null,
- TVL_Real_StringsInfo[i]);
- v.add(proposal);
- }
- }
-
- return v;
- }
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_StringLiteral_CompletionProposal.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_StringLiteral_CompletionProposal.java
deleted file mode 100644
index 4c30f20949d..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_StringLiteral_CompletionProposal.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.parsers.texteditor.completionproposals;
-
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.jface.text.contentassist.CompletionProposal;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.papyrus.parsers.messages.NFPMessages;
-
-public class VSL_StringLiteral_CompletionProposal implements ICompletionProposalComputer {
-
- /** Text inserted in the editor */
- final static private String[] TVL_StringLiteral_Strings = { "\'\'", };
-
- /** Text displayed in the information window */
- final static private String[] TVL_StringLiteral_StringsInfo = { NFPMessages.StringLiteral_StringsInfo, };
-
- /** Text displayed in the completion area window */
- final static private String[] TVL_StringLiteral_StringName = { NFPMessages.StringLiteral_StringName, };
-
- /*
- * (non-Javadoc)
- *
- * @see
- * com.cea.papyrus.classdiagram.parsers.texteditor.completionproposals.ICompletionProposalComputer
- * #generateCompletionProposals(int, int, java.lang.String)
- */
- public List<ICompletionProposal> generateCompletionProposals(int documentOffset, int selectionRange, String prefix) {
- Vector<ICompletionProposal> v = new Vector<ICompletionProposal>();
-
- // adds each Completion proposal
- ICompletionProposal proposal = null;
-
- // adds all name (static strings...)
- for (int i = 0; i < TVL_StringLiteral_Strings.length; i++) {
- if (TVL_StringLiteral_Strings[i].startsWith(prefix)) {
- proposal = new CompletionProposal(TVL_StringLiteral_Strings[i], documentOffset - prefix.length(),
- prefix.length() + selectionRange, TVL_StringLiteral_Strings[i].length() - 1, null,
- TVL_StringLiteral_StringName[i], null, TVL_StringLiteral_StringsInfo[i]);
- v.add(proposal);
- }
- }
-
- return v;
- }
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_Tuple_CompletionProposal.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_Tuple_CompletionProposal.java
deleted file mode 100644
index 9aa3e4fda5d..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_Tuple_CompletionProposal.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.parsers.texteditor.completionproposals;
-
-import java.util.Iterator;
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.jface.text.contentassist.CompletionProposal;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.papyrus.parsers.messages.NFPMessages;
-import org.eclipse.uml2.uml.DataType;
-import org.eclipse.uml2.uml.Property;
-
-public class VSL_Tuple_CompletionProposal implements ICompletionProposalComputer {
-
- private static DataType dataType;
-
- private static String tupleTypeString;
-
- public void setDataType(DataType datatype) {
- dataType = datatype;
- }
-
- /**
- *
- * @return returns the string containing properties of the data type for completion
- */
- public static String computeTVL_Tuple_String() {
- String tupleString = "(";
- tupleTypeString = "(";
- // if datatype is defined
- if (dataType != null) {
- if (dataType.getOwnedAttributes().size() > 0) {
- Iterator<Property> propIter = dataType.getAllAttributes().iterator();
- while (propIter.hasNext()) {
- Property prop = propIter.next();
- DataType propType = (DataType) prop.getType();
- tupleString += prop.getName() + "=";
- if (prop.getDefault() != null) {
- tupleString += prop.getDefault();
- }
- tupleString += " , ";
- tupleTypeString += prop.getName() + ": " + propType.getName() + ", ";
- }
- } else {
- tupleString = dataType.getName();
- }
- }
-
- tupleString = tupleString.substring(0, tupleString.length() - 3);
- tupleString += ")";
- tupleTypeString = tupleTypeString.substring(0, tupleTypeString.length() - 2);
- tupleTypeString += ")";
- return tupleString;
- }
-
- /** Text inserted in the editor */
- /*
- * final static private String[] TVL_Tuple_Strings = { computeTVL_Tuple_String(), };
- */
-
- /** Text displayed in the information window */
- final static private String[] TVL_Tuple_StringsInfo = { NFPMessages.Tuple_StringsInfo, };
-
- /** Text displayed in the completion area window */
- final static private String[] TVL_Tuple_StringName = { NFPMessages.Tuple_StringName, };
-
- /*
- * (non-Javadoc)
- *
- * @see
- * com.cea.papyrus.classdiagram.parsers.texteditor.completionproposals.ICompletionProposalComputer
- * #generateCompletionProposals(int, int, java.lang.String)
- */
- public List<ICompletionProposal> generateCompletionProposals(int documentOffset, int selectionRange, String prefix) {
- Vector<ICompletionProposal> v = new Vector<ICompletionProposal>();
-
- // adds each Completion proposal
- ICompletionProposal proposal = null;
- String tupleString = computeTVL_Tuple_String();
- if (tupleString.startsWith(prefix)) {
- proposal = new CompletionProposal(tupleString, documentOffset - prefix.length(), prefix.length()
- + selectionRange, tupleString.length() - 1, null, tupleTypeString, null, TVL_Tuple_StringsInfo[0]);
- v.add(proposal);
- }
- return v;
- }
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_UnlimitedNatural_CompletionProposal.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_UnlimitedNatural_CompletionProposal.java
deleted file mode 100644
index 3d534abd137..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_UnlimitedNatural_CompletionProposal.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.parsers.texteditor.completionproposals;
-
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.jface.text.contentassist.CompletionProposal;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.papyrus.parsers.messages.NFPMessages;
-
-//unlimited natural
-// TODO: To change the symbol of Infinity='*' (UML2 & MARTE) because it conflict with multiplication operator
-public class VSL_UnlimitedNatural_CompletionProposal implements ICompletionProposalComputer {
-
- /** Text inserted in the editor */
- final static private String[] TVL_UnlimitedNatural_Strings = { "", "0x", "*", };
-
- /** Text displayed in the information window */
- final static private String[] TVL_UnlimitedNatural_StringsInfo = {
- NFPMessages.UnlimitedNatural_Decimal_StringsInfo, NFPMessages.UnlimitedNatural_Hexadecimal_StringsInfo,
- NFPMessages.UnlimitedNatural_Star_StringsInfo, };
-
- /** Text displayed in the completion area window */
- final static private String[] TVL_UnlimitedNatural_StringName = { NFPMessages.UnlimitedNatural_Decimal_StringName,
- NFPMessages.UnlimitedNatural_Hexadecimal_StringName, NFPMessages.UnlimitedNatural_Star_StringName, };
-
- /*
- * (non-Javadoc)
- *
- * @see
- * com.cea.papyrus.classdiagram.parsers.texteditor.completionproposals.ICompletionProposalComputer
- * #generateCompletionProposals(int, int, java.lang.String)
- */
- public List<ICompletionProposal> generateCompletionProposals(int documentOffset, int selectionRange, String prefix) {
- Vector<ICompletionProposal> v = new Vector<ICompletionProposal>();
-
- // adds each Completion proposal
- ICompletionProposal proposal = null;
-
- // adds all name (static strings...)
- for (int i = 0; i < TVL_UnlimitedNatural_Strings.length; i++) {
- if (TVL_UnlimitedNatural_Strings[i].startsWith(prefix)) {
- proposal = new CompletionProposal(TVL_UnlimitedNatural_Strings[i], documentOffset - prefix.length(),
- prefix.length() + selectionRange, TVL_UnlimitedNatural_Strings[i].length(), null,
- TVL_UnlimitedNatural_StringName[i], null, TVL_UnlimitedNatural_StringsInfo[i]);
- v.add(proposal);
- }
- }
-
- return v;
- }
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VisibilityCompletionProposal.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VisibilityCompletionProposal.java
deleted file mode 100644
index 8dfbd352a49..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VisibilityCompletionProposal.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.completionproposals;
-
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.jface.text.contentassist.CompletionProposal;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-
-/**
- * Completion proposal computer for visibilities.
- */
-public class VisibilityCompletionProposal implements ICompletionProposalComputer {
-
- /**
- * Text inserted in the editor.
- */
- final static public String[] visibilityStrings = { "+", "-", "#", "~", };
-
- /**
- * Text displayed in the information window.
- */
- final static public String[] visibilityStringsInfo = { "Public visibility", "Private visibility",
- "Protected visibility", "Package visibility", };
-
- /**
- * Text displayed in the completion area window.
- */
- final static public String[] visibilityStringsName = { "+", "-", "#", "~", };
-
- /*
- * (non-Javadoc)
- *
- * @see
- * com.cea.papyrus.classdiagram.parsers.texteditor.completionproposals.ICompletionProposalComputer
- * #generateCompletionProposals(int, int, java.lang.String)
- */
- /**
- *
- *
- * @param selectionRange
- * @param prefix
- * @param documentOffset
- *
- * @return
- */
- public List<ICompletionProposal> generateCompletionProposals(int documentOffset, int selectionRange, String prefix) {
- Vector<ICompletionProposal> v = new Vector<ICompletionProposal>();
-
- // adds each Completion proposal
- ICompletionProposal proposal = null;
-
- // adds all standard multiplicities (static strings...)
- for (int i = 0; i < visibilityStrings.length; i++) {
- if (visibilityStrings[i].startsWith(prefix)) {
- proposal = new CompletionProposal(visibilityStrings[i], documentOffset - prefix.length(), prefix
- .length()
- + selectionRange, visibilityStrings[i].length(), null, visibilityStringsName[i], null,
- visibilityStringsInfo[i]);
- v.add(proposal);
- }
- }
- return v;
- }
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/IContext.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/IContext.java
deleted file mode 100644
index 7b506f887ca..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/IContext.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - customization for Parameter
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.parameterlabel;
-
-/**
- *
- */
-public abstract interface IContext {
-
- /**
- *
- */
- public static final int DEFAULT = 0;
-
- /**
- *
- */
- public static final int VISIBILITY = 1;
-
- /**
- *
- */
- public static final int DIRECTION = 2;
-
- /**
- *
- */
- public static final int NAME = 3;
-
- /**
- *
- */
- public static final int AFTER_COLON = 4;
-
- /**
- *
- */
- public static final int PARAMETER_TYPE = 5;
-
- /**
- *
- */
- public static final int MULTIPLICITY = 6;
-
- /**
- *
- */
- public static final int DEFAULT_VALUE = 7;
-
- /**
- *
- */
- public static final int PARAMETER_MODIFIERS = 8;
-
- /**
- *
- */
- public static final int PARAMETER_MODIFIER = 9;
-
- /**
- *
- */
- public static final int IN_MULTIPLICITY = 10;
-
- /**
- *
- */
- public static final int AFTER_MULTIPLICITY = 11;
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/IParameterLabelColorConstants.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/IParameterLabelColorConstants.java
deleted file mode 100644
index 9d54b75f77c..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/IParameterLabelColorConstants.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - customization for Parameter
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.parameterlabel;
-
-import org.eclipse.swt.graphics.RGB;
-
-/**
- * Used colors constants definitions.
- */
-public interface IParameterLabelColorConstants {
-
- /** DEFAULT definition */
- public final String DEFAULT = "default";
-
- /** KEYWORD definition */
- public final String KEYWORD = "keyword";
-
- /** STRING definition */
- public final String STRING = "string";
-
- /** SYMBOL definition */
- public final String SYMBOL = "symbol";
-
- /** DEFAULT color value definition */
- public final RGB RGB_DEFAULT = new RGB(0, 0, 0);
-
- /** CONSTANT color value definition */
- public final RGB RGB_CONSTANT = new RGB(120, 120, 120);
-
- /** BACKGROUND color value definition */
- public final RGB RGB_BACKGROUND = new RGB(255, 255, 255);
-
- /** KEYWORD color value definition */
- public final RGB RGB_KEYWORD = new RGB(127, 0, 85);
-
- /** STRING color value definition */
- public final RGB RGB_STRING = new RGB(85, 200, 85);
-
- /** SYMBOL color value definition */
- public final RGB RGB_SYMBOL = new RGB(42, 0, 255);
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/ParameterConfigurationForUML.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/ParameterConfigurationForUML.java
deleted file mode 100644
index 111b83a23db..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/ParameterConfigurationForUML.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - customization for Parameter
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.parsers.texteditor.parameterlabel;
-
-import org.eclipse.jface.dialogs.IInputValidator;
-import org.eclipse.jface.text.source.SourceViewerConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.DefaultDirectEditorConfiguration;
-import org.eclipse.papyrus.parsers.modelgenerator.ParameterGenerator;
-import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil;
-import org.eclipse.papyrus.uml.tools.utils.ParameterUtil;
-import org.eclipse.uml2.uml.Parameter;
-
-/**
- * Configuration Class for the direct edition of a UML property
- */
-public class ParameterConfigurationForUML extends DefaultDirectEditorConfiguration {
-
- /** Configuration of the source viewer */
- final private ParameterLabelSourceViewerConfiguration configuration;
-
- /**
- * Creates a new ParameterConfigurationForUML.
- */
- public ParameterConfigurationForUML() {
- configuration = new ParameterLabelSourceViewerConfiguration();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public SourceViewerConfiguration getSourceViewerConfiguration() {
- return configuration;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String getTextToEdit(Object editedObject) {
- if (editedObject instanceof Parameter) {
- return ParameterUtil.getLabel((Parameter) editedObject);
- }
- return "not a Parameter";
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Object preEditAction(Object objectToEdit) {
- if (objectToEdit instanceof Parameter) {
- configuration.setParameter((Parameter) objectToEdit);
- }
- return super.preEditAction(objectToEdit);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Object postEditAction(Object editedObject, String text) {
- // Should undo the various creations done in the property edition
- // (template binding, etc...)
- if (editedObject instanceof Parameter) {
- ParameterGenerator generator = new ParameterGenerator(((Parameter) editedObject));
- generator.parseAndModifyParameter(text);
- }
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public IInputValidator getInputValidator() {
- return new IInputValidator() {
-
- public String isValid(String newText) {
- if (getObjectToEdit() instanceof Parameter) {
- ParameterGenerator generator = new ParameterGenerator(((Parameter) getObjectToEdit()));
- return generator.parseAndValidateParameter(newText);
- }
- return null;
- }
- };
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Selection getTextSelection(String value, Object editedObject) {
- if (editedObject instanceof Parameter) {
- Parameter parameter = (Parameter) editedObject;
- String name = NamedElementUtil.getName(parameter);
- int start = value.indexOf(name);
- int length = name.length();
- return new Selection(start, length);
- }
- return super.getTextSelection(value, editedObject);
- }
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/ParameterLabelColorProvider.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/ParameterLabelColorProvider.java
deleted file mode 100644
index c7582007e13..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/ParameterLabelColorProvider.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - customization for Parameter
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.parsers.texteditor.parameterlabel;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.papyrus.parsers.PapyrusParsersPlugin;
-import org.eclipse.papyrus.parsers.preferences.IPreferencesConstants;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.swt.widgets.Display;
-
-/**
- * Color provider to syntax highlight.
- */
-public class ParameterLabelColorProvider implements IParameterLabelColorConstants {
-
- /** Default instance */
- private static ParameterLabelColorProvider instance;
-
- /** Default constructor */
- private ParameterLabelColorProvider() {
- }
-
- /**
- * Get singleton instance
- *
- * @return the default instance
- */
- public static ParameterLabelColorProvider getDefault() {
- if (instance == null) {
- instance = new ParameterLabelColorProvider();
- }
- return instance;
- }
-
- /** Used color table */
- protected Map<String, Color> fColorTable = new HashMap<String, Color>(10);
-
- /**
- * Set default colors in given preference store.
- *
- * @param aStore
- * the preference store
- */
- public static void initializeDefaults(IPreferenceStore aStore) {
- PreferenceConverter.setDefault(aStore, IPreferencesConstants.COLOR_DEFAULT, IParameterLabelColorConstants.RGB_DEFAULT);
- PreferenceConverter.setDefault(aStore, IPreferencesConstants.COLOR_KEYWORD, IParameterLabelColorConstants.RGB_KEYWORD);
- PreferenceConverter.setDefault(aStore, IPreferencesConstants.COLOR_STRING, IParameterLabelColorConstants.RGB_STRING);
- PreferenceConverter.setDefault(aStore, IPreferencesConstants.COLOR_SYMBOL, IParameterLabelColorConstants.RGB_SYMBOL);
- }
-
- /**
- * Returns specified color that is stored in the color table. If color not found in color table
- * then a new instance is created from according preferences value and stored in color table.
- *
- * @param aName
- * the name of the color
- *
- * @return the color instance
- */
- public Color getColor(String aName) {
-
- Color color = fColorTable.get(aName);
- if (color == null) {
- IPreferenceStore store = PapyrusParsersPlugin.getDefault().getPreferenceStore();
-
- PreferenceConverter.setValue(store, IPreferencesConstants.COLOR_SYMBOL, IParameterLabelColorConstants.RGB_SYMBOL);
-
- RGB rgb = PreferenceConverter.getColor(store, IPreferencesConstants.PREFIX_COLOR + aName);
- if (rgb != null) {
- color = new Color(Display.getCurrent(), rgb);
- } else {
- color = Display.getCurrent().getSystemColor(SWT.COLOR_LIST_FOREGROUND);
- PapyrusParsersPlugin.logError("Undefined color '" + aName + "'");
- }
- fColorTable.put(aName, color);
- }
- return color;
- }
-
- /**
- * Release all of the color resources held onto by the color provider.
- */
- public void dispose() {
- Iterator<Color> colors = fColorTable.values().iterator();
- while (colors.hasNext()) {
- colors.next().dispose();
- }
- }
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/ParameterLabelCompletionProcessor.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/ParameterLabelCompletionProcessor.java
deleted file mode 100644
index fd143ac9f45..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/ParameterLabelCompletionProcessor.java
+++ /dev/null
@@ -1,249 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - customization for Parameter
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.parameterlabel;
-
-import java.util.Collection;
-import java.util.Map;
-import java.util.Vector;
-
-import org.antlr.runtime.ANTLRStringStream;
-import org.antlr.runtime.CommonTokenStream;
-import org.antlr.runtime.RecognitionException;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.papyrus.parsers.antlr.ParameterLabelLexer;
-import org.eclipse.papyrus.parsers.antlr.ParameterLabelParser;
-import org.eclipse.papyrus.parsers.texteditor.CompletionFilterSourceViewerConfiguration;
-import org.eclipse.papyrus.parsers.texteditor.CompletionFilterSourceViewerConfiguration.ICompletionFilter;
-import org.eclipse.papyrus.parsers.texteditor.LabelCompletionProcessor;
-import org.eclipse.papyrus.parsers.texteditor.completionproposals.DefaultValueCompletionProposal;
-import org.eclipse.papyrus.parsers.texteditor.completionproposals.DirectionCompletionProposal;
-import org.eclipse.papyrus.parsers.texteditor.completionproposals.MultiplicityCompletionProposal;
-import org.eclipse.papyrus.parsers.texteditor.completionproposals.NameCompletionProposal;
-import org.eclipse.papyrus.parsers.texteditor.completionproposals.ParameterModifierProposal;
-import org.eclipse.papyrus.parsers.texteditor.completionproposals.ParameterModifiersProposal;
-import org.eclipse.papyrus.parsers.texteditor.completionproposals.TypeCompletionProposalComputer;
-import org.eclipse.papyrus.parsers.texteditor.completionproposals.VisibilityCompletionProposal;
-import org.eclipse.papyrus.parsers.util.SimpleStringErrorReporter;
-import org.eclipse.uml2.uml.Parameter;
-
-/**
- * Completion processor for action language. <BR>
- * Main class to process the different completions given by the texteditor to its user
- *
- * @author Remi SCHNEKENBURGER
- * @see org.eclipse.jface.text.templates.TemplateCompletionProcessor
- * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor
- * @see com.cea.actionlanguage.sharedresources.texteditor.IPropertyLabelKeywords
- */
-public class ParameterLabelCompletionProcessor extends LabelCompletionProcessor implements IContext {
-
- /** The completion filter. */
- private final ICompletionFilter completionFilter;
-
- /** The {@link Parameter} to modify */
- private Parameter parameter;
-
- /** The modifiers used. */
- private Map<String, Boolean> modifiersUsed;
-
- /**
- * Constructor
- *
- * @param parameter
- * the parsed {@link Parameter}
- */
- public ParameterLabelCompletionProcessor(Parameter parameter) {
- this.parameter = parameter;
- this.completionFilter = new CompletionFilterSourceViewerConfiguration.NullCompletionFilter();
- }
-
- /**
- * The Constructor.
- *
- * @param property
- * the property
- * @param iCompletionFilter
- * the i completion filter
- */
- public ParameterLabelCompletionProcessor(Parameter parameter, ICompletionFilter iCompletionFilter) {
- this.parameter = parameter;
- this.completionFilter = iCompletionFilter;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.cea.papyrus.classdiagram.parsers.texteditor.LabelCompletionProcessor
- * #computeCompletionProposals(org.eclipse.jface.text.ITextViewer, int)
- */
- /**
- * This method computes completion proposal for currently edited Parameter label.
- *
- * @param viewer
- * @param documentOffset
- *
- * @return completion proposals
- */
- @Override
- public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int documentOffset) {
- String text;
- String prefix = "";
- ParameterLabelLexer lexer = null;
- ParameterLabelParser parser = null;
- Collection<ICompletionProposal> result = null;
- int selectionRange = 0;
-
- try {
- text = viewer.getDocument().get(0, documentOffset);
- lexer = new ParameterLabelLexer(new ANTLRStringStream(text));
- CommonTokenStream tokens = new CommonTokenStream(lexer);
-
- parser = new ParameterLabelParser(tokens, parameter, new SimpleStringErrorReporter());
- parser.setValidation(true);
- selectionRange = viewer.getSelectedRange().y;
- parser.label();
- modifiersUsed = parser.getModifiersUsed();
- result = computeCompletions(viewer, parser.getContext(), documentOffset, selectionRange);
- } catch (BadLocationException e) {
- e.printStackTrace();
- } catch (RuntimeException e) {
- modifiersUsed = parser.getModifiersUsed();
- prefix = getPrefix(viewer, documentOffset);
- result = computeCompletions(viewer, parser.getContext(), documentOffset, selectionRange);
- } catch (RecognitionException e) {
- modifiersUsed = parser.getModifiersUsed();
- prefix = getPrefix(viewer, documentOffset);
- result = computeCompletions(viewer, parser.getContext(), documentOffset, selectionRange);
- }
-
- return result.toArray(new ICompletionProposal[] {});
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.cea.papyrus.classdiagram.parsers.texteditor.LabelCompletionProcessor
- * #computeCompletions(org.eclipse.jface.text.ITextViewer, int, int, int)
- */
- /**
- * Compute completion possibilities depending on existing edited label (prefix, it may not be
- * complete).
- *
- * @param viewer
- * @param selectionRange
- * @param context
- * @param documentOffset
- *
- * @return
- */
- @Override
- public Collection<ICompletionProposal> computeCompletions(ITextViewer viewer, int context, int documentOffset, int selectionRange) {
- Vector<ICompletionProposal> v = new Vector<ICompletionProposal>();
- ParameterModifierProposal modifierProposalComputer = new ParameterModifierProposal();
- modifierProposalComputer.setModifiersUsed(modifiersUsed);
-
- String prefix = getPrefix(viewer, documentOffset);
- switch (context) {
-
- // DEFAULT : visibility or direction or name
- case IContext.DEFAULT:
- v.addAll(new VisibilityCompletionProposal().generateCompletionProposals(documentOffset, selectionRange, prefix));
- v.addAll(new DirectionCompletionProposal().generateCompletionProposals(documentOffset, selectionRange, prefix));
- v.addAll(new NameCompletionProposal().generateCompletionProposals(documentOffset, selectionRange, prefix));
- break;
-
- // VISIBILITY : direction or name
- case IContext.VISIBILITY:
- v.addAll(new DirectionCompletionProposal().generateCompletionProposals(documentOffset, selectionRange, prefix));
- v.addAll(new NameCompletionProposal().generateCompletionProposals(documentOffset, selectionRange, prefix));
- break;
-
- // DIRECTION : name
- case IContext.DIRECTION:
- v.addAll(new NameCompletionProposal().generateCompletionProposals(documentOffset, selectionRange, prefix));
- break;
-
- // NAME: either ':' or ":undefined"
- case IContext.NAME:
- v.addAll(createCompletionProposalsWithDifferentName(new String[] { ": ", ": <Undefined>" }, new String[] { "Parameter type", "Undefined Parameter type" }, new String[] { ": <Type Name>", ": <Undefined>" }, "", documentOffset));
- break;
-
- // PROPERTY TYPE (after ":") model types or undefined
- case IContext.AFTER_COLON:
- // create properties visible in the model
- // specific prefix for type... ('<' possible at the beginning)
- prefix = getPrefixForType(viewer, documentOffset);
- // generate completion for TypeUtil
- TypeCompletionProposalComputer computer = new TypeCompletionProposalComputer(completionFilter, IContext.AFTER_COLON);
- computer.setElement(parameter);
- v.addAll(computer.generateCompletionProposals(documentOffset, selectionRange, prefix));
- break;
-
- // MULTIPLICITY: multiplicity or default value or property modifiers
- case IContext.PARAMETER_TYPE:
- // specific prefix for type... ('<' possible at the beginning)
- prefix = getPrefixForType(viewer, documentOffset);
- computer = new TypeCompletionProposalComputer(completionFilter, IContext.PARAMETER_TYPE);
- computer.setElement(parameter);
- v.addAll(computer.generateCompletionProposals(documentOffset, selectionRange, prefix));
- break;
-
- // IN_MULTIPLICITY(after '['): does nothing
- case IContext.MULTIPLICITY:
- // create properties visible in the model
- // specific prefix for type... ('<' possible at the beginning)
- prefix = getPrefixForType(viewer, documentOffset);
- // generate completion for TypeUtil
- computer = new TypeCompletionProposalComputer(completionFilter, IContext.AFTER_COLON);
- computer.setElement(parameter);
- v.addAll(computer.generateCompletionProposals(documentOffset, selectionRange, prefix));
- v.addAll(new MultiplicityCompletionProposal().generateCompletionProposals(documentOffset, selectionRange, prefix));
- v.addAll(new DefaultValueCompletionProposal().generateCompletionProposals(documentOffset, selectionRange, prefix));
- v.addAll(new ParameterModifiersProposal().generateCompletionProposals(documentOffset, selectionRange, prefix));
- break;
-
- // : default value or property modifiers
- case IContext.IN_MULTIPLICITY:
- prefix = getPrefixForMultiplicity(viewer, documentOffset);
- v.addAll(new MultiplicityCompletionProposal().generateCompletionProposals(documentOffset, selectionRange, prefix));
- break;
-
- // AFTER_MULTIPLICITY(after ']')
- case IContext.AFTER_MULTIPLICITY:
- v.addAll(new DefaultValueCompletionProposal().generateCompletionProposals(documentOffset, selectionRange, prefix));
- v.addAll(new ParameterModifiersProposal().generateCompletionProposals(documentOffset, selectionRange, prefix));
- break;
-
- // DEFAULT_VALUE: property modifiers
- case IContext.DEFAULT_VALUE:
- v.addAll(new ParameterModifiersProposal().generateCompletionProposals(documentOffset, selectionRange, prefix));
- break;
-
- case IContext.PARAMETER_MODIFIERS:
- v.addAll(modifierProposalComputer.generateCompletionProposals(documentOffset, selectionRange, prefix));
- break;
-
- case IContext.PARAMETER_MODIFIER:
- v.addAll(modifierProposalComputer.generateCompletionProposals(documentOffset, selectionRange, prefix));
- break;
- default:
- break;
- }
-
- return v;
- }
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/ParameterLabelPartitionScanner.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/ParameterLabelPartitionScanner.java
deleted file mode 100644
index 6ecc5be5846..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/ParameterLabelPartitionScanner.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - customization for Parameter
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.parameterlabel;
-
-import org.eclipse.jface.text.rules.IPredicateRule;
-import org.eclipse.jface.text.rules.IToken;
-import org.eclipse.jface.text.rules.MultiLineRule;
-import org.eclipse.jface.text.rules.RuleBasedPartitionScanner;
-import org.eclipse.jface.text.rules.Token;
-
-/**
- * Scanner that splits document into several parts<BR>
- * Two different rules at this time :
- * <ul>
- * <li>RTACTION_STRING</li>
- * <li>Multi line comment</li>
- * </ul>
- * .
- *
- * @author Remi SCHNEKENBURGER
- * @see org.eclipse.jface.text.rules.RuleBasedPartitionScanner
- */
-public class ParameterLabelPartitionScanner extends RuleBasedPartitionScanner {
-
- /**
- *
- */
- public static final String PARAMETER_MODIFIERS_STRING = "_rt_action_string";
-
- /**
- * Creates a partition scanner dedicated to the action language.
- */
- public ParameterLabelPartitionScanner() {
- IToken tagString = new Token(PARAMETER_MODIFIERS_STRING);
- IPredicateRule[] rules = new IPredicateRule[1];
- rules[0] = new MultiLineRule("{", "}", tagString, (char) 0, true);
- setPredicateRules(rules);
- }
-
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/ParameterLabelScanner.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/ParameterLabelScanner.java
deleted file mode 100644
index 7e483ac186e..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/ParameterLabelScanner.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - customization for Parameter
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.parameterlabel;
-
-import org.eclipse.jface.text.TextAttribute;
-import org.eclipse.jface.text.rules.IRule;
-import org.eclipse.jface.text.rules.IToken;
-import org.eclipse.jface.text.rules.RuleBasedScanner;
-import org.eclipse.jface.text.rules.Token;
-import org.eclipse.jface.text.rules.WhitespaceRule;
-import org.eclipse.jface.text.rules.WordRule;
-import org.eclipse.papyrus.parsers.texteditor.WhitespaceDetector;
-import org.eclipse.papyrus.parsers.texteditor.completionproposals.ParameterModifierProposal;
-import org.eclipse.papyrus.parsers.texteditor.completionproposals.VisibilityCompletionProposal;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * Scanner for the action language.<BR>
- * It implements the interface IALKeywords, which contains the different keywords available in the
- * action language
- *
- * @author Remi SCHNEKENBURGER
- * @see org.eclipse.jface.text.rules.RuleBasedScanner
- * @see com.cea.actionlanguage.sharedresources.texteditor.IRTActionKeywords
- */
-public class ParameterLabelScanner extends RuleBasedScanner implements IParameterLabelColorConstants {
-
- /** Color for the default token */
- private Color defaultColor;
-
- /** Color for keywords */
- private Color keywordColor;
-
- /** Color for special chars */
- private Color symbolColor;
-
- /**
- * Creates a new rule based scanner.
- */
- public ParameterLabelScanner() {
- defaultColor = ParameterLabelColorProvider.getDefault().getColor(DEFAULT);
- keywordColor = ParameterLabelColorProvider.getDefault().getColor(KEYWORD);
- symbolColor = ParameterLabelColorProvider.getDefault().getColor(SYMBOL);
-
- IToken other = new Token(new TextAttribute(defaultColor));
- IToken keyword = new Token(new TextAttribute(keywordColor, null, SWT.BOLD));
- IToken symbol = new Token(new TextAttribute(symbolColor, null, SWT.BOLD));
-
- IRule[] rules = new IRule[2];
-
- WordRule wordRule = new WordRule(new ParameterWordDetector(), other);
- for (int i = 0; i < VisibilityCompletionProposal.visibilityStrings.length; i++) {
- // wordRule.addWord(getWordWithoutQuotes(visibilityStrings[i]), keyword);
- }
-
- for (int i = 0; i < ParameterModifierProposal.modifiersStrings.length; i++) {
- wordRule.addWord(ParameterModifierProposal.modifiersStrings[i].trim(), keyword);
- }
-
- wordRule.addWord("+", symbol);
- wordRule.addWord("-", symbol);
- wordRule.addWord("#", symbol);
- wordRule.addWord("~", symbol);
- wordRule.addWord("/", symbol);
- wordRule.addWord("+/", symbol);
- wordRule.addWord("-/", symbol);
- wordRule.addWord("#/", symbol);
- wordRule.addWord(":", symbol);
- wordRule.addWord("in", symbol);
- wordRule.addWord("out", symbol);
- wordRule.addWord("inout", symbol);
- wordRule.addWord("return", symbol);
-
- rules[0] = wordRule;
- rules[1] = new WhitespaceRule(new WhitespaceDetector());
-
- setRules(rules);
- }
-
- /**
- * returns the word for the scanner, without quotes.
- *
- * @param word
- *
- * @return
- */
- public static String getWordWithoutQuotes(String word) {
- String tmp = "";
- tmp = word.replaceAll("'", "");
- return tmp;
- }
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/ParameterLabelSourceViewerConfiguration.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/ParameterLabelSourceViewerConfiguration.java
deleted file mode 100644
index b750c7799fc..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/ParameterLabelSourceViewerConfiguration.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - customization for Parameter
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.parameterlabel;
-
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.TextAttribute;
-import org.eclipse.jface.text.contentassist.ContentAssistant;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.text.contentassist.IContentAssistant;
-import org.eclipse.jface.text.presentation.IPresentationReconciler;
-import org.eclipse.jface.text.presentation.PresentationReconciler;
-import org.eclipse.jface.text.rules.BufferedRuleBasedScanner;
-import org.eclipse.jface.text.rules.DefaultDamagerRepairer;
-import org.eclipse.jface.text.rules.Token;
-import org.eclipse.jface.text.source.ISourceViewer;
-import org.eclipse.papyrus.parsers.texteditor.CompletionFilterSourceViewerConfiguration;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.uml2.uml.Parameter;
-
-/**
- * This class bundles the configuration space of the action language source viewer. Instances of
- * this class are passed to the configure method of <code>SourceViewer</code>.
- *
- * @see org.eclipse.jface.text.source.SourceViewerConfiguration
- */
-public class ParameterLabelSourceViewerConfiguration extends CompletionFilterSourceViewerConfiguration {
-
- /** Edited {@link Parameter} */
- private Parameter parameter;
-
- /**
- * Creates a new ParameterLabelSourceViewerConfiguration
- *
- * @param parameter
- * the {@link Parameter} to edit
- */
- public ParameterLabelSourceViewerConfiguration(Parameter parameter) {
- super(null);
- setParameter(parameter);
- }
-
- /**
- * Creates a new ParameterLabelSourceViewerConfiguration
- */
- public ParameterLabelSourceViewerConfiguration() {
- this(null, null);
- }
-
- /**
- * Instantiates a new property label source viewer configuration.
- *
- * @param property
- * the property
- * @param filter
- * the filter
- */
- public ParameterLabelSourceViewerConfiguration(Parameter parameter, ICompletionFilter filter) {
- super(filter);
- setParameter(parameter);
- }
-
- /**
- * @param filter
- */
- public ParameterLabelSourceViewerConfiguration(ICompletionFilter filter) {
- this(null, filter);
- }
-
- /**
- * Token scanner
- */
- static class SingleTokenScanner extends BufferedRuleBasedScanner {
-
- /**
- * Constructor
- *
- * @param attribute
- */
- public SingleTokenScanner(TextAttribute attribute) {
- setDefaultReturnToken(new Token(attribute));
- }
- };
-
- /**
- * {@inheritDoc}
- */
- @Override
- public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {
- PresentationReconciler reconciler = new PresentationReconciler();
-
- // creating damager/repairer for single line comments
- Color colorString = ParameterLabelColorProvider.getDefault().getColor(IParameterLabelColorConstants.STRING);
- DefaultDamagerRepairer dr = new DefaultDamagerRepairer(new SingleTokenScanner(new TextAttribute(colorString)));
-
- reconciler.setDamager(dr, ParameterLabelPartitionScanner.PARAMETER_MODIFIERS_STRING);
- reconciler.setRepairer(dr, ParameterLabelPartitionScanner.PARAMETER_MODIFIERS_STRING);
-
- // creating damager/repairer for other zones (action language zone)
- dr = new DefaultDamagerRepairer(new ParameterLabelScanner());
- reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE);
- reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE);
-
- return reconciler;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {
- ContentAssistant assistant = new ContentAssistant();
-
- IContentAssistProcessor processor = new ParameterLabelCompletionProcessor(parameter, getFilter());
- assistant.setContentAssistProcessor(processor, IDocument.DEFAULT_CONTENT_TYPE);
-
- // IInformationControlCreator
- assistant.setInformationControlCreator(getInformationControlCreator(sourceViewer));
-
- assistant.enableAutoActivation(true);
- assistant.setAutoActivationDelay(500);
-
- return assistant;
- }
-
- /**
- * Returns the edited {@link Parameter}
- *
- * @return the {@link Parameter} to edit
- */
- public Parameter getParameter() {
- return parameter;
- }
-
- /**
- * Sets the {@link Parameter} to Edit
- *
- * @param collaborationUse
- * the {@link Parameter} to edit
- */
- public void setParameter(Parameter parameter) {
- this.parameter = parameter;
- }
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/ParameterWordDetector.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/ParameterWordDetector.java
deleted file mode 100644
index 43ed392d051..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/ParameterWordDetector.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - customization for Parameter
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.parameterlabel;
-
-import org.eclipse.jface.text.rules.IWordDetector;
-
-/**
- * Basic word detector for the scanner.<BR>
- *
- * @author Remi SCHNEKENBURGER
- * @see org.eclipse.jface.text.rules.IWordDetector
- */
-public class ParameterWordDetector implements IWordDetector {
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.text.rules.IWordDetector#isWordPart(char)
- */
- /**
- *
- *
- * @param character
- *
- * @return
- */
- public boolean isWordPart(char character) {
- Character ch = Character.valueOf(character);
-
- if (ch.compareTo('+') == 0) {
- return true;
- } else if (ch.compareTo('-') == 0) {
- return true;
- } else if (ch.compareTo('#') == 0) {
- return true;
- } else if (ch.compareTo('~') == 0) {
- return true;
- } else if (ch.compareTo('/') == 0) {
- return true;
- } else if (ch.compareTo(':') == 0) {
- return true;
- }
-
- return Character.isLetter(character);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.text.rules.IWordDetector#isWordStart(char)
- */
- /**
- *
- *
- * @param character
- *
- * @return
- */
- public boolean isWordStart(char character) {
- Character ch = Character.valueOf(character);
-
- if (ch.compareTo('+') == 0) {
- return true;
- } else if (ch.compareTo('-') == 0) {
- return true;
- } else if (ch.compareTo('#') == 0) {
- return true;
- } else if (ch.compareTo('~') == 0) {
- return true;
- } else if (ch.compareTo('/') == 0) {
- return true;
- } else if (ch.compareTo(':') == 0) {
- return true;
- }
- return Character.isLetter(character);
- }
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/IContext.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/IContext.java
deleted file mode 100644
index d60aece9c52..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/IContext.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.propertylabel;
-
-/**
- *
- */
-public abstract interface IContext {
-
- /**
- *
- */
- public static final int DEFAULT = 0;
-
- /**
- *
- */
- public static final int VISIBILITY = 1;
-
- /**
- *
- */
- public static final int IS_DERIVED = 2;
-
- /**
- *
- */
- public static final int NAME = 3;
-
- /**
- *
- */
- public static final int AFTER_COLON = 4;
-
- /**
- *
- */
- public static final int PROPERTY_TYPE = 5;
-
- /**
- *
- */
- public static final int MULTIPLICITY = 6;
-
- /**
- *
- */
- public static final int DEFAULT_VALUE = 7;
-
- /**
- *
- */
- public static final int PROPERTY_MODIFIERS = 8;
-
- /**
- *
- */
- public static final int PROPERTY_MODIFIER = 9;
-
- /**
- *
- */
- public static final int IN_MULTIPLICITY = 10;
-
- /**
- *
- */
- public static final int SUBSET_PROPERTY = 11;
-
- /**
- *
- */
- public static final int REDEFINE_PROPERTY = 12;
-
- /**
- *
- */
- public static final int AFTER_MULTIPLICITY = 13;
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/IPropertyLabelColorConstants.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/IPropertyLabelColorConstants.java
deleted file mode 100644
index 84a231bc9e7..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/IPropertyLabelColorConstants.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.propertylabel;
-
-import org.eclipse.swt.graphics.RGB;
-
-/**
- *
- */
-public interface IPropertyLabelColorConstants {
-
- /**
- *
- */
- public final String DEFAULT = "default";
-
- /**
- *
- */
- public final String KEYWORD = "keyword";
-
- /**
- *
- */
- public final String STRING = "string";
-
- /**
- *
- */
- public final String SYMBOL = "symbol";
-
- /**
- *
- */
- public final RGB RGB_DEFAULT = new RGB(0, 0, 0);
-
- /**
- *
- */
- public final RGB RGB_CONSTANT = new RGB(120, 120, 120);
-
- /**
- *
- */
- public final RGB RGB_BACKGROUND = new RGB(255, 255, 255);
-
- /**
- *
- */
- public final RGB RGB_KEYWORD = new RGB(127, 0, 85);
-
- /**
- *
- */
- public final RGB RGB_STRING = new RGB(85, 200, 85);
-
- /**
- *
- */
- public final RGB RGB_SYMBOL = new RGB(42, 0, 255);
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyConfigurationForUML.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyConfigurationForUML.java
deleted file mode 100644
index bc02792a89f..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyConfigurationForUML.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.parsers.texteditor.propertylabel;
-
-import org.eclipse.jface.dialogs.IInputValidator;
-import org.eclipse.jface.text.source.SourceViewerConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.DefaultDirectEditorConfiguration;
-import org.eclipse.papyrus.parsers.modelgenerator.PropertyGenerator;
-import org.eclipse.papyrus.uml.tools.utils.PropertyUtil;
-import org.eclipse.uml2.uml.Property;
-
-/**
- * Configuration Class for the direct edition of a UML property
- */
-public class PropertyConfigurationForUML extends DefaultDirectEditorConfiguration {
-
- /** configuration of the source viewer */
- final private PropertyLabelSourceViewerConfiguration configuration;
-
- /**
- * Creates a new PropertyConfigurationForUML.
- */
- public PropertyConfigurationForUML() {
- configuration = new PropertyLabelSourceViewerConfiguration();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public SourceViewerConfiguration getSourceViewerConfiguration() {
- return configuration;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String getTextToEdit(Object editedObject) {
- if (editedObject instanceof Property) {
- return PropertyUtil.getLabel((Property) editedObject);
- }
- return "not a Property";
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Object preEditAction(Object objectToEdit) {
- if (objectToEdit instanceof Property) {
- configuration.setProperty((Property) objectToEdit);
- }
- return super.preEditAction(objectToEdit);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Object postEditAction(Object editedObject, String text) {
- // should undo the various creations done in the property edition
- // (template binding, etc...)
- if (editedObject instanceof Property) {
- PropertyGenerator generator = new PropertyGenerator(((Property) editedObject));
- generator.parseAndModifyProperty(text);
- }
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public IInputValidator getInputValidator() {
- return new IInputValidator() {
-
- public String isValid(String newText) {
- if (getObjectToEdit() instanceof Property) {
- PropertyGenerator generator = new PropertyGenerator(((Property) getObjectToEdit()));
- return generator.parseAndValidateProperty(newText);
- }
- return null;
- }
- };
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Selection getTextSelection(String value, Object editedObject) {
- if (editedObject instanceof Property) {
- Property property = (Property) editedObject;
- String name = PropertyUtil.getName(property);
- int start = value.indexOf(name);
- int length = name.length();
- return new Selection(start, length);
- }
- return super.getTextSelection(value, editedObject);
- }
-
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyLabelColorProvider.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyLabelColorProvider.java
deleted file mode 100644
index 951ca7c9b53..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyLabelColorProvider.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.propertylabel;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.papyrus.parsers.PapyrusParsersPlugin;
-import org.eclipse.papyrus.parsers.preferences.IPreferencesConstants;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.swt.widgets.Display;
-
-/**
- * Color provider to syntax highlight.
- */
-public class PropertyLabelColorProvider implements IPropertyLabelColorConstants {
-
- /**
- *
- */
- private static PropertyLabelColorProvider instance;
-
- /**
- *
- */
- private PropertyLabelColorProvider() {
- }
-
- /**
- *
- *
- * @return
- */
- public static PropertyLabelColorProvider getDefault() {
- if (instance == null) {
- instance = new PropertyLabelColorProvider();
- }
- return instance;
- }
-
- /**
- *
- */
- protected Map<String, Color> fColorTable = new HashMap<String, Color>(10);
-
- /**
- * Set default colors in given preference store.
- *
- * @param aStore
- * the pref store
- */
- public static void initializeDefaults(IPreferenceStore aStore) {
- PreferenceConverter.setDefault(aStore, IPreferencesConstants.COLOR_DEFAULT,
- IPropertyLabelColorConstants.RGB_DEFAULT);
- PreferenceConverter.setDefault(aStore, IPreferencesConstants.COLOR_KEYWORD,
- IPropertyLabelColorConstants.RGB_KEYWORD);
- PreferenceConverter.setDefault(aStore, IPreferencesConstants.COLOR_STRING,
- IPropertyLabelColorConstants.RGB_STRING);
- PreferenceConverter.setDefault(aStore, IPreferencesConstants.COLOR_SYMBOL,
- IPropertyLabelColorConstants.RGB_SYMBOL);
- }
-
- /**
- * Returns specified color that is stored in the color table. If color not found in color table
- * then a new instance is created from according preferences value and stored in color table.
- *
- * @param aName
- * the name of the color
- *
- * @return the color instance
- */
- public Color getColor(String aName) {
-
- Color color = fColorTable.get(aName);
- if (color == null) {
- IPreferenceStore store = PapyrusParsersPlugin.getDefault().getPreferenceStore();
-
- // PreferenceConverter.setValue(store, IPreferencesConstants.COLOR_KEYWORD,
- // ILabelColorConstants.RGB_KEYWORD);
- PreferenceConverter.setValue(store, IPreferencesConstants.COLOR_SYMBOL,
- IPropertyLabelColorConstants.RGB_SYMBOL);
-
- RGB rgb = PreferenceConverter.getColor(store, IPreferencesConstants.PREFIX_COLOR + aName);
- if (rgb != null) {
- color = new Color(Display.getCurrent(), rgb);
- } else {
- color = Display.getCurrent().getSystemColor(SWT.COLOR_LIST_FOREGROUND);
- PapyrusParsersPlugin.logError("Undefined color '" + aName + "'");
- }
- fColorTable.put(aName, color);
- }
- return color;
- }
-
- /**
- * Release all of the color resources held onto by the color provider.
- */
- public void dispose() {
- Iterator colors = fColorTable.values().iterator();
- while (colors.hasNext()) {
- ((Color) colors.next()).dispose();
- }
- }
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyLabelCompletionProcessor.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyLabelCompletionProcessor.java
deleted file mode 100644
index a7dc09c6f74..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyLabelCompletionProcessor.java
+++ /dev/null
@@ -1,244 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.propertylabel;
-
-import java.util.Collection;
-import java.util.Map;
-import java.util.Vector;
-
-import org.antlr.runtime.ANTLRStringStream;
-import org.antlr.runtime.CommonTokenStream;
-import org.antlr.runtime.RecognitionException;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.papyrus.parsers.antlr.PropertyLabelLexer;
-import org.eclipse.papyrus.parsers.antlr.PropertyLabelParser;
-import org.eclipse.papyrus.parsers.texteditor.CompletionFilterSourceViewerConfiguration;
-import org.eclipse.papyrus.parsers.texteditor.CompletionFilterSourceViewerConfiguration.ICompletionFilter;
-import org.eclipse.papyrus.parsers.texteditor.LabelCompletionProcessor;
-import org.eclipse.papyrus.parsers.texteditor.completionproposals.DefaultValueCompletionProposal;
-import org.eclipse.papyrus.parsers.texteditor.completionproposals.DerivedPropertyCompletionProposal;
-import org.eclipse.papyrus.parsers.texteditor.completionproposals.MultiplicityCompletionProposal;
-import org.eclipse.papyrus.parsers.texteditor.completionproposals.NameCompletionProposal;
-import org.eclipse.papyrus.parsers.texteditor.completionproposals.PropertyModifierProposal;
-import org.eclipse.papyrus.parsers.texteditor.completionproposals.PropertyModifiersProposal;
-import org.eclipse.papyrus.parsers.texteditor.completionproposals.PropertyRedefineProposal;
-import org.eclipse.papyrus.parsers.texteditor.completionproposals.PropertySubsetsProposal;
-import org.eclipse.papyrus.parsers.texteditor.completionproposals.TypeCompletionProposalComputer;
-import org.eclipse.papyrus.parsers.texteditor.completionproposals.VisibilityCompletionProposal;
-import org.eclipse.papyrus.parsers.util.SimpleStringErrorReporter;
-import org.eclipse.uml2.uml.Property;
-
-/**
- * Completion processor for action language. <BR>
- * Main class to process the different completions given by the texteditor to its user
- *
- * @author Remi SCHNEKENBURGER
- * @see org.eclipse.jface.text.templates.TemplateCompletionProcessor
- * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor
- * @see com.cea.actionlanguage.sharedresources.texteditor.IPropertyLabelKeywords
- */
-public class PropertyLabelCompletionProcessor extends LabelCompletionProcessor implements IContext {
-
-
- /** The completion filter. */
- private final ICompletionFilter completionFilter;
-
- /** The filtered property */
- private Property property;
-
- /** The modifiers used. */
- private Map<String, Boolean> modifiersUsed;
-
- /**
- * Instantiates a new property label completion processor.
- *
- * @param property
- * the property
- */
- public PropertyLabelCompletionProcessor(Property property) {
- this.property = property;
- this.completionFilter = new CompletionFilterSourceViewerConfiguration.NullCompletionFilter();
- }
-
- /**
- * The Constructor.
- *
- * @param property
- * the property
- * @param iCompletionFilter
- * the i completion filter
- */
- public PropertyLabelCompletionProcessor(Property property, ICompletionFilter iCompletionFilter) {
- this.property = property;
- this.completionFilter = iCompletionFilter;
- }
-
- /**
- * Compute completion proposals.
- *
- * @param viewer
- * the viewer
- * @param documentOffset
- * the document offset
- *
- * @return the i completion proposal[]
- */
- @Override
- public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int documentOffset) {
- String text;
- String prefix = "";
- PropertyLabelLexer lexer = null;
- PropertyLabelParser parser = null;
- Collection<ICompletionProposal> result = null;
- int selectionRange = 0;
-
- try {
- text = viewer.getDocument().get(0, documentOffset);
- lexer = new PropertyLabelLexer(new ANTLRStringStream(text));
- CommonTokenStream tokens = new CommonTokenStream(lexer);
-
- parser = new PropertyLabelParser(tokens, property, new SimpleStringErrorReporter());
- parser.setValidation(true);
- selectionRange = viewer.getSelectedRange().y;
- parser.label();
- modifiersUsed = parser.getModifiersUsed();
- result = computeCompletions(viewer, parser.getContext(), documentOffset, selectionRange);
- } catch (BadLocationException e) {
- e.printStackTrace();
- } catch (RuntimeException e) {
- modifiersUsed = parser.getModifiersUsed();
- prefix = getPrefix(viewer, documentOffset);
- result = computeCompletions(viewer, parser.getContext(), documentOffset, selectionRange);
- } catch (RecognitionException e) {
- modifiersUsed = parser.getModifiersUsed();
- prefix = getPrefix(viewer, documentOffset);
- result = computeCompletions(viewer, parser.getContext(), documentOffset, selectionRange);
- }
-
- return result.toArray(new ICompletionProposal[] {});
- }
-
- /**
- * @see com.cea.papyrus.classdiagram.parsers.texteditor.LabelCompletionProcessor #computeCompletions(org.eclipse.jface.text.ITextViewer, int, int, int)
- */
-
- @Override
- public Collection<ICompletionProposal> computeCompletions(ITextViewer viewer, int context, int documentOffset, int selectionRange) {
- Vector<ICompletionProposal> v = new Vector<ICompletionProposal>();
- PropertyModifierProposal modifierProposalComputer = new PropertyModifierProposal();
- ;
- modifierProposalComputer.setModifiersUsed(modifiersUsed);
-
- String prefix = getPrefix(viewer, documentOffset);
- switch (context) {
-
- // DEFAULT : visibility, isDerived or name
- case IContext.DEFAULT:
- v.addAll(new VisibilityCompletionProposal().generateCompletionProposals(documentOffset, selectionRange, prefix));
- v.addAll(new DerivedPropertyCompletionProposal().generateCompletionProposals(documentOffset, selectionRange, prefix));
- v.addAll(new NameCompletionProposal().generateCompletionProposals(documentOffset, selectionRange, prefix));
- break;
-
- // VISIBILITY : isDerived or name
- case IContext.VISIBILITY:
- v.addAll(new DerivedPropertyCompletionProposal().generateCompletionProposals(documentOffset, selectionRange, prefix));
- v.addAll(new NameCompletionProposal().generateCompletionProposals(documentOffset, selectionRange, prefix));
- break;
-
- // IS_DERIVED: name
- case IContext.IS_DERIVED:
- v.addAll(new NameCompletionProposal().generateCompletionProposals(documentOffset, selectionRange, prefix));
- break;
-
- // NAME: either ':' or ":undefined"
- case IContext.NAME:
- v.addAll(createCompletionProposalsWithDifferentName(new String[] { ": ", ": <Undefined>" }, new String[] { "Property type", "Undefined property type" }, new String[] { ": <Type Name>", ": <Undefined>" }, "", documentOffset));
- break;
-
- // PROPERTY TYPE (after ":") model types or undefined
- case IContext.AFTER_COLON:
- // create properties visible in the model
- // specific prefix for type... ('<' possible at the beginning)
- prefix = getPrefixForType(viewer, documentOffset);
- // generate completion for TypeUtil
- TypeCompletionProposalComputer computer = new TypeCompletionProposalComputer(completionFilter, IContext.AFTER_COLON);
- computer.setElement(property);
- v.addAll(computer.generateCompletionProposals(documentOffset, selectionRange, prefix));
- break;
-
- // MULTIPLICITY: multiplicity or default value or property modifiers
- case IContext.PROPERTY_TYPE:
- // specific prefix for type... ('<' possible at the beginning)
- prefix = getPrefixForType(viewer, documentOffset);
- computer = new TypeCompletionProposalComputer(completionFilter, IContext.PROPERTY_TYPE);
- computer.setElement(property);
- v.addAll(computer.generateCompletionProposals(documentOffset, selectionRange, prefix));
- break;
-
- // IN_MULTIPLICITY(after '['): does nothing
- case IContext.MULTIPLICITY:
- // create properties visible in the model
- // specific prefix for type... ('<' possible at the beginning)
- prefix = getPrefixForType(viewer, documentOffset);
- // generate completion for TypeUtil
- computer = new TypeCompletionProposalComputer(completionFilter, IContext.AFTER_COLON);
- computer.setElement(property);
- v.addAll(computer.generateCompletionProposals(documentOffset, selectionRange, prefix));
- v.addAll(new MultiplicityCompletionProposal().generateCompletionProposals(documentOffset, selectionRange, prefix));
- v.addAll(new DefaultValueCompletionProposal().generateCompletionProposals(documentOffset, selectionRange, prefix));
- v.addAll(new PropertyModifiersProposal().generateCompletionProposals(documentOffset, selectionRange, prefix));
- break;
-
- // : default value or property modifiers
- case IContext.IN_MULTIPLICITY:
- prefix = getPrefixForMultiplicity(viewer, documentOffset);
- v.addAll(new MultiplicityCompletionProposal().generateCompletionProposals(documentOffset, selectionRange, prefix));
- break;
-
- // AFTER_MULTIPLICITY(after ']')
- case IContext.AFTER_MULTIPLICITY:
- v.addAll(new DefaultValueCompletionProposal().generateCompletionProposals(documentOffset, selectionRange, prefix));
- v.addAll(new PropertyModifiersProposal().generateCompletionProposals(documentOffset, selectionRange, prefix));
- break;
-
- // DEFAULT_VALUE: property modifiers
- case IContext.DEFAULT_VALUE:
- v.addAll(new PropertyModifiersProposal().generateCompletionProposals(documentOffset, selectionRange, prefix));
- break;
-
- case IContext.PROPERTY_MODIFIERS:
- v.addAll(modifierProposalComputer.generateCompletionProposals(documentOffset, selectionRange, prefix));
- break;
-
- case IContext.PROPERTY_MODIFIER:
- v.addAll(modifierProposalComputer.generateCompletionProposals(documentOffset, selectionRange, prefix));
- break;
-
- case IContext.SUBSET_PROPERTY:
- v.addAll(new PropertySubsetsProposal(property).generateCompletionProposals(documentOffset, selectionRange, prefix));
- break;
-
- case IContext.REDEFINE_PROPERTY:
- v.addAll(new PropertyRedefineProposal(property).generateCompletionProposals(documentOffset, selectionRange, prefix));
- break;
- default:
- break;
-
- }
- return v;
- }
-
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyLabelContextType.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyLabelContextType.java
deleted file mode 100644
index f4b10e65a86..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyLabelContextType.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.propertylabel;
-
-import org.eclipse.jface.text.templates.GlobalTemplateVariables;
-import org.eclipse.jface.text.templates.TemplateContextType;
-
-/**
- * A simple context type for PropertyUtil label.
- */
-public class PropertyLabelContextType extends TemplateContextType {
-
- /**
- * This context's id.
- */
- public static final String PROPERTYLABEL_CONTEXT_TYPE = "com.cea.papyrus.classdiagram.parsers.texteditor.propertylabel.type";
-
- /**
- * The constructor. Creates a new PROPERTY LABEL context type.
- */
- public PropertyLabelContextType() {
- addGlobalResolvers();
- }
-
- /**
- * adds a variable resolver to the context type.
- */
- private void addGlobalResolvers() {
- addResolver(new GlobalTemplateVariables.Cursor());
- addResolver(new GlobalTemplateVariables.WordSelection());
- addResolver(new GlobalTemplateVariables.LineSelection());
- addResolver(new GlobalTemplateVariables.Dollar());
- addResolver(new GlobalTemplateVariables.Date());
- addResolver(new GlobalTemplateVariables.Year());
- addResolver(new GlobalTemplateVariables.Time());
- addResolver(new GlobalTemplateVariables.User());
- }
-
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyLabelPartitionScanner.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyLabelPartitionScanner.java
deleted file mode 100644
index 1b0268e560f..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyLabelPartitionScanner.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.propertylabel;
-
-import org.eclipse.jface.text.rules.IPredicateRule;
-import org.eclipse.jface.text.rules.IToken;
-import org.eclipse.jface.text.rules.MultiLineRule;
-import org.eclipse.jface.text.rules.RuleBasedPartitionScanner;
-import org.eclipse.jface.text.rules.Token;
-
-/**
- * Scanner that splits document into several parts<BR>
- * Two different rules at this time :
- * <ul>
- * <li>RTACTION_STRING</li>
- * <li>Multi line comment</li>
- * </ul>
- * .
- *
- * @author Remi SCHNEKENBURGER
- * @see org.eclipse.jface.text.rules.RuleBasedPartitionScanner
- */
-public class PropertyLabelPartitionScanner extends RuleBasedPartitionScanner {
-
- /**
- *
- */
- public static final String PROPERTY_MODIFIERS_STRING = "_rt_action_string";
-
- /**
- * Creates a partition scanner dedicated to the action language.
- */
- public PropertyLabelPartitionScanner() {
- IToken tagString = new Token(PROPERTY_MODIFIERS_STRING);
- IPredicateRule[] rules = new IPredicateRule[1];
- rules[0] = new MultiLineRule("{", "}", tagString, (char) 0, true);
- setPredicateRules(rules);
- }
-
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyLabelScanner.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyLabelScanner.java
deleted file mode 100644
index abcc0fffb69..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyLabelScanner.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.propertylabel;
-
-import org.eclipse.jface.text.TextAttribute;
-import org.eclipse.jface.text.rules.IRule;
-import org.eclipse.jface.text.rules.IToken;
-import org.eclipse.jface.text.rules.RuleBasedScanner;
-import org.eclipse.jface.text.rules.Token;
-import org.eclipse.jface.text.rules.WhitespaceRule;
-import org.eclipse.jface.text.rules.WordRule;
-import org.eclipse.papyrus.parsers.texteditor.WhitespaceDetector;
-import org.eclipse.papyrus.parsers.texteditor.completionproposals.DerivedPropertyCompletionProposal;
-import org.eclipse.papyrus.parsers.texteditor.completionproposals.PropertyModifierProposal;
-import org.eclipse.papyrus.parsers.texteditor.completionproposals.VisibilityCompletionProposal;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * Scanner for the action language.<BR>
- * It implements the interface IALKeywords, which contains the different keywords available in the
- * action language
- *
- * @author Remi SCHNEKENBURGER
- * @see org.eclipse.jface.text.rules.RuleBasedScanner
- * @see com.cea.actionlanguage.sharedresources.texteditor.IRTActionKeywords
- */
-public class PropertyLabelScanner extends RuleBasedScanner implements IPropertyLabelColorConstants {
-
- // Color for the default token
- /**
- *
- */
- private Color defaultColor;
-
- // Color for keywords
- /**
- *
- */
- private Color keywordColor;
-
- // Color for special chars
- /**
- *
- */
- private Color symbolColor;
-
- /**
- * Creates a new rule based scanner.
- */
- public PropertyLabelScanner() {
- defaultColor = PropertyLabelColorProvider.getDefault().getColor(DEFAULT);
- keywordColor = PropertyLabelColorProvider.getDefault().getColor(KEYWORD);
- symbolColor = PropertyLabelColorProvider.getDefault().getColor(SYMBOL);
-
- IToken other = new Token(new TextAttribute(defaultColor));
- IToken keyword = new Token(new TextAttribute(keywordColor, null, SWT.BOLD));
- IToken symbol = new Token(new TextAttribute(symbolColor, null, SWT.BOLD));
-
- IRule[] rules = new IRule[2];
-
- WordRule wordRule = new WordRule(new PropertyWordDetector(), other);
- for (int i = 0; i < VisibilityCompletionProposal.visibilityStrings.length; i++) {
- // wordRule.addWord(getWordWithoutQuotes(visibilityStrings[i]), keyword);
- }
- for (int i = 0; i < DerivedPropertyCompletionProposal.derivedPropertyStrings.length; i++) {
- // wordRule.addWord(getWordWithoutQuotes(isDerivedStrings[i]), keyword);
- }
- for (int i = 0; i < PropertyModifierProposal.modifiersStrings.length; i++) {
- wordRule.addWord(PropertyModifierProposal.modifiersStrings[i].trim(), keyword);
- }
-
- wordRule.addWord("+", symbol);
- wordRule.addWord("-", symbol);
- wordRule.addWord("#", symbol);
- wordRule.addWord("~", symbol);
- wordRule.addWord("/", symbol);
- wordRule.addWord("+/", symbol);
- wordRule.addWord("-/", symbol);
- wordRule.addWord("#/", symbol);
- wordRule.addWord(":", symbol);
-
- rules[0] = wordRule;
- rules[1] = new WhitespaceRule(new WhitespaceDetector());
-
- setRules(rules);
- }
-
- /**
- * returns the word for the scanner, without quotes.
- *
- * @param word
- *
- * @return
- */
- public static String getWordWithoutQuotes(String word) {
- String tmp = "";
- tmp = word.replaceAll("'", "");
- return tmp;
- }
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyLabelSourceViewerConfiguration.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyLabelSourceViewerConfiguration.java
deleted file mode 100644
index 412efd85553..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyLabelSourceViewerConfiguration.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.propertylabel;
-
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.TextAttribute;
-import org.eclipse.jface.text.contentassist.ContentAssistant;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.text.contentassist.IContentAssistant;
-import org.eclipse.jface.text.presentation.IPresentationReconciler;
-import org.eclipse.jface.text.presentation.PresentationReconciler;
-import org.eclipse.jface.text.rules.BufferedRuleBasedScanner;
-import org.eclipse.jface.text.rules.DefaultDamagerRepairer;
-import org.eclipse.jface.text.rules.Token;
-import org.eclipse.jface.text.source.ISourceViewer;
-import org.eclipse.papyrus.parsers.texteditor.CompletionFilterSourceViewerConfiguration;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.uml2.uml.Property;
-
-/**
- * This class bundles the configuration space of the action language source viewer. Instances of
- * this class are passed to the configure method of <code>SourceViewer</code>.
- *
- * @see org.eclipse.jface.text.source.SourceViewerConfiguration
- */
-public class PropertyLabelSourceViewerConfiguration extends CompletionFilterSourceViewerConfiguration {
-
- /** edited PropertyUtil */
- private Property property;
-
- /**
- * Creates a new PropertyLabelSourceViewerConfiguration
- */
- public PropertyLabelSourceViewerConfiguration() {
- this(null, null);
- }
-
- /**
- * Creates a new PropertyLabelSourceViewerConfiguration
- *
- * @param property
- * the property to edit
- */
- public PropertyLabelSourceViewerConfiguration(Property property) {
- super(null);
- setProperty(property);
- }
-
- /**
- * Instantiates a new property label source viewer configuration.
- *
- * @param property
- * the property
- * @param filter
- * the filter
- */
- public PropertyLabelSourceViewerConfiguration(Property property, ICompletionFilter filter) {
- super(filter);
- setProperty(property);
- }
-
- /**
- * @param filter
- */
- public PropertyLabelSourceViewerConfiguration(ICompletionFilter filter) {
- this(null, filter);
- }
-
- /**
- *
- */
- static class SingleTokenScanner extends BufferedRuleBasedScanner {
-
- /**
- *
- *
- * @param attribute
- */
- public SingleTokenScanner(TextAttribute attribute) {
- setDefaultReturnToken(new Token(attribute));
- }
- };
-
- /**
- * {@inheritDoc}
- */
- @Override
- public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {
- PresentationReconciler reconciler = new PresentationReconciler();
-
- // creating damager/repairer for single line comments
- Color colorString = PropertyLabelColorProvider.getDefault().getColor(IPropertyLabelColorConstants.STRING);
- DefaultDamagerRepairer dr = new DefaultDamagerRepairer(new SingleTokenScanner(new TextAttribute(colorString)));
-
- reconciler.setDamager(dr, PropertyLabelPartitionScanner.PROPERTY_MODIFIERS_STRING);
- reconciler.setRepairer(dr, PropertyLabelPartitionScanner.PROPERTY_MODIFIERS_STRING);
-
- // creating damager/repairer for other zones (action language zone)
- dr = new DefaultDamagerRepairer(new PropertyLabelScanner());
- reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE);
- reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE);
-
- return reconciler;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {
- ContentAssistant assistant = new ContentAssistant();
-
- IContentAssistProcessor processor = new PropertyLabelCompletionProcessor(property, getFilter());
- assistant.setContentAssistProcessor(processor, IDocument.DEFAULT_CONTENT_TYPE);
-
- // IInformationControlCreator
- assistant.setInformationControlCreator(getInformationControlCreator(sourceViewer));
-
- assistant.enableAutoActivation(true);
- assistant.setAutoActivationDelay(500);
-
- return assistant;
- }
-
- /**
- * Returns the edited PropertyUtil
- *
- * @return the property to edit
- */
- public Property getProperty() {
- return property;
- }
-
- /**
- * Sets the property to Edit
- *
- * @param property
- * the property to edit
- */
- public void setProperty(Property property) {
- this.property = property;
- }
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyLabelTemplateUI.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyLabelTemplateUI.java
deleted file mode 100644
index 91a65be249a..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyLabelTemplateUI.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.propertylabel;
-
-import java.io.IOException;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.ImageRegistry;
-import org.eclipse.jface.text.templates.ContextTypeRegistry;
-import org.eclipse.jface.text.templates.persistence.TemplateStore;
-import org.eclipse.papyrus.parsers.PapyrusParsersPlugin;
-import org.eclipse.ui.editors.text.templates.ContributionContextTypeRegistry;
-import org.eclipse.ui.editors.text.templates.ContributionTemplateStore;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-
-/**
- * Template management for the text editor.
- */
-public class PropertyLabelTemplateUI {
-
- /**
- * Key to store custom templates.
- */
- private static final String CUSTOM_TEMPLATES_KEY = "com.cea.accorduml.view.rtaction.texteditor.customtemplates";
-
- /**
- * The shared instance.
- */
- private static PropertyLabelTemplateUI fInstance;
-
- /**
- * The template store.
- */
- private TemplateStore fStore;
-
- /**
- * The context type registry.
- */
- private ContributionContextTypeRegistry fRegistry;
-
- /**
- *
- */
- private PropertyLabelTemplateUI() {
- }
-
- /**
- * Returns the shared instance.
- *
- * @return the shared instance
- */
- public static PropertyLabelTemplateUI getDefault() {
- if (fInstance == null) {
- fInstance = new PropertyLabelTemplateUI();
- }
- return fInstance;
- }
-
- /**
- * Returns this plug-in's template store.
- *
- * @return the template store of this plug-in instance
- */
- public TemplateStore getTemplateStore() {
- if (fStore == null) {
- fStore = new ContributionTemplateStore(getContextTypeRegistry(), PapyrusParsersPlugin.getDefault()
- .getPreferenceStore(), CUSTOM_TEMPLATES_KEY);
- try {
- fStore.load();
- } catch (IOException e) {
- PapyrusParsersPlugin.logException(e);
- }
- }
- return fStore;
- }
-
- /**
- * Returns this plug-in's context type registry.
- *
- * @return the context type registry for this plug-in instance
- */
- public ContextTypeRegistry getContextTypeRegistry() {
- if (fRegistry == null) {
- // create an configure the contexts available in the template editor
- fRegistry = new ContributionContextTypeRegistry();
- fRegistry.addContextType(PropertyLabelContextType.PROPERTYLABEL_CONTEXT_TYPE);
- }
- return fRegistry;
- }
-
- /* Forward plug-in methods to javaeditor example plugin default instance */
- /**
- *
- *
- * @return
- */
- public ImageRegistry getImageRegistry() {
- return PapyrusParsersPlugin.getDefault().getImageRegistry();
- }
-
- /**
- * Creates and returns the <code>ImageDescriptor</code> for an image from a plugin.
- *
- * @param imageFilePath
- * relative path to the file that stores the image
- * @param pluginId
- * the identifier of the plugin
- *
- * @return the image descriptor
- *
- * @see AbstractUIPlugin#imageDescriptorFromPlugin(java.lang.String, java.lang.String)
- */
- public static ImageDescriptor imageDescriptorFromPlugin(String pluginId, String imageFilePath) {
- return AbstractUIPlugin.imageDescriptorFromPlugin(pluginId, imageFilePath);
- }
-
- /**
- * Returns the preference store of the plugin.
- *
- * @return the preference store of the plugin
- *
- * @see AbstractUIPlugin#getPreferenceStore()
- */
- public IPreferenceStore getPreferenceStore() {
- return PapyrusParsersPlugin.getDefault().getPreferenceStore();
- }
-
- /**
- * Save plugin preferences.
- *
- * @see org.eclipse.core.runtime.Plugin#savePluginPreferences()
- */
- public void savePluginPreferences() {
- PapyrusParsersPlugin.getDefault().savePluginPreferences();
- }
-
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyWordDetector.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyWordDetector.java
deleted file mode 100644
index 2ac93f4ac22..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyWordDetector.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.propertylabel;
-
-import org.eclipse.jface.text.rules.IWordDetector;
-
-/**
- * Basic word detector for the scanner.<BR>
- *
- * @author Remi SCHNEKENBURGER
- * @see org.eclipse.jface.text.rules.IWordDetector
- */
-public class PropertyWordDetector implements IWordDetector {
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.text.rules.IWordDetector#isWordPart(char)
- */
- /**
- *
- *
- * @param character
- *
- * @return
- */
- public boolean isWordPart(char character) {
- Character ch = Character.valueOf(character);
-
- if (ch.compareTo('+') == 0) {
- return true;
- } else if (ch.compareTo('-') == 0) {
- return true;
- } else if (ch.compareTo('#') == 0) {
- return true;
- } else if (ch.compareTo('~') == 0) {
- return true;
- } else if (ch.compareTo('/') == 0) {
- return true;
- } else if (ch.compareTo(':') == 0) {
- return true;
- }
-
- return Character.isLetter(character);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.text.rules.IWordDetector#isWordStart(char)
- */
- /**
- *
- *
- * @param character
- *
- * @return
- */
- public boolean isWordStart(char character) {
- Character ch = Character.valueOf(character);
-
- if (ch.compareTo('+') == 0) {
- return true;
- } else if (ch.compareTo('-') == 0) {
- return true;
- } else if (ch.compareTo('#') == 0) {
- return true;
- } else if (ch.compareTo('~') == 0) {
- return true;
- } else if (ch.compareTo('/') == 0) {
- return true;
- } else if (ch.compareTo(':') == 0) {
- return true;
- }
- return Character.isLetter(character);
- }
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/Assert.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/Assert.java
deleted file mode 100644
index 40b310c57ae..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/Assert.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.util;
-
-import org.eclipse.core.runtime.AssertionFailedException;
-
-/**
- * <code>Assert</code> is useful for for embedding runtime sanity checks in code. The predicate
- * methods all test a condition and throw some type of unchecked exception if the condition does not
- * hold.
- * <p>
- * Assertion failure exceptions, like most runtime exceptions, are thrown when something is misbehaving. Assertion failures are invariably unspecified behavior; consequently, clients should never rely on these being thrown (and certainly should not being
- * catching them specifically).
- * </p>
- * <p>
- * This class is not intended to be instantiated or sub-classed by clients.
- * </p>
- */
-public class Assert {
-
- /* This class is not intended to be instantiated. */
- /**
- *
- */
- private Assert() {
- // not allowed
- }
-
- /**
- * Asserts that the given object is not <code>null</code>. If this is not the case, some kind of
- * unchecked exception is thrown.
- *
- * @param object
- * the value to test
- */
- public static void isNotNull(Object object) {
- isNotNull(object, "");
- }
-
- /**
- * Asserts that the given object is not <code>null</code>. If this is not the case, some kind of
- * unchecked exception is thrown. The given message is included in that exception, to aid
- * debugging.
- *
- * @param object
- * the value to test
- * @param message
- * the message to include in the exception
- */
- public static void isNotNull(Object object, String message) {
- if (object == null) {
- throw new AssertionFailedException("null argument:" + message);
- }
- }
-
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/AssertionFailedException.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/AssertionFailedException.java
deleted file mode 100644
index 1047fcba4ff..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/AssertionFailedException.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.util;
-
-/**
- * <code>AssertionFailedException</code> is a runtime exception thrown by some of the methods in <code>Assert</code>.
- *
- * @see Assert
- */
-public class AssertionFailedException extends RuntimeException {
-
- /**
- *
- */
- private static final long serialVersionUID = 5329046801658039137L;
-
- /**
- * Constructs a new exception with the given message.
- *
- * @param detail
- * the message
- */
- public AssertionFailedException(String detail) {
- super(detail);
- }
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/IErrorReporter.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/IErrorReporter.java
deleted file mode 100644
index 16197864c87..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/IErrorReporter.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.util;
-
-/**
- * Interface that should be implemented by parsers and lexers that exports error messages to
- * somewhere else the System out stream.
- */
-public interface IErrorReporter {
-
- /**
- * Reports an error
- *
- * @param error
- * the error to report
- */
- void reportError(String error);
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/Messages.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/Messages.java
deleted file mode 100644
index 3e69dece758..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/Messages.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.util;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Manages messages and labels for this plugin.
- */
-public class Messages extends NLS {
-
- /** name of the bundle */
- private static final String BUNDLE_NAME = "org.eclipse.papyrus.parsers.util.messages"; //$NON-NLS-1$
-
- public static String NameMissing;
-
- public static String MismatchedToken;
-
- public static String NoViableAltException;
-
- /** initializer */
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- /**
- * Default Constructor.
- */
- private Messages() {
- }
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/MultiplicityException.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/MultiplicityException.java
deleted file mode 100644
index 316e11a6ba7..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/MultiplicityException.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.util;
-
-/**
- * Exception to manage ill-formed multiplicity
- */
-public class MultiplicityException extends RuntimeException {
-
- /** Serial ID */
- private static final long serialVersionUID = -6675171028982908999L;
-
- /**
- * Creates a new MultiplicityException.
- *
- * @param message
- * the message of the exception
- */
- public MultiplicityException(String message) {
- super(message);
- }
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/NameException.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/NameException.java
deleted file mode 100644
index 8134db47dae..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/NameException.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.util;
-
-import org.antlr.runtime.RecognitionException;
-
-/**
- * Exception to manage bad name exception
- */
-public class NameException extends RecognitionException {
-
- /** Serial ID */
- private static final long serialVersionUID = -8831007802595595763L;
-
- /**
- * Creates a new MultiplicityException.
- *
- * @param message
- * the message of the exception
- */
- public NameException() {
- super();
- }
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/SimpleStringErrorReporter.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/SimpleStringErrorReporter.java
deleted file mode 100644
index 887fc7096d9..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/SimpleStringErrorReporter.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.util;
-
-/**
- * Simple implementation of the error reporter for lexer/parser generated from ANTLR grammar
- */
-public class SimpleStringErrorReporter implements IErrorReporter {
-
- /** stored message */
- private String message = null;
-
- /**
- * {@inheritDoc}
- */
- public void reportError(String error) {
- setMessage(error);
- }
-
- /**
- * Sets the error message
- *
- * @param message
- * the message to set
- */
- public void setMessage(String message) {
- this.message = message;
- }
-
- /**
- * Returns the error message
- *
- * @return the message to return
- */
- public String getMessage() {
- return message;
- }
-
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/TypeRecognitionException.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/TypeRecognitionException.java
deleted file mode 100644
index 024ffca63fb..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/TypeRecognitionException.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.util;
-
-/**
- * <code>AssertionFailedException</code> is a runtime exception thrown by some of the methods in <code>Assert</code>.
- *
- * @see Assert
- */
-public class TypeRecognitionException extends RuntimeException {
-
- /**
- * serial ID
- *
- * @generated
- */
- private static final long serialVersionUID = -8893242382872509656L;
-
- private String typeName = null;
-
- /**
- * Constructs a new exception with the given message.
- *
- * @param detail
- * the message
- */
- public TypeRecognitionException(String message, String typeName) {
- super(message);
- this.typeName = typeName;
- }
-
- public String getTypeName() {
- return typeName;
- }
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/UnboundTemplateRecognitionException.java b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/UnboundTemplateRecognitionException.java
deleted file mode 100644
index a2617f50c47..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/UnboundTemplateRecognitionException.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 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:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.util;
-
-import org.eclipse.uml2.uml.TemplateableElement;
-
-/**
- * <code>AssertionFailedException</code> is a runtime exception thrown by some of the methods in <code>Assert</code>.
- *
- * @see Assert
- */
-public class UnboundTemplateRecognitionException extends RuntimeException {
-
- /**
- * serial ID
- *
- * @generated
- */
- private static final long serialVersionUID = -3962411131136049484L;
-
- private org.eclipse.uml2.uml.TemplateableElement template;
-
- /**
- * Constructs a new exception with the given message.
- *
- * @param detail
- * the message
- */
- public UnboundTemplateRecognitionException(String message, TemplateableElement template) {
- super(message);
- this.template = template;
- }
-
- public TemplateableElement getTemplate() {
- return template;
- }
-}
diff --git a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/messages.properties b/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/messages.properties
deleted file mode 100644
index eca6f584cc4..00000000000
--- a/extraplugins/marte/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/messages.properties
+++ /dev/null
@@ -1,3 +0,0 @@
-NameMissing=Please enter a correct name for the property
-MismatchedToken =[{0}] Was waiting for {1}. Found ( {2} ) instead.
-NoViableAltException=[{0}] Was waiting for {1}. Found ( {2} ) instead.

Back to the top