diff options
Diffstat (limited to 'plugins')
164 files changed, 25443 insertions, 548 deletions
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.extensionpoints.editors/src/org/eclipse/papyrus/extensionpoints/editors/utils/DirectEditorsUtil.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.extensionpoints.editors/src/org/eclipse/papyrus/extensionpoints/editors/utils/DirectEditorsUtil.java index dd020633f84..62014d9895a 100644 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.extensionpoints.editors/src/org/eclipse/papyrus/extensionpoints/editors/utils/DirectEditorsUtil.java +++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.extensionpoints.editors/src/org/eclipse/papyrus/extensionpoints/editors/utils/DirectEditorsUtil.java @@ -246,3 +246,4 @@ public class DirectEditorsUtil { } } + diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/celleditor/AbstractOpenDialogCellEditorButtonAction.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/celleditor/AbstractOpenDialogCellEditorButtonAction.java new file mode 100644 index 00000000000..7c8a9a48885 --- /dev/null +++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/celleditor/AbstractOpenDialogCellEditorButtonAction.java @@ -0,0 +1,170 @@ +/***************************************************************************** + * Copyright (c) 2012 CEA LIST. + * + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.nattable.celleditor; + +import org.eclipse.jface.window.Window; +import org.eclipse.nebula.widgets.nattable.config.IConfigRegistry; +import org.eclipse.nebula.widgets.nattable.edit.DialogEditHandler; +import org.eclipse.nebula.widgets.nattable.edit.gui.AbstractDialogCellEditor; +import org.eclipse.nebula.widgets.nattable.layer.cell.ILayerCell; +import org.eclipse.nebula.widgets.nattable.widget.EditModeEnum; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.widgets.Composite; + +/** + * This class allows to store required information to customize + * a Button to open a dialog + */ +public abstract class AbstractOpenDialogCellEditorButtonAction { + + /** The text to use for the button. */ + private String text; + + /** The tooltip to use for the button. */ + private String tooltipText; + + /** the image to set on the button. */ + private Image image; + + /** + * the new cell value selected by the user opening a dialog + */ + protected Object newValue; + + /** + * the column index of the edited cell + */ + protected int columnIndex; + + /** + * the row index of the edited cell + */ + protected int rowIndex; + + /** + * Gets the image. + * + * @return the image + */ + public Image getImage() { + return image; + } + + + /** + * Sets the image. + * + * @param image + * the new image + */ + public void setImage(Image image) { + this.image = image; + } + + + /** + * Gets the text. + * + * @return the text + */ + public String getText() { + return text; + } + + + /** + * Sets the text. + * + * @param text + * the new text + */ + public void setText(String text) { + this.text = text; + } + + + /** + * Gets the tooltip text. + * + * @return the tooltip text + */ + public String getTooltipText() { + return tooltipText; + } + + + /** + * Sets the tooltip text. + * + * @param tooltipText + * the new tooltip text + */ + public void setTooltipText(String tooltipText) { + this.tooltipText = tooltipText; + } + + + /** + * + * @return + * the created dialog + */ + public abstract AbstractDialogCellEditor createDialogCellEditor(); + + + /** + * Setter for the edited cell location + * + * @param columnIndex + * the column index of the edited cell + * @param rowIndex + * the row index of the edited cell + */ + public final void setCellLocation(int columnIndex, int rowIndex) { + this.columnIndex = columnIndex; + this.rowIndex = rowIndex; + } + + /** + * + * @return + * the value selected by the user + */ + public Object getEditorValue() { + return this.newValue; + } + + /** + * + * @param parent + * the parent composite used to open a dialog + * @param originalCanonicalValue + * the original value + * @param cell + * the cell to edit + * @param configRegistry + * the config registry used by the nattable widget + * @return + * a IStatus to know if the user cancel the action or validate the action + */ + public int openDialog(Composite parent, Object originalCanonicalValue, ILayerCell cell, IConfigRegistry configRegistry) { + AbstractDialogCellEditor editor = createDialogCellEditor(); + editor.activateCell(parent, originalCanonicalValue, EditModeEnum.DIALOG, new DialogEditHandler(), cell, configRegistry); + int res = editor.open(); + if (Window.OK == res) { + this.newValue = editor.getEditorValue(); + } + return res; + } +} diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/celleditor/AbstractPapyrusStyledTextCellEditor.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/celleditor/AbstractPapyrusStyledTextCellEditor.java index 6a31dd8480d..1621ddefdc4 100644 --- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/celleditor/AbstractPapyrusStyledTextCellEditor.java +++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/celleditor/AbstractPapyrusStyledTextCellEditor.java @@ -13,18 +13,30 @@ *****************************************************************************/
package org.eclipse.papyrus.infra.nattable.celleditor;
+import org.eclipse.core.runtime.Assert;
import org.eclipse.emf.ecore.EObject;
+import org.eclipse.jface.window.Window;
+import org.eclipse.nebula.widgets.nattable.selection.SelectionLayer.MoveDirectionEnum;
import org.eclipse.papyrus.infra.nattable.manager.table.ITableAxisElementProvider;
import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.StyledText;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
/**
* Abstract Class for StyledText cell editor.
- * This class is used for XText Cell Editor
+ * This class is used for XText Cell Editor and text editor with completion
*
- * @author vl222926
+ * @author Vincent Lorenzo
*
*/
-public abstract class AbstractPapyrusStyledTextCellEditor extends AbstractStyledTextCellEditor {
+public abstract class AbstractPapyrusStyledTextCellEditor extends AbstractStyledTextCellEditor{
/**
* the table
@@ -42,6 +54,27 @@ public abstract class AbstractPapyrusStyledTextCellEditor extends AbstractStyled protected final ITableAxisElementProvider elementProvider;
/**
+ * the configuration of the additional button
+ */
+ protected AbstractOpenDialogCellEditorButtonAction buttonConfiguration;
+
+ /**
+ * the controller of the editor
+ */
+ private Control editorControl;
+
+ /**
+ * the initial value
+ */
+ private Object originalValue;
+
+ /**
+ * the styled text
+ */
+ private StyledText text;
+
+
+ /**
*
* Constructor.
*
@@ -70,7 +103,6 @@ public abstract class AbstractPapyrusStyledTextCellEditor extends AbstractStyled this(table, axisElement, elementProvider, false);
}
-
/**
*
* Constructor.
@@ -89,4 +121,105 @@ public abstract class AbstractPapyrusStyledTextCellEditor extends AbstractStyled * @return the edited object
*/
protected abstract EObject getEditedEObject();
+
+
+ /**
+ * @see org.eclipse.papyrus.infra.nattable.celleditor.AbstractStyledTextCellEditor#activateCell(org.eclipse.swt.widgets.Composite, java.lang.Object)
+ *
+ * @param parent
+ * @param originalCanonicalValue
+ * @return
+ */
+ @Override
+ protected Control activateCell(Composite parent, Object originalCanonicalValue) {
+ this.originalValue = originalCanonicalValue;
+ Composite realParent = parent;
+ if (this.buttonConfiguration != null) {
+ realParent = new Composite(parent, SWT.NONE);
+ }
+ this.text = (StyledText) super.activateCell(realParent, originalCanonicalValue);
+ if (this.buttonConfiguration != null) {
+ this.editorControl = realParent;
+ GridLayout gridLayout = new GridLayout(2, false);
+ gridLayout.horizontalSpacing = 0;
+ gridLayout.verticalSpacing = 0;
+ gridLayout.marginHeight = 0;
+ gridLayout.marginWidth = 0;
+ realParent.setLayout(gridLayout);
+
+ GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, true);
+ text.setLayoutData(gridData);
+
+ Button b = createAdditionalButton(realParent);
+ GridData buttonGridData = new GridData(SWT.RIGHT, SWT.FILL, false, true);
+ b.setLayoutData(buttonGridData);
+ this.buttonConfiguration.setCellLocation(layerCell.getColumnIndex(), layerCell.getRowIndex());
+ } else {
+ this.editorControl = text;
+ }
+ return this.editorControl;
+ }
+
+
+ /**
+ * @see org.eclipse.papyrus.infra.nattable.celleditor.AbstractStyledTextCellEditor#getEditorControl()
+ *
+ * @return
+ */
+ @Override
+ public Control getEditorControl() {
+ return editorControl;
+ }
+
+ /**
+ *
+ * @param composite
+ * the composite parent
+ * @return
+ * the created button
+ *
+ */
+ protected Button createAdditionalButton(Composite composite) {
+ Button button = new Button(composite, SWT.NONE);
+ button.setText(this.buttonConfiguration.getText());
+ button.setToolTipText(this.buttonConfiguration.getTooltipText());
+ button.setImage(this.buttonConfiguration.getImage());
+ button.addSelectionListener(new SelectionListener() {
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ runButtonAction();
+ }
+
+ @Override
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ });
+ return button;
+ }
+
+
+ /**
+ * execute the action declared in the button
+ */
+ protected void runButtonAction() {
+ if (Window.OK == this.buttonConfiguration.openDialog(parent, originalValue, layerCell, configRegistry)) {
+ setCanonicalValue(this.buttonConfiguration.getEditorValue());
+ commit(MoveDirectionEnum.NONE);
+ } else {
+ close();
+ }
+ }
+
+ /**
+ * This method allow to define the behavior of the an additional button located at the right of the text field in the cell
+ *
+ * @param additionalAction
+ */
+ public void setOpenDialogCellEditorButtonAction(AbstractOpenDialogCellEditorButtonAction additionalAction) {
+ this.buttonConfiguration = additionalAction;
+ if (additionalAction != null) {
+ Assert.isNotNull(additionalAction);
+ }
+ }
}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/celleditor/AbstractStyledTextCellEditor.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/celleditor/AbstractStyledTextCellEditor.java index aea2d85286a..5350b8333d8 100644 --- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/celleditor/AbstractStyledTextCellEditor.java +++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/celleditor/AbstractStyledTextCellEditor.java @@ -13,6 +13,8 @@ *****************************************************************************/
package org.eclipse.papyrus.infra.nattable.celleditor;
+
+
import org.eclipse.jface.fieldassist.ControlDecoration;
import org.eclipse.nebula.widgets.nattable.edit.EditConfigAttributes;
import org.eclipse.nebula.widgets.nattable.edit.config.RenderErrorHandling;
@@ -30,8 +32,8 @@ import org.eclipse.nebula.widgets.nattable.widget.EditModeEnum; import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.custom.VerifyKeyListener;
-import org.eclipse.swt.events.KeyAdapter;
import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.KeyListener;
import org.eclipse.swt.events.VerifyEvent;
import org.eclipse.swt.graphics.Cursor;
import org.eclipse.swt.widgets.Composite;
@@ -46,7 +48,7 @@ import org.eclipse.swt.widgets.Text; * @author vl222926
*
*/
-public abstract class AbstractStyledTextCellEditor extends AbstractCellEditor {
+public abstract class AbstractStyledTextCellEditor extends AbstractCellEditor implements KeyListener {
/**
* The StyledText control which is the editor wrapped by this TextCellEditor.
@@ -200,7 +202,7 @@ public abstract class AbstractStyledTextCellEditor extends AbstractCellEditor { }
@Override
- public StyledText getEditorControl() {
+ public Control getEditorControl() {
return this.text;
}
@@ -261,58 +263,117 @@ public abstract class AbstractStyledTextCellEditor extends AbstractCellEditor { // add a key listener that will commit or close the editor for special key strokes
// and executes conversion/validation on input to the editor
- textControl.addKeyListener(new KeyAdapter() {
+ textControl.addKeyListener(this);
+ // textControl.addKeyListener(new KeyAdapter() {
+ //
+ // @Override
+ // public void keyPressed(KeyEvent event) {
+ // if (commitOnEnter && (event.keyCode == SWT.CR || event.keyCode == SWT.KEYPAD_CR)) {
+ //
+ // MoveDirectionEnum move = MoveDirectionEnum.NONE;
+ // if (moveSelectionOnEnter && editMode == EditModeEnum.INLINE) {
+ // if (event.stateMask == 0) {
+ // move = MoveDirectionEnum.DOWN;
+ // } else if (event.stateMask == SWT.SHIFT) {
+ // move = MoveDirectionEnum.UP;
+ // }
+ // }
+ //
+ // commit(move);
+ //
+ // if (editMode == EditModeEnum.DIALOG) {
+ // parent.forceFocus();
+ // }
+ // } else if (event.keyCode == SWT.ESC && event.stateMask == 0) {
+ // close();
+ // } else if (commitOnUpDown && editMode == EditModeEnum.INLINE) {
+ // if (event.keyCode == SWT.ARROW_UP) {
+ // commit(MoveDirectionEnum.UP);
+ // } else if (event.keyCode == SWT.ARROW_DOWN) {
+ // commit(MoveDirectionEnum.DOWN);
+ // }
+ // }
+ // }
+ //
+ // @Override
+ // public void keyReleased(KeyEvent e) {
+ // try {
+ // // always do the conversion
+ // Object canonicalValue = getCanonicalValue(inputConversionErrorHandler);
+ // // and always do the validation
+ // // even if for commiting the validation should be skipped, on editing
+ // // a validation failure should be made visible
+ // // otherwise there would be no need for validation!
+ // validateCanonicalValue(canonicalValue, inputValidationErrorHandler);
+ // } catch (Exception ex) {
+ // // do nothing as exceptions caused by conversion or validation are handled already
+ // // we just need this catch block for stopping the process if conversion failed with
+ // // an exception
+ // }
+ // }
+ // });
- @Override
- public void keyPressed(KeyEvent event) {
- if (commitOnEnter && (event.keyCode == SWT.CR || event.keyCode == SWT.KEYPAD_CR)) {
-
- MoveDirectionEnum move = MoveDirectionEnum.NONE;
- if (moveSelectionOnEnter && editMode == EditModeEnum.INLINE) {
- if (event.stateMask == 0) {
- move = MoveDirectionEnum.DOWN;
- } else if (event.stateMask == SWT.SHIFT) {
- move = MoveDirectionEnum.UP;
- }
- }
-
- commit(move);
-
- if (editMode == EditModeEnum.DIALOG) {
- parent.forceFocus();
- }
- } else if (event.keyCode == SWT.ESC && event.stateMask == 0) {
- close();
- } else if (commitOnUpDown && editMode == EditModeEnum.INLINE) {
- if (event.keyCode == SWT.ARROW_UP) {
- commit(MoveDirectionEnum.UP);
- } else if (event.keyCode == SWT.ARROW_DOWN) {
- commit(MoveDirectionEnum.DOWN);
- }
+ return textControl;
+ }
+
+
+ /**
+ *
+ * @see org.eclipse.swt.events.KeyListener#keyPressed(org.eclipse.swt.events.KeyEvent)
+ *
+ * @param event
+ */
+ public void keyPressed(KeyEvent event) {
+ if (commitOnEnter && (event.keyCode == SWT.CR || event.keyCode == SWT.KEYPAD_CR)) {
+
+ MoveDirectionEnum move = MoveDirectionEnum.NONE;
+ if (moveSelectionOnEnter && editMode == EditModeEnum.INLINE) {
+ if (event.stateMask == 0) {
+ move = MoveDirectionEnum.DOWN;
+ } else if (event.stateMask == SWT.SHIFT) {
+ move = MoveDirectionEnum.UP;
}
}
- @Override
- public void keyReleased(KeyEvent e) {
- try {
- // always do the conversion
- Object canonicalValue = getCanonicalValue(inputConversionErrorHandler);
- // and always do the validation
- // even if for commiting the validation should be skipped, on editing
- // a validation failure should be made visible
- // otherwise there would be no need for validation!
- validateCanonicalValue(canonicalValue, inputValidationErrorHandler);
- } catch (Exception ex) {
- // do nothing as exceptions caused by conversion or validation are handled already
- // we just need this catch block for stopping the process if conversion failed with
- // an exception
- }
+ commit(move);
+
+ if (editMode == EditModeEnum.DIALOG) {
+ parent.forceFocus();
}
- });
+ } else if (event.keyCode == SWT.ESC && event.stateMask == 0) {
+ close();
+ } else if (commitOnUpDown && editMode == EditModeEnum.INLINE) {
+ if (event.keyCode == SWT.ARROW_UP) {
+ commit(MoveDirectionEnum.UP);
+ } else if (event.keyCode == SWT.ARROW_DOWN) {
+ commit(MoveDirectionEnum.DOWN);
+ }
+ }
+ }
- return textControl;
+ /**
+ *
+ * @see org.eclipse.swt.events.KeyListener#keyReleased(org.eclipse.swt.events.KeyEvent)
+ *
+ * @param e
+ */
+ public void keyReleased(KeyEvent e) {
+ try {
+ // always do the conversion
+ Object canonicalValue = getCanonicalValue(inputConversionErrorHandler);
+ // and always do the validation
+ // even if for commiting the validation should be skipped, on editing
+ // a validation failure should be made visible
+ // otherwise there would be no need for validation!
+ validateCanonicalValue(canonicalValue, inputValidationErrorHandler);
+ } catch (Exception ex) {
+ // do nothing as exceptions caused by conversion or validation are handled already
+ // we just need this catch block for stopping the process if conversion failed with
+ // an exception
+ }
}
+
@Override
public void close() {
super.close();
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/cell/ICellManager.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/cell/ICellManager.java index 1c539622067..370b383ea9a 100644 --- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/cell/ICellManager.java +++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/cell/ICellManager.java @@ -35,7 +35,12 @@ public interface ICellManager { public static final String NOT_AVALAIBLE = Messages.ICellManager_NotAvailable;
/**
- * the empty sting
+ * the string used for <code>null</code> value
+ */
+ public static final String NULL_VALUE = "null"; //$NON-NLS-1$
+
+ /**
+ * empty string
*/
public static final String EMPTY_STRING = ""; //$NON-NLS-1$
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/CrossAxisWrapper.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/CrossAxisWrapper.java new file mode 100644 index 00000000000..f96a6b57a2d --- /dev/null +++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/CrossAxisWrapper.java @@ -0,0 +1,68 @@ +/***************************************************************************** + * Copyright (c) 2015 CEA LIST and others. + * + * 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: + * CEA LIST - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.infra.nattable.utils; + +/** + * + * @author Vincent Lorenzo + * + * This class can be used to store the axis linked to a cell + * + * @param <A> + * the type of the first axis + * @param <B> + * the type of the second axis + */ +public class CrossAxisWrapper<A, B> { + + /** + * the first axis + */ + private A firstAxis; + + /** + * the second axis + */ + private B secondAxis; + + /** + * + * Constructor. + * + * @param firstAxis + * @param secondAxis + */ + public CrossAxisWrapper(A firstAxis, B secondAxis) { + this.firstAxis = firstAxis; + this.secondAxis = secondAxis; + } + + /** + * + * @return + * the row element + */ + public A getFirstAxis() { + return firstAxis; + } + + /** + * + * @return + * the column element + */ + public B getSecondAxis() { + return secondAxis; + } +}
\ No newline at end of file diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/databinding/CompletionStyledTextMultiReferenceDialogObservableValue.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/databinding/CompletionStyledTextMultiReferenceDialogObservableValue.java new file mode 100644 index 00000000000..33e481ba136 --- /dev/null +++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/databinding/CompletionStyledTextMultiReferenceDialogObservableValue.java @@ -0,0 +1,86 @@ +/***************************************************************************** + * Copyright (c) 2015 CEA LIST and others. + * + * 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: + * CEA LIST - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.infra.widgets.databinding; + +import java.util.Collection; + +import org.eclipse.core.databinding.observable.list.IObservableList; +import org.eclipse.swt.custom.StyledText; +import org.eclipse.swt.widgets.Control; + +/** + * @author Vincent Lorenzo + * + */ +public class CompletionStyledTextMultiReferenceDialogObservableValue extends CompletionStyledTextObservableValue { + + /** + * the styled text with completion reference dialog + */ + private Control referenceDialog; + + /** + * the IObservable list + */ + private IObservableList list; + + /** + * @param dialog + * The observed StyledTextReferenceDialog + * @param styledText + * The observed StyledText + * @param modelObservable + * The Model IObservable + * @param eventType + * The eventType to listen to. When the event is fired by the Text + * widget, this IObservableValue will fire a ChangeEvent + */ + public CompletionStyledTextMultiReferenceDialogObservableValue(Control dialog, StyledText styledText, IObservableList modelObservable, int eventType) { + super(styledText, null, eventType); + this.referenceDialog = dialog; + list = modelObservable; + } + + + /** + * + * @see org.eclipse.papyrus.infra.widgets.databinding.StyledTextObservableValue#doSetValue(java.lang.Object) + * + * @param value + */ + @Override + protected void doSetValue(Object value) { + super.doSetValue(value); + referenceDialog.update(); + } + + /** + * @see org.eclipse.papyrus.infra.widgets.databinding.CompletionStyledTextObservableValue#doGetValue() + * + * @return + */ + @Override + protected Object doGetValue() { + Object newValues = super.doGetValue(); + if (newValues instanceof Collection<?>) { + if (!list.equals(newValues)) { + list.clear(); + list.addAll((Collection<?>) newValues); + } + }else if(newValues==null){ + list.clear(); + } + return newValues; + } +} diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/databinding/CompletionStyledTextObservableValue.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/databinding/CompletionStyledTextObservableValue.java new file mode 100644 index 00000000000..f60fe0a1b28 --- /dev/null +++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/databinding/CompletionStyledTextObservableValue.java @@ -0,0 +1,121 @@ +/***************************************************************************** + * Copyright (c) 2013 CEA LIST. + * + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.widgets.databinding; + +import java.util.List; + +import org.eclipse.core.databinding.observable.value.IObservableValue; +import org.eclipse.core.databinding.observable.value.ValueDiff; +import org.eclipse.papyrus.infra.widgets.util.IPapyrusConverter; +import org.eclipse.papyrus.infra.widgets.util.ISetPapyrusConverter; +import org.eclipse.swt.custom.StyledText; +import org.eclipse.swt.widgets.Event; + +public class CompletionStyledTextObservableValue extends StyledTextObservableValue implements ISetPapyrusConverter { + + /** + * The name resolution helper shared with the widget + */ + protected IPapyrusConverter parser; + + /** + * + * Constructor. + * + * @param text + * @param modelProperty + * @param eventType + */ + public CompletionStyledTextObservableValue(StyledText text, IObservableValue modelProperty, int eventType) { + super(text, modelProperty, eventType); + + } + + /** + * + * @see org.eclipse.papyrus.infra.widgets.databinding.StyledTextObservableValue#doSetValue(java.lang.Object) + * + * @param value + */ + @Override + protected void doSetValue(Object value) { + String editValue = parser.canonicalToEditValue(value, 0); + if (editValue instanceof String) { + super.doSetValue(editValue); + } else { + super.doSetValue(value); + } + } + + /** + * + * @see org.eclipse.papyrus.infra.widgets.databinding.StyledTextObservableValue#doGetValue() + * + * @return² + */ + @Override + protected Object doGetValue() { + Object newValue = super.doGetValue(); + if (newValue instanceof String) { + if (IPapyrusConverter.NULL_VALUE.equals(newValue)) { + return null; + } + Object result = this.parser.editToCanonicalValue((String) newValue, 0); + return result; + } + return null; + } + + /** + * @see org.eclipse.papyrus.infra.widgets.util.ISetPapyrusConverter#setPapyrusConverter(org.eclipse.papyrus.infra.widgets.util.IPapyrusConverter) + * + * @param parser + */ + @Override + public void setPapyrusConverter(IPapyrusConverter parser) { + this.parser = parser; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.swt.widgets.Listener#handleEvent(org.eclipse.swt.widgets.Event) + */ + @Override + public void handleEvent(final Event event) { + + final Object oldValue = currentValue; + final Object newValue = getValue(); + // if (newValue == null) { + // return; + // } + currentValue = newValue; + + if ((eventType & event.type) != 0) { + fireValueChange(new ValueDiff() { + + @Override + public Object getOldValue() { + return oldValue; + } + + @Override + public Object getNewValue() { + return newValue; + } + + }); + } + } +} diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/databinding/CompletionStyledTextReferenceDialogObservableValue.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/databinding/CompletionStyledTextReferenceDialogObservableValue.java new file mode 100644 index 00000000000..ef22a7ba233 --- /dev/null +++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/databinding/CompletionStyledTextReferenceDialogObservableValue.java @@ -0,0 +1,68 @@ +/***************************************************************************** + * Copyright (c) 2015 CEA LIST and others. + * + * 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: + * CEA LIST - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.infra.widgets.databinding; + +import org.eclipse.core.databinding.observable.value.IObservableValue; +import org.eclipse.papyrus.infra.widgets.editors.CompletionStyledTextReferenceDialog; +import org.eclipse.swt.custom.StyledText; + +/** + * @author VL222926 + * + */ +public class CompletionStyledTextReferenceDialogObservableValue extends CompletionStyledTextObservableValue { + + /** + * the styled text with completion reference dialog + */ + private CompletionStyledTextReferenceDialog referenceDialog; + + /** + * @param dialog + * The observed StyledTextReferenceDialog + * @param styledText + * The observed StyledText + * @param modelObservable + * The Model IObservable + * @param eventType + * The eventType to listen to. When the event is fired by the Text + * widget, this IObservableValue will fire a ChangeEvent + */ + public CompletionStyledTextReferenceDialogObservableValue(CompletionStyledTextReferenceDialog dialog, StyledText styledText, IObservableValue modelObservable, int eventType) { + super(styledText, modelObservable, eventType); + this.referenceDialog = dialog; + } + + /** + * + * @see org.eclipse.papyrus.infra.widgets.databinding.StyledTextObservableValue#doSetValue(java.lang.Object) + * + * @param value + */ + @Override + protected void doSetValue(Object value) { + super.doSetValue(value); + referenceDialog.update(); + } + + /** + * @see org.eclipse.papyrus.infra.widgets.databinding.CompletionStyledTextObservableValue#doGetValue() + * + * @return + */ + @Override + protected Object doGetValue() { + return super.doGetValue(); + } +} diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/databinding/StyledTextObservableValue.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/databinding/StyledTextObservableValue.java new file mode 100644 index 00000000000..19ab83c7351 --- /dev/null +++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/databinding/StyledTextObservableValue.java @@ -0,0 +1,152 @@ +/***************************************************************************** + * Copyright (c) 2013 CEA LIST. + * + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.widgets.databinding; + +import org.eclipse.core.databinding.observable.value.AbstractObservableValue; +import org.eclipse.core.databinding.observable.value.IObservableValue; +import org.eclipse.core.databinding.observable.value.ValueDiff; +import org.eclipse.papyrus.infra.tools.databinding.AggregatedObservable; +import org.eclipse.papyrus.infra.widgets.providers.UnchangedObject; +import org.eclipse.swt.custom.StyledText; +import org.eclipse.swt.widgets.Event; +import org.eclipse.swt.widgets.Listener; + +/** + * An ObservableValue for StyledText field, with support for AggregatedObservable + * + * @author Vincent Lorenzo + */ +public class StyledTextObservableValue extends AbstractObservableValue implements Listener { + + /** + * The styled text. + */ + protected StyledText text; + + /** + * The event type used by the styled text. + */ + protected int eventType; + + /** + * The current value. + */ + protected Object currentValue; + + /** + * If the Text field may represent more than one value, + * use an AggregatedObservable. + * + * May be null. + */ + protected AggregatedObservable modelProperty; + + /** + * Constructor + * + * @param text + * The Text field to observe + * @param modelProperty + * The model IObservableValue + * @param eventType + * The eventType to listen to. When the event is fired by the Text + * widget, this IObservableValue will fire a ChangeEvent + */ + public StyledTextObservableValue(final StyledText text, final IObservableValue modelProperty, final int eventType) { + this.text = text; + this.eventType = eventType; + if (modelProperty instanceof AggregatedObservable) { + this.modelProperty = (AggregatedObservable) modelProperty; + } + this.text.addListener(eventType, this); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.core.databinding.observable.value.IObservableValue#getValueType() + */ + @Override + public Object getValueType() { + return String.class; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.core.databinding.observable.value.AbstractObservableValue#doGetValue() + */ + @Override + protected Object doGetValue() { + if (UnchangedObject.instance.toString().equals(text.getText())) { + return null; + } else { + return text.getText(); + } + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.core.databinding.observable.value.AbstractObservableValue#doSetValue(java.lang.Object) + */ + @Override + protected void doSetValue(final Object value) { + if (modelProperty != null && modelProperty.hasDifferentValues()) { + this.text.setText(UnchangedObject.instance.toString()); + this.currentValue = UnchangedObject.instance; + } else { + if (value instanceof String) { + this.text.setText((String) value); + this.currentValue = value; + } else if (value == null) { + this.text.setText(""); //$NON-NLS-1$ + this.currentValue = null; + } + } + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.swt.widgets.Listener#handleEvent(org.eclipse.swt.widgets.Event) + */ + @Override + public void handleEvent(final Event event) { + + final Object oldValue = currentValue; + final Object newValue = getValue(); + if (newValue == null) { + return; + } + currentValue = newValue; + + if ((eventType & event.type) != 0) { + fireValueChange(new ValueDiff() { + + @Override + public Object getOldValue() { + return oldValue; + } + + @Override + public Object getNewValue() { + return newValue; + } + + }); + } + } + +} diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/databinding/StyledTextReferenceDialogObservableValue.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/databinding/StyledTextReferenceDialogObservableValue.java new file mode 100644 index 00000000000..eb77f7e30d1 --- /dev/null +++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/databinding/StyledTextReferenceDialogObservableValue.java @@ -0,0 +1,91 @@ +/***************************************************************************** + * Copyright (c) 2015 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: + * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.widgets.databinding; + +import org.eclipse.core.databinding.observable.value.IObservableValue; +import org.eclipse.jface.viewers.ILabelProvider; +import org.eclipse.jface.viewers.LabelProvider; +import org.eclipse.papyrus.infra.widgets.editors.AbstractValueEditor; +import org.eclipse.papyrus.infra.widgets.providers.UnchangedObject; +import org.eclipse.swt.custom.StyledText; + +/** + * An ObservableValue for ReferenceDialog widget (Which displays + * the current value with a CLabel) + */ +public class StyledTextReferenceDialogObservableValue extends StyledTextObservableValue { + + /** + * The value editor. + */ + private AbstractValueEditor referenceDialog; + + /** + * The label provider used to get the text value. + */ + private ILabelProvider labelProvider; + + /** + * @param dialog + * The observed StyledTextReferenceDialog + * @param styledText + * The observed StyledText + * @param modelObservable + * The Model IObservable + * @param eventType + * The eventType to listen to. When the event is fired by the Text + * widget, this IObservableValue will fire a ChangeEvent + * @param labelProvider + * The label provider + */ + public StyledTextReferenceDialogObservableValue(final AbstractValueEditor dialog, final StyledText styledText, final IObservableValue modelObservable, final int eventType, final ILabelProvider labelProvider) { + super(styledText, modelObservable, eventType); + this.referenceDialog = dialog; + this.labelProvider = labelProvider; + } + + /** + * Set the label provider. + * + * @param labelProvider + * The LabelProvider used to define the CLabel's text and image, + * based on the current value + */ + public void setLabelProvider(ILabelProvider labelProvider) { + if (labelProvider != null) { + this.labelProvider = labelProvider; + } else { + this.labelProvider = new LabelProvider(); + } + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.infra.widgets.databinding.StyledTextObservableValue#doSetValue(java.lang.Object) + */ + @Override + protected void doSetValue(final Object value) { + if (null != modelProperty && modelProperty.hasDifferentValues()) { + this.text.setText(UnchangedObject.instance.toString()); + this.currentValue = UnchangedObject.instance; + } else if (value instanceof String) { + this.text.setText((String) value); + this.currentValue = value; + } else { + this.text.setText(labelProvider.getText(value)); + this.currentValue = value; + } + referenceDialog.update(); + } +} diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/CompletionStyledTextMultipleReferenceEditor.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/CompletionStyledTextMultipleReferenceEditor.java new file mode 100644 index 00000000000..7103ed3b46e --- /dev/null +++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/CompletionStyledTextMultipleReferenceEditor.java @@ -0,0 +1,128 @@ +/***************************************************************************** + * 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ +package org.eclipse.papyrus.infra.widgets.editors; + +import org.eclipse.core.databinding.observable.IChangeListener; +import org.eclipse.core.databinding.observable.list.IObservableList; +import org.eclipse.papyrus.infra.widgets.databinding.CompletionStyledTextMultiReferenceDialogObservableValue; +import org.eclipse.papyrus.infra.widgets.util.IPapyrusConverter; +import org.eclipse.papyrus.infra.widgets.util.ISetPapyrusConverter; +import org.eclipse.swt.SWT; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.widgets.Composite; + +/** + * + * + * An editor for multivalued references, with a string editor in addition. This editor should be used when + * there is enough vertical space available. If the vertical space is limited, + * CompactMultipleReferenceEditor should be used instead. + * + * @author Vincent Lorenzo + * + */ +public class CompletionStyledTextMultipleReferenceEditor extends MultipleReferenceEditor implements ISetPapyrusConverter { + + /** + * the embedded string editor + */ + private CompletionStyledTextStringEditor editor; + + /** + * the converter to use + */ + private IPapyrusConverter converter; + + /** + * + * Constructor. + * + * @param parent + * @param style + * @param ordered + * @param unique + * @param label + */ + public CompletionStyledTextMultipleReferenceEditor(Composite parent, int style, boolean ordered, boolean unique, String label) { + super(parent, style, ordered, unique, label); + addStyledTextSection(parent, style); + } + + /** + * + * Constructor. + * + * @param parent + * @param style + * @param label + */ + public CompletionStyledTextMultipleReferenceEditor(Composite parent, int style, String label) { + super(parent, style, label); + addStyledTextSection(parent, style); + } + + /** + * + * Constructor. + * + * @param parent + * @param style + */ + public CompletionStyledTextMultipleReferenceEditor(Composite parent, int style) { + super(parent, style); + addStyledTextSection(parent, style); + } + + /** + * + * @param parent + * @param style + */ + protected void addStyledTextSection(Composite parent, int style) { + editor = new CompletionStyledTextStringEditor(this, style | SWT.BORDER); + GridData treeData = new GridData(SWT.FILL, SWT.FILL, true, true); + treeData.horizontalSpan = 2; + editor.setLayoutData(treeData); + } + + + /** + * @see org.eclipse.papyrus.infra.widgets.editors.MultipleValueEditor#setModelObservable(org.eclipse.core.databinding.observable.list.IObservableList) + * + * @param modelProperty + */ + @Override + public void setModelObservable(IObservableList modelProperty) { + super.setModelObservable(modelProperty); + CompletionStyledTextMultiReferenceDialogObservableValue styledTextObservable = new CompletionStyledTextMultiReferenceDialogObservableValue(editor, editor.getText(), modelProperty, SWT.FocusOut); + styledTextObservable.setPapyrusConverter(converter); + styledTextObservable.addChangeListener(new IChangeListener() { + + @Override + public void handleChange(org.eclipse.core.databinding.observable.ChangeEvent event) { + commit(); + } + }); + editor.setValue(modelProperty); + } + + /** + * @see org.eclipse.papyrus.infra.widgets.util.ISetPapyrusConverter#setPapyrusConverter(org.eclipse.papyrus.infra.widgets.util.IPapyrusConverter) + * + * @param converter + */ + @Override + public void setPapyrusConverter(IPapyrusConverter converter) { + this.converter = converter; + this.editor.setPapyrusConverter(converter); + } +} diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/CompletionStyledTextReferenceDialog.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/CompletionStyledTextReferenceDialog.java new file mode 100644 index 00000000000..8c7847d3b0a --- /dev/null +++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/CompletionStyledTextReferenceDialog.java @@ -0,0 +1,82 @@ +/***************************************************************************** + * Copyright (c) 2015 CEA LIST and others. + * + * 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: + * CEA LIST - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.infra.widgets.editors; + +import org.eclipse.core.databinding.observable.value.IObservableValue; +import org.eclipse.papyrus.infra.widgets.databinding.CompletionStyledTextReferenceDialogObservableValue; +import org.eclipse.papyrus.infra.widgets.util.IPapyrusConverter; +import org.eclipse.papyrus.infra.widgets.util.ISetPapyrusConverter; +import org.eclipse.swt.SWT; +import org.eclipse.swt.widgets.Composite; + +/** + * @author Vincent Lorenzo + * + */ +public class CompletionStyledTextReferenceDialog extends StyledTextReferenceDialog implements ISetPapyrusConverter { + /** + * the content assist helper used for the completion + */ + protected IPapyrusConverter parser; + + /** + * + * Constructor. + * + * @param parent + * @param style + */ + public CompletionStyledTextReferenceDialog(Composite parent, int style) { + super(parent, style); + } + + /** + * + * @see org.eclipse.papyrus.infra.widgets.editors.StyledTextReferenceDialog#createStyledTextStringEditor(org.eclipse.swt.widgets.Composite, java.lang.String, int) + * + * @param parent + * @param initialValue + * @param style + * @return + */ + protected StyledTextStringEditor createStyledTextStringEditor(Composite parent, String initialValue, int style) { + StyledTextStringEditor editor = new CompletionStyledTextStringEditor(parent, style); + editor.setValue(initialValue); + return editor; + } + + /** + * + * @see org.eclipse.papyrus.infra.widgets.editors.StyledTextReferenceDialog#createWidgetObservable(org.eclipse.core.databinding.observable.value.IObservableValue) + * + * @param modelProperty + * @return + */ + protected IObservableValue createWidgetObservable(IObservableValue modelProperty) { + CompletionStyledTextReferenceDialogObservableValue val = new CompletionStyledTextReferenceDialogObservableValue(this, this.styledTextStringEditor.getText(), modelProperty, SWT.FocusOut); + val.setPapyrusConverter(parser); + return val; + } + + /** + * @see org.eclipse.papyrus.infra.widgets.util.ISetPapyrusConverter#setPapyrusConverter(org.eclipse.papyrus.infra.widgets.util.IPapyrusConverter) + * + * @param parser + */ + @Override + public void setPapyrusConverter(IPapyrusConverter parser) { + this.parser = parser; + ((CompletionStyledTextStringEditor) styledTextStringEditor).setPapyrusConverter(parser); + } +} diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/CompletionStyledTextStringEditor.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/CompletionStyledTextStringEditor.java new file mode 100644 index 00000000000..367b67aa907 --- /dev/null +++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/CompletionStyledTextStringEditor.java @@ -0,0 +1,175 @@ +/***************************************************************************** + * Copyright (c) 2015 CEA LIST and others. + * + * 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: + * CEA LIST - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.infra.widgets.editors; + +import java.util.Collection; + +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Status; +import org.eclipse.papyrus.infra.widgets.util.IPapyrusConverter; +import org.eclipse.papyrus.infra.widgets.util.ISetPapyrusConverter; +import org.eclipse.papyrus.infra.widgets.validator.AbstractValidator; +import org.eclipse.swt.SWT; +import org.eclipse.swt.custom.StyledText; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Event; + +/** + * @author Vincent Lorenzo + * + */ +public class CompletionStyledTextStringEditor extends StyledTextStringEditor implements ISetPapyrusConverter { + + /** + * This wrapper provides a text field with completion + */ + private StringEditorWithCompletionWrapper wrapper; + + /** + * the parser to use + */ + protected IPapyrusConverter parser; + + /** + * + * Constructor. + * + * @param parent + * @param style + * @param heighHint + * @param widthHint + */ + public CompletionStyledTextStringEditor(Composite parent, int style, int heighHint, int widthHint) { + super(parent, style, heighHint, widthHint); + createReferenceTargetValidator(); + } + + /** + * + * Constructor. + * + * @param parent + * @param style + * @param label + * @param heighHint + * @param widthHint + */ + public CompletionStyledTextStringEditor(Composite parent, int style, String label, int heighHint, int widthHint) { + super(parent, style, label, heighHint, widthHint); + createReferenceTargetValidator(); + } + + /** + * + * Constructor. + * + * @param parent + * @param style + * @param label + */ + public CompletionStyledTextStringEditor(Composite parent, int style, String label) { + super(parent, style, label); + createReferenceTargetValidator(); + } + + + + /** + * @see org.eclipse.papyrus.infra.widgets.editors.StyledTextStringEditor#setValue(java.lang.Object) + * + * @param value + */ + @Override + public void setValue(Object value) { + if (parser != null && value instanceof Collection<?>) { + String val = parser.canonicalToEditValue(value, 0); + super.setValue(val); + } else { + super.setValue(value); + } + } + + /** + * + * Constructor. + * + * @param parent + * @param style + */ + public CompletionStyledTextStringEditor(Composite parent, int style) { + super(parent, style); + createReferenceTargetValidator(); + } + + protected void notifyChange() { + + text.notifyListeners(SWT.FocusOut, new Event()); + + // added to update the status when we use the completion + if (targetValidator != null) { + IStatus status = targetValidator.validate(text.getText()); + updateStatus(status); + } + commit(); + changeColorField(); + } + + /** + * create the validator for the text field + */ + protected void createReferenceTargetValidator() { + targetValidator = new AbstractValidator() { + + @Override + public IStatus validate(Object value) { + if (parser == null) { + return Status.OK_STATUS; + } + if (value instanceof String) { + return parser.isValidEditString((String) value); + } + // not possible + return new Status(IStatus.ERROR, org.eclipse.papyrus.infra.widgets.Activator.PLUGIN_ID, "Impossible case"); //$NON-NLS-1$ + } + }; + } + + /** + * + * @see org.eclipse.papyrus.infra.widgets.editors.StyledTextStringEditor#createStyledText(org.eclipse.swt.widgets.Composite, java.lang.String, int) + * + * @param parent + * @param value + * @param style + * @return + */ + @Override + public StyledText createStyledText(Composite parent, String value, int style) { + this.wrapper = new StringEditorWithCompletionWrapper(parent, style); + return wrapper.getTextWidget(); + } + + /** + * + * @see org.eclipse.papyrus.infra.widgets.util.ISetPapyrusConverter#setPapyrusConverter(org.eclipse.papyrus.infra.widgets.util.IPapyrusConverter) + * + * @param parser + */ + public void setPapyrusConverter(IPapyrusConverter parser) { + this.parser = parser; + this.wrapper.setPapyrusConverter(parser); + } + + +} diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/StringEditorWithCompletionWrapper.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/StringEditorWithCompletionWrapper.java new file mode 100644 index 00000000000..7de49d963cc --- /dev/null +++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/StringEditorWithCompletionWrapper.java @@ -0,0 +1,200 @@ +/***************************************************************************** + * Copyright (c) 2015 CEA LIST and others. + * + * 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: + * CEA LIST - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.infra.widgets.editors; + +import org.eclipse.jface.text.Document; +import org.eclipse.jface.text.IDocument; +import org.eclipse.jface.text.TextViewer; +import org.eclipse.jface.text.contentassist.ContentAssistEvent; +import org.eclipse.jface.text.contentassist.ContentAssistant; +import org.eclipse.jface.text.contentassist.ICompletionListener; +import org.eclipse.jface.text.contentassist.ICompletionProposal; +import org.eclipse.jface.text.contentassist.IContentAssistProcessor; +import org.eclipse.papyrus.infra.widgets.util.IPapyrusConverter; +import org.eclipse.papyrus.infra.widgets.util.ISetPapyrusConverter; +import org.eclipse.swt.SWT; +import org.eclipse.swt.custom.StyledText; +import org.eclipse.swt.events.KeyAdapter; +import org.eclipse.swt.events.KeyEvent; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Display; + +/** + * @author Vincent Lorenzo + * + * This class allows to build a StyledText widget allowing the completion + * + */ +public class StringEditorWithCompletionWrapper implements ISetPapyrusConverter{ + + /** + * the parser used to convert object to string and string to object + */ + public IPapyrusConverter parser; + + /** + * boolean indicating if the content assist popup is opened + */ + private boolean delayedIsOpen = false; + + /** + * the text viewer + */ + private TextViewer textViewer; + + /** + * + * Constructor. + * + * @param parent + * the parent to use to create the TextWidget + * @param helper + * the helper to use to find the elements by their name + */ + public StringEditorWithCompletionWrapper(Composite parent, IPapyrusConverter parser) { + setPapyrusConverter(parser); + buildControls(parent, SWT.NONE); + } + + /** + * + * Constructor. + * + * @param parent + * the parent to use to create the TextWidget + * @param helper + * the helper to use to find the elements by their name + */ + public StringEditorWithCompletionWrapper(Composite parent, int style, IPapyrusConverter parser) { + setPapyrusConverter(parser); + buildControls(parent, style); + } + + /** + * + * Constructor. + * + * @param parent + * the parent to use to create the TextWidget + * @param helper + * the helper to use to find the elements by their name + */ + public StringEditorWithCompletionWrapper(Composite parent, int style) { + buildControls(parent, style); + } + + + /** + * + * @return + * the text viewer used + */ + public TextViewer getTextViewer() { + return this.textViewer; + } + + /** + * + * @return + * the styled text used or <code>null</code> + */ + public StyledText getTextWidget() { + if (this.textViewer != null) { + return this.textViewer.getTextWidget(); + } + return null; + } + + + /** + * + * @return + * <code>true</code> if the content assist is currently opened + */ + public boolean isContentAssistOpened() { + return delayedIsOpen; + } + + private ContentAssistant assistant; + + private IContentAssistProcessor processor; + + private void buildControls(Composite parent, int style) { + // setLayout(new FillLayout()); + textViewer = new TextViewer(parent, SWT.SINGLE | SWT.V_SCROLL | style); + + textViewer.setDocument(new Document()); + + this.assistant = new ContentAssistant(); + + + if (parser != null) { + this.processor = parser.getCompletionProcessor(null); + assistant.setContentAssistProcessor(this.processor, IDocument.DEFAULT_CONTENT_TYPE); + } + + assistant.install(textViewer); + assistant.addCompletionListener(new ICompletionListener() { + + @Override + public void selectionChanged(ICompletionProposal proposal, boolean smartToggle) { + + } + + @Override + public void assistSessionStarted(ContentAssistEvent event) { + // reset open status asynchronously. + Display.getDefault().asyncExec(new Runnable() { + + public void run() { + delayedIsOpen = true; + } + }); + } + + @Override + public void assistSessionEnded(ContentAssistEvent event) { + // reset open status asynchronously. + Display.getDefault().asyncExec(new Runnable() { + + public void run() { + delayedIsOpen = false; + } + }); + + } + }); + textViewer.getControl().addKeyListener(new KeyAdapter() { + public void keyPressed(KeyEvent e) { + if (SWT.CTRL == e.stateMask && SWT.SPACE == e.character) { + assistant.showPossibleCompletions(); + } + } + }); + } + + /** + * @see org.eclipse.papyrus.infra.widgets.util.ISetPapyrusConverter#setPapyrusConverter(org.eclipse.papyrus.infra.widgets.util.IPapyrusConverter) + * + * @param parser + */ + @Override + public void setPapyrusConverter(IPapyrusConverter parser) { + this.parser = parser; + if (parser != null && assistant!=null && processor==null) { + this.processor = parser.getCompletionProcessor(null); + assistant.setContentAssistProcessor(this.processor, IDocument.DEFAULT_CONTENT_TYPE); + } + } +} diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/StyledTextReferenceDialog.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/StyledTextReferenceDialog.java new file mode 100644 index 00000000000..a00452dd51f --- /dev/null +++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/StyledTextReferenceDialog.java @@ -0,0 +1,750 @@ +/***************************************************************************** + * Copyright (c) 2013 CEA LIST. + * + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation + * Nicolas FAUVERGUE (ALL4TECà nicolas.fauvergue@all4tec.net - Bug 459747 + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.widgets.editors; + +import java.util.Collection; +import java.util.Collections; +import java.util.List; +import java.util.Timer; +import java.util.TimerTask; + +import org.eclipse.core.databinding.observable.value.IObservableValue; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.OperationCanceledException; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.jface.fieldassist.ControlDecoration; +import org.eclipse.jface.fieldassist.FieldDecoration; +import org.eclipse.jface.fieldassist.FieldDecorationRegistry; +import org.eclipse.jface.viewers.ILabelProvider; +import org.eclipse.jface.viewers.LabelProvider; +import org.eclipse.jface.window.Window; +import org.eclipse.osgi.util.NLS; +import org.eclipse.papyrus.infra.widgets.Activator; +import org.eclipse.papyrus.infra.widgets.creation.ReferenceValueFactory; +import org.eclipse.papyrus.infra.widgets.databinding.StyledTextReferenceDialogObservableValue; +import org.eclipse.papyrus.infra.widgets.messages.Messages; +import org.eclipse.papyrus.infra.widgets.providers.EncapsulatedContentProvider; +import org.eclipse.papyrus.infra.widgets.providers.IAdaptableContentProvider; +import org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider; +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.MouseEvent; +import org.eclipse.swt.events.MouseListener; +import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.events.SelectionListener; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Button; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.swt.widgets.Widget; + +/** + * An editor representing a single reference as a String Editor. A filtered selection + * dialog is used to edit the value. Also offers support for unsetting the + * value. This Editor needs a ContentProvider, and may use an optional + * LabelProvider, describing the objects that can be referred by this property + * + * @author Vincent Lorenzo + * + * Duplicated code from {@link ReferenceDialog}, replacing CLabel by {@link StyledTextStringEditor} + * + */ +public class StyledTextReferenceDialog extends AbstractValueEditor implements SelectionListener { + + /** + * The styled text displaying the current value + */ + protected final StyledTextStringEditor styledTextStringEditor; + + /** + * The Button used to browse the available values + */ + protected Button browseValuesButton; + + /** + * The Button used to create a new instance + */ + protected Button createInstanceButton; + + /** + * The Button used to edit the current object + */ + protected Button editInstanceButton; + + /** + * The Button used to unset the current value + */ + protected Button unsetButton; + + /** + * The label provider used to display the values in both the label and the + * selection dialog + */ + protected ILabelProvider labelProvider; + + /** + * The content provider, providing the different possible values for the + * input object + */ + protected IStaticContentProvider contentProvider; + + /** + * The dialog used to select the value + */ + protected final ITreeSelectorDialog dialog; + + /** + * The current value for this editor + */ + protected Object value; + + /** + * The factory used to create or edit objects directly from this editor + */ + protected ReferenceValueFactory valueFactory; + + /** + * Indicates whether the widget is read-only or not + */ + protected boolean readOnly; + + /** + * Boolean to detect direct creation. + */ + private boolean directCreation; + + /** + * Indicates whether the widget requires a value or not. If it is mandatory, + * it cannot delete/unset its value + */ + protected boolean mandatory; + + /** + * The control decoration of the styled text. + */ + private ControlDecoration controlDecoration; + + /** + * Determinate if an error occurred. + */ + protected boolean error = false; + + /** + * The timer. + */ + private Timer timer; + + /** + * The timer tack for the change color. + */ + private TimerTask changeColorTask; + + /** + * Determinate if an edit occurred. + */ + private boolean edit = false; + + /** + * Constructs a new ReferenceDialog in the given parent Composite. The style + * will be applied to the syled text displaying the current value. + * + * @param parent + * The parent composite. + * @param style + * The style of the styled text. + */ + public StyledTextReferenceDialog(final Composite parent, final int style) { + super(parent, style); + GridData gridData = getDefaultLayoutData(); + + styledTextStringEditor = createStyledTextStringEditor(this, null, factory.getBorderStyle() | style); + styledTextStringEditor.setLayoutData(gridData); + styledTextStringEditor.addMouseListener(new MouseListener() { + + @Override + public void mouseDoubleClick(MouseEvent e) { + editAction(); // TODO : Try to determine whether the double + // click should call the edit, create or browse + // action + // e.g. if the value is null, try to browse. If we cannot + // browse, try to create an instance. + } + + @Override + public void mouseDown(MouseEvent e) { + // Nothing + } + + @Override + public void mouseUp(MouseEvent e) { + // Nothing + } + + }); + + dialog = createDialog(parent.getShell()); + + createButtons(); + updateControls(); + controlDecoration = new ControlDecoration(styledTextStringEditor, SWT.TOP | SWT.LEFT); + + gridData.horizontalIndent = FieldDecorationRegistry.getDefault().getMaximumDecorationWidth(); + } + + /** + * This allow to create the styled text editor. + * + * @param parent + * The parent composite. + * @param initialValue + * The initial value of the styled text. + * @param style + * The style of the styled text. + * @return The created {@link StyledTextStringEditor}. + */ + protected StyledTextStringEditor createStyledTextStringEditor(final Composite parent, final String initialValue, final int style) { + StyledTextStringEditor editor = new StyledTextStringEditor(parent, style); + editor.setValue(initialValue); + return editor; + } + + /** + * This allow to create the dialog. + * + * @param shell + * The current shell. + * @return The created {@link ITreeSelectorDialog}. + */ + protected ITreeSelectorDialog createDialog(final Shell shell) { + return new TreeSelectorDialog(shell); + } + + /** + * This allow to create the buttons of the reference dialog (browse, create, edit and unset). + */ + protected void createButtons() { + ((GridLayout) getLayout()).numColumns += 4; + + browseValuesButton = factory.createButton(this, null, SWT.PUSH); + browseValuesButton.setImage(Activator.getDefault().getImage("/icons/browse_12x12.gif")); //$NON-NLS-1$ + browseValuesButton.setToolTipText(Messages.ReferenceDialog_EditValue); + browseValuesButton.addSelectionListener(this); + + createInstanceButton = factory.createButton(this, null, SWT.PUSH); + createInstanceButton.setImage(Activator.getDefault().getImage("/icons/Add_12x12.gif")); //$NON-NLS-1$ + createInstanceButton.setToolTipText(Messages.ReferenceDialog_CreateANewObject); + createInstanceButton.addSelectionListener(this); + + editInstanceButton = factory.createButton(this, null, SWT.PUSH); + editInstanceButton.setImage(Activator.getDefault().getImage("/icons/Edit_12x12.gif")); //$NON-NLS-1$ + editInstanceButton.setToolTipText(Messages.ReferenceDialog_EditTheCurrentValue); + editInstanceButton.addSelectionListener(this); + + unsetButton = factory.createButton(this, null, SWT.PUSH); + unsetButton.setImage(Activator.getDefault().getImage("/icons/Delete_12x12.gif")); //$NON-NLS-1$ + unsetButton.setToolTipText(Messages.ReferenceDialog_UnsetValue); + unsetButton.addSelectionListener(this); + } + + /** + * The action executed when the "browse" button is selected Choose a value + * from a selection of already created objects + */ + protected void browseAction() { + setInitialSelection(Collections.singletonList(getValue())); + int result = dialog.open(); + if (result == Window.OK) { + Object[] newValue = dialog.getResult(); + if (newValue == null) { + return; + } + + if (newValue.length == 0) { + setValue(null); + } else { + Object value = newValue[0]; + if (contentProvider instanceof IAdaptableContentProvider) { + + value = ((IAdaptableContentProvider) contentProvider).getAdaptedValue(value); + } + setValue(value); + styledTextStringEditor.setValue(labelProvider.getText(newValue)); + } + } + } + + /** + * The action executed when the "create" button is selected Create a new + * instance and assign it to this reference + */ + protected void createAction() { + if (valueFactory != null && valueFactory.canCreateObject()) { + final Object context = getContextElement(); + getOperationExecutor(context).execute(new Runnable() { + + @Override + public void run() { + Object value = valueFactory.createObject(createInstanceButton, context); + if (value == null) { + // Cancel the operation + throw new OperationCanceledException(); + } + Collection<Object> validatedObjects = valueFactory.validateObjects(Collections.singleton(value)); + if (!validatedObjects.isEmpty()) { + final Object newValue = validatedObjects.iterator().next(); + setValue(newValue); + styledTextStringEditor.setValue(labelProvider.getText(newValue)); + } + } + }, NLS.bind(Messages.ReferenceDialog_setOperation, labelText)); + } + } + + /** + * The action executed when the "edit" button is selected Edits the object + * that is currently selected + */ + protected void editAction() { + styledTextStringEditor.setBackground(EDIT); + edit = true; + final Object currentValue = getValue(); + if (currentValue != null && valueFactory != null && valueFactory.canEdit()) { + getOperationExecutor(currentValue).execute(new Runnable() { + + @Override + public void run() { + Object newValue = valueFactory.edit(editInstanceButton, currentValue); + + // Per the contract of ReferenceValueFactory::edit(), a null return means the object was edited "in place." + // In that case, there is nothing further to do + if (newValue != null) { + setValue(newValue); + styledTextStringEditor.setValue(labelProvider.getText(newValue)); + } + + updateLabel(); + } + }, NLS.bind(Messages.ReferenceDialog_editOperation, labelText)); + } + } + + /** + * The action executed when the "unset" button is selected Sets the current + * reference to null + */ + protected void unsetAction() { + setValue(null); + } + + /** + * Updates the displayed label for the current value + */ + protected void updateLabel() { + if (binding != null) { + binding.updateModelToTarget(); + + } else { + styledTextStringEditor.setValue(labelProvider.getText(getValue())); + } + } + + /** + * Sets the Content provider for this editor + * + * @param provider + * The content provider used to retrieve the possible values for + * this Reference + */ + public void setContentProvider(final IStaticContentProvider provider) { + dialog.setContentProvider(new EncapsulatedContentProvider(provider)); + if (getValue() != null) { + setInitialSelection(Collections.singletonList(getValue())); + } + + this.contentProvider = provider; + } + + /** + * Sets the Label provider for this editor If the label provider is null, a + * default one will be used. The same label provider is used for both the + * editor's label and the selection dialog. + * + * @param provider + * The label provider + */ + public void setLabelProvider(final ILabelProvider provider) { + if (provider == null) { + setLabelProvider(new LabelProvider()); + return; + } + + dialog.setLabelProvider(provider); + this.labelProvider = provider; + if (widgetObservable != null) { + ((StyledTextReferenceDialogObservableValue) widgetObservable).setLabelProvider(labelProvider); + } + updateLabel(); + } + + /** + * {@inheritDoc} + */ + @Override + public void setLabel(final String label) { + super.setLabel(label); + dialog.setTitle(label); + } + + /** + * {@inheritDoc} + */ + @Override + public Object getValue() { + if (modelProperty != null) { + Object modelPropertyValue = modelProperty.getValue(); + if(modelPropertyValue == null){ + EObject contextElement = getContextElement() != null && getContextElement() instanceof EObject ? (EObject) getContextElement() : null; + if(modelProperty.getValueType() instanceof EStructuralFeature){ + return contextElement.eGet((EStructuralFeature)modelProperty.getValueType()); + } + } + return modelPropertyValue; + } + return value; + } + + /** + * {@inheritDoc} + */ + @Override + public Object getEditableType() { + return Object.class; + } + + /** + * {@inheritDoc} + */ + @Override + public void setReadOnly(boolean readOnly) { + this.readOnly = readOnly; + updateControls(); + } + + /** + * {@inheritDoc} + */ + @Override + public boolean isReadOnly() { + return !styledTextStringEditor.isEnabled(); + } + + /** + * {@inheritDoc} + */ + @Override + protected void doBinding() { + super.doBinding(); + } + + /** + * Set the initial selection. + * + * @param initialValues + * The list of possible values. + */ + protected void setInitialSelection(final List<?> initialValues) { + dialog.setInitialElementSelections(initialValues); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.infra.widgets.editors.AbstractValueEditor#setModelObservable(org.eclipse.core.databinding.observable.value.IObservableValue) + */ + @Override + public void setModelObservable(final IObservableValue modelProperty) { + setWidgetObservable(createWidgetObservable(modelProperty)); + super.setModelObservable(modelProperty); + this.styledTextStringEditor.setModelObservable(modelProperty); + + updateControls(); + } + + /** + * This allow to create the widget observable value. + * + * @param modelProperty + * The current observable value. + * @return The created {@link StyledTextReferenceDialogObservableValue}. + */ + protected IObservableValue createWidgetObservable(final IObservableValue modelProperty) { + return new StyledTextReferenceDialogObservableValue(this, this.styledTextStringEditor.getText(), modelProperty, SWT.FocusOut, labelProvider); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.swt.widgets.Control#setToolTipText(java.lang.String) + */ + @Override + public void setToolTipText(final String text) { + super.setLabelToolTipText(text); + styledTextStringEditor.setToolTipText(text); + } + + /** + * Set the factory. + * + * @param factory + * The reference value factory. + */ + public void setValueFactory(final ReferenceValueFactory factory) { + valueFactory = factory; + updateControls(); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent) + */ + @Override + public void widgetSelected(final SelectionEvent e) { + Widget widget = e.widget; + if (widget == browseValuesButton) { + browseAction(); + } else if (widget == createInstanceButton) { + createAction(); + } else if (widget == editInstanceButton) { + editAction(); + } else if (widget == unsetButton) { + unsetAction(); + } + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent) + */ + @Override + public void widgetDefaultSelected(final SelectionEvent e) { + // Nothing + } + + /** + * Updates the buttons' status + */ + protected void updateControls() { + // Check if the edit & create buttons should be displayed + boolean exclude = valueFactory == null || !valueFactory.canCreateObject(); + setExclusion(editInstanceButton, exclude); + setExclusion(createInstanceButton, exclude); + + setExclusion(browseValuesButton, directCreation); + + browseValuesButton.setEnabled(!readOnly); + + // If they are displayed, check if they should be enabled + if (!exclude) { + editInstanceButton.setEnabled(valueFactory != null && valueFactory.canEdit() && getValue() != null); + createInstanceButton.setEnabled(valueFactory != null && valueFactory.canCreateObject() && !readOnly); + } + + // Do not display unset if the value is mandatory + setExclusion(unsetButton, mandatory); + if (!mandatory) { + boolean enabled = !readOnly; + enabled = enabled && getValue() != null; + + unsetButton.setEnabled(enabled); + } + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.swt.widgets.Control#update() + */ + @Override + public void update() { + super.update(); + updateControls(); + } + + /** + * Set the direct creation value. + * + * @param directCreation + * Boolean to determinate the direct creation value. + */ + public void setDirectCreation(final boolean directCreation) { + this.directCreation = directCreation; + updateControls(); + } + + /** + * Set the value. + * + * @param value + * The value object. + */ + public void setValue(final Object value) { + this.value = value; + try { + if (modelProperty != null) { + modelProperty.setValue(value); + error = false; + } + } catch (Exception e) { + error = true; + + } + + updateControls(); + updateLabel(); + commit(); + } + + /** + * @see org.eclipse.jface.viewers.StructuredViewer#setInput(Object) + * @param input + * The current input; + */ + public void setInput(final Object input) { + this.dialog.setInput(input); + } + + /** + * Set the mandatory. + * + * @param mandatory + * The mandatory boolean value. + */ + public void setMandatory(final boolean mandatory) { + this.mandatory = mandatory; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.infra.widgets.editors.AbstractValueEditor#updateStatus(org.eclipse.core.runtime.IStatus) + */ + @Override + public void updateStatus(final IStatus status) { + + if (error) { + FieldDecoration error = FieldDecorationRegistry.getDefault().getFieldDecoration(FieldDecorationRegistry.DEC_ERROR); + controlDecoration.setImage(error.getImage()); + controlDecoration.showHoverText(Messages.ReferenceDialog_0); + controlDecoration.setDescriptionText(Messages.ReferenceDialog_1); + controlDecoration.show(); + styledTextStringEditor.setBackground(ERROR); + styledTextStringEditor.update(); + + + } else { + controlDecoration.hide(); + } + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.swt.widgets.Widget#dispose() + */ + @Override + public void dispose() { + if (changeColorTask != null) { + changeColorTask.cancel(); + } + if (timer != null) { + timer.cancel(); + } + super.dispose(); + } + + /** + * This allow to react of cancel of the current task. + */ + private void cancelCurrentTask() { + if (changeColorTask != null) { + changeColorTask.cancel(); + } + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.infra.widgets.editors.AbstractEditor#changeColorField() + */ + @Override + public void changeColorField() { + if (!error & !edit) { + + if (timer == null) { + timer = new Timer(true); + } + + cancelCurrentTask(); + changeColorTask = new TimerTask() { + + @Override + public void run() { + if (StyledTextReferenceDialog.this.isDisposed()) { + return; + } + StyledTextReferenceDialog.this.getDisplay().syncExec(new Runnable() { + + @Override + public void run() { + if (StyledTextReferenceDialog.this.isDisposed()) {// Bug 434787 : Shouldn't not execute the timer thread if the widget is disposed + return; + } + styledTextStringEditor.setBackground(DEFAULT); + styledTextStringEditor.update(); + } + + + }); + } + }; + + if (errorBinding) { + styledTextStringEditor.setBackground(ERROR); + styledTextStringEditor.update(); + } else { + IStatus status = (IStatus) binding.getValidationStatus().getValue(); + switch (status.getSeverity()) { + case IStatus.OK: + case IStatus.WARNING: + timer.schedule(changeColorTask, 600); + styledTextStringEditor.setBackground(VALID); + styledTextStringEditor.update(); + break; + case IStatus.ERROR: + styledTextStringEditor.setBackground(ERROR); + styledTextStringEditor.update(); + break; + + } + } + } else { + styledTextStringEditor.setBackground(DEFAULT); + } + } + +} diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/StyledTextStringEditor.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/StyledTextStringEditor.java new file mode 100644 index 00000000000..6f82b025613 --- /dev/null +++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/StyledTextStringEditor.java @@ -0,0 +1,506 @@ +/***************************************************************************** + * Copyright (c) 2013 CEA LIST. + * + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.widgets.editors; + + +import java.util.Timer; +import java.util.TimerTask; + +import org.eclipse.core.databinding.observable.value.IObservableValue; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.jface.fieldassist.ControlDecoration; +import org.eclipse.jface.fieldassist.FieldDecoration; +import org.eclipse.jface.fieldassist.FieldDecorationRegistry; +import org.eclipse.papyrus.infra.widgets.databinding.StyledTextObservableValue; +import org.eclipse.papyrus.infra.widgets.selectors.StringSelector; +import org.eclipse.swt.SWT; +import org.eclipse.swt.custom.StyledText; +import org.eclipse.swt.events.KeyEvent; +import org.eclipse.swt.events.KeyListener; +import org.eclipse.swt.events.ModifyEvent; +import org.eclipse.swt.events.ModifyListener; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Event; + +/** + * A Property Editor representing a single-line or multi-line String value as a + * Text. This editor's content is validated when the focus is lost, or, if the + * editor is single-line, when the Carriage Return is pressed. For a multi-line + * editor, ctrl+enter will also validate the editor's content. + * + * @see SWT#MULTI + * + * @author Vincent Lorenzo, adapted code from {@link StringEditor} + */ +public class StyledTextStringEditor extends AbstractValueEditor implements KeyListener, ModifyListener { + + /** + * The text box for editing this editor's value + */ + protected final StyledText text; + + private int delay = 600; + + private boolean validateOnDelay = false; + + private Timer timer; + + private TimerTask currentValidateTask; + + private TimerTask changeColorTask; + + private final static int DEFAULT_HEIGHT_HINT = 55; + + private final static int DEFAULT_WIDTH_HINT = 100; + + + /** + * + * Constructor. + * + * @param parent + * The composite in which this editor should be displayed + * @param style + * The style for this editor's text box + */ + public StyledTextStringEditor(Composite parent, int style) { + this(parent, style, null, DEFAULT_HEIGHT_HINT, DEFAULT_WIDTH_HINT); + + } + + /** + * + * Constructor. + * + * @param parent + * The composite in which this editor should be displayed + * @param style + * The style for this editor's text box + * @param label + * The label for this editor + */ + public StyledTextStringEditor(Composite parent, int style, String label) { + this(parent, style, label, DEFAULT_HEIGHT_HINT, DEFAULT_WIDTH_HINT); + } + + /** + * + * Constructor. + * + * @param parent + * The composite in which this editor should be displayed + * @param style + * The style for this editor's text box + * @param heighHint + * Height hint of the text area in multiline mode + * @param widthHint + * Width hint of the text area in multiline mode + */ + public StyledTextStringEditor(Composite parent, int style, int heighHint, int widthHint) { + this(parent, style, null, heighHint, widthHint); + } + + /** + * + * Constructor. + * + * @param parent + * The composite in which this editor should be displayed + * @param style + * The style for this editor's text box + * @param label + * The label for this editor + * @param heighHint + * Height hint of the text area in multiline mode + * @param widthHint + * Width hint of the text area in multiline mode + */ + public StyledTextStringEditor(Composite parent, int style, String label, int heighHint, int widthHint) { + super(parent, label); + + GridData data = getDefaultLayoutData(); + data.grabExcessVerticalSpace = true; + data.grabExcessHorizontalSpace = true; + data.verticalAlignment = SWT.FILL; + data.horizontalAlignment = SWT.FILL; + if ((style & SWT.MULTI) != 0) { + data.minimumHeight = heighHint; + data.minimumWidth = widthHint; + style = style | SWT.V_SCROLL; + } + + text = createStyledText(this, null, style); + text.setLayoutData(data); + + if (label != null) { + super.label.setLayoutData(getLabelLayoutData()); + + } + text.addKeyListener(this); + text.addModifyListener(this); + setCommitOnFocusLost(text); + controlDecoration = new ControlDecoration(text, SWT.LEFT | SWT.TOP); + controlDecoration.hide(); + + // we ignore the indentation + // data.horizontalIndent = FieldDecorationRegistry.getDefault().getMaximumDecorationWidth(); + + // we remove the margin + GridLayout layout = (GridLayout) this.getLayout(); + layout.marginHeight = 0; + layout.marginWidth = 0; + + pack(); + + } + + + /** + * Creates a styled text as a part of the form. + * + * @param parent + * the text parent + * @param value + * the text initial value + * @param style + * the text style + * @return the styled text widget + */ + public StyledText createStyledText(Composite parent, String value, int style) { + StyledText txt = new StyledText(parent, style); + txt.setText(value); + return txt; + } + + + @Override + protected GridData getLabelLayoutData() { + GridData result = super.getLabelLayoutData(); + if (text != null) { + if ((text.getStyle() & SWT.MULTI) != 0) { + result.verticalAlignment = SWT.BEGINNING; + } + } + return result; + } + + /** + * Ignored + */ + @Override + public void keyPressed(KeyEvent e) { + // Nothing + } + + /** + * Validates this editor when one of the following events occur : - CR + * released - Keypad CR released - Ctrl + [CR | Keypad CR] released + * + * @see org.eclipse.swt.events.KeyListener#keyReleased(org.eclipse.swt.events.KeyEvent) + * + * @param e + */ + // TODO : we should prevent the \n from being written when validating the + // multi-line field with Ctrl + CR + @Override + public void keyReleased(KeyEvent e) { + // We listen on Carriage Return or Ctrl+ Carriage return, depending on + // whether the editor is single- or multi-line + if (e.keyCode == SWT.CR || e.keyCode == SWT.KEYPAD_CR) { + if ((text.getStyle() & SWT.MULTI) == 0) { // Single-line : Enter + if (e.stateMask == SWT.NONE) { + notifyChange(); + } + } else { // Multi-line : Ctrl+Enter + if (e.stateMask == SWT.CTRL) { + String str = text.getText(); + if (str.endsWith(StringSelector.LINE_SEPARATOR)) { + int newLength = str.length() - StringSelector.LINE_SEPARATOR.length(); + text.setText(str.substring(0, newLength)); + text.setSelection(newLength); + } + notifyChange(); + } + } + } + + + } + + @Override + public void setModelObservable(IObservableValue observable) { + setWidgetObservable(new StyledTextObservableValue(text, observable, SWT.FocusOut), true); + super.setModelObservable(observable); + + } + + /** + * {@inheritDoc} + */ + @Override + public Object getEditableType() { + return String.class; + } + + /** + * {@inheritDoc} + */ + @Override + public Object getValue() { + return text.getText(); + } + + @Override + public void setReadOnly(boolean readOnly) { + text.setEnabled(!readOnly); + } + + @Override + public boolean isReadOnly() { + return !text.isEnabled(); + } + + protected void notifyChange() { + + text.notifyListeners(SWT.FocusOut, new Event()); + commit(); + changeColorField(); + } + + @Override + public void setToolTipText(String tooltip) { + text.setToolTipText(tooltip); + super.setLabelToolTipText(tooltip); + } + + /** + * Sets the current text value for this editor + * + * @param value + */ + public void setValue(Object value) { + if (value instanceof String) { + this.text.setText((String) value); + } else { + this.text.setText(""); //$NON-NLS-1$; + } + } + + /** + * Indicates that this editor should be automatically validated after a + * timer. + * + * @param validateOnDelay + */ + public void setValidateOnDelay(boolean validateOnDelay) { + this.validateOnDelay = validateOnDelay; + + if (validateOnDelay) { + text.addModifyListener(this); + } else { + text.removeModifyListener(this); + cancelCurrentTask(); + } + } + + /** + * Indicates that this editor should be automatically validated after the + * given timer + * + * @param millis + * The delay after which the editor should be automatically + * validated, in milliseconds. The default is 600ms + */ + public void setValidateOnDelay(int millis) { + this.delay = millis; + setValidateOnDelay(true); + if (delay == 0) { + cancelCurrentTask(); + } + } + + private void cancelCurrentTask() { + if (currentValidateTask != null) { + currentValidateTask.cancel(); + currentValidateTask = null; + } + } + + /** + * {@inheritDoc} + */ + + @Override + public void modifyText(ModifyEvent e) { + // SWT Thread + if (validateOnDelay) { + if (delay == 0) { + commit(); // Direct commit on edition, to avoid creating useless + // threads + + return; + } + + if (timer == null) { + timer = new Timer(true); + } + + cancelCurrentTask(); + currentValidateTask = new TimerTask() { + + // Timer thread + @Override + public void run() { + StyledTextStringEditor.this.getDisplay().syncExec(new Runnable() { + + // SWT Thread + @Override + public void run() { + + commit(); + } + }); + } + }; + timer.schedule(currentValidateTask, delay); + } + if (targetValidator != null) { + IStatus status = targetValidator.validate(text.getText()); + updateStatus(status); + } + if (modelValidator != null) { + IStatus status = modelValidator.validate(text.getText()); + updateStatus(status); + if (binding == null) { + update(); + } + } + + if (modelProperty != null) { // Bug 433169: The widget may be used without an Observable Value (setValue + getValue) + if (modelProperty.getValue() != null) { + if (!isReadOnly() && !modelProperty.getValue().toString().equals(text.getText())) { + text.setBackground(EDIT); + } else { + text.setBackground(DEFAULT); + } + } else { + if (text.getText().equals("")) { + text.setBackground(DEFAULT); + } else { + text.setBackground(EDIT); + } + } + } + } + + @Override + public void dispose() { + cancelCurrentTask(); + cancelChangeColorTask(); + if (timer != null) { + timer.cancel(); + timer = null; + } + super.dispose(); + } + + public StyledText getText() { + return text; + } + + @Override + public void updateStatus(IStatus status) { + switch (status.getSeverity()) { + case IStatus.OK: + controlDecoration.hide(); + break; + case IStatus.WARNING: + FieldDecoration warning = FieldDecorationRegistry.getDefault().getFieldDecoration(FieldDecorationRegistry.DEC_WARNING); + controlDecoration.setImage(warning.getImage()); + controlDecoration.showHoverText(status.getMessage()); + controlDecoration.setDescriptionText(status.getMessage()); + controlDecoration.show(); + break; + case IStatus.ERROR: + FieldDecoration error = FieldDecorationRegistry.getDefault().getFieldDecoration(FieldDecorationRegistry.DEC_ERROR); + controlDecoration.setImage(error.getImage()); + controlDecoration.showHoverText(status.getMessage()); + controlDecoration.setDescriptionText(status.getMessage()); + controlDecoration.show(); + break; + default: + controlDecoration.hide(); + break; + } + + } + + @Override + public void changeColorField() { + if (binding != null) { + + if (timer == null) { + timer = new Timer(true); + } + + cancelChangeColorTask(); + changeColorTask = new TimerTask() { + + @Override + public void run() { + if (StyledTextStringEditor.this.isDisposed()) { + return; + } + StyledTextStringEditor.this.getDisplay().syncExec(new Runnable() { + + @Override + public void run() { + text.setBackground(DEFAULT); + text.update(); + } + }); + } + }; + if (errorBinding) { + text.setBackground(ERROR); + text.update(); + } else { + IStatus status = (IStatus) binding.getValidationStatus().getValue(); + switch (status.getSeverity()) { + case IStatus.OK: + case IStatus.WARNING: + timer.schedule(changeColorTask, 600); + text.setBackground(VALID); + text.update(); + break; + case IStatus.ERROR: + text.setBackground(ERROR); + text.update(); + break; + + } + } + } + } + + private void cancelChangeColorTask() { + if (changeColorTask != null) { + changeColorTask.cancel(); + changeColorTask = null; + } + } + +} diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/util/DoNothingCompletionProposal.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/util/DoNothingCompletionProposal.java new file mode 100644 index 00000000000..b37f22846f5 --- /dev/null +++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/util/DoNothingCompletionProposal.java @@ -0,0 +1,146 @@ +/***************************************************************************** + * Copyright (c) 2015 CEA LIST and others. + * + * 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: + * CEA LIST - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.infra.widgets.util; + +import org.eclipse.core.runtime.Assert; +import org.eclipse.jface.text.IDocument; +import org.eclipse.jface.text.contentassist.ICompletionProposal; +import org.eclipse.jface.text.contentassist.IContextInformation; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.graphics.Point; + +/** + * @author VL222926 + * + */ +public class DoNothingCompletionProposal implements ICompletionProposal { + /** The string to be displayed in the completion proposal popup. */ + private String fDisplayString; + /** The replacement string. */ + private String fReplacementString; + /** The replacement offset. */ + private int fReplacementOffset; + // /** The replacement length. */ + private int fReplacementLength; + /** The cursor position after this proposal has been applied. */ + private int fCursorPosition; + /** The image to be displayed in the completion proposal popup. */ + private Image fImage; + /** The context information of this proposal. */ + private IContextInformation fContextInformation; + /** The additional info of this proposal. */ + private String fAdditionalProposalInfo; + + /** + * Creates a new completion proposal based on the provided information. The replacement string is + * considered being the display string too. All remaining fields are set to <code>null</code>. + * + * @param replacementString + * the actual string to be inserted into the document + * @param replacementOffset + * the offset of the text to be replaced + * @param replacementLength + * the length of the text to be replaced + * @param cursorPosition + * the position of the cursor following the insert relative to replacementOffset + */ + public DoNothingCompletionProposal(String replacementString, int replacementOffset, int replacementLength, int cursorPosition) { + this(replacementString, replacementOffset, replacementLength, cursorPosition, null, null, null, null); + } + + /** + * Creates a new completion proposal. All fields are initialized based on the provided information. + * + * @param replacementString + * the actual string to be inserted into the document + * @param replacementOffset + * the offset of the text to be replaced + * @param replacementLength + * the length of the text to be replaced + * @param cursorPosition + * the position of the cursor following the insert relative to replacementOffset + * @param image + * the image to display for this proposal + * @param displayString + * the string to be displayed for the proposal + * @param contextInformation + * the context information associated with this proposal + * @param additionalProposalInfo + * the additional information associated with this proposal + */ + public DoNothingCompletionProposal(String replacementString, int replacementOffset, int replacementLength, int cursorPosition, Image image, String displayString, IContextInformation contextInformation, String additionalProposalInfo) { + Assert.isNotNull(replacementString); + Assert.isTrue(replacementOffset >= 0); + Assert.isTrue(replacementLength >= 0); + Assert.isTrue(cursorPosition >= 0); + + fReplacementString = replacementString; + fReplacementOffset = replacementOffset; + fReplacementLength = replacementLength; + fCursorPosition = cursorPosition; + fImage = image; + fDisplayString = displayString; + fContextInformation = contextInformation; + fAdditionalProposalInfo = additionalProposalInfo; + } + + /** + * + * @see org.eclipse.jface.text.contentassist.ICompletionProposal#apply(org.eclipse.jface.text.IDocument) + * + * @param document + */ + public void apply(IDocument document) { + // nothing to do + } + + /* + * @see ICompletionProposal#getSelection(IDocument) + */ + public Point getSelection(IDocument document) { + return new Point(fReplacementOffset + fCursorPosition, 0); + } + + /* + * @see ICompletionProposal#getContextInformation() + */ + public IContextInformation getContextInformation() { + return fContextInformation; + } + + /* + * @see ICompletionProposal#getImage() + */ + public Image getImage() { + return fImage; + + } + + /* + * @see ICompletionProposal#getDisplayString() + */ + public String getDisplayString() { + if (fDisplayString != null) + return fDisplayString; + return fReplacementString; + } + + /* + * @see ICompletionProposal#getAdditionalProposalInfo() + */ + public String getAdditionalProposalInfo() { + return fAdditionalProposalInfo; + } + +} diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/util/INameResolutionHelper.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/util/INameResolutionHelper.java new file mode 100644 index 00000000000..727c9c6b46e --- /dev/null +++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/util/INameResolutionHelper.java @@ -0,0 +1,50 @@ +/***************************************************************************** + * Copyright (c) 2015 CEA LIST and others. + * + * 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: + * CEA LIST - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.infra.widgets.util; + +import java.util.List; + +/** + * Common interface to use to find elements from a given string + * + */ +public interface INameResolutionHelper { + + /** + * + * @param aString + * a string + * @return + * all elements whose the name starts with this string, or all found element if the string is <code>null</code> or empty + */ + public List<?> getMatchingElements(final String aString); + + /** + * + * @param aString + * a string + * @return + * all elements which have the wanted string as (qualified) name + */ + public List<?> getElementsByName(final String aString); + + + /** + * @param namedElement + * @return + * the shortest qualified to use for the element + */ + public List<String> getShortestQualifiedNames(Object element); + +} diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/util/IPapyrusConverter.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/util/IPapyrusConverter.java new file mode 100644 index 00000000000..e55a566cbc9 --- /dev/null +++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/util/IPapyrusConverter.java @@ -0,0 +1,164 @@ +/***************************************************************************** + * Copyright (c) 2015 CEA LIST and others. + * + * 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: + * CEA LIST - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.infra.widgets.util; + +import java.util.List; +import java.util.Map; + +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.jface.text.contentassist.IContentAssistProcessor; + +/** + * @author VL222926 + * + * This class provides method to convert Object to a string to edit or a string to display and vice-versa from a string to edit or to display to the real object + * + */ +public interface IPapyrusConverter extends INameResolutionHelper { + + // the previous regex,which did not allow to get 'Class, when the user asked for the completion and + // PLEASE DO NOT ERASE THIS COMMENT + // public static final String FIND_PART_NAME_REGEX = "([^'\\x2C]+)|('[^']+')"; //$NON-NLS-1$ + + /** + * regex used to parse string on , and ',': + */ + public static final String FIND_PART_NAME_REGEX = "([^'\\x2C]+)|('[^']+')|('(([^']*[\\x2C][^']*)))"; //$NON-NLS-1$ + + /** + * the string delimiter + */ + public static final String STRING_DELIMITER = "\'"; //$NON-NLS-1$ + + /** + * the string separator for multivalued properties + */ + public static final String STRING_SEPARATOR = ","; //$NON-NLS-1$ + + /** + * the string used for <code>null</code> value + */ + public static final String NULL_VALUE = "null";//$NON-NLS-1$ + + /** + * add this string to the suggestions when there are more than {@link #MAX_ELEMENTS_TO_DISPLAY} + */ + public static final String MORE_ELEMENTS = "...";//$NON-NLS-1$ + + /** + * empty string + */ + public static final String EMPTY_STRING = "";//$NON-NLS-1$ + + /** + * + * @param multiValueAsString + * the full String write in the StyledText + * @return + * a map with the name of the elements as value and the start and the end index of the name in the typed text as key + */ + public Map<List<Integer>, String> getSubStringsWithTheirPositions(String multiValueAsString); + + /** + * + * @param multiValueAsString + * a string + * @return + * all substring according to the applied regex + */ + public List<String> splitFullStringToSubElementString(String multiValueAsString); + + /** + * + * @param aString + * a string + * @return + * a istatus indicating if the string is valid or not + */ + public IStatus isValidEditString(String aString); + + /** + * Returns the parser's content assist processor + * + * @param element + * the element + * @return the content assist processor + */ + public IContentAssistProcessor getCompletionProcessor(IAdaptable element); + + + /** + * + * @param object + * an object + * @param flag + * a flag which coul be used for for the name qualification for example + * @return + * the string to display (label) representing the object + */ + public String canonicalToDisplayValue(Object object, int flag); + + /** + * + * @param object + * an object + * @param flag + * a flag which coul be used for for the name qualification for example + * @return + * the string to edit (label) representing the object + */ + public String canonicalToEditValue(Object object, int flag); + + /** + * + * @param string + * a display string + * @param flag + * a flag which coul be used for for the name qualification for example + * @return + * the object represented by the displayed string + */ + public Object displayToCanonicalValue(String string, int flag); + + /** + * + * @param string + * an edited string + * @param flag + * a flag which coul be used for for the name qualification for example + * @return + * the object represented by the edited string + */ + public Object editToCanonicalValue(String string, int flag); + + /** + * + * @param string + * an edited string + * @return + * the the equivalent string to use for edition + */ + public String editToDisplayValue(String string); + + /** + * + * @param string + * a displayed string + * @return + * the the equivalent string to use for + */ + public String displayToEditValue(String string); + +} diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/util/ISetNameResolutionHelper.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/util/ISetNameResolutionHelper.java new file mode 100644 index 00000000000..104bfabd7df --- /dev/null +++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/util/ISetNameResolutionHelper.java @@ -0,0 +1,30 @@ +/***************************************************************************** + * Copyright (c) 2015 CEA LIST and others. + * + * 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: + * CEA LIST - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.infra.widgets.util; + +import org.eclipse.papyrus.infra.widgets.util.INameResolutionHelper; + +/** + * Interface used to declare a ISNameResolutionHelper + * + */ +public interface ISetNameResolutionHelper { + + /** + * + * @param helper + * a name resolution helper + */ + public void setNameResolutionHelper(INameResolutionHelper helper); +} diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/util/ISetPapyrusConverter.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/util/ISetPapyrusConverter.java new file mode 100644 index 00000000000..4da7e5a75eb --- /dev/null +++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/util/ISetPapyrusConverter.java @@ -0,0 +1,29 @@ +/***************************************************************************** + * Copyright (c) 2015 CEA LIST and others. + * + * 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: + * CEA LIST - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.infra.widgets.util; + +/** + * @author Vincent Lorenzo + * + */ +public interface ISetPapyrusConverter { + + /** + * + * @param converter + * the papyrus converter to use + */ + public void setPapyrusConverter(IPapyrusConverter converter); + +} diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.integration/plugin.xml b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.integration/plugin.xml new file mode 100644 index 00000000000..3f87e27c957 --- /dev/null +++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.integration/plugin.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.4"?> +<plugin> +</plugin> + diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.integration/src/org/eclipse/papyrus/uml/nattable/xtext/integration/celleditor/AbstractXtextCellEditor.java b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.integration/src/org/eclipse/papyrus/uml/nattable/xtext/integration/celleditor/AbstractXtextCellEditor.java new file mode 100644 index 00000000000..0296470c930 --- /dev/null +++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.integration/src/org/eclipse/papyrus/uml/nattable/xtext/integration/celleditor/AbstractXtextCellEditor.java @@ -0,0 +1,100 @@ +/***************************************************************************** + * Copyright (c) 2015 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: + * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.nattable.xtext.integration.celleditor; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.jface.preference.IPreferenceStore; +import org.eclipse.papyrus.extensionpoints.editors.Activator; +import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration; +import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil; +import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds; +import org.eclipse.papyrus.infra.nattable.manager.table.ITableAxisElementProvider; +import org.eclipse.papyrus.infra.nattable.model.nattable.Table; +import org.eclipse.papyrus.infra.nattable.utils.AxisUtils; +import org.eclipse.papyrus.uml.xtext.integration.DefaultXtextDirectEditorConfiguration; + +/** + * ICellEditor implementation that wraps a SWT Text control to + * support text editing. This is also the default editor in NatTable if you + * didn't configure something else. + */ +public abstract class AbstractXtextCellEditor extends + AbstractNatTableXTextCellEditor { + + /** + * Creates the default TextCellEditor that does not commit on pressing the + * up/down arrow keys and will not move the selection on committing a value + * by pressing enter. + */ + public AbstractXtextCellEditor(final Table table, + final Object axisElement, + final ITableAxisElementProvider elementProvider) { + super(table, axisElement, elementProvider); + } + + /** + * + * @see org.eclipse.papyrus.infra.nattable.xtext.integration.celleditor.AbstractNatTableXTextCellEditor#createXTextEditorConfiguration() + * + * @return + */ + protected DefaultXtextDirectEditorConfiguration createXTextEditorConfiguration() { + int columnIndex = this.layerCell.getColumnIndex(); + int rowIndex = this.layerCell.getRowIndex(); + Object row = this.elementProvider.getRowElement(rowIndex); + Object column = this.elementProvider.getColumnElement(columnIndex); + row = AxisUtils.getRepresentedElement(row); + column = AxisUtils.getRepresentedElement(column); + + return getConfigurationFromEditedEObject(row, column); + } + + /** + * This allow to get the configuration for edited object. + * + * @param editedEObject + * The edited object. + * @return The {@link DefaultXtextDirectEditorConfiguration} corresponding the the edited object. + */ + protected DefaultXtextDirectEditorConfiguration getConfigurationFromEditedEObject(Object row, Object column) { + if (row instanceof EObject && column instanceof EStructuralFeature) { + + final Object editedEObject = ((EObject) row).eGet((EStructuralFeature) column); + + if (editedEObject != null && editedEObject instanceof EObject) { + IPreferenceStore store = Activator.getDefault() + .getPreferenceStore(); + String semanticClassName = ((EObject) editedEObject).eClass() + .getInstanceClassName(); + + String key = IDirectEditorsIds.EDITOR_FOR_ELEMENT + + semanticClassName; + String languagePreferred = store.getString(key); + + if (languagePreferred != null && !languagePreferred.equals("")) { //$NON-NLS-1$ + IDirectEditorConfiguration configuration = DirectEditorsUtil + .findEditorConfiguration(languagePreferred, + semanticClassName); + if (configuration instanceof DefaultXtextDirectEditorConfiguration) { + + DefaultXtextDirectEditorConfiguration xtextConfiguration = (DefaultXtextDirectEditorConfiguration) configuration; + xtextConfiguration.preEditAction(editedEObject); + return xtextConfiguration; + } + } + } + } + return null; + } +} diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/.classpath b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/.classpath new file mode 100644 index 00000000000..ad32c83a788 --- /dev/null +++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/.classpath @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="src" path="src"/> + <classpathentry kind="output" path="bin"/> +</classpath> diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/.project b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/.project new file mode 100644 index 00000000000..8f91204b6ab --- /dev/null +++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/.project @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.eclipse.papyrus.uml.nattable.xtext.valuespecification</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.ManifestBuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.SchemaBuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.pde.PluginNature</nature> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/.settings/org.eclipse.jdt.core.prefs b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000000..94d61f00da6 --- /dev/null +++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,291 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.6 +org.eclipse.jdt.core.formatter.align_type_members_on_columns=false +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_assignment=0 +org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 +org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 +org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 +org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16 +org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_after_package=1 +org.eclipse.jdt.core.formatter.blank_lines_before_field=0 +org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 +org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 +org.eclipse.jdt.core.formatter.blank_lines_before_method=1 +org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 +org.eclipse.jdt.core.formatter.blank_lines_before_package=0 +org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 +org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 +org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false +org.eclipse.jdt.core.formatter.comment.format_block_comments=true +org.eclipse.jdt.core.formatter.comment.format_header=false +org.eclipse.jdt.core.formatter.comment.format_html=true +org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true +org.eclipse.jdt.core.formatter.comment.format_line_comments=true +org.eclipse.jdt.core.formatter.comment.format_source_code=true +org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true +org.eclipse.jdt.core.formatter.comment.indent_root_tags=true +org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert +org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert +org.eclipse.jdt.core.formatter.comment.line_length=260 +org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true +org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true +org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false +org.eclipse.jdt.core.formatter.compact_else_if=true +org.eclipse.jdt.core.formatter.continuation_indentation=2 +org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 +org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off +org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on +org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false +org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true +org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_empty_lines=false +org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true +org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false +org.eclipse.jdt.core.formatter.indentation.size=4 +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert +org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert +org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert +org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.join_lines_in_comments=false +org.eclipse.jdt.core.formatter.join_wrapped_lines=false +org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false +org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false +org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false +org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false +org.eclipse.jdt.core.formatter.lineSplit=260 +org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false +org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5 +org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true +org.eclipse.jdt.core.formatter.tabulation.char=tab +org.eclipse.jdt.core.formatter.tabulation.size=4 +org.eclipse.jdt.core.formatter.use_on_off_tags=false +org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false +org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true +org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true +org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/.settings/org.eclipse.jdt.ui.prefs b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 00000000000..954281dbc31 --- /dev/null +++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,68 @@ +cleanup.add_default_serial_version_id=true +cleanup.add_generated_serial_version_id=false +cleanup.add_missing_annotations=true +cleanup.add_missing_deprecated_annotations=true +cleanup.add_missing_methods=false +cleanup.add_missing_nls_tags=false +cleanup.add_missing_override_annotations=true +cleanup.add_missing_override_annotations_interface_methods=true +cleanup.add_serial_version_id=false +cleanup.always_use_blocks=true +cleanup.always_use_parentheses_in_expressions=false +cleanup.always_use_this_for_non_static_field_access=false +cleanup.always_use_this_for_non_static_method_access=false +cleanup.convert_functional_interfaces=false +cleanup.convert_to_enhanced_for_loop=false +cleanup.correct_indentation=false +cleanup.format_source_code=false +cleanup.format_source_code_changes_only=false +cleanup.insert_inferred_type_arguments=false +cleanup.make_local_variable_final=true +cleanup.make_parameters_final=false +cleanup.make_private_fields_final=true +cleanup.make_type_abstract_if_missing_method=false +cleanup.make_variable_declarations_final=false +cleanup.never_use_blocks=false +cleanup.never_use_parentheses_in_expressions=true +cleanup.organize_imports=false +cleanup.qualify_static_field_accesses_with_declaring_class=false +cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +cleanup.qualify_static_member_accesses_with_declaring_class=true +cleanup.qualify_static_method_accesses_with_declaring_class=false +cleanup.remove_private_constructors=true +cleanup.remove_redundant_type_arguments=true +cleanup.remove_trailing_whitespaces=true +cleanup.remove_trailing_whitespaces_all=true +cleanup.remove_trailing_whitespaces_ignore_empty=false +cleanup.remove_unnecessary_casts=true +cleanup.remove_unnecessary_nls_tags=true +cleanup.remove_unused_imports=true +cleanup.remove_unused_local_variables=false +cleanup.remove_unused_private_fields=true +cleanup.remove_unused_private_members=false +cleanup.remove_unused_private_methods=true +cleanup.remove_unused_private_types=true +cleanup.sort_members=false +cleanup.sort_members_all=false +cleanup.use_anonymous_class_creation=false +cleanup.use_blocks=true +cleanup.use_blocks_only_for_return_and_throw=false +cleanup.use_lambda=true +cleanup.use_parentheses_in_expressions=false +cleanup.use_this_for_non_static_field_access=false +cleanup.use_this_for_non_static_field_access_only_if_necessary=true +cleanup.use_this_for_non_static_method_access=false +cleanup.use_this_for_non_static_method_access_only_if_necessary=true +cleanup.use_type_arguments=false +cleanup_profile=_Papyrus +cleanup_settings_version=2 +eclipse.preferences.version=1 +formatter_profile=_Papyrus +formatter_settings_version=12 +org.eclipse.jdt.ui.ignorelowercasenames=true +org.eclipse.jdt.ui.importorder=java;javax;org;com; +org.eclipse.jdt.ui.javadoc=true +org.eclipse.jdt.ui.ondemandthreshold=99 +org.eclipse.jdt.ui.staticondemandthreshold=99 +org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates> diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/META-INF/MANIFEST.MF b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/META-INF/MANIFEST.MF new file mode 100644 index 00000000000..d2e6e831782 --- /dev/null +++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/META-INF/MANIFEST.MF @@ -0,0 +1,28 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: $pluginName +Bundle-SymbolicName: org.eclipse.papyrus.uml.nattable.xtext.valuespecification;singleton:=true +Bundle-Version: 1.0.2.qualifier +Bundle-Activator: org.eclipse.papyrus.uml.nattable.xtext.valuespecification.Activator +Require-Bundle: org.eclipse.uml2.uml, + org.eclipse.papyrus.infra.nattable;bundle-version="1.0.2", + org.eclipse.papyrus.infra.nattable.model;bundle-version="1.0.2", + org.eclipse.ui, + org.eclipse.papyrus.infra.core.log;bundle-version="1.0.2", + org.eclipse.papyrus.infra.tools;bundle-version="1.0.2", + org.eclipse.papyrus.infra.emf.nattable;bundle-version="1.0.2", + org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.0.2", + org.eclipse.gmf.runtime.emf.type.core, + org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils;bundle-version="1.0.2", + org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui;bundle-version="1.0.2", + com.google.inject, + org.eclipse.papyrus.uml.nattable.xtext.integration;bundle-version="1.0.2", + org.eclipse.nebula.widgets.nattable.core, + org.eclipse.papyrus.uml.xtext.integration.ui;bundle-version="1.0.2" +Bundle-RequiredExecutionEnvironment: JavaSE-1.6 +Bundle-ActivationPolicy: lazy +Export-Package: org.eclipse.papyrus.uml.nattable.xtext.valuespecification, + org.eclipse.papyrus.uml.nattable.xtext.valuespecification.celleditor, + org.eclipse.papyrus.uml.nattable.xtext.valuespecification.manager.cell +Bundle-Vendor: %providerName +Bundle-Description: %pluginDescription diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/about.html b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/about.html new file mode 100644 index 00000000000..d35d5aed64c --- /dev/null +++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/about.html @@ -0,0 +1,28 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> +<title>About</title> +</head> +<body lang="EN-US"> +<h2>About This Content</h2> + +<p>June 5, 2007</p> +<h3>License</h3> + +<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise +indicated below, the Content is provided to you under the terms and conditions of the +Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available +at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>. +For purposes of the EPL, "Program" will mean the Content.</p> + +<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is +being redistributed by another party ("Redistributor") and different terms and conditions may +apply to your use of any object code in the Content. Check the Redistributor's license that was +provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise +indicated below, the terms and conditions of the EPL still apply to any source code in the Content +and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p> + +</body> +</html> diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/build.properties b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/build.properties new file mode 100644 index 00000000000..dd3fa347af8 --- /dev/null +++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/build.properties @@ -0,0 +1,8 @@ +source.. = src/ +bin.includes = META-INF/,\ + .,\ + plugin.xml,\ + plugin.properties,\ + about.html + +src.includes = about.html diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/plugin.properties b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/plugin.properties new file mode 100644 index 00000000000..16e85ac4bcb --- /dev/null +++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/plugin.properties @@ -0,0 +1,13 @@ +################################################################################# +# Copyright (c) 2015 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: +# Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - initial API and implementation +################################################################################## +pluginName = ValueSpecification XText for NatTable +providerName = Eclipse Modeling Project +pluginDescription=This plugin define the xtext editor for the cell of NatTable
\ No newline at end of file diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/plugin.xml b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/plugin.xml new file mode 100644 index 00000000000..db358219279 --- /dev/null +++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/plugin.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.4"?> +<plugin> + <extension + point="org.eclipse.papyrus.infra.nattable.cellmanager"> + <cellManager + id="org.eclipse.papyrus.uml.nattable.valuespecification.config.cell.manager" + manager="org.eclipse.papyrus.uml.nattable.xtext.valuespecification.manager.cell.ValueSpecificationCellManager" + order="1100"> + </cellManager> + </extension> + <extension + point="org.eclipse.papyrus.infra.nattable.celleditor.configuration"> + <configuration + class="org.eclipse.papyrus.uml.nattable.xtext.valuespecification.celleditor.ValueSpecificationCellEditorConfiguration" + order="700"> + </configuration> + </extension> +</plugin> diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/pom.xml b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/pom.xml new file mode 100644 index 00000000000..eab6b5219e6 --- /dev/null +++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/pom.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project> + <modelVersion>4.0.0</modelVersion> + <parent> + <artifactId>org.eclipse.papyrus</artifactId> + <groupId>org.eclipse.papyrus</groupId> + <version>1.0.2-SNAPSHOT</version> + <relativePath>../../../../releng/top-pom-main.xml</relativePath> + </parent> + <artifactId>org.eclipse.papyrus.uml.nattable.xtext.valuespecification</artifactId> + <groupId>org.eclipse.papyrus</groupId> + <version>1.0.2-SNAPSHOT</version> + <packaging>eclipse-plugin</packaging> +</project>
\ No newline at end of file diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/src/org/eclipse/papyrus/uml/nattable/xtext/valuespecification/Activator.java b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/src/org/eclipse/papyrus/uml/nattable/xtext/valuespecification/Activator.java new file mode 100644 index 00000000000..d3ae979cccc --- /dev/null +++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/src/org/eclipse/papyrus/uml/nattable/xtext/valuespecification/Activator.java @@ -0,0 +1,77 @@ +/***************************************************************************** + * Copyright (c) 2015 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: + * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.nattable.xtext.valuespecification; + +import org.eclipse.papyrus.infra.core.log.LogHelper; +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.BundleContext; + +/** + * The activator class controls the plug-in life cycle + */ +public class Activator extends AbstractUIPlugin { + + /** + * The plug-in ID. + */ + public static final String PLUGIN_ID = "org.eclipse.papyrus.uml.nattable.xtext.valuespecification"; //$NON-NLS-1$ + + /** + * The shared instance. + */ + private static Activator plugin; + + /** + * The log helper. + */ + public static LogHelper log; + + /** + * The constructor + */ + public Activator() { + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) + */ + @Override + public void start(final BundleContext context) throws Exception { + super.start(context); + plugin = this; + log = new LogHelper(this); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) + */ + @Override + public void stop(final BundleContext context) throws Exception { + plugin = null; + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static Activator getDefault() { + return plugin; + } + +} diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/src/org/eclipse/papyrus/uml/nattable/xtext/valuespecification/celleditor/ValueSpecificationCellEditor.java b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/src/org/eclipse/papyrus/uml/nattable/xtext/valuespecification/celleditor/ValueSpecificationCellEditor.java new file mode 100644 index 00000000000..a8db522a61e --- /dev/null +++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/src/org/eclipse/papyrus/uml/nattable/xtext/valuespecification/celleditor/ValueSpecificationCellEditor.java @@ -0,0 +1,120 @@ +/***************************************************************************** + * Copyright (c) 2015 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: + * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.nattable.xtext.valuespecification.celleditor; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.jface.preference.IPreferenceStore; +import org.eclipse.nebula.widgets.nattable.edit.editor.ICellEditor; +import org.eclipse.papyrus.extensionpoints.editors.Activator; +import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration; +import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil; +import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds; +import org.eclipse.papyrus.infra.nattable.manager.table.ITableAxisElementProvider; +import org.eclipse.papyrus.infra.nattable.model.nattable.Table; +import org.eclipse.papyrus.infra.nattable.utils.AxisUtils; +import org.eclipse.papyrus.uml.nattable.xtext.integration.celleditor.AbstractXtextCellEditor; +import org.eclipse.papyrus.uml.xtext.integration.DefaultXtextDirectEditorConfiguration; +import org.eclipse.swt.widgets.Text; +import org.eclipse.uml2.uml.UMLPackage; + +/** + * {@link ICellEditor} implementation that wraps a SWT {@link Text} control to + * support text editing. This is also the default editor in NatTable if you + * didn't configure something else. + */ +public class ValueSpecificationCellEditor extends AbstractXtextCellEditor { + + /** + * Constructor. + * + * @param table + * The table. + * @param axisElement + * The axis element object. + * @param elementProvider + * The element provider. + */ + public ValueSpecificationCellEditor(final Table table, + final Object axisElement, + final ITableAxisElementProvider elementProvider) { + super(table, axisElement, elementProvider); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.infra.nattable.celleditor.AbstractPapyrusStyledTextCellEditor#getEditedEObject() + */ + @Override + protected EObject getEditedEObject() { + int columnIndex = this.layerCell.getColumnIndex(); + int rowIndex = this.layerCell.getRowIndex(); + Object row = this.elementProvider.getRowElement(rowIndex); + Object column = this.elementProvider.getColumnElement(columnIndex); + row = AxisUtils.getRepresentedElement(row); + column = AxisUtils.getRepresentedElement(column); + EObject editedEObject = null; + if (row instanceof EObject && column instanceof EStructuralFeature) { + if (UMLPackage.Literals.VALUE_SPECIFICATION == ((EStructuralFeature) column) + .getEType()) { + editedEObject = (EObject) row; + } + } else if (row instanceof EStructuralFeature && column instanceof EObject) { + if (UMLPackage.Literals.VALUE_SPECIFICATION == ((EStructuralFeature) row) + .getEType()) { + editedEObject = (EObject) column; + } + } + return editedEObject; + } + + /** + * This allow to get the configuration for edited object. + * + * @param editedEObject + * The edited object. + * @return The {@link DefaultXtextDirectEditorConfiguration} corresponding + * the the edited object. + */ + protected DefaultXtextDirectEditorConfiguration getConfigurationFromEditedEObject( + final Object row, final Object column) { + if (row instanceof EObject && column instanceof EStructuralFeature || row instanceof EStructuralFeature && column instanceof EObject) { + + final EStructuralFeature feature = (EStructuralFeature) (column instanceof EStructuralFeature ? column : row); + final EObject eObject = (EObject) (row instanceof EObject ? row : column); + + IPreferenceStore store = Activator.getDefault() + .getPreferenceStore(); + String semanticClassName = feature.getEType() + .getInstanceClassName(); + + String key = IDirectEditorsIds.EDITOR_FOR_ELEMENT + + semanticClassName; + String languagePreferred = store.getString(key); + + if (languagePreferred != null && !languagePreferred.equals("")) { //$NON-NLS-1$ + IDirectEditorConfiguration configuration = DirectEditorsUtil + .findEditorConfigurationWithPriority(languagePreferred, + semanticClassName); + if (configuration instanceof DefaultXtextDirectEditorConfiguration) { + + DefaultXtextDirectEditorConfiguration xtextConfiguration = (DefaultXtextDirectEditorConfiguration) configuration; + xtextConfiguration.preEditAction(eObject.eGet(feature)); + return xtextConfiguration; + } + } + } + return null; + } +} diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/src/org/eclipse/papyrus/uml/nattable/xtext/valuespecification/celleditor/ValueSpecificationCellEditorConfiguration.java b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/src/org/eclipse/papyrus/uml/nattable/xtext/valuespecification/celleditor/ValueSpecificationCellEditorConfiguration.java new file mode 100644 index 00000000000..3955e6de4aa --- /dev/null +++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/src/org/eclipse/papyrus/uml/nattable/xtext/valuespecification/celleditor/ValueSpecificationCellEditorConfiguration.java @@ -0,0 +1,101 @@ +/***************************************************************************** + * Copyright (c) 2015 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: + * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.nattable.xtext.valuespecification.celleditor; + +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.jface.viewers.ILabelProvider; +import org.eclipse.nebula.widgets.nattable.data.convert.IDisplayConverter; +import org.eclipse.nebula.widgets.nattable.edit.editor.ICellEditor; +import org.eclipse.nebula.widgets.nattable.painter.cell.ICellPainter; +import org.eclipse.nebula.widgets.nattable.painter.cell.TextPainter; +import org.eclipse.nebula.widgets.nattable.style.DisplayMode; +import org.eclipse.papyrus.infra.nattable.celleditor.config.AbstractCellEditorConfiguration; +import org.eclipse.papyrus.infra.nattable.manager.table.ITableAxisElementProvider; +import org.eclipse.papyrus.infra.nattable.model.nattable.Table; +import org.eclipse.uml2.uml.ValueSpecification; + +/** + * The configuration for the ConnectorEnd cell editor + */ +public class ValueSpecificationCellEditorConfiguration extends AbstractCellEditorConfiguration { + + /** + * The identifier of xtext cell editor for the ValueSpecification. + */ + private static final String XTEXT_VALUE_SPECIFICATION_CELL_EDITOR_IDENTIFIER = "XTEXT_ValueSpecification_Cell_Editor"; //$NON-NLS-1$ + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.infra.nattable.celleditor.config.IAxisCellEditorConfiguration#getDisplayConvert(org.eclipse.papyrus.infra.nattable.model.nattable.Table, java.lang.Object, org.eclipse.jface.viewers.ILabelProvider) + */ + @Override + public IDisplayConverter getDisplayConvert(Table table, Object axisElement, ILabelProvider provider) { + return null; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.infra.nattable.celleditor.config.IAxisCellEditorConfiguration#getCellPainter(org.eclipse.papyrus.infra.nattable.model.nattable.Table, java.lang.Object) + */ + @Override + public ICellPainter getCellPainter(Table table, Object axisElement) { + return new TextPainter(); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.infra.nattable.celleditor.config.IAxisCellEditorConfiguration#getICellEditor(org.eclipse.papyrus.infra.nattable.model.nattable.Table, java.lang.Object, org.eclipse.papyrus.infra.nattable.manager.table.ITableAxisElementProvider) + */ + @Override + public ICellEditor getICellEditor(Table table, Object axisElement, ITableAxisElementProvider elementProvider) { + return new ValueSpecificationCellEditor(table, axisElement, elementProvider); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.infra.nattable.celleditor.config.IAxisCellEditorConfiguration#getDisplayMode(org.eclipse.papyrus.infra.nattable.model.nattable.Table, java.lang.Object) + */ + @Override + public String getDisplayMode(Table table, Object axisElement) { + return DisplayMode.EDIT; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.infra.nattable.celleditor.config.IAxisCellEditorConfiguration#getEditorConfigId() + */ + @Override + public String getEditorConfigId() { + return XTEXT_VALUE_SPECIFICATION_CELL_EDITOR_IDENTIFIER; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.infra.nattable.celleditor.config.IAxisCellEditorConfiguration#handles(org.eclipse.papyrus.infra.nattable.model.nattable.Table, java.lang.Object) + */ + @Override + public boolean handles(final Table table, final Object object) { + boolean result = false; + if (object instanceof EStructuralFeature) { + result = ((EStructuralFeature) object).getEType().getInstanceClassName().equals(ValueSpecification.class.getName()); + } + return result; + } + +} diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/src/org/eclipse/papyrus/uml/nattable/xtext/valuespecification/manager/cell/ValueSpecificationCellManager.java b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/src/org/eclipse/papyrus/uml/nattable/xtext/valuespecification/manager/cell/ValueSpecificationCellManager.java new file mode 100644 index 00000000000..381d2157642 --- /dev/null +++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/src/org/eclipse/papyrus/uml/nattable/xtext/valuespecification/manager/cell/ValueSpecificationCellManager.java @@ -0,0 +1,160 @@ +/***************************************************************************** + * Copyright (c) 2015 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: + * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.nattable.xtext.valuespecification.manager.cell; + +import java.util.Collection; +import java.util.Collections; + +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.emf.common.command.Command; +import org.eclipse.emf.common.command.UnexecutableCommand; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.transaction.TransactionalEditingDomain; +import org.eclipse.gmf.runtime.common.core.command.CompositeCommand; +import org.eclipse.gmf.runtime.common.core.command.ICommand; +import org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper; +import org.eclipse.papyrus.infra.emf.nattable.manager.cell.EMFFeatureValueCellManager; +import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager; +import org.eclipse.papyrus.infra.nattable.model.nattable.Table; +import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.EObjectAxis; +import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.EStructuralFeatureAxis; +import org.eclipse.papyrus.infra.nattable.utils.AxisUtils; +import org.eclipse.papyrus.infra.tools.converter.AbstractStringValueConverter; +import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.internal.UmlValueSpecificationActivator; +import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils.commands.ValueSpecificationSetCommand; +import org.eclipse.uml2.uml.UMLPackage; +import org.eclipse.uml2.uml.ValueSpecification; + +import com.google.inject.Injector; + +/** + * This class provides the method to get and set the values in the Cell + * representing a ValueSpecification. + */ +public class ValueSpecificationCellManager extends EMFFeatureValueCellManager { + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.infra.emf.nattable.manager.cell.EMFFeatureValueCellManager#getSetValueCommand(org.eclipse.emf.transaction.TransactionalEditingDomain, + * java.lang.Object, java.lang.Object, java.lang.Object, + * org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager) + */ + @Override + public Command getSetValueCommand(final TransactionalEditingDomain domain, + final Object columnElement, final Object rowElement, + final Object newValue, final INattableModelManager tableManager) { + if (newValue instanceof IAdaptable) { + final ICommand cmd = (ICommand) ((IAdaptable) newValue) + .getAdapter(ICommand.class); + if (null != cmd && cmd.canExecute()) { + return new GMFtoEMFCommandWrapper(cmd); + } else { + final String editedString = (String) ((IAdaptable) newValue) + .getAdapter(String.class); + return getSetStringValueCommand(domain, columnElement, + rowElement, editedString, null, tableManager); + } + + } + return UnexecutableCommand.INSTANCE; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.infra.emf.nattable.manager.cell.EMFFeatureValueCellManager#getSetStringValueCommand(org.eclipse.emf.transaction.TransactionalEditingDomain, + * java.lang.Object, java.lang.Object, java.lang.String, + * org.eclipse.papyrus.infra.tools.converter.AbstractStringValueConverter, + * org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager) + */ + @Override + public Command getSetStringValueCommand( + final TransactionalEditingDomain domain, final Object columnElement, + final Object rowElement, final String newValue, + final AbstractStringValueConverter valueSolver, + final INattableModelManager tableManager) { + if (columnElement instanceof EStructuralFeatureAxis && rowElement instanceof EObjectAxis || columnElement instanceof EObjectAxis && rowElement instanceof EStructuralFeatureAxis) { + + EStructuralFeature structuralFeature = null; + if (columnElement instanceof EStructuralFeatureAxis) { + structuralFeature = (EStructuralFeature) ((EStructuralFeatureAxis) columnElement).getElement(); + } else { + structuralFeature = (EStructuralFeature) ((EStructuralFeatureAxis) rowElement).getElement(); + } + + if (UMLPackage.Literals.VALUE_SPECIFICATION == structuralFeature + .getEType()) { + EObject eObject = null; + if (rowElement instanceof EObjectAxis) { + eObject = ((EObjectAxis) rowElement).getElement(); + } else { + eObject = ((EObjectAxis) columnElement).getElement(); + } + + CompositeCommand result = ValueSpecificationSetCommand + .getInstance().createSetCommand(getInjector(), eObject, + structuralFeature, newValue, getDefaultLanguages()); + + return result.isEmpty() ? null : new GMFtoEMFCommandWrapper( + result); + } + } + + return null; + } + + /** + * This allow to define the default languages for an opaque expression. + * + * @return The list of default languages. + */ + protected Collection<String> getDefaultLanguages() { + // This method will be redefined to define the default languages of an opaque expression + return Collections.emptyList(); + } + + /** + * This allow to get the injector used for the xtext parser. + * + * @return The injector corresponding to the xtext parser. + */ + public Injector getInjector() { + return UmlValueSpecificationActivator + .getInstance() + .getInjector( + UmlValueSpecificationActivator.ORG_ECLIPSE_PAPYRUS_UML_TEXTEDIT_VALUESPECIFICATION_XTEXT_UMLVALUESPECIFICATION); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.infra.emf.nattable.manager.cell.EMFFeatureValueCellManager#handles(java.lang.Object, java.lang.Object) + */ + @Override + public boolean handles(final Object columnElement, final Object rowElement) { + boolean result = false; + Object row = AxisUtils.getRepresentedElement(rowElement); + Object column = AxisUtils.getRepresentedElement(columnElement); + if (column instanceof EStructuralFeature) { + result = UMLPackage.Literals.VALUE_SPECIFICATION == ((EStructuralFeature) column) + .getEType(); + } else if (row instanceof EStructuralFeature) { + result = UMLPackage.Literals.VALUE_SPECIFICATION == ((EStructuralFeature) row) + .getEType(); + } + return result; + } + +} diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/plugin.xml b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/plugin.xml index 38f7425c6d2..ce661696b69 100644 --- a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/plugin.xml +++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/plugin.xml @@ -7,6 +7,14 @@ class="org.eclipse.papyrus.uml.nattable.config.UMLFeatureCellEditorConfig" order="500"> </configuration> + <configuration + class="org.eclipse.papyrus.uml.nattable.config.UMLSingleReferenceTextualCellEditorWithButtonConfiguration" + order="400"> + </configuration> + <configuration + class="org.eclipse.papyrus.uml.nattable.config.UMLMultiReferenceTextualCellEditorWithButtonConfiguration" + order="401"> + </configuration> </extension> <extension point="org.eclipse.papyrus.infra.services.labelprovider.labelProvider"> diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/config/UMLMultiReferenceTextualCellEditorWithButtonConfiguration.java b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/config/UMLMultiReferenceTextualCellEditorWithButtonConfiguration.java new file mode 100644 index 00000000000..9a55ad884cd --- /dev/null +++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/config/UMLMultiReferenceTextualCellEditorWithButtonConfiguration.java @@ -0,0 +1,220 @@ +/***************************************************************************** + * Copyright (c) 2013 CEA LIST. + * + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.nattable.config; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EClassifier; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.jface.viewers.ILabelProvider; +import org.eclipse.nebula.widgets.nattable.data.convert.IDisplayConverter; +import org.eclipse.nebula.widgets.nattable.data.validate.IDataValidator; +import org.eclipse.nebula.widgets.nattable.edit.editor.ICellEditor; +import org.eclipse.nebula.widgets.nattable.edit.gui.AbstractDialogCellEditor; +import org.eclipse.nebula.widgets.nattable.painter.cell.ICellPainter; +import org.eclipse.nebula.widgets.nattable.painter.cell.TextPainter; +import org.eclipse.nebula.widgets.nattable.style.DisplayMode; +import org.eclipse.papyrus.infra.nattable.celleditor.AbstractPapyrusStyledTextCellEditor; +import org.eclipse.papyrus.infra.nattable.celleditor.AbstractOpenDialogCellEditorButtonAction; +import org.eclipse.papyrus.infra.nattable.celleditor.config.IAxisCellEditorConfiguration; +import org.eclipse.papyrus.infra.nattable.manager.table.ITableAxisElementProvider; +import org.eclipse.papyrus.infra.nattable.model.nattable.Table; +import org.eclipse.papyrus.infra.nattable.utils.AxisUtils; +import org.eclipse.papyrus.uml.nattable.converter.UMLMultiReferenceDisplayConverter; +import org.eclipse.papyrus.uml.nattable.converter.UMLSingleReferenceDisplayConverter; +import org.eclipse.papyrus.uml.nattable.editor.MultiReferenceCellEditor; +import org.eclipse.papyrus.uml.nattable.editor.SingleReferenceValueCellEditor; +import org.eclipse.papyrus.uml.nattable.manager.cell.editor.UMLReferenceTextWithCompletionCellEditor; +import org.eclipse.papyrus.uml.nattable.messages.Messages; +import org.eclipse.papyrus.uml.nattable.utils.UMLTableUtils; +import org.eclipse.uml2.uml.DataType; +import org.eclipse.uml2.uml.NamedElement; +import org.eclipse.uml2.uml.Property; +import org.eclipse.uml2.uml.Type; +import org.eclipse.uml2.uml.UMLPackage; + +/** + * + * This class provides the configuration to edit UML References single and multi-valued with a text editor + * + */ +public class UMLMultiReferenceTextualCellEditorWithButtonConfiguration implements IAxisCellEditorConfiguration { + + /** + * + * @see org.eclipse.papyrus.infra.nattable.celleditor.config.IAxisCellEditorConfiguration#handles(org.eclipse.papyrus.infra.nattable.model.nattable.Table, java.lang.Object) + * + * @param table + * @param object + * @return + */ + @Override + public boolean handles(Table table, Object object) { + Object tmp = AxisUtils.getRepresentedElement(object); + if (tmp instanceof EReference) { + EReference ref = (EReference) tmp; + if (ref.isContainment() || !ref.isChangeable() || ref.isDerived()) { + return false; + } + if (!ref.isMany()) { + return false; + } + EClassifier type = ref.getEType(); + + // TODO : to test on constraint + // return type instanceof EClass && UMLPackage.eINSTANCE.getNamedElement().isSuperTypeOf((EClass) type); + return true; + + } else if (object instanceof String && ((String) object).startsWith(UMLTableUtils.PROPERTY_OF_STEREOTYPE_PREFIX)) { + String str = (String) tmp; + Property prop = UMLTableUtils.getRealStereotypeProperty(table.getContext(), str); + if (prop != null) { + if (prop.isDerived()) { + return false; + } + Type type = prop.getType(); + if (type instanceof DataType) { + return false; + } + if (!(type instanceof NamedElement)) { + return false; + } + if (!prop.isMultivalued()) { + return false; + } + switch (prop.getAggregation()) { + case NONE_LITERAL: + case SHARED_LITERAL: + return true; + case COMPOSITE_LITERAL: + default: + return false; + } + } + } + + return false; + } + + /** + * + * @see org.eclipse.papyrus.infra.nattable.celleditor.config.IAxisCellEditorConfiguration#getDisplayConvert(org.eclipse.papyrus.infra.nattable.model.nattable.Table, java.lang.Object, org.eclipse.jface.viewers.ILabelProvider) + * + * @param table + * @param axisElement + * @param provider + * @return + */ + @Override + public IDisplayConverter getDisplayConvert(Table table, Object axisElement, ILabelProvider provider) { + return new UMLMultiReferenceDisplayConverter(); + } + + + /** + * + * @see org.eclipse.papyrus.infra.nattable.celleditor.config.IAxisCellEditorConfiguration#getCellPainter(org.eclipse.papyrus.infra.nattable.model.nattable.Table, java.lang.Object) + * + * @param table + * @param axisElement + * @return + */ + @Override + public ICellPainter getCellPainter(Table table, Object axisElement) { + return new TextPainter(); + } + + + + + /** + * + * @see org.eclipse.papyrus.infra.nattable.celleditor.config.IAxisCellEditorConfiguration#getICellEditor(org.eclipse.papyrus.infra.nattable.model.nattable.Table, java.lang.Object, org.eclipse.papyrus.infra.nattable.manager.table.ITableAxisElementProvider) + * + * @param table + * @param axisElement + * @param elementProvider + * @return + */ + @Override + public ICellEditor getICellEditor(Table table, final Object axisElement, final ITableAxisElementProvider elementProvider) { + UMLReferenceTextWithCompletionCellEditor editor = new UMLReferenceTextWithCompletionCellEditor(table, axisElement, elementProvider); + editor.setIsMultiValued(true); + AbstractOpenDialogCellEditorButtonAction openDialogConfiguration = new AbstractOpenDialogCellEditorButtonAction() { + /** + * @see org.eclipse.papyrus.infra.nattable.celleditor.AbstractOpenDialogCellEditorButtonAction#createDialogCellEditor() + * + * @return + */ + @Override + public AbstractDialogCellEditor createDialogCellEditor() { + return new MultiReferenceCellEditor(axisElement, elementProvider); + } + + }; + editor.setOpenDialogCellEditorButtonAction(openDialogConfiguration); + openDialogConfiguration.setText("..."); //$NON-NLS-1$ + openDialogConfiguration.setTooltipText(Messages.UMLReferenceCellEditorConfiguration_OpenDialogToChooseTheValue); + return editor; + } + + /** + * + * @see org.eclipse.papyrus.infra.nattable.celleditor.config.IAxisCellEditorConfiguration#getDisplayMode(org.eclipse.papyrus.infra.nattable.model.nattable.Table, java.lang.Object) + * + * @param table + * @param axisElement + * @return + */ + @Override + public String getDisplayMode(Table table, Object axisElement) { + return DisplayMode.EDIT; + } + + /** + * + * @see org.eclipse.papyrus.infra.nattable.celleditor.config.IAxisCellEditorConfiguration#getEditorConfigId() + * + * @return + */ + @Override + public String getEditorConfigId() { + return "org.eclipse.papyrus.uml.reference.text.with.completion.editor.and.dialog"; //$NON-NLS-1$ + } + + /** + * + * @see org.eclipse.papyrus.infra.nattable.celleditor.config.IAxisCellEditorConfiguration#getDataValidator(org.eclipse.papyrus.infra.nattable.model.nattable.Table, java.lang.Object) + * + * @param table + * @param axisElement + * @return + */ + @Override + public IDataValidator getDataValidator(Table table, Object axisElement) { + return null;// By default, the system will use the DefautDataValidator//new UMLReferenceDataValidator(); + } + + /** + * + * @see org.eclipse.papyrus.infra.nattable.celleditor.config.IAxisCellEditorConfiguration#getEditorDescription() + * + * @return + */ + @Override + public String getEditorDescription() { + return "This configuration provides a Text editor with completion for multi references"; //$NON-NLS-1$ + } + + +} diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/config/UMLSingleReferenceTextualCellEditorWithButtonConfiguration.java b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/config/UMLSingleReferenceTextualCellEditorWithButtonConfiguration.java new file mode 100644 index 00000000000..0bf91a90169 --- /dev/null +++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/config/UMLSingleReferenceTextualCellEditorWithButtonConfiguration.java @@ -0,0 +1,213 @@ +/***************************************************************************** + * Copyright (c) 2013 CEA LIST. + * + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.nattable.config; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EClassifier; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.jface.viewers.ILabelProvider; +import org.eclipse.nebula.widgets.nattable.data.convert.IDisplayConverter; +import org.eclipse.nebula.widgets.nattable.data.validate.IDataValidator; +import org.eclipse.nebula.widgets.nattable.edit.editor.ICellEditor; +import org.eclipse.nebula.widgets.nattable.edit.gui.AbstractDialogCellEditor; +import org.eclipse.nebula.widgets.nattable.painter.cell.ICellPainter; +import org.eclipse.nebula.widgets.nattable.painter.cell.TextPainter; +import org.eclipse.nebula.widgets.nattable.style.DisplayMode; +import org.eclipse.papyrus.infra.nattable.celleditor.AbstractOpenDialogCellEditorButtonAction; +import org.eclipse.papyrus.infra.nattable.celleditor.AbstractPapyrusStyledTextCellEditor; +import org.eclipse.papyrus.infra.nattable.celleditor.config.IAxisCellEditorConfiguration; +import org.eclipse.papyrus.infra.nattable.manager.table.ITableAxisElementProvider; +import org.eclipse.papyrus.infra.nattable.model.nattable.Table; +import org.eclipse.papyrus.infra.nattable.utils.AxisUtils; +import org.eclipse.papyrus.uml.nattable.converter.UMLSingleReferenceDisplayConverter; +import org.eclipse.papyrus.uml.nattable.editor.SingleReferenceValueCellEditor; +import org.eclipse.papyrus.uml.nattable.manager.cell.editor.UMLReferenceTextWithCompletionCellEditor; +import org.eclipse.papyrus.uml.nattable.messages.Messages; +import org.eclipse.papyrus.uml.nattable.utils.UMLTableUtils; +import org.eclipse.uml2.uml.DataType; +import org.eclipse.uml2.uml.NamedElement; +import org.eclipse.uml2.uml.Property; +import org.eclipse.uml2.uml.Type; +import org.eclipse.uml2.uml.UMLPackage; + +/** + * + * This class provides the configuration to edit UML References single and multi-valued with a text editor + * + */ +public class UMLSingleReferenceTextualCellEditorWithButtonConfiguration implements IAxisCellEditorConfiguration { + + /** + * + * @see org.eclipse.papyrus.infra.nattable.celleditor.config.IAxisCellEditorConfiguration#handles(org.eclipse.papyrus.infra.nattable.model.nattable.Table, java.lang.Object) + * + * @param table + * @param object + * @return + */ + @Override + public boolean handles(Table table, Object object) { + Object tmp = AxisUtils.getRepresentedElement(object); + if (tmp instanceof EReference) { + EReference ref = (EReference) tmp; + if (ref.isContainment() || !ref.isChangeable() || ref.isDerived()) { + return false; + } + if (ref.isMany()) { + return false; + } + EClassifier type = ref.getEType(); + return type instanceof EClass && UMLPackage.eINSTANCE.getNamedElement().isSuperTypeOf((EClass) type); + } else if (object instanceof String && ((String) object).startsWith(UMLTableUtils.PROPERTY_OF_STEREOTYPE_PREFIX)) { + String str = (String) tmp; + Property prop = UMLTableUtils.getRealStereotypeProperty(table.getContext(), str); + if (prop != null) { + if (prop.isDerived()) { + return false; + } + Type type = prop.getType(); + if (type instanceof DataType) { + return false; + } + if (!(type instanceof NamedElement)) { + return false; + } + if (prop.isMultivalued()) { + return false; + } + switch (prop.getAggregation()) { + case NONE_LITERAL: + case SHARED_LITERAL: + return true; + case COMPOSITE_LITERAL: + default: + return false; + } + } + } + + return false; + } + + /** + * + * @see org.eclipse.papyrus.infra.nattable.celleditor.config.IAxisCellEditorConfiguration#getDisplayConvert(org.eclipse.papyrus.infra.nattable.model.nattable.Table, java.lang.Object, org.eclipse.jface.viewers.ILabelProvider) + * + * @param table + * @param axisElement + * @param provider + * @return + */ + @Override + public IDisplayConverter getDisplayConvert(Table table, Object axisElement, ILabelProvider provider) { + return new UMLSingleReferenceDisplayConverter(); + } + + + /** + * + * @see org.eclipse.papyrus.infra.nattable.celleditor.config.IAxisCellEditorConfiguration#getCellPainter(org.eclipse.papyrus.infra.nattable.model.nattable.Table, java.lang.Object) + * + * @param table + * @param axisElement + * @return + */ + @Override + public ICellPainter getCellPainter(Table table, Object axisElement) { + return new TextPainter(); + } + + + + + /** + * + * @see org.eclipse.papyrus.infra.nattable.celleditor.config.IAxisCellEditorConfiguration#getICellEditor(org.eclipse.papyrus.infra.nattable.model.nattable.Table, java.lang.Object, org.eclipse.papyrus.infra.nattable.manager.table.ITableAxisElementProvider) + * + * @param table + * @param axisElement + * @param elementProvider + * @return + */ + @Override + public ICellEditor getICellEditor(Table table, final Object axisElement, final ITableAxisElementProvider elementProvider) { + AbstractPapyrusStyledTextCellEditor editor = new UMLReferenceTextWithCompletionCellEditor(table, axisElement, elementProvider); + AbstractOpenDialogCellEditorButtonAction openDialogConfiguration = new AbstractOpenDialogCellEditorButtonAction() { + /** + * @see org.eclipse.papyrus.infra.nattable.celleditor.AbstractOpenDialogCellEditorButtonAction#createDialogCellEditor() + * + * @return + */ + @Override + public AbstractDialogCellEditor createDialogCellEditor() { + return new SingleReferenceValueCellEditor(axisElement, elementProvider); + } + + }; + editor.setOpenDialogCellEditorButtonAction(openDialogConfiguration); + openDialogConfiguration.setText("..."); //$NON-NLS-1$ + openDialogConfiguration.setTooltipText(Messages.UMLReferenceCellEditorConfiguration_OpenDialogToChooseTheValue); + return editor; + } + + /** + * + * @see org.eclipse.papyrus.infra.nattable.celleditor.config.IAxisCellEditorConfiguration#getDisplayMode(org.eclipse.papyrus.infra.nattable.model.nattable.Table, java.lang.Object) + * + * @param table + * @param axisElement + * @return + */ + @Override + public String getDisplayMode(Table table, Object axisElement) { + return DisplayMode.EDIT; + } + + /** + * + * @see org.eclipse.papyrus.infra.nattable.celleditor.config.IAxisCellEditorConfiguration#getEditorConfigId() + * + * @return + */ + @Override + public String getEditorConfigId() { + return "org.eclipse.papyrus.uml.reference.text.with.completion.editor.and.dialog"; //$NON-NLS-1$ + } + + /** + * + * @see org.eclipse.papyrus.infra.nattable.celleditor.config.IAxisCellEditorConfiguration#getDataValidator(org.eclipse.papyrus.infra.nattable.model.nattable.Table, java.lang.Object) + * + * @param table + * @param axisElement + * @return + */ + @Override + public IDataValidator getDataValidator(Table table, Object axisElement) { + return null;// By default, the system will use the DefautDataValidator//new UMLReferenceDataValidator(); + } + + /** + * + * @see org.eclipse.papyrus.infra.nattable.celleditor.config.IAxisCellEditorConfiguration#getEditorDescription() + * + * @return + */ + @Override + public String getEditorDescription() { + return "This configuration provides a Text editor with completion for single references"; //$NON-NLS-1$ + } + + +} diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/converter/UMLMultiReferenceDisplayConverter.java b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/converter/UMLMultiReferenceDisplayConverter.java new file mode 100644 index 00000000000..ecb254d9eda --- /dev/null +++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/converter/UMLMultiReferenceDisplayConverter.java @@ -0,0 +1,58 @@ +/***************************************************************************** + * Copyright (c) 2013 CEA LIST. + * + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.nattable.converter; + +import java.util.Collections; + +import org.eclipse.papyrus.infra.nattable.manager.cell.ICellManager; + +/** + * + * This class allows us to convert UML Object into string and string to UML Object + * + */ +public class UMLMultiReferenceDisplayConverter extends UMLSingleReferenceDisplayConverter { + + + /** + * + * @see org.eclipse.nebula.widgets.nattable.data.convert.DisplayConverter#canonicalToDisplayValue(java.lang.Object) + * + * @param canonicalValue + * @return + */ + @Override + public Object canonicalToDisplayValue(Object canonicalValue) { + if (canonicalValue == null) { + return ICellManager.EMPTY_STRING; + } + return super.canonicalToDisplayValue(canonicalValue); + } + + /** + * + * @see org.eclipse.nebula.widgets.nattable.data.convert.DisplayConverter#displayToCanonicalValue(java.lang.Object) + * + * @param displayValue + * @return + */ + @Override + public Object displayToCanonicalValue(Object displayValue) { + if (ICellManager.NULL_VALUE.equals(displayValue) || ICellManager.EMPTY_STRING.equals(displayValue)) { + return Collections.EMPTY_LIST; + } else { + return super.displayToCanonicalValue(displayValue); + } + } +} diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/converter/UMLSingleReferenceDisplayConverter.java b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/converter/UMLSingleReferenceDisplayConverter.java new file mode 100644 index 00000000000..c9d144063a6 --- /dev/null +++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/converter/UMLSingleReferenceDisplayConverter.java @@ -0,0 +1,76 @@ +/***************************************************************************** + * Copyright (c) 2013 CEA LIST. + * + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.nattable.converter; + +import org.eclipse.core.runtime.Assert; +import org.eclipse.nebula.widgets.nattable.data.convert.DisplayConverter; +import org.eclipse.papyrus.infra.nattable.manager.cell.ICellManager; +import org.eclipse.papyrus.infra.widgets.util.IPapyrusConverter; +import org.eclipse.papyrus.infra.widgets.util.ISetPapyrusConverter; + +/** + * + * This class allows us to convert UML Object into string and string to UML Object + * + */ +public class UMLSingleReferenceDisplayConverter extends DisplayConverter implements ISetPapyrusConverter { + + + /** + * the parser used for references, separated by ',' + */ + private IPapyrusConverter parser; + + /** + * + * @see org.eclipse.nebula.widgets.nattable.data.convert.DisplayConverter#canonicalToDisplayValue(java.lang.Object) + * + * @param canonicalValue + * @return + */ + @Override + public Object canonicalToDisplayValue(Object canonicalValue) { + if (canonicalValue instanceof Object) { + return parser.canonicalToEditValue(canonicalValue,0); + } + return parser.canonicalToEditValue(null,0); + } + + /** + * + * @see org.eclipse.nebula.widgets.nattable.data.convert.DisplayConverter#displayToCanonicalValue(java.lang.Object) + * + * @param displayValue + * @return + */ + @Override + public Object displayToCanonicalValue(Object displayValue) { + if (ICellManager.EMPTY_STRING.equals(displayValue) || ICellManager.NULL_VALUE.equals(displayValue)) { + return null; + } + Assert.isTrue(displayValue instanceof String); + return parser.editToCanonicalValue((String) displayValue, 0); + } + + + /** + * @see org.eclipse.papyrus.infra.widgets.util.ISetPapyrusConverter#setPapyrusConverter(org.eclipse.papyrus.infra.widgets.util.IPapyrusConverter) + * + * @param parser + */ + @Override + public void setPapyrusConverter(IPapyrusConverter parser) { + this.parser = parser; + } +} diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/manager/cell/editor/UMLReferenceTextWithCompletionCellEditor.java b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/manager/cell/editor/UMLReferenceTextWithCompletionCellEditor.java new file mode 100644 index 00000000000..18f994f339a --- /dev/null +++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/manager/cell/editor/UMLReferenceTextWithCompletionCellEditor.java @@ -0,0 +1,263 @@ +/******************************************************************************* + * Copyright (c) 2012 Original authors and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Vincent Lorenzo (CEA-LIST) - duplicated and adapted code from nattable project. + * + ******************************************************************************/ +package org.eclipse.papyrus.uml.nattable.manager.cell.editor; + +import java.util.ArrayList; +import java.util.Collection; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EClassifier; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.nebula.widgets.nattable.edit.editor.ICellEditor; +import org.eclipse.nebula.widgets.nattable.edit.editor.IEditErrorHandler; +import org.eclipse.papyrus.infra.nattable.celleditor.AbstractPapyrusStyledTextCellEditor; +import org.eclipse.papyrus.infra.nattable.manager.table.ITableAxisElementProvider; +import org.eclipse.papyrus.infra.nattable.model.nattable.Table; +import org.eclipse.papyrus.infra.nattable.utils.CrossAxisWrapper; +import org.eclipse.papyrus.infra.widgets.editors.StringEditorWithCompletionWrapper; +import org.eclipse.papyrus.infra.widgets.util.INameResolutionHelper; +import org.eclipse.papyrus.infra.widgets.util.IPapyrusConverter; +import org.eclipse.papyrus.infra.widgets.util.ISetPapyrusConverter; +import org.eclipse.papyrus.uml.nattable.utils.UMLTableUtils; +import org.eclipse.papyrus.uml.tools.util.UMLReferenceConverter; +import org.eclipse.papyrus.uml.tools.utils.NameResolutionHelper; +import org.eclipse.swt.custom.StyledText; +import org.eclipse.swt.events.KeyEvent; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.Text; +import org.eclipse.uml2.uml.Element; + + + +/** + * {@link ICellEditor} implementation that wraps a SWT {@link Text} control to + * support text editing. This is also the default editor in NatTable if you + * didn't configure something else. + * + * duplicated and adapted code from nattable project. Add the method {@link #keyPressed(Composite, KeyEvent)} to allow to ovveride it + */ +public class UMLReferenceTextWithCompletionCellEditor extends AbstractPapyrusStyledTextCellEditor { + + /** + * The Text control which is the editor wrapped by this TextCellEditor. + */ + private StringEditorWithCompletionWrapper textCompletion = null; + + /** + * The name resolution helper to use to find UML Element from a string + */ + private INameResolutionHelper helper; + + /** + * the papyrus parser to use + */ + private IPapyrusConverter parser; + /** + * boolean indicating if we are editing a multivalued field + */ + private boolean isMultiValued = false; + + /** + * + * Constructor. + * + * @param table + * @param axisElement + * @param elementProvider + * @param commitOnUpDown + * @param moveSelectionOnEnter + */ + public UMLReferenceTextWithCompletionCellEditor(Table table, Object axisElement, ITableAxisElementProvider elementProvider, boolean commitOnUpDown, boolean moveSelectionOnEnter) { + super(table, axisElement, elementProvider, commitOnUpDown, moveSelectionOnEnter); + } + + /** + * + * Constructor. + * + * @param table + * @param axisElement + * @param elementProvider + * @param commitOnUpDown + */ + public UMLReferenceTextWithCompletionCellEditor(Table table, Object axisElement, ITableAxisElementProvider elementProvider, boolean commitOnUpDown) { + super(table, axisElement, elementProvider, commitOnUpDown); + } + + /** + * + * Constructor. + * + * @param table + * @param axisElement + * @param elementProvider + */ + public UMLReferenceTextWithCompletionCellEditor(Table table, Object axisElement, ITableAxisElementProvider elementProvider) { + super(table, axisElement, elementProvider); + } + + /** + * + * @param isMultivalued + */ + public void setIsMultiValued(boolean isMultivalued) { + this.isMultiValued = isMultivalued; + } + + /** + * + * @see org.eclipse.papyrus.infra.nattable.celleditor.AbstractStyledTextCellEditor#activateCell(org.eclipse.swt.widgets.Composite, java.lang.Object) + * + * @param parent + * @param originalCanonicalValue + * @return + */ + @Override + protected Control activateCell(Composite parent, Object originalCanonicalValue) { + this.helper = createNameResolutionHelper(); + parser = new UMLReferenceConverter(this.helper, isMultiValued); + setPapyrusConverter(parser); + return super.activateCell(parent, originalCanonicalValue); + } + + /** + * + * @param parser + * the parser to use to find the references + */ + private void setPapyrusConverter(IPapyrusConverter parser) { + // if (this.dataValidator instanceof ISetPapyrusParser) { + // ((ISetPapyrusParser) this.dataValidator).setPapyrusParser(parser); + // } + if (this.displayConverter instanceof ISetPapyrusConverter) { + ((ISetPapyrusConverter) this.displayConverter).setPapyrusConverter(parser); + } + } + + /** + * + * @return + */ + @Override + public Control getEditorControl() { + return super.getEditorControl(); + } + + /** + * + * @param parent + * @param style + * @return + */ + @Override + protected StyledText createStyledText(Composite parent, int style) { + // IPapyrusParser parser = new UMLReferenceParser(helper); + this.textCompletion = new StringEditorWithCompletionWrapper(parent, this.parser); + return this.textCompletion.getTextViewer().getTextWidget(); + } + + /** + * @see org.eclipse.papyrus.infra.nattable.celleditor.AbstractStyledTextCellEditor#keyPressed(org.eclipse.swt.events.KeyEvent) + * + * @param event + */ + @Override + public void keyPressed(KeyEvent event) { + if (isMultiValued && textCompletion.isContentAssistOpened()) { + return; + } + super.keyPressed(event); + } + + + /** + * + * @return + * the created name resolution helper + */ + protected INameResolutionHelper createNameResolutionHelper() { + CrossAxisWrapper<EObject, EStructuralFeature> editedElement = UMLTableUtils.getRealEditedObject(layerCell, elementProvider); + EObject element = editedElement.getFirstAxis(); + Element scope; + if (element instanceof Element) { + scope = (Element) element; + } else { + // it could be a stereotype application + scope = org.eclipse.uml2.uml.util.UMLUtil.getBaseElement(element); + } + + EStructuralFeature feature = editedElement.getSecondAxis(); + EClassifier eType = feature.getEType(); + if (eType instanceof EClass) { + INameResolutionHelper helper = new NameResolutionHelper(scope, (EClass) eType); + return helper; + } + return null; + } + + /** + * + * @see org.eclipse.nebula.widgets.nattable.edit.editor.AbstractCellEditor#getCanonicalValue(org.eclipse.nebula.widgets.nattable.edit.editor.IEditErrorHandler) + * + * @param conversionErrorHandler + * @return + */ + @Override + public Object getCanonicalValue(IEditErrorHandler conversionErrorHandler) { + Object canonnicalValue = super.getCanonicalValue(conversionErrorHandler); + if (canonnicalValue instanceof Collection<?>) { + return canonnicalValue; + } + if (isMultiValued) { + Collection<Object> coll = new ArrayList<Object>(); + coll.add(canonnicalValue); + return coll; + } else { + return canonnicalValue; + } + } + + /** + * + * @see org.eclipse.nebula.widgets.nattable.edit.editor.AbstractCellEditor#getCanonicalValue() + * + * @return + */ + @Override + public Object getCanonicalValue() { + return super.getCanonicalValue(); + } + + /** + * + * @see org.eclipse.papyrus.infra.nattable.celleditor.AbstractStyledTextCellEditor#close() + * + */ + @Override + public void close() { + this.textCompletion.getTextWidget().dispose(); + super.close(); + } + + + /** + * + * @see org.eclipse.papyrus.infra.nattable.celleditor.AbstractPapyrusStyledTextCellEditor#getEditedEObject() + * + * @return + */ + protected EObject getEditedEObject() { + return null; + } +} diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/messages/Messages.java b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/messages/Messages.java index 9320e0be78c..784ff1dd44a 100644 --- a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/messages/Messages.java +++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/messages/Messages.java @@ -21,6 +21,8 @@ public class Messages extends NLS { public static String StereotypePropertyCellManager_SeveralStereotypesWithThisFeatureAreApplied;
public static String StereotypePropertyHeaderLabelProvider_RequiredProfileNotFound;
+
+ public static String UMLReferenceCellEditorConfiguration_OpenDialogToChooseTheValue;
static {
// initialize resource bundle
NLS.initializeMessages(BUNDLE_NAME, Messages.class);
diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/messages/messages.properties b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/messages/messages.properties index 8ccb633749a..a11a43cae98 100644 --- a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/messages/messages.properties +++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/messages/messages.properties @@ -1,2 +1,3 @@ StereotypePropertyCellManager_SeveralStereotypesWithThisFeatureAreApplied=Several stereotypes with this feature are applied -> not yet managed
StereotypePropertyHeaderLabelProvider_RequiredProfileNotFound=Required Profile Not Found
+UMLReferenceCellEditorConfiguration_OpenDialogToChooseTheValue=Open dialog to choose the value.
diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/utils/UMLTableUtils.java b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/utils/UMLTableUtils.java index 90800f68bdb..3ae9bd8a73e 100644 --- a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/utils/UMLTableUtils.java +++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/utils/UMLTableUtils.java @@ -1,341 +1,388 @@ -/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.nattable.utils;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.emf.common.util.Enumerator;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EEnum;
-import org.eclipse.emf.ecore.EEnumLiteral;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.papyrus.infra.nattable.utils.AxisUtils;
-import org.eclipse.papyrus.infra.nattable.utils.Constants;
-import org.eclipse.papyrus.uml.nattable.paste.StereotypeApplicationStructure;
-import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.NamedElement;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.Profile;
-import org.eclipse.uml2.uml.Property;
-import org.eclipse.uml2.uml.Stereotype;
-
-/**
- *
- * This class provides useful methods to manage stereotypes in the table
- *
- */
-public class UMLTableUtils {
-
- public static final String PROPERTY_OF_STEREOTYPE_PREFIX = "property_of_stereotype:/"; //$NON-NLS-1$
-
- private UMLTableUtils() {
- // to prevent instanciation
- }
-
- /**
- *
- * @param aString
- * a string
- * @return
- * <code>true</code> if the string start with {@link #PROPERTY_OF_STEREOTYPE_PREFIX}
- */
- public static final boolean isStringRepresentingStereotypeProperty(String aString) {
- return aString.startsWith(PROPERTY_OF_STEREOTYPE_PREFIX);
- }
-
- /**
- *
- * @param anAxis
- * an object axis
- * @return
- * <code>true</code> if the axis represents a property of stereotype (so a string starting with {@link #PROPERTY_OF_STEREOTYPE_PREFIX}
- */
- public static final boolean isStringRepresentingStereotypeProperty(Object anAxis) {
- anAxis = AxisUtils.getRepresentedElement(anAxis);
- if (anAxis instanceof String) {
- return isStringRepresentingStereotypeProperty((String) anAxis);
- }
- return false;
- }
-
- /**
- *
- * @param eobject
- * an element of the model (currently, if it is not an UML::Element, we can't find the property)
- * @param id
- * the id used to identify the property of the stereotype
- *
- * @return
- * the UML::Property or <code>null</code> if we can't resolve it (the required profile is not applied)
- */
- public static Property getRealStereotypeProperty(final EObject eobject, final String id) {
- Assert.isTrue(id.startsWith(PROPERTY_OF_STEREOTYPE_PREFIX));
- if (eobject instanceof Element) {
- final Element element = (Element) eobject;
- final String propertyQN = id.replace(UMLTableUtils.PROPERTY_OF_STEREOTYPE_PREFIX, ""); //$NON-NLS-1$
- final String propertyName = NamedElementUtil.getNameFromQualifiedName(propertyQN);
- final String stereotypeQN = NamedElementUtil.getParentQualifiedName(propertyQN);
- final String stereotypeName = NamedElementUtil.getNameFromQualifiedName(stereotypeQN);
- final String profileQN = NamedElementUtil.getParentQualifiedName(stereotypeQN);
-
- // 1. we check if the profile is applied on the nearest package
- if (element.getNearestPackage() != null) {
- final Profile profile = element.getNearestPackage().getAppliedProfile(profileQN, true);
- if (profile != null) {
- final Stereotype ste = profile.getOwnedStereotype(stereotypeName);
- return (Property) ste.getMember(propertyName);
- }
- }
-
- // 2. if not, the profile could be applied on a sub-package of the nearest package
- /* the table can show element which are not children of its context, so the profile could not be available in its context */
- return getProperty(element.getNearestPackage().getNestedPackages(), propertyQN);
- }
- return null;
- }
-
- /**
- *
- * @param packages
- * a list of package
- * @param propertyQN
- * the qualified name of the wanted property
- * @return
- * the property or <code>null</code> if not found
- */
- protected static Property getProperty(Collection<Package> packages, String propertyQN) {
- final String propertyName = NamedElementUtil.getNameFromQualifiedName(propertyQN);
- final String stereotypeQN = NamedElementUtil.getParentQualifiedName(propertyQN);
- final String stereotypeName = NamedElementUtil.getNameFromQualifiedName(stereotypeQN);
- final String profileQN = NamedElementUtil.getParentQualifiedName(stereotypeQN);
- for (Package package1 : packages) {
- for (Profile prof : package1.getAppliedProfiles()) {
- if (prof.getQualifiedName().equals(profileQN)) {
- NamedElement ste = prof.getMember(stereotypeName);
- if (ste instanceof Stereotype) {
- NamedElement prop = ((Stereotype) ste).getMember(propertyName);
- if (prop instanceof Property && prop.getQualifiedName().equals(propertyQN)) {
- return (Property) prop;
- }
- }
- }
- Property p = getProperty(package1.getNestedPackages(), propertyQN);
- if (p != null) {
- return p;
- }
- }
- }
- return null;
- }
-
- /**
- *
- * @param eobject
- * an element of the model (currently, if it is not an UML::Element, we can't find the property)
- * @param id
- * the id used to identify the property of the stereotype
- * @return
- * a list of enumerator which contains the available literal
- */
- public static final List<Enumerator> getLiteralsToTypeProperty(final EObject modelElement, final String id) {
- Assert.isTrue(id.startsWith(PROPERTY_OF_STEREOTYPE_PREFIX));
- if (modelElement instanceof Element) {
- final Property property = UMLTableUtils.getRealStereotypeProperty(modelElement, id);
- final Stereotype current = (Stereotype) property.getOwner();
-
- EClass stereotypeDef = (EClass) current.getProfile().getDefinition(current);
- EStructuralFeature feature = stereotypeDef.getEStructuralFeature(property.getName());
- EEnum eenum = null;
- if (feature != null && feature.getEType() instanceof EEnum) {
- eenum = (EEnum) feature.getEType();
- }
-
- if (eenum != null) {
- final List<Enumerator> literals = new ArrayList<Enumerator>();
- for (EEnumLiteral literal : eenum.getELiterals()) {
- Enumerator value = literal.getInstance();
- literals.add(value);
- }
- return literals;
- }
- }
- return Collections.emptyList();
-
- }
-
- /**
- *
- * @param eobject
- * an element of the model (currently, if it is not an UML::Element, we can't find the property)
- * @param id
- * the id used to identify the property of the stereotype
- * @param sharedMap
- * a map owning interesting information, like {@link StereotypeApplicationStructure} which can be used to find stereotype, stereotype
- * application and so on
- * @return
- * the UML::Property or <code>null</code> if we can't resolve it (the required profile is not applied)
- */
- public static Property getRealStereotypeProperty(final EObject eobject, final String id, final Map<?, ?> sharedMap) {
- Assert.isTrue(id.startsWith(PROPERTY_OF_STEREOTYPE_PREFIX));
- if (eobject instanceof Element) {
- final Element element = (Element) eobject;
- final String propertyQN = id.replace(UMLTableUtils.PROPERTY_OF_STEREOTYPE_PREFIX, ""); //$NON-NLS-1$
- final String propertyName = NamedElementUtil.getNameFromQualifiedName(propertyQN);
- final String stereotypeQN = NamedElementUtil.getParentQualifiedName(propertyQN);
- final String stereotypeName = NamedElementUtil.getNameFromQualifiedName(stereotypeQN);
- final String profileQN = NamedElementUtil.getParentQualifiedName(stereotypeQN);
- final Package nearestPackage;
- if (sharedMap != null) {
- final Element context = (Element) sharedMap.get(Constants.PASTED_ELEMENT_CONTAINER_KEY);
- nearestPackage = context.getNearestPackage();
- } else {
- nearestPackage = element.getNearestPackage();
- }
- if (nearestPackage != null) {
- final Profile profile = nearestPackage.getAppliedProfile(profileQN, true);
- if (profile != null) {
- final Stereotype ste = profile.getOwnedStereotype(stereotypeName);
- return (Property) ste.getMember(propertyName);
- }
- }
-
- }
- return null;
- }
-
- /**
- *
- * @param element
- * the UML::Element on which we are looking for applied Stereotype with the property identified by its id
- * @param id
- * the id used to identify the property of the stereotype
- *
- * @return
- * the list of UML::Stereotype which have the property identified by this id and which are applied on the Element or <code>null</code> if
- * we can't resolve it (the required profile is not applied)
- */
- public static final List<Stereotype> getAppliedStereotypesWithThisProperty(final Element element, final String id) {
- Assert.isTrue(id.startsWith(PROPERTY_OF_STEREOTYPE_PREFIX));
- final List<Stereotype> stereotypes = new ArrayList<Stereotype>();
- if (element.eResource() != null) {
- final Object prop = getRealStereotypeProperty(element, id);
- if (prop instanceof Property) {
- for (final Stereotype current : element.getAppliedStereotypes()) {
- if (current.getAllAttributes().contains(prop)) {
- stereotypes.add(current);
- }
- }
- }
- }
- return stereotypes;
- }
-
- /**
- *
- * @param element
- * the UML::Element on which we are looking for applied Stereotype with the property identified by its id
- * @param id
- * the id used to identify the property of the stereotype
- *
- * @return
- * the list of UML::Stereotype which have the property identified by this id and which are applied on the Element or <code>null</code> if
- * we can't resolve it (the required profile is not applied)
- */
- public static final List<Stereotype> getApplicableStereotypesWithThisProperty(final Element element, final String id) {
- Assert.isTrue(id.startsWith(PROPERTY_OF_STEREOTYPE_PREFIX));
- final List<Stereotype> stereotypes = new ArrayList<Stereotype>();
- if (element.eResource() != null) {
- final Object prop = getRealStereotypeProperty(element, id);
- if (prop instanceof Property) {
- for (final Stereotype current : element.getApplicableStereotypes()) {
- if (current.getAllAttributes().contains(prop)) {
- stereotypes.add(current);
- }
- }
- }
- }
- return stereotypes;
- }
-
- /**
- *
- * @param element
- * the UML::Element on which we are looking for applied Stereotype with the property identified by its id
- * @param id
- * the id used to identify the property of the stereotype
- * @param sharedMap
- * a map owning interesting information, like {@link StereotypeApplicationStructure} which can be used to find stereotype, stereotype
- * application and so on
- * @return
- * the list of UML::Stereotype which have the property identified by this id and which are applied on the Element or <code>null</code> if
- * we can't resolve it (the required profile is not applied)
- */
- public static final List<Stereotype> getAppliedStereotypesWithThisProperty(final Element element, final String id, Map<?, ?> sharedMap) {
- Assert.isTrue(id.startsWith(PROPERTY_OF_STEREOTYPE_PREFIX));
- final List<Stereotype> stereotypes = new ArrayList<Stereotype>();
- if (sharedMap != null) {
- final List<StereotypeApplicationStructure> struct = findStereotypeApplicationDataStructure(element, id, sharedMap);
- if (struct != null) {
- for (final StereotypeApplicationStructure current : struct) {
- stereotypes.add(current.getStereotype());
- }
- }
- }
- if (element.eResource() != null) {
- final Object prop = getRealStereotypeProperty(element, id, sharedMap);
- if (prop instanceof Property) {
- for (final Stereotype current : element.getAppliedStereotypes()) {
- if (current.getAllAttributes().contains(prop)) {
- stereotypes.add(current);
- }
- }
- }
- }
- return stereotypes;
- }
-
- /**
- *
- * @param editedElement
- * the edited element
- * @param id
- * the id of the edited stereotype feature
- * @param sharedMap
- * a map owning interesting information, like {@link StereotypeApplicationStructure} which can be used to find stereotype, stereotype
- * application and so on
- * @return
- * the list of the found data structure or <code>null</code> if not found
- */
- public static final List<StereotypeApplicationStructure> findStereotypeApplicationDataStructure(final Element editedElement, final String id, final Map<?, ?> sharedMap) {
- // TODO : enhance the data structure to look for an editedElement + a propQn as Key!
- @SuppressWarnings("unchecked")
- List<StereotypeApplicationStructure> list = (List<StereotypeApplicationStructure>) sharedMap.get(editedElement);
- if (list != null && !list.isEmpty()) {
- final String propertyQN = id.replace(UMLTableUtils.PROPERTY_OF_STEREOTYPE_PREFIX, ""); //$NON-NLS-1$
- for (final StereotypeApplicationStructure current : list) {
- if (current.getProperty().getQualifiedName().equals(propertyQN)) {
- return Collections.singletonList(current);// TODO : doesn't manage when several stereotype with the same property are applied
- }
- }
- }
- return null;
- }
-}
+/***************************************************************************** + * Copyright (c) 2012 CEA LIST. + * + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.nattable.utils; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +import org.eclipse.core.runtime.Assert; +import org.eclipse.emf.common.util.Enumerator; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EEnum; +import org.eclipse.emf.ecore.EEnumLiteral; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.papyrus.infra.nattable.utils.AxisUtils; +import org.eclipse.papyrus.infra.nattable.utils.Constants; +import org.eclipse.papyrus.infra.nattable.utils.CrossAxisWrapper; +import org.eclipse.papyrus.uml.nattable.paste.StereotypeApplicationStructure; +import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil; +import org.eclipse.uml2.uml.Element; +import org.eclipse.uml2.uml.NamedElement; +import org.eclipse.uml2.uml.Package; +import org.eclipse.uml2.uml.Profile; +import org.eclipse.uml2.uml.Property; +import org.eclipse.uml2.uml.Stereotype; + +/** + * + * This class provides useful methods to manage stereotypes in the table + * + */ +public class UMLTableUtils { + + public static final String PROPERTY_OF_STEREOTYPE_PREFIX = "property_of_stereotype:/"; //$NON-NLS-1$ + + private UMLTableUtils() { + // to prevent instanciation + } + + /** + * + * @param aString + * a string + * @return + * <code>true</code> if the string start with {@link #PROPERTY_OF_STEREOTYPE_PREFIX} + */ + public static final boolean isStringRepresentingStereotypeProperty(String aString) { + return aString.startsWith(PROPERTY_OF_STEREOTYPE_PREFIX); + } + + /** + * + * @param anAxis + * an object axis + * @return + * <code>true</code> if the axis represents a property of stereotype (so a string starting with {@link #PROPERTY_OF_STEREOTYPE_PREFIX} + */ + public static final boolean isStringRepresentingStereotypeProperty(Object anAxis) { + anAxis = AxisUtils.getRepresentedElement(anAxis); + if (anAxis instanceof String) { + return isStringRepresentingStereotypeProperty((String) anAxis); + } + return false; + } + + /** + * + * @param eobject + * an element of the model (currently, if it is not an UML::Element, we can't find the property) + * @param id + * the id used to identify the property of the stereotype + * + * @return + * the UML::Property or <code>null</code> if we can't resolve it (the required profile is not applied) + */ + public static Property getRealStereotypeProperty(final EObject eobject, final String id) { + Assert.isTrue(id.startsWith(PROPERTY_OF_STEREOTYPE_PREFIX)); + if (eobject instanceof Element) { + final Element element = (Element) eobject; + final String propertyQN = id.replace(UMLTableUtils.PROPERTY_OF_STEREOTYPE_PREFIX, ""); //$NON-NLS-1$ + final String propertyName = NamedElementUtil.getNameFromQualifiedName(propertyQN); + final String stereotypeQN = NamedElementUtil.getParentQualifiedName(propertyQN); + final String stereotypeName = NamedElementUtil.getNameFromQualifiedName(stereotypeQN); + final String profileQN = NamedElementUtil.getParentQualifiedName(stereotypeQN); + + // 1. we check if the profile is applied on the nearest package + if (element.getNearestPackage() != null) { + final Profile profile = element.getNearestPackage().getAppliedProfile(profileQN, true); + if (profile != null) { + final Stereotype ste = profile.getOwnedStereotype(stereotypeName); + return (Property) ste.getMember(propertyName); + } + } + + // 2. if not, the profile could be applied on a sub-package of the nearest package + /* the table can show element which are not children of its context, so the profile could not be available in its context */ + return getProperty(element.getNearestPackage().getNestedPackages(), propertyQN); + } + return null; + } + + /** + * + * @param packages + * a list of package + * @param propertyQN + * the qualified name of the wanted property + * @return + * the property or <code>null</code> if not found + */ + protected static Property getProperty(Collection<Package> packages, String propertyQN) { + final String propertyName = NamedElementUtil.getNameFromQualifiedName(propertyQN); + final String stereotypeQN = NamedElementUtil.getParentQualifiedName(propertyQN); + final String stereotypeName = NamedElementUtil.getNameFromQualifiedName(stereotypeQN); + final String profileQN = NamedElementUtil.getParentQualifiedName(stereotypeQN); + for (Package package1 : packages) { + for (Profile prof : package1.getAppliedProfiles()) { + if (prof.getQualifiedName().equals(profileQN)) { + NamedElement ste = prof.getMember(stereotypeName); + if (ste instanceof Stereotype) { + NamedElement prop = ((Stereotype) ste).getMember(propertyName); + if (prop instanceof Property && prop.getQualifiedName().equals(propertyQN)) { + return (Property) prop; + } + } + } + Property p = getProperty(package1.getNestedPackages(), propertyQN); + if (p != null) { + return p; + } + } + } + return null; + } + + /** + * + * @param eobject + * an element of the model (currently, if it is not an UML::Element, we can't find the property) + * @param id + * the id used to identify the property of the stereotype + * @return + * a list of enumerator which contains the available literal + */ + public static final List<Enumerator> getLiteralsToTypeProperty(final EObject modelElement, final String id) { + Assert.isTrue(id.startsWith(PROPERTY_OF_STEREOTYPE_PREFIX)); + if (modelElement instanceof Element) { + final Property property = UMLTableUtils.getRealStereotypeProperty(modelElement, id); + final Stereotype current = (Stereotype) property.getOwner(); + + EClass stereotypeDef = (EClass) current.getProfile().getDefinition(current); + EStructuralFeature feature = stereotypeDef.getEStructuralFeature(property.getName()); + EEnum eenum = null; + if (feature != null && feature.getEType() instanceof EEnum) { + eenum = (EEnum) feature.getEType(); + } + + if (eenum != null) { + final List<Enumerator> literals = new ArrayList<Enumerator>(); + for (EEnumLiteral literal : eenum.getELiterals()) { + Enumerator value = literal.getInstance(); + literals.add(value); + } + return literals; + } + } + return Collections.emptyList(); + + } + + /** + * + * @param eobject + * an element of the model (currently, if it is not an UML::Element, we can't find the property) + * @param id + * the id used to identify the property of the stereotype + * @param sharedMap + * a map owning interesting information, like {@link StereotypeApplicationStructure} which can be used to find stereotype, stereotype + * application and so on + * @return + * the UML::Property or <code>null</code> if we can't resolve it (the required profile is not applied) + */ + public static Property getRealStereotypeProperty(final EObject eobject, final String id, final Map<?, ?> sharedMap) { + Assert.isTrue(id.startsWith(PROPERTY_OF_STEREOTYPE_PREFIX)); + if (eobject instanceof Element) { + final Element element = (Element) eobject; + final String propertyQN = id.replace(UMLTableUtils.PROPERTY_OF_STEREOTYPE_PREFIX, ""); //$NON-NLS-1$ + final String propertyName = NamedElementUtil.getNameFromQualifiedName(propertyQN); + final String stereotypeQN = NamedElementUtil.getParentQualifiedName(propertyQN); + final String stereotypeName = NamedElementUtil.getNameFromQualifiedName(stereotypeQN); + final String profileQN = NamedElementUtil.getParentQualifiedName(stereotypeQN); + final Package nearestPackage; + if (sharedMap != null) { + final Element context = (Element) sharedMap.get(Constants.PASTED_ELEMENT_CONTAINER_KEY); + nearestPackage = context.getNearestPackage(); + } else { + nearestPackage = element.getNearestPackage(); + } + if (nearestPackage != null) { + final Profile profile = nearestPackage.getAppliedProfile(profileQN, true); + if (profile != null) { + final Stereotype ste = profile.getOwnedStereotype(stereotypeName); + return (Property) ste.getMember(propertyName); + } + } + + } + return null; + } + + /** + * + * @param element + * the UML::Element on which we are looking for applied Stereotype with the property identified by its id + * @param id + * the id used to identify the property of the stereotype + * + * @return + * the list of UML::Stereotype which have the property identified by this id and which are applied on the Element or <code>null</code> if + * we can't resolve it (the required profile is not applied) + */ + public static final List<Stereotype> getAppliedStereotypesWithThisProperty(final Element element, final String id) { + Assert.isTrue(id.startsWith(PROPERTY_OF_STEREOTYPE_PREFIX)); + final List<Stereotype> stereotypes = new ArrayList<Stereotype>(); + if (element.eResource() != null) { + final Object prop = getRealStereotypeProperty(element, id); + if (prop instanceof Property) { + for (final Stereotype current : element.getAppliedStereotypes()) { + if (current.getAllAttributes().contains(prop)) { + stereotypes.add(current); + } + } + } + } + return stereotypes; + } + + /** + * + * @param element + * the UML::Element on which we are looking for applied Stereotype with the property identified by its id + * @param id + * the id used to identify the property of the stereotype + * + * @return + * the list of UML::Stereotype which have the property identified by this id and which are applied on the Element or <code>null</code> if + * we can't resolve it (the required profile is not applied) + */ + public static final List<Stereotype> getApplicableStereotypesWithThisProperty(final Element element, final String id) { + Assert.isTrue(id.startsWith(PROPERTY_OF_STEREOTYPE_PREFIX)); + final List<Stereotype> stereotypes = new ArrayList<Stereotype>(); + if (element.eResource() != null) { + final Object prop = getRealStereotypeProperty(element, id); + if (prop instanceof Property) { + for (final Stereotype current : element.getApplicableStereotypes()) { + if (current.getAllAttributes().contains(prop)) { + stereotypes.add(current); + } + } + } + } + return stereotypes; + } + + /** + * + * @param element + * the UML::Element on which we are looking for applied Stereotype with the property identified by its id + * @param id + * the id used to identify the property of the stereotype + * @param sharedMap + * a map owning interesting information, like {@link StereotypeApplicationStructure} which can be used to find stereotype, stereotype + * application and so on + * @return + * the list of UML::Stereotype which have the property identified by this id and which are applied on the Element or <code>null</code> if + * we can't resolve it (the required profile is not applied) + */ + public static final List<Stereotype> getAppliedStereotypesWithThisProperty(final Element element, final String id, Map<?, ?> sharedMap) { + Assert.isTrue(id.startsWith(PROPERTY_OF_STEREOTYPE_PREFIX)); + final List<Stereotype> stereotypes = new ArrayList<Stereotype>(); + if (sharedMap != null) { + final List<StereotypeApplicationStructure> struct = findStereotypeApplicationDataStructure(element, id, sharedMap); + if (struct != null) { + for (final StereotypeApplicationStructure current : struct) { + stereotypes.add(current.getStereotype()); + } + } + } + if (element.eResource() != null) { + final Object prop = getRealStereotypeProperty(element, id, sharedMap); + if (prop instanceof Property) { + for (final Stereotype current : element.getAppliedStereotypes()) { + if (current.getAllAttributes().contains(prop)) { + stereotypes.add(current); + } + } + } + } + return stereotypes; + } + + /** + * + * @param editedElement + * the edited element + * @param id + * the id of the edited stereotype feature + * @param sharedMap + * a map owning interesting information, like {@link StereotypeApplicationStructure} which can be used to find stereotype, stereotype + * application and so on + * @return + * the list of the found data structure or <code>null</code> if not found + */ + public static final List<StereotypeApplicationStructure> findStereotypeApplicationDataStructure(final Element editedElement, final String id, final Map<?, ?> sharedMap) { + // TODO : enhance the data structure to look for an editedElement + a propQn as Key! + @SuppressWarnings("unchecked") + List<StereotypeApplicationStructure> list = (List<StereotypeApplicationStructure>) sharedMap.get(editedElement); + if (list != null && !list.isEmpty()) { + final String propertyQN = id.replace(UMLTableUtils.PROPERTY_OF_STEREOTYPE_PREFIX, ""); //$NON-NLS-1$ + for (final StereotypeApplicationStructure current : list) { + if (current.getProperty().getQualifiedName().equals(propertyQN)) { + return Collections.singletonList(current);// TODO : doesn't manage when several stereotype with the same property are applied + } + } + } + return null; + } + + // currently consisder this method as internal + public static CrossAxisWrapper<EObject, EStructuralFeature> getRealEditedObject(final ILayerCell layerCell, ITableAxisElementProvider manager) { + int columnIndex = layerCell.getColumnIndex(); + int rowIndex = layerCell.getRowIndex(); + Object row = manager.getRowElement(rowIndex); + Object column = manager.getColumnElement(columnIndex); + row = AxisUtils.getRepresentedElement(row); + column = AxisUtils.getRepresentedElement(column); + Element editedElement = null; + Object feature = null; + if (row instanceof Element && !(column instanceof Element)) { + editedElement = (Element) row; + feature = column; + } else if (column instanceof Element && !(row instanceof Element)) { + editedElement = (Element) column; + feature = row; + } else { + return null; + } + + EStructuralFeature realFeature = null; + EObject realEditedObject = null; +// Stereotype stereotype = null; + List<Stereotype> stereotypesWithEditedFeatureAppliedOnElement = null; + if (feature instanceof EStructuralFeature) { + realFeature = (EStructuralFeature) feature; + realEditedObject = editedElement; + } else if (feature instanceof String && ((String) feature).startsWith(PROPERTY_OF_STEREOTYPE_PREFIX)) { + final String id = AxisUtils.getPropertyId(feature); + stereotypesWithEditedFeatureAppliedOnElement = UMLTableUtils.getAppliedStereotypesWithThisProperty(editedElement, id); +// stereotype = stereotypesWithEditedFeatureAppliedOnElement.get(0); + realEditedObject = editedElement.getStereotypeApplication(stereotypesWithEditedFeatureAppliedOnElement.get(0)); + Property prop = UMLTableUtils.getRealStereotypeProperty(editedElement, id); + realFeature = realEditedObject.eClass().getEStructuralFeature(prop.getName()); + } + if (stereotypesWithEditedFeatureAppliedOnElement != null && stereotypesWithEditedFeatureAppliedOnElement.size() > 1) { + // TODO : not yet managed + return null; + } + + if (realEditedObject != null && realFeature != null) { + return new CrossAxisWrapper<EObject, EStructuralFeature>(realEditedObject, realFeature); + } + return null; + } +} diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/widget/UMLDialogComboAction.java b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/widget/UMLDialogComboAction.java index 0c9546dff31..b6ee04a8b5a 100644 --- a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/widget/UMLDialogComboAction.java +++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/widget/UMLDialogComboAction.java @@ -25,10 +25,10 @@ import org.eclipse.nebula.widgets.nattable.edit.editor.IComboBoxDataProvider; import org.eclipse.papyrus.infra.core.services.ServiceException;
import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForEObject;
+import org.eclipse.papyrus.infra.widgets.editors.TreeSelectorDialog;
import org.eclipse.papyrus.infra.nattable.celleditor.AbstractComboAction;
import org.eclipse.papyrus.infra.nattable.utils.AxisUtils;
import org.eclipse.papyrus.infra.services.labelprovider.service.LabelProviderService;
-import org.eclipse.papyrus.infra.widgets.editors.TreeSelectorDialog;
import org.eclipse.papyrus.uml.nattable.Activator;
import org.eclipse.papyrus.uml.nattable.dataprovider.UMLSingleReferenceComboBoxDataProvider;
import org.eclipse.papyrus.uml.nattable.utils.UMLTableUtils;
diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/META-INF/MANIFEST.MF b/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/META-INF/MANIFEST.MF index e53fc7c4b6c..18037adb042 100644 --- a/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/META-INF/MANIFEST.MF +++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/META-INF/MANIFEST.MF @@ -1,27 +1,26 @@ -Manifest-Version: 1.0
-Require-Bundle: org.eclipse.ui;bundle-version="3.105.0",
- org.eclipse.ui.forms;bundle-version="3.6.0",
- org.eclipse.ui.views.properties.tabbed;bundle-version="3.6.0",
- org.eclipse.emf.ecore;bundle-version="2.9.0",
- org.eclipse.gmf.runtime.common.core;bundle-version="1.7.0",
- org.eclipse.gmf.runtime.common.ui.services;bundle-version="1.7.0",
- org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.7.0",
- org.eclipse.gmf.runtime.diagram.ui.properties;bundle-version="1.7.0",
- org.eclipse.papyrus.infra.core;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.1.0",
- org.eclipse.papyrus.extensionpoints.editors;bundle-version="1.1.0",
- org.eclipse.papyrus.uml.xtext.integration.ui;bundle-version="1.1.0",
- org.eclipse.xtext;bundle-version="2.4.2",
- org.eclipse.papyrus.infra.emf;bundle-version="1.1.0",
- org.eclipse.papyrus.uml.properties;bundle-version="1.1.0",
- org.eclipse.papyrus.views.properties;bundle-version="1.1.0"
-Bundle-Vendor: %providerName
-Bundle-ActivationPolicy: lazy
-Bundle-Version: 1.1.0.qualifier
-Bundle-Localization: plugin
-Bundle-Name: %pluginName
-Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.papyrus.uml.properties.xtext;singleto
- n:=true
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-
+Manifest-Version: 1.0 +Require-Bundle: org.eclipse.ui;bundle-version="3.105.0", + org.eclipse.ui.forms;bundle-version="3.6.0", + org.eclipse.ui.views.properties.tabbed;bundle-version="3.6.0", + org.eclipse.emf.ecore;bundle-version="2.9.0", + org.eclipse.gmf.runtime.common.core;bundle-version="1.7.0", + org.eclipse.gmf.runtime.common.ui.services;bundle-version="1.7.0", + org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.7.0", + org.eclipse.gmf.runtime.diagram.ui.properties;bundle-version="1.7.0", + org.eclipse.papyrus.infra.core;bundle-version="1.1.0", + org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.1.0", + org.eclipse.papyrus.extensionpoints.editors;bundle-version="1.1.0", + org.eclipse.papyrus.uml.xtext.integration.ui;bundle-version="1.1.0", + org.eclipse.xtext;bundle-version="2.4.2", + org.eclipse.papyrus.infra.emf;bundle-version="1.1.0", + org.eclipse.papyrus.uml.properties;bundle-version="1.1.0", + org.eclipse.papyrus.views.properties;bundle-version="1.1.0" +Bundle-Vendor: %providerName +Bundle-ActivationPolicy: lazy +Bundle-Version: 1.1.0.qualifier +Bundle-Localization: plugin +Bundle-Name: %pluginName +Bundle-ManifestVersion: 2 +Bundle-SymbolicName: org.eclipse.papyrus.uml.properties.xtext;singleto + n:=true +Bundle-RequiredExecutionEnvironment: J2SE-1.5 diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/UMLXtextReferenceValueEditor.java b/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/UMLXtextReferenceValueEditor.java new file mode 100644 index 00000000000..a990905d246 --- /dev/null +++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/UMLXtextReferenceValueEditor.java @@ -0,0 +1,346 @@ +/***************************************************************************** + * Copyright (c) 2015 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: + * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.textual.editors.example.widget; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.resource.ResourceSet; +import org.eclipse.emf.transaction.TransactionalEditingDomain; +import org.eclipse.emf.transaction.util.TransactionUtil; +import org.eclipse.gmf.runtime.common.core.command.ICommand; +import org.eclipse.gmf.runtime.common.ui.services.parser.IParser; +import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter; +import org.eclipse.jface.preference.IPreferenceStore; +import org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper; +import org.eclipse.papyrus.extensionpoints.editors.Activator; +import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration; +import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil; +import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds; +import org.eclipse.papyrus.infra.emf.dialog.NestedEditingDialogContext; +import org.eclipse.papyrus.infra.widgets.editors.StyledTextReferenceDialog; +import org.eclipse.papyrus.infra.widgets.editors.StyledTextStringEditor; +import org.eclipse.papyrus.uml.xtext.integration.DefaultXtextDirectEditorConfiguration; +import org.eclipse.papyrus.uml.xtext.integration.StyledTextXtextAdapter; +import org.eclipse.papyrus.uml.xtext.integration.core.ContextElementAdapter; +import org.eclipse.papyrus.uml.xtext.integration.core.ContextElementAdapter.IContextElementProvider; +import org.eclipse.papyrus.uml.xtext.integration.core.ContextElementAdapter.IContextElementProviderWithInit; +import org.eclipse.swt.SWT; +import org.eclipse.swt.custom.StyledText; +import org.eclipse.swt.events.FocusEvent; +import org.eclipse.swt.events.FocusListener; +import org.eclipse.swt.events.SelectionListener; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; + +/** + * This class provides a ReferenceValueEditor, with a text field with the xtext + * completion and syntax instead of the CLabel. + */ +public class UMLXtextReferenceValueEditor extends StyledTextReferenceDialog + implements IContextElementProvider, SelectionListener { + + /** + * The xtext adapter. + */ + private StyledTextXtextAdapter xtextAdapter; + + /** + * The xtext direct editor configuration used. + */ + private DefaultXtextDirectEditorConfiguration configuration; + + /** + * The context element adapter. + */ + final private ContextElementAdapter contextElementAdapter = new ContextElementAdapter( + this); + + /** + * Constructor. + * + * @param parent + * The composite in which the widget will be displayed. + * @param style + * The style for the widget. + */ + public UMLXtextReferenceValueEditor(final Composite parent, final int style) { + super(parent, style); + styledTextStringEditor.getText().addFocusListener(new FocusListener() { + + public void focusLost(FocusEvent e) { + IParser parser = getParser(); + if (null == xtextAdapter) { + return; + } + + if (null != xtextAdapter + && null != xtextAdapter.getCompletionProposalAdapter() + && xtextAdapter.getCompletionProposalAdapter() + .delayedIsPopupOpen()) { + // ignore focus lost + return; + } + manageParserCommand(parser); + } + + public void focusGained(FocusEvent e) { + // Nothing + } + }); + } + + /** + * This allow to manage the parser command. + * + * @param parser + * The parser used. + */ + protected void manageParserCommand(final IParser parser) { + if (null != parser) { + ICommand command = null; + if (null != modelProperty + && modelProperty.getValueType() instanceof EStructuralFeature) { + command = parser.getParseCommand(new EObjectAdapter( + (EStructuralFeature) modelProperty.getValueType()), + styledTextStringEditor.getText().getText(), 0); + } else { + command = parser.getParseCommand(new EObjectAdapter( + (EObject) getValue()), styledTextStringEditor.getText() + .getText(), 0); + } + + TransactionalEditingDomain domain = TransactionUtil + .getEditingDomain(getContextElement()); + if (null == domain) { + // can be null for opaque expression that have been + // created but have not been added to parent + // try to get resource set from nested dialog context + ResourceSet rs = NestedEditingDialogContext.getInstance() + .getResourceSet(); + domain = TransactionUtil.getEditingDomain(rs); + } + if (null != domain) { + domain.getCommandStack().execute( + new GMFtoEMFCommandWrapper(command)); + } + } + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.infra.widgets.editors.StyledTextReferenceDialog#createStyledTextStringEditor(org.eclipse.swt.widgets.Composite, + * java.lang.String, int) + */ + @Override + protected StyledTextStringEditor createStyledTextStringEditor( + final Composite parent, final String initialValue, final int style) { + // Change the style to set the singleText to a single line + int createdStyle = style | SWT.SINGLE; + return new StyledTextStringEditor(parent, createdStyle) { + public StyledText createStyledText(Composite parent, String value, + int createdStyle) { + StyledText txt = new StyledText(parent, createdStyle); + if (null != labelProvider) { + txt.setText(labelProvider.getText(getValue())); + } + return txt; + } + }; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.infra.widgets.editors.StyledTextReferenceDialog#update() + */ + @Override + public void update() { + super.update(); + updateControls(); + } + + /** + * This allow to update the xtext adapter for the styled text. + * + * @param styledText + * The styled text which one to adapt the xtext adapter. + */ + protected void updateXtextAdapters(final Control styledText) { + final Object oldObjectToEdit = null != configuration ? configuration + .getObjectToEdit() : null; + + final DefaultXtextDirectEditorConfiguration newConfiguration = getConfigurationFromSelection(); + // Check if configuration has changed and update adapters + if (null != newConfiguration && newConfiguration != configuration) { + if (null != xtextAdapter) { + xtextAdapter.getFakeResourceContext().getFakeResource() + .eAdapters().remove(contextElementAdapter); + } + configuration = newConfiguration; + xtextAdapter = new StyledTextXtextAdapter( + configuration.getInjector()); + + EObject semanticElement = (EObject) getValue(); + if (null != semanticElement) { + newConfiguration.preEditAction(semanticElement); + } + + xtextAdapter.getFakeResourceContext().getFakeResource().eAdapters() + .add(contextElementAdapter); + xtextAdapter.adapt((StyledText) styledText); + } + + if (null != configuration + && configuration.getObjectToEdit() != oldObjectToEdit) { + IContextElementProvider provider = configuration + .getContextProvider(); + if (provider instanceof IContextElementProviderWithInit) { + // update resource, if required by text editor + if (null != xtextAdapter) { + ((IContextElementProviderWithInit) provider) + .initResource(xtextAdapter.getFakeResourceContext() + .getFakeResource()); + } + } + } + } + + /** + * This allow to get the xtext direct editor configuration depending on the + * value of the styled text. + * + * @return The {@link DefaultXtextDirectEditorConfiguration} corresponding. + */ + protected DefaultXtextDirectEditorConfiguration getConfigurationFromSelection() { + DefaultXtextDirectEditorConfiguration result = null; + final Object feature = modelProperty.getValueType(); + if (null != feature && feature instanceof EStructuralFeature) { + IPreferenceStore store = Activator.getDefault() + .getPreferenceStore(); + String semanticClassName = ((EStructuralFeature) feature) + .getEType().getInstanceClassName(); + + String key = IDirectEditorsIds.EDITOR_FOR_ELEMENT + + semanticClassName; + String languagePreferred = store.getString(key); + + if (languagePreferred != null && !languagePreferred.equals("")) { //$NON-NLS-1$ + IDirectEditorConfiguration configuration = DirectEditorsUtil + .findEditorConfiguration(languagePreferred, + semanticClassName); + if (configuration instanceof DefaultXtextDirectEditorConfiguration) { + + final Object contextElement = getContextElement(); + if (null != contextElement + && contextElement instanceof EObject) { + DefaultXtextDirectEditorConfiguration xtextConfiguration = (DefaultXtextDirectEditorConfiguration) configuration; + xtextConfiguration + .preEditAction(((EObject) contextElement) + .eGet((EStructuralFeature) feature)); + result = xtextConfiguration; + } + } + } + } + + if (null == result) { + EObject semanticElement = (EObject) getValue(); + + if (null != semanticElement) { + IPreferenceStore store = Activator.getDefault() + .getPreferenceStore(); + String semanticClassName = semanticElement.eClass() + .getInstanceClassName(); + + String key = IDirectEditorsIds.EDITOR_FOR_ELEMENT + + semanticClassName; + String languagePreferred = store.getString(key); + + if (languagePreferred != null && !languagePreferred.equals("")) { //$NON-NLS-1$ + IDirectEditorConfiguration configuration = DirectEditorsUtil + .findEditorConfiguration(languagePreferred, + semanticClassName); + if (configuration instanceof DefaultXtextDirectEditorConfiguration) { + + DefaultXtextDirectEditorConfiguration xtextConfiguration = (DefaultXtextDirectEditorConfiguration) configuration; + xtextConfiguration.preEditAction(semanticElement); + return xtextConfiguration; + } + } + } + } + return result; + } + + /** + * Get the parser corresponding to the value. + * + * @return The {@link IParser} + */ + protected IParser getParser() { + EObject parentSemanticElement = null; + final Object contextElement = getContextElement(); + if (null != contextElement && contextElement instanceof EObject) { + parentSemanticElement = (EObject) contextElement; + } + if (null != configuration && null != parentSemanticElement) { + return configuration.createParser(parentSemanticElement); + } + return null; + } + + /** + * {@inheritDoc} Update the xtext adapter. + * + * @see org.eclipse.papyrus.infra.widgets.editors.StyledTextReferenceDialog#doBinding() + */ + @Override + protected void doBinding() { + super.doBinding(); + updateXtextAdapters(styledTextStringEditor.getText()); + styledTextStringEditor.setValue(labelProvider.getText(getValue())); + updateLabel(); + } + + /** + * {@inheritDoc} Dispose the xtext adapter. + * + * @see org.eclipse.papyrus.infra.widgets.editors.StyledTextReferenceDialog#dispose() + * + */ + @Override + public void dispose() { + // dispose resources to avoid memory leaks + if (null != styledTextStringEditor) { + styledTextStringEditor.dispose(); + } + if (null != xtextAdapter) { + xtextAdapter.getFakeResourceContext().getFakeResource().eAdapters() + .remove(contextElementAdapter); + xtextAdapter.dispose(); + xtextAdapter = null; + } + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.xtext.integration.core.ContextElementAdapter.IContextElementProvider#getContextObject() + */ + @Override + public EObject getContextObject() { + final Object value = getValue(); + return value instanceof EObject ? (EObject) value : null; + } +} diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/model/environment.xmi b/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/model/environment.xmi new file mode 100644 index 00000000000..0addaed8040 --- /dev/null +++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/model/environment.xmi @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="ASCII"?> +<environment:Environment + xmi:version="2.0" + xmlns:xmi="http://www.omg.org/XMI" + xmlns:environment="http://www.eclipse.org/papyrus/properties/environment/0.9"> + <propertyEditorTypes + label="Xtext Reference Editor" + widgetClass="UMLStyledTextReferenceDialog" + namespace="//@namespaces.0"/> + <namespaces + name="xtexteditor" + value="org.eclipse.papyrus.uml.properties.xtext.widget.property"/> +</environment:Environment> diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/plugin.xml b/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/plugin.xml index d3f366ccdb7..73b22f1d0bf 100644 --- a/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/plugin.xml +++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/plugin.xml @@ -1,11 +1,17 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
- <extension
- point="org.eclipse.papyrus.uml.properties.languageEditor">
- <editor
- editor="org.eclipse.papyrus.uml.properties.xtext.XtextLanguageEditor"
- language="OCL">
- </editor>
- </extension>
-</plugin>
+<?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.4"?> +<plugin> + <extension + point="org.eclipse.papyrus.uml.properties.languageEditor"> + <editor + editor="org.eclipse.papyrus.uml.properties.xtext.XtextLanguageEditor" + language="OCL"> + </editor> + </extension> + <extension + point="org.eclipse.papyrus.views.properties.environment"> + <environment + environmentModel="model/environment.xmi"> + </environment> + </extension> +</plugin> diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/src/org/eclipse/papyrus/uml/properties/xtext/widget/UMLXtextReferenceValueEditor.java b/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/src/org/eclipse/papyrus/uml/properties/xtext/widget/UMLXtextReferenceValueEditor.java new file mode 100644 index 00000000000..182ff901e2b --- /dev/null +++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/src/org/eclipse/papyrus/uml/properties/xtext/widget/UMLXtextReferenceValueEditor.java @@ -0,0 +1,346 @@ +/***************************************************************************** + * Copyright (c) 2015 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: + * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.properties.xtext.widget; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.resource.ResourceSet; +import org.eclipse.emf.transaction.TransactionalEditingDomain; +import org.eclipse.emf.transaction.util.TransactionUtil; +import org.eclipse.gmf.runtime.common.core.command.ICommand; +import org.eclipse.gmf.runtime.common.ui.services.parser.IParser; +import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter; +import org.eclipse.jface.preference.IPreferenceStore; +import org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper; +import org.eclipse.papyrus.extensionpoints.editors.Activator; +import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration; +import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil; +import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds; +import org.eclipse.papyrus.infra.emf.dialog.NestedEditingDialogContext; +import org.eclipse.papyrus.infra.widgets.editors.StyledTextReferenceDialog; +import org.eclipse.papyrus.infra.widgets.editors.StyledTextStringEditor; +import org.eclipse.papyrus.uml.xtext.integration.DefaultXtextDirectEditorConfiguration; +import org.eclipse.papyrus.uml.xtext.integration.StyledTextXtextAdapter; +import org.eclipse.papyrus.uml.xtext.integration.core.ContextElementAdapter; +import org.eclipse.papyrus.uml.xtext.integration.core.ContextElementAdapter.IContextElementProvider; +import org.eclipse.papyrus.uml.xtext.integration.core.ContextElementAdapter.IContextElementProviderWithInit; +import org.eclipse.swt.SWT; +import org.eclipse.swt.custom.StyledText; +import org.eclipse.swt.events.FocusEvent; +import org.eclipse.swt.events.FocusListener; +import org.eclipse.swt.events.SelectionListener; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; + +/** + * This class provides a ReferenceValueEditor, with a text field with the xtext + * completion and syntax instead of the CLabel. + */ +public class UMLXtextReferenceValueEditor extends StyledTextReferenceDialog + implements IContextElementProvider, SelectionListener { + + /** + * The xtext adapter. + */ + private StyledTextXtextAdapter xtextAdapter; + + /** + * The xtext direct editor configuration used. + */ + private DefaultXtextDirectEditorConfiguration configuration; + + /** + * The context element adapter. + */ + final private ContextElementAdapter contextElementAdapter = new ContextElementAdapter( + this); + + /** + * Constructor. + * + * @param parent + * The composite in which the widget will be displayed. + * @param style + * The style for the widget. + */ + public UMLXtextReferenceValueEditor(final Composite parent, final int style) { + super(parent, style); + styledTextStringEditor.getText().addFocusListener(new FocusListener() { + + public void focusLost(FocusEvent e) { + IParser parser = getParser(); + if (null == xtextAdapter) { + return; + } + + if (null != xtextAdapter + && null != xtextAdapter.getCompletionProposalAdapter() + && xtextAdapter.getCompletionProposalAdapter() + .delayedIsPopupOpen()) { + // ignore focus lost + return; + } + manageParserCommand(parser); + } + + public void focusGained(FocusEvent e) { + // Nothing + } + }); + } + + /** + * This allow to manage the parser command. + * + * @param parser + * The parser used. + */ + protected void manageParserCommand(final IParser parser) { + if (null != parser) { + ICommand command = null; + if (null != modelProperty + && modelProperty.getValueType() instanceof EStructuralFeature) { + command = parser.getParseCommand(new EObjectAdapter( + (EStructuralFeature) modelProperty.getValueType()), + styledTextStringEditor.getText().getText(), 0); + } else { + command = parser.getParseCommand(new EObjectAdapter( + (EObject) getValue()), styledTextStringEditor.getText() + .getText(), 0); + } + + TransactionalEditingDomain domain = TransactionUtil + .getEditingDomain(getContextElement()); + if (null == domain) { + // can be null for opaque expression that have been + // created but have not been added to parent + // try to get resource set from nested dialog context + ResourceSet rs = NestedEditingDialogContext.getInstance() + .getResourceSet(); + domain = TransactionUtil.getEditingDomain(rs); + } + if (null != domain) { + domain.getCommandStack().execute( + new GMFtoEMFCommandWrapper(command)); + } + } + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.infra.widgets.editors.StyledTextReferenceDialog#createStyledTextStringEditor(org.eclipse.swt.widgets.Composite, + * java.lang.String, int) + */ + @Override + protected StyledTextStringEditor createStyledTextStringEditor( + final Composite parent, final String initialValue, final int style) { + // Change the style to set the singleText to a single line + int createdStyle = style | SWT.SINGLE; + return new StyledTextStringEditor(parent, createdStyle) { + public StyledText createStyledText(Composite parent, String value, + int createdStyle) { + StyledText txt = new StyledText(parent, createdStyle); + if (null != labelProvider) { + txt.setText(labelProvider.getText(getValue())); + } + return txt; + } + }; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.infra.widgets.editors.StyledTextReferenceDialog#update() + */ + @Override + public void update() { + super.update(); + updateControls(); + } + + /** + * This allow to update the xtext adapter for the styled text. + * + * @param styledText + * The styled text which one to adapt the xtext adapter. + */ + protected void updateXtextAdapters(final Control styledText) { + final Object oldObjectToEdit = null != configuration ? configuration + .getObjectToEdit() : null; + + final DefaultXtextDirectEditorConfiguration newConfiguration = getConfigurationFromSelection(); + // Check if configuration has changed and update adapters + if (null != newConfiguration && newConfiguration != configuration) { + if (null != xtextAdapter) { + xtextAdapter.getFakeResourceContext().getFakeResource() + .eAdapters().remove(contextElementAdapter); + } + configuration = newConfiguration; + xtextAdapter = new StyledTextXtextAdapter( + configuration.getInjector()); + + EObject semanticElement = (EObject) getValue(); + if (null != semanticElement) { + newConfiguration.preEditAction(semanticElement); + } + + xtextAdapter.getFakeResourceContext().getFakeResource().eAdapters() + .add(contextElementAdapter); + xtextAdapter.adapt((StyledText) styledText); + } + + if (null != configuration + && configuration.getObjectToEdit() != oldObjectToEdit) { + IContextElementProvider provider = configuration + .getContextProvider(); + if (provider instanceof IContextElementProviderWithInit) { + // update resource, if required by text editor + if (null != xtextAdapter) { + ((IContextElementProviderWithInit) provider) + .initResource(xtextAdapter.getFakeResourceContext() + .getFakeResource()); + } + } + } + } + + /** + * This allow to get the xtext direct editor configuration depending on the + * value of the styled text. + * + * @return The {@link DefaultXtextDirectEditorConfiguration} corresponding. + */ + protected DefaultXtextDirectEditorConfiguration getConfigurationFromSelection() { + DefaultXtextDirectEditorConfiguration result = null; + final Object feature = modelProperty.getValueType(); + if (null != feature && feature instanceof EStructuralFeature) { + IPreferenceStore store = Activator.getDefault() + .getPreferenceStore(); + String semanticClassName = ((EStructuralFeature) feature) + .getEType().getInstanceClassName(); + + String key = IDirectEditorsIds.EDITOR_FOR_ELEMENT + + semanticClassName; + String languagePreferred = store.getString(key); + + if (languagePreferred != null && !languagePreferred.equals("")) { //$NON-NLS-1$ + IDirectEditorConfiguration configuration = DirectEditorsUtil + .findEditorConfigurationWithPriority(languagePreferred, + semanticClassName); + if (configuration instanceof DefaultXtextDirectEditorConfiguration) { + + final Object contextElement = getContextElement(); + if (null != contextElement + && contextElement instanceof EObject) { + DefaultXtextDirectEditorConfiguration xtextConfiguration = (DefaultXtextDirectEditorConfiguration) configuration; + xtextConfiguration + .preEditAction(((EObject) contextElement) + .eGet((EStructuralFeature) feature)); + result = xtextConfiguration; + } + } + } + } + + if (null == result) { + EObject semanticElement = (EObject) getValue(); + + if (null != semanticElement) { + IPreferenceStore store = Activator.getDefault() + .getPreferenceStore(); + String semanticClassName = semanticElement.eClass() + .getInstanceClassName(); + + String key = IDirectEditorsIds.EDITOR_FOR_ELEMENT + + semanticClassName; + String languagePreferred = store.getString(key); + + if (languagePreferred != null && !languagePreferred.equals("")) { //$NON-NLS-1$ + IDirectEditorConfiguration configuration = DirectEditorsUtil + .findEditorConfigurationWithPriority(languagePreferred, + semanticClassName); + if (configuration instanceof DefaultXtextDirectEditorConfiguration) { + + DefaultXtextDirectEditorConfiguration xtextConfiguration = (DefaultXtextDirectEditorConfiguration) configuration; + xtextConfiguration.preEditAction(semanticElement); + return xtextConfiguration; + } + } + } + } + return result; + } + + /** + * Get the parser corresponding to the value. + * + * @return The {@link IParser} + */ + protected IParser getParser() { + EObject parentSemanticElement = null; + final Object contextElement = getContextElement(); + if (null != contextElement && contextElement instanceof EObject) { + parentSemanticElement = (EObject) contextElement; + } + if (null != configuration && null != parentSemanticElement) { + return configuration.createParser(parentSemanticElement); + } + return null; + } + + /** + * {@inheritDoc} Update the xtext adapter. + * + * @see org.eclipse.papyrus.infra.widgets.editors.StyledTextReferenceDialog#doBinding() + */ + @Override + protected void doBinding() { + super.doBinding(); + updateXtextAdapters(styledTextStringEditor.getText()); + styledTextStringEditor.setValue(labelProvider.getText(getValue())); + updateLabel(); + } + + /** + * {@inheritDoc} Dispose the xtext adapter. + * + * @see org.eclipse.papyrus.infra.widgets.editors.StyledTextReferenceDialog#dispose() + * + */ + @Override + public void dispose() { + // dispose resources to avoid memory leaks + if (null != styledTextStringEditor) { + styledTextStringEditor.dispose(); + } + if (null != xtextAdapter) { + xtextAdapter.getFakeResourceContext().getFakeResource().eAdapters() + .remove(contextElementAdapter); + xtextAdapter.dispose(); + xtextAdapter = null; + } + } + + /** + * + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.xtext.integration.core.ContextElementAdapter.IContextElementProvider#getContextObject() + */ + public EObject getContextObject() { + final Object value = getValue(); + return value instanceof EObject ? (EObject) value : null; + } +} diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/src/org/eclipse/papyrus/uml/properties/xtext/widget/property/UMLStyledTextReferenceDialog.java b/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/src/org/eclipse/papyrus/uml/properties/xtext/widget/property/UMLStyledTextReferenceDialog.java new file mode 100644 index 00000000000..b3dc3dda2fd --- /dev/null +++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/src/org/eclipse/papyrus/uml/properties/xtext/widget/property/UMLStyledTextReferenceDialog.java @@ -0,0 +1,113 @@ +/***************************************************************************** + * Copyright (c) 2015 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: + * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.properties.xtext.widget.property; + +import org.eclipse.papyrus.infra.widgets.creation.ReferenceValueFactory; +import org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider; +import org.eclipse.papyrus.uml.properties.xtext.widget.UMLXtextReferenceValueEditor; +import org.eclipse.papyrus.views.properties.widgets.AbstractPropertyEditor; +import org.eclipse.swt.widgets.Composite; + +/** + * An editor representing a single reference in a StyledText widget with + * completion . A filtered selection dialog is used to edit the value. Also + * offers support for unsetting the value. This Editor needs a ContentProvider, + * and may use an optional LabelProvider, describing the objects that can be + * referred by this property. + */ +public class UMLStyledTextReferenceDialog extends AbstractPropertyEditor { + + /** + * The ValueFactory used to create or edit Objects directly from this + * editor. + */ + protected ReferenceValueFactory factory; + + /** + * The SimpleTextReferenceDialog widget. + */ + protected UMLXtextReferenceValueEditor editor; + + /** + * Constructor. + * + * @param parent + * The composite in which the widget will be displayed. + * @param style + * The style for the widget. + */ + public UMLStyledTextReferenceDialog(final Composite parent, final int style) { + setEditor(createReferenceDialog(parent, style)); + } + + /** + * Creates the reference dialog. + * + * @param parent + * The composite in which the widget will be displayed. + * @param style + * The style for the widget. + * @return The reference dialog. + */ + protected UMLXtextReferenceValueEditor createReferenceDialog( + final Composite parent, final int style) { + return editor = new UMLXtextReferenceValueEditor(parent, style); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.views.properties.widgets.AbstractPropertyEditor#doBinding() + */ + @Override + protected void doBinding() { + IStaticContentProvider provider = input + .getContentProvider(propertyPath); + editor.setLabelProvider(input.getLabelProvider(propertyPath)); + editor.setContentProvider(provider); + editor.setDirectCreation(input.getDirectCreation(propertyPath)); + editor.setMandatory(input.isMandatory(propertyPath)); + if (null == factory) { + // Use the default factory from the DataSource + editor.setValueFactory(input.getValueFactory(propertyPath)); + } else { + // Use the factory explicitly specified + editor.setValueFactory(factory); + } + + super.doBinding(); + } + + /** + * Sets the ValueFactory used to create or edit Objects directly from this + * editor. + * + * @param factory + * The reference value factory. + */ + public void setFactory(final ReferenceValueFactory factory) { + this.factory = factory; + editor.setValueFactory(factory); + } + + /** + * Get the factory. + * + * @return The ValueFactory used to create or edit Objects directly from + * this editor. + */ + public ReferenceValueFactory getFactory() { + return factory; + } + +} diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/modelelement/UMLModelElement.java b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/modelelement/UMLModelElement.java index 18825d8960d..3c64b7587eb 100644 --- a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/modelelement/UMLModelElement.java +++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/modelelement/UMLModelElement.java @@ -30,9 +30,11 @@ import org.eclipse.core.databinding.validation.IValidator; import org.eclipse.emf.databinding.EMFProperties; import org.eclipse.emf.databinding.FeaturePath; import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EClassifier; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EReference; import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.ETypedElement; import org.eclipse.emf.ecore.resource.ResourceSet; import org.eclipse.emf.edit.domain.EditingDomain; import org.eclipse.jface.viewers.ITreeContentProvider; @@ -43,6 +45,8 @@ import org.eclipse.papyrus.infra.emf.utils.ProviderHelper; import org.eclipse.papyrus.infra.widgets.creation.ReferenceValueFactory; import org.eclipse.papyrus.infra.widgets.providers.EmptyContentProvider; import org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider; +import org.eclipse.papyrus.infra.widgets.util.INameResolutionHelper; +import org.eclipse.papyrus.infra.widgets.util.IPapyrusConverter; import org.eclipse.papyrus.uml.properties.creation.ConnectorTypeEditorFactory; import org.eclipse.papyrus.uml.properties.creation.MessageValueSpecificationFactory; import org.eclipse.papyrus.uml.properties.creation.OwnedRuleCreationFactory; @@ -57,9 +61,12 @@ import org.eclipse.papyrus.uml.tools.providers.ConstrainedElementContentProvider import org.eclipse.papyrus.uml.tools.providers.UMLContainerContentProvider; import org.eclipse.papyrus.uml.tools.providers.UMLContentProvider; import org.eclipse.papyrus.uml.tools.providers.UMLFilteredLabelProvider; +import org.eclipse.papyrus.uml.tools.util.UMLReferenceConverter; +import org.eclipse.papyrus.uml.tools.utils.NameResolutionHelper; import org.eclipse.papyrus.views.properties.modelelement.EMFModelElement; import org.eclipse.papyrus.views.properties.providers.FeatureContentProvider; import org.eclipse.uml2.uml.Connector; +import org.eclipse.uml2.uml.Element; import org.eclipse.uml2.uml.Extension; import org.eclipse.uml2.uml.Message; import org.eclipse.uml2.uml.ParameterDirectionKind; @@ -284,4 +291,38 @@ public class UMLModelElement extends EMFModelElement { return null; } + /** + * @see org.eclipse.papyrus.views.properties.modelelement.AbstractModelElement#getNameResolutionHelper(java.lang.String) + * + * @param propertyPath + * @return + */ + @Override + public INameResolutionHelper getNameResolutionHelper(String propertyPath) { + EObject source = getSource(); + Object feature = getFeature(propertyPath); + if (feature instanceof EStructuralFeature && source instanceof Element) { + EStructuralFeature f = (EStructuralFeature) feature; + EClassifier etype = f.getEType(); + if (etype instanceof EClass) { + return new NameResolutionHelper((Element) source, (EClass) etype); + } + } + return super.getNameResolutionHelper(propertyPath); + } + + /** + * + * @see org.eclipse.papyrus.views.properties.modelelement.AbstractModelElement#getPapyrusConverter(java.lang.String) + * + * @param propertyPath + * @return + */ + public IPapyrusConverter getPapyrusConverter(String propertyPath) { + INameResolutionHelper helper = getNameResolutionHelper(propertyPath); + if (helper != null) { + return new UMLReferenceConverter(helper, getFeature(propertyPath).isMany()); + } + return null; + } } diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/.classpath b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/.classpath new file mode 100644 index 00000000000..59cf3977c7e --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/.classpath @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="src" path="src"/> + <classpathentry kind="src" path="src-gen"/> + <classpathentry kind="output" path="bin"/> +</classpath> diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/.project b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/.project new file mode 100644 index 00000000000..b8b4db247c1 --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/.project @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.ManifestBuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.SchemaBuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.pde.PluginNature</nature> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/.settings/org.eclipse.jdt.core.prefs b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000000..c585cc455ae --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,291 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 +org.eclipse.jdt.core.compiler.compliance=1.5 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.5 +org.eclipse.jdt.core.formatter.align_type_members_on_columns=false +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_assignment=0 +org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 +org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 +org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 +org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16 +org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_after_package=1 +org.eclipse.jdt.core.formatter.blank_lines_before_field=0 +org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 +org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 +org.eclipse.jdt.core.formatter.blank_lines_before_method=1 +org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 +org.eclipse.jdt.core.formatter.blank_lines_before_package=0 +org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 +org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 +org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false +org.eclipse.jdt.core.formatter.comment.format_block_comments=true +org.eclipse.jdt.core.formatter.comment.format_header=false +org.eclipse.jdt.core.formatter.comment.format_html=true +org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true +org.eclipse.jdt.core.formatter.comment.format_line_comments=true +org.eclipse.jdt.core.formatter.comment.format_source_code=true +org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true +org.eclipse.jdt.core.formatter.comment.indent_root_tags=true +org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert +org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert +org.eclipse.jdt.core.formatter.comment.line_length=260 +org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true +org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true +org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false +org.eclipse.jdt.core.formatter.compact_else_if=true +org.eclipse.jdt.core.formatter.continuation_indentation=2 +org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 +org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off +org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on +org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false +org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true +org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_empty_lines=false +org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true +org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false +org.eclipse.jdt.core.formatter.indentation.size=4 +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert +org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert +org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert +org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.join_lines_in_comments=false +org.eclipse.jdt.core.formatter.join_wrapped_lines=false +org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false +org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false +org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false +org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false +org.eclipse.jdt.core.formatter.lineSplit=260 +org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false +org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5 +org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true +org.eclipse.jdt.core.formatter.tabulation.char=tab +org.eclipse.jdt.core.formatter.tabulation.size=4 +org.eclipse.jdt.core.formatter.use_on_off_tags=false +org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false +org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true +org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true +org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/.settings/org.eclipse.jdt.ui.prefs b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 00000000000..954281dbc31 --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,68 @@ +cleanup.add_default_serial_version_id=true +cleanup.add_generated_serial_version_id=false +cleanup.add_missing_annotations=true +cleanup.add_missing_deprecated_annotations=true +cleanup.add_missing_methods=false +cleanup.add_missing_nls_tags=false +cleanup.add_missing_override_annotations=true +cleanup.add_missing_override_annotations_interface_methods=true +cleanup.add_serial_version_id=false +cleanup.always_use_blocks=true +cleanup.always_use_parentheses_in_expressions=false +cleanup.always_use_this_for_non_static_field_access=false +cleanup.always_use_this_for_non_static_method_access=false +cleanup.convert_functional_interfaces=false +cleanup.convert_to_enhanced_for_loop=false +cleanup.correct_indentation=false +cleanup.format_source_code=false +cleanup.format_source_code_changes_only=false +cleanup.insert_inferred_type_arguments=false +cleanup.make_local_variable_final=true +cleanup.make_parameters_final=false +cleanup.make_private_fields_final=true +cleanup.make_type_abstract_if_missing_method=false +cleanup.make_variable_declarations_final=false +cleanup.never_use_blocks=false +cleanup.never_use_parentheses_in_expressions=true +cleanup.organize_imports=false +cleanup.qualify_static_field_accesses_with_declaring_class=false +cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +cleanup.qualify_static_member_accesses_with_declaring_class=true +cleanup.qualify_static_method_accesses_with_declaring_class=false +cleanup.remove_private_constructors=true +cleanup.remove_redundant_type_arguments=true +cleanup.remove_trailing_whitespaces=true +cleanup.remove_trailing_whitespaces_all=true +cleanup.remove_trailing_whitespaces_ignore_empty=false +cleanup.remove_unnecessary_casts=true +cleanup.remove_unnecessary_nls_tags=true +cleanup.remove_unused_imports=true +cleanup.remove_unused_local_variables=false +cleanup.remove_unused_private_fields=true +cleanup.remove_unused_private_members=false +cleanup.remove_unused_private_methods=true +cleanup.remove_unused_private_types=true +cleanup.sort_members=false +cleanup.sort_members_all=false +cleanup.use_anonymous_class_creation=false +cleanup.use_blocks=true +cleanup.use_blocks_only_for_return_and_throw=false +cleanup.use_lambda=true +cleanup.use_parentheses_in_expressions=false +cleanup.use_this_for_non_static_field_access=false +cleanup.use_this_for_non_static_field_access_only_if_necessary=true +cleanup.use_this_for_non_static_method_access=false +cleanup.use_this_for_non_static_method_access_only_if_necessary=true +cleanup.use_type_arguments=false +cleanup_profile=_Papyrus +cleanup_settings_version=2 +eclipse.preferences.version=1 +formatter_profile=_Papyrus +formatter_settings_version=12 +org.eclipse.jdt.ui.ignorelowercasenames=true +org.eclipse.jdt.ui.importorder=java;javax;org;com; +org.eclipse.jdt.ui.javadoc=true +org.eclipse.jdt.ui.ondemandthreshold=99 +org.eclipse.jdt.ui.staticondemandthreshold=99 +org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates> diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/META-INF/MANIFEST.MF b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/META-INF/MANIFEST.MF new file mode 100644 index 00000000000..cc192f084a3 --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/META-INF/MANIFEST.MF @@ -0,0 +1,39 @@ +Manifest-Version: 1.0 +Export-Package: org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui, + org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.contentassist, + org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.contentassist.antlr, + org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.contentassist.antlr.internal, + org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.contribution, + org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.internal, + org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.labeling, + org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.outline, + org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.quickfix +Bundle-ActivationPolicy: lazy +Bundle-Name: %pluginName +Bundle-Localization: plugin +Bundle-RequiredExecutionEnvironment: JavaSE-1.6 +Require-Bundle: org.eclipse.ui, + org.eclipse.core.runtime, + org.eclipse.xtext.ui, + org.eclipse.xtext.ui.shared, + org.eclipse.ui.editors, + org.eclipse.xtext.builder, + org.antlr.runtime, + org.eclipse.gmf.runtime.common.core, + org.eclipse.gmf.runtime.diagram.ui, + org.eclipse.papyrus.extensionpoints.editors;bundle-version="1.0.2", + org.eclipse.papyrus.infra.services.edit;bundle-version="1.0.2", + org.eclipse.uml2.uml, + org.apache.log4j, + org.eclipse.papyrus.uml.alf.common.ui;bundle-version="1.0.2", + org.eclipse.papyrus.uml.xtext.integration.ui;bundle-version="1.0.2", + org.eclipse.papyrus.uml.textedit.valuespecification.xtext;bundle-version="1.0.2", + org.eclipse.papyrus.uml.tools;bundle-version="1.0.2", + org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils;bundle-version="1.0.2" +Bundle-Vendor: %providerName +Bundle-Version: 1.0.2.qualifier +Bundle-ManifestVersion: 2 +Bundle-Activator: org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.internal.UmlValueSpecificationActivator +Bundle-SymbolicName: org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui;singleton:=true +Import-Package: org.apache.log4j +Bundle-Description: %pluginDescription diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/about.html b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/about.html new file mode 100644 index 00000000000..d35d5aed64c --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/about.html @@ -0,0 +1,28 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> +<title>About</title> +</head> +<body lang="EN-US"> +<h2>About This Content</h2> + +<p>June 5, 2007</p> +<h3>License</h3> + +<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise +indicated below, the Content is provided to you under the terms and conditions of the +Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available +at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>. +For purposes of the EPL, "Program" will mean the Content.</p> + +<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is +being redistributed by another party ("Redistributor") and different terms and conditions may +apply to your use of any object code in the Content. Check the Redistributor's license that was +provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise +indicated below, the terms and conditions of the EPL still apply to any source code in the Content +and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p> + +</body> +</html> diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/build.properties b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/build.properties new file mode 100644 index 00000000000..7673e8696ef --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/build.properties @@ -0,0 +1,9 @@ +source.. = src/,\ + src-gen/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + about.html,\ + plugin.xml,\ + plugin.properties +src.includes = about.html diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/plugin.properties b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/plugin.properties new file mode 100644 index 00000000000..9b53717031e --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/plugin.properties @@ -0,0 +1,13 @@ +################################################################################# +# Copyright (c) 2015 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: +# Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - initial API and implementation +################################################################################## +pluginName=Papyrus ValueSpecification xtext ui direct editor +providerName=Eclipse Modeling Project +pluginDescription=This allow to define the xtext ui editor for the ValueSpecification object
\ No newline at end of file diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/plugin.xml b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/plugin.xml new file mode 100644 index 00000000000..7e54fcea8eb --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/plugin.xml @@ -0,0 +1,359 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.0"?> + +<plugin> + + <extension + point="org.eclipse.ui.editors"> + <editor + class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.ui.editor.XtextEditor" + contributorClass="org.eclipse.ui.editors.text.TextEditorActionContributor" + default="true" + extensions="umlvaluespecification" + id="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification" + name="UmlValueSpecification Editor"> + </editor> + </extension> + <extension + point="org.eclipse.ui.handlers"> + <handler + class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.ui.editor.hyperlinking.OpenDeclarationHandler" + commandId="org.eclipse.xtext.ui.editor.hyperlinking.OpenDeclaration"> + <activeWhen> + <reference + definitionId="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.Editor.opened"> + </reference> + </activeWhen> + </handler> + <handler + class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.ui.editor.handler.ValidateActionHandler" + commandId="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.validate"> + <activeWhen> + <reference + definitionId="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.Editor.opened"> + </reference> + </activeWhen> + </handler> + <!-- copy qualified name --> + <handler + class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedNameHandler" + commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName"> + <activeWhen> + <reference definitionId="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.Editor.opened" /> + </activeWhen> + </handler> + <handler + class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedNameHandler" + commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedName"> + <activeWhen> + <and> + <reference definitionId="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.XtextEditor.opened" /> + <iterate> + <adapt type="org.eclipse.xtext.ui.editor.outline.IOutlineNode" /> + </iterate> + </and> + </activeWhen> + </handler> + </extension> + <extension point="org.eclipse.core.expressions.definitions"> + <definition id="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.Editor.opened"> + <and> + <reference definitionId="isActiveEditorAnInstanceOfXtextEditor"/> + <with variable="activeEditor"> + <test property="org.eclipse.xtext.ui.editor.XtextEditor.languageName" + value="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification" + forcePluginActivation="true"/> + </with> + </and> + </definition> + <definition id="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.XtextEditor.opened"> + <and> + <reference definitionId="isXtextEditorActive"/> + <with variable="activeEditor"> + <test property="org.eclipse.xtext.ui.editor.XtextEditor.languageName" + value="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification" + forcePluginActivation="true"/> + </with> + </and> + </definition> + </extension> + <extension + point="org.eclipse.ui.preferencePages"> + <page + category="org.eclipse.papyrus.embeddededitors" + class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.ui.editor.preferences.LanguageRootPreferencePage" + id="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification" + name="UmlValueSpecification"> + <keywordReference id="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.keyword_UmlValueSpecification"/> + </page> + <page + category="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification" + class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.ui.editor.syntaxcoloring.SyntaxColoringPreferencePage" + id="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.coloring" + name="Syntax Coloring"> + <keywordReference id="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.keyword_UmlValueSpecification"/> + </page> + <page + category="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification" + class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.ui.editor.templates.XtextTemplatePreferencePage" + id="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.templates" + name="Templates"> + <keywordReference id="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.keyword_UmlValueSpecification"/> + </page> + </extension> + <extension + point="org.eclipse.ui.propertyPages"> + <page + class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.ui.editor.preferences.LanguageRootPreferencePage" + id="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification" + name="UmlValueSpecification"> + <keywordReference id="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.keyword_UmlValueSpecification"/> + <enabledWhen> + <adapt type="org.eclipse.core.resources.IProject"/> + </enabledWhen> + <filter name="projectNature" value="org.eclipse.xtext.ui.shared.xtextNature"/> + </page> + </extension> + <extension + point="org.eclipse.ui.keywords"> + <keyword + id="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.keyword_UmlValueSpecification" + label="UmlValueSpecification"/> + </extension> + <extension + point="org.eclipse.ui.commands"> + <command + description="Trigger expensive validation" + id="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.validate" + name="Validate"> + </command> + <!-- copy qualified name --> + <command + id="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName" + categoryId="org.eclipse.ui.category.edit" + description="Copy the qualified name for the selected element" + name="Copy Qualified Name"> + </command> + <command + id="org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedName" + categoryId="org.eclipse.ui.category.edit" + description="Copy the qualified name for the selected element" + name="Copy Qualified Name"> + </command> + </extension> + <extension point="org.eclipse.ui.menus"> + <menuContribution + locationURI="popup:#TextEditorContext?after=group.edit"> + <command + commandId="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.validate" + style="push" + tooltip="Trigger expensive validation"> + <visibleWhen checkEnabled="false"> + <reference + definitionId="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.Editor.opened"> + </reference> + </visibleWhen> + </command> + </menuContribution> + <!-- copy qualified name --> + <menuContribution locationURI="popup:#TextEditorContext?after=copy"> + <command commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName" + style="push" tooltip="Copy Qualified Name"> + <visibleWhen checkEnabled="false"> + <reference definitionId="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.Editor.opened" /> + </visibleWhen> + </command> + </menuContribution> + <menuContribution locationURI="menu:edit?after=copy"> + <command commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName" + style="push" tooltip="Copy Qualified Name"> + <visibleWhen checkEnabled="false"> + <reference definitionId="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.Editor.opened" /> + </visibleWhen> + </command> + </menuContribution> + <menuContribution locationURI="popup:org.eclipse.xtext.ui.outline?after=additions"> + <command commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedName" + style="push" tooltip="Copy Qualified Name"> + <visibleWhen checkEnabled="false"> + <and> + <reference definitionId="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.XtextEditor.opened" /> + <iterate> + <adapt type="org.eclipse.xtext.ui.editor.outline.IOutlineNode" /> + </iterate> + </and> + </visibleWhen> + </command> + </menuContribution> + </extension> + <extension point="org.eclipse.ui.menus"> + <menuContribution locationURI="popup:#TextEditorContext?endof=group.find"> + <command commandId="org.eclipse.xtext.ui.editor.FindReferences"> + <visibleWhen checkEnabled="false"> + <reference definitionId="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.Editor.opened"> + </reference> + </visibleWhen> + </command> + </menuContribution> + </extension> + <extension point="org.eclipse.ui.handlers"> + <handler + class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.ui.editor.findrefs.FindReferencesHandler" + commandId="org.eclipse.xtext.ui.editor.FindReferences"> + <activeWhen> + <reference + definitionId="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.Editor.opened"> + </reference> + </activeWhen> + </handler> + </extension> + +<!-- adding resource factories --> + + <extension + point="org.eclipse.emf.ecore.extension_parser"> + <parser + class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.resource.IResourceFactory" + type="umlvaluespecification"> + </parser> + </extension> + <extension point="org.eclipse.xtext.extension_resourceServiceProvider"> + <resourceServiceProvider + class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.ui.resource.IResourceUIServiceProvider" + uriExtension="umlvaluespecification"> + </resourceServiceProvider> + </extension> + + + <!-- marker definitions for org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification --> + <extension + id="umlvaluespecification.check.fast" + name="UmlValueSpecification Problem" + point="org.eclipse.core.resources.markers"> + <super type="org.eclipse.xtext.ui.check.fast"/> + <persistent value="true"/> + </extension> + <extension + id="umlvaluespecification.check.normal" + name="UmlValueSpecification Problem" + point="org.eclipse.core.resources.markers"> + <super type="org.eclipse.xtext.ui.check.normal"/> + <persistent value="true"/> + </extension> + <extension + id="umlvaluespecification.check.expensive" + name="UmlValueSpecification Problem" + point="org.eclipse.core.resources.markers"> + <super type="org.eclipse.xtext.ui.check.expensive"/> + <persistent value="true"/> + </extension> + + <extension + point="org.eclipse.xtext.builder.participant"> + <participant + class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.builder.IXtextBuilderParticipant"> + </participant> + </extension> + <extension + point="org.eclipse.ui.preferencePages"> + <page + category="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification" + class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.builder.preferences.BuilderPreferencePage" + id="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.compiler.preferencePage" + name="Compiler"> + <keywordReference id="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.keyword_UmlValueSpecification"/> + </page> + </extension> + <extension + point="org.eclipse.ui.propertyPages"> + <page + category="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification" + class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.builder.preferences.BuilderPreferencePage" + id="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.compiler.propertyPage" + name="Compiler"> + <keywordReference id="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.keyword_UmlValueSpecification"/> + <enabledWhen> + <adapt type="org.eclipse.core.resources.IProject"/> + </enabledWhen> + <filter name="projectNature" value="org.eclipse.xtext.ui.shared.xtextNature"/> + </page> + </extension> + + <!-- Quick Outline --> + <extension + point="org.eclipse.ui.handlers"> + <handler + class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.ui.editor.outline.quickoutline.ShowQuickOutlineActionHandler" + commandId="org.eclipse.xtext.ui.editor.outline.QuickOutline"> + <activeWhen> + <reference + definitionId="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.Editor.opened"> + </reference> + </activeWhen> + </handler> + </extension> + <extension + point="org.eclipse.ui.commands"> + <command + description="Open the quick outline." + id="org.eclipse.xtext.ui.editor.outline.QuickOutline" + name="Quick Outline"> + </command> + </extension> + <extension point="org.eclipse.ui.menus"> + <menuContribution + locationURI="popup:#TextEditorContext?after=group.open"> + <command commandId="org.eclipse.xtext.ui.editor.outline.QuickOutline" + style="push" + tooltip="Open Quick Outline"> + <visibleWhen checkEnabled="false"> + <reference definitionId="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.Editor.opened"/> + </visibleWhen> + </command> + </menuContribution> + </extension> + <!-- quickfix marker resolution generator for org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification --> + <extension + point="org.eclipse.ui.ide.markerResolution"> + <markerResolutionGenerator + class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator" + markerType="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.umlvaluespecification.check.fast"> + <attribute + name="FIXABLE_KEY" + value="true"> + </attribute> + </markerResolutionGenerator> + <markerResolutionGenerator + class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator" + markerType="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.umlvaluespecification.check.normal"> + <attribute + name="FIXABLE_KEY" + value="true"> + </attribute> + </markerResolutionGenerator> + <markerResolutionGenerator + class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator" + markerType="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.umlvaluespecification.check.expensive"> + <attribute + name="FIXABLE_KEY" + value="true"> + </attribute> + </markerResolutionGenerator> + </extension> + <extension + point="org.eclipse.papyrus.extensionpoints.editors.DirectEditor"> + <DirectEditor + contributor="CEA LIST" + icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ValueSpecification.gif" + language="Advanced Value Specification Textual Editor" + objectToEdit="org.eclipse.uml2.uml.ValueSpecification"> + <popupeditor + editorConfiguration="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.contribution.ValueSpecificationXtextDirectEditorConfiguration"> + </popupeditor> + <Priority + name="Lowest"> + </Priority> + </DirectEditor> + </extension> + +</plugin> diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/plugin.xml_gen b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/plugin.xml_gen new file mode 100644 index 00000000000..ec5bf5b53e0 --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/plugin.xml_gen @@ -0,0 +1,345 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.0"?> + +<plugin> + + <extension + point="org.eclipse.ui.editors"> + <editor + class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.ui.editor.XtextEditor" + contributorClass="org.eclipse.ui.editors.text.TextEditorActionContributor" + default="true" + extensions="umlvaluespecification" + id="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification" + name="UmlValueSpecification Editor"> + </editor> + </extension> + <extension + point="org.eclipse.ui.handlers"> + <handler + class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.ui.editor.hyperlinking.OpenDeclarationHandler" + commandId="org.eclipse.xtext.ui.editor.hyperlinking.OpenDeclaration"> + <activeWhen> + <reference + definitionId="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.Editor.opened"> + </reference> + </activeWhen> + </handler> + <handler + class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.ui.editor.handler.ValidateActionHandler" + commandId="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.validate"> + <activeWhen> + <reference + definitionId="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.Editor.opened"> + </reference> + </activeWhen> + </handler> + <!-- copy qualified name --> + <handler + class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedNameHandler" + commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName"> + <activeWhen> + <reference definitionId="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.Editor.opened" /> + </activeWhen> + </handler> + <handler + class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedNameHandler" + commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedName"> + <activeWhen> + <and> + <reference definitionId="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.XtextEditor.opened" /> + <iterate> + <adapt type="org.eclipse.xtext.ui.editor.outline.IOutlineNode" /> + </iterate> + </and> + </activeWhen> + </handler> + </extension> + <extension point="org.eclipse.core.expressions.definitions"> + <definition id="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.Editor.opened"> + <and> + <reference definitionId="isActiveEditorAnInstanceOfXtextEditor"/> + <with variable="activeEditor"> + <test property="org.eclipse.xtext.ui.editor.XtextEditor.languageName" + value="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification" + forcePluginActivation="true"/> + </with> + </and> + </definition> + <definition id="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.XtextEditor.opened"> + <and> + <reference definitionId="isXtextEditorActive"/> + <with variable="activeEditor"> + <test property="org.eclipse.xtext.ui.editor.XtextEditor.languageName" + value="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification" + forcePluginActivation="true"/> + </with> + </and> + </definition> + </extension> + <extension + point="org.eclipse.ui.preferencePages"> + <page + class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.ui.editor.preferences.LanguageRootPreferencePage" + id="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification" + name="UmlValueSpecification"> + <keywordReference id="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.keyword_UmlValueSpecification"/> + </page> + <page + category="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification" + class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.ui.editor.syntaxcoloring.SyntaxColoringPreferencePage" + id="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.coloring" + name="Syntax Coloring"> + <keywordReference id="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.keyword_UmlValueSpecification"/> + </page> + <page + category="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification" + class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.ui.editor.templates.XtextTemplatePreferencePage" + id="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.templates" + name="Templates"> + <keywordReference id="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.keyword_UmlValueSpecification"/> + </page> + </extension> + <extension + point="org.eclipse.ui.propertyPages"> + <page + class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.ui.editor.preferences.LanguageRootPreferencePage" + id="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification" + name="UmlValueSpecification"> + <keywordReference id="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.keyword_UmlValueSpecification"/> + <enabledWhen> + <adapt type="org.eclipse.core.resources.IProject"/> + </enabledWhen> + <filter name="projectNature" value="org.eclipse.xtext.ui.shared.xtextNature"/> + </page> + </extension> + <extension + point="org.eclipse.ui.keywords"> + <keyword + id="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.keyword_UmlValueSpecification" + label="UmlValueSpecification"/> + </extension> + <extension + point="org.eclipse.ui.commands"> + <command + description="Trigger expensive validation" + id="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.validate" + name="Validate"> + </command> + <!-- copy qualified name --> + <command + id="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName" + categoryId="org.eclipse.ui.category.edit" + description="Copy the qualified name for the selected element" + name="Copy Qualified Name"> + </command> + <command + id="org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedName" + categoryId="org.eclipse.ui.category.edit" + description="Copy the qualified name for the selected element" + name="Copy Qualified Name"> + </command> + </extension> + <extension point="org.eclipse.ui.menus"> + <menuContribution + locationURI="popup:#TextEditorContext?after=group.edit"> + <command + commandId="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.validate" + style="push" + tooltip="Trigger expensive validation"> + <visibleWhen checkEnabled="false"> + <reference + definitionId="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.Editor.opened"> + </reference> + </visibleWhen> + </command> + </menuContribution> + <!-- copy qualified name --> + <menuContribution locationURI="popup:#TextEditorContext?after=copy"> + <command commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName" + style="push" tooltip="Copy Qualified Name"> + <visibleWhen checkEnabled="false"> + <reference definitionId="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.Editor.opened" /> + </visibleWhen> + </command> + </menuContribution> + <menuContribution locationURI="menu:edit?after=copy"> + <command commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName" + style="push" tooltip="Copy Qualified Name"> + <visibleWhen checkEnabled="false"> + <reference definitionId="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.Editor.opened" /> + </visibleWhen> + </command> + </menuContribution> + <menuContribution locationURI="popup:org.eclipse.xtext.ui.outline?after=additions"> + <command commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedName" + style="push" tooltip="Copy Qualified Name"> + <visibleWhen checkEnabled="false"> + <and> + <reference definitionId="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.XtextEditor.opened" /> + <iterate> + <adapt type="org.eclipse.xtext.ui.editor.outline.IOutlineNode" /> + </iterate> + </and> + </visibleWhen> + </command> + </menuContribution> + </extension> + <extension point="org.eclipse.ui.menus"> + <menuContribution locationURI="popup:#TextEditorContext?endof=group.find"> + <command commandId="org.eclipse.xtext.ui.editor.FindReferences"> + <visibleWhen checkEnabled="false"> + <reference definitionId="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.Editor.opened"> + </reference> + </visibleWhen> + </command> + </menuContribution> + </extension> + <extension point="org.eclipse.ui.handlers"> + <handler + class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.ui.editor.findrefs.FindReferencesHandler" + commandId="org.eclipse.xtext.ui.editor.FindReferences"> + <activeWhen> + <reference + definitionId="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.Editor.opened"> + </reference> + </activeWhen> + </handler> + </extension> + +<!-- adding resource factories --> + + <extension + point="org.eclipse.emf.ecore.extension_parser"> + <parser + class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.resource.IResourceFactory" + type="umlvaluespecification"> + </parser> + </extension> + <extension point="org.eclipse.xtext.extension_resourceServiceProvider"> + <resourceServiceProvider + class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.ui.resource.IResourceUIServiceProvider" + uriExtension="umlvaluespecification"> + </resourceServiceProvider> + </extension> + + + <!-- marker definitions for org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification --> + <extension + id="umlvaluespecification.check.fast" + name="UmlValueSpecification Problem" + point="org.eclipse.core.resources.markers"> + <super type="org.eclipse.xtext.ui.check.fast"/> + <persistent value="true"/> + </extension> + <extension + id="umlvaluespecification.check.normal" + name="UmlValueSpecification Problem" + point="org.eclipse.core.resources.markers"> + <super type="org.eclipse.xtext.ui.check.normal"/> + <persistent value="true"/> + </extension> + <extension + id="umlvaluespecification.check.expensive" + name="UmlValueSpecification Problem" + point="org.eclipse.core.resources.markers"> + <super type="org.eclipse.xtext.ui.check.expensive"/> + <persistent value="true"/> + </extension> + + <extension + point="org.eclipse.xtext.builder.participant"> + <participant + class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.builder.IXtextBuilderParticipant" + fileExtensions="umlvaluespecification" + > + </participant> + </extension> + <extension + point="org.eclipse.ui.preferencePages"> + <page + category="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification" + class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.builder.preferences.BuilderPreferencePage" + id="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.compiler.preferencePage" + name="Compiler"> + <keywordReference id="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.keyword_UmlValueSpecification"/> + </page> + </extension> + <extension + point="org.eclipse.ui.propertyPages"> + <page + category="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification" + class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.builder.preferences.BuilderPreferencePage" + id="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.compiler.propertyPage" + name="Compiler"> + <keywordReference id="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.keyword_UmlValueSpecification"/> + <enabledWhen> + <adapt type="org.eclipse.core.resources.IProject"/> + </enabledWhen> + <filter name="projectNature" value="org.eclipse.xtext.ui.shared.xtextNature"/> + </page> + </extension> + + <!-- Quick Outline --> + <extension + point="org.eclipse.ui.handlers"> + <handler + class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.ui.editor.outline.quickoutline.ShowQuickOutlineActionHandler" + commandId="org.eclipse.xtext.ui.editor.outline.QuickOutline"> + <activeWhen> + <reference + definitionId="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.Editor.opened"> + </reference> + </activeWhen> + </handler> + </extension> + <extension + point="org.eclipse.ui.commands"> + <command + description="Open the quick outline." + id="org.eclipse.xtext.ui.editor.outline.QuickOutline" + name="Quick Outline"> + </command> + </extension> + <extension point="org.eclipse.ui.menus"> + <menuContribution + locationURI="popup:#TextEditorContext?after=group.open"> + <command commandId="org.eclipse.xtext.ui.editor.outline.QuickOutline" + style="push" + tooltip="Open Quick Outline"> + <visibleWhen checkEnabled="false"> + <reference definitionId="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.Editor.opened"/> + </visibleWhen> + </command> + </menuContribution> + </extension> + <!-- quickfix marker resolution generator for org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification --> + <extension + point="org.eclipse.ui.ide.markerResolution"> + <markerResolutionGenerator + class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator" + markerType="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.umlvaluespecification.check.fast"> + <attribute + name="FIXABLE_KEY" + value="true"> + </attribute> + </markerResolutionGenerator> + <markerResolutionGenerator + class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator" + markerType="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.umlvaluespecification.check.normal"> + <attribute + name="FIXABLE_KEY" + value="true"> + </attribute> + </markerResolutionGenerator> + <markerResolutionGenerator + class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator" + markerType="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.umlvaluespecification.check.expensive"> + <attribute + name="FIXABLE_KEY" + value="true"> + </attribute> + </markerResolutionGenerator> + </extension> + +</plugin> diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/pom.xml b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/pom.xml new file mode 100644 index 00000000000..5ac368df45d --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/pom.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project> + <modelVersion>4.0.0</modelVersion> + <parent> + <artifactId>org.eclipse.papyrus</artifactId> + <groupId>org.eclipse.papyrus</groupId> + <version>1.0.2-SNAPSHOT</version> + <relativePath>../../../../releng/top-pom-main.xml</relativePath> + </parent> + <artifactId>org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui</artifactId> + <groupId>org.eclipse.papyrus</groupId> + <version>1.0.2-SNAPSHOT</version> + <packaging>eclipse-plugin</packaging> +</project>
\ No newline at end of file diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/AbstractUmlValueSpecificationUiModule.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/AbstractUmlValueSpecificationUiModule.java new file mode 100644 index 00000000000..2ba0dd30183 --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/AbstractUmlValueSpecificationUiModule.java @@ -0,0 +1,137 @@ + +/* + * generated by Xtext + */ +package org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui; + +import org.eclipse.xtext.ui.DefaultUiModule; +import org.eclipse.ui.plugin.AbstractUIPlugin; + +/** + * Manual modifications go to {org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationUiModule} + */ +@SuppressWarnings("all") +public abstract class AbstractUmlValueSpecificationUiModule extends DefaultUiModule { + + public AbstractUmlValueSpecificationUiModule(AbstractUIPlugin plugin) { + super(plugin); + } + + + // contributed by org.eclipse.xtext.ui.generator.ImplicitUiFragment + public com.google.inject.Provider<org.eclipse.xtext.resource.containers.IAllContainersState> provideIAllContainersState() { + return org.eclipse.xtext.ui.shared.Access.getJavaProjectsState(); + } + + // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment + public Class<? extends org.eclipse.xtext.ui.editor.contentassist.IProposalConflictHelper> bindIProposalConflictHelper() { + return org.eclipse.xtext.ui.editor.contentassist.antlr.AntlrProposalConflictHelper.class; + } + + // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment + public void configureHighlightingLexer(com.google.inject.Binder binder) { + binder.bind(org.eclipse.xtext.parser.antlr.Lexer.class).annotatedWith(com.google.inject.name.Names.named(org.eclipse.xtext.ui.LexerUIBindings.HIGHLIGHTING)).to(org.eclipse.papyrus.uml.textedit.valuespecification.xtext.parser.antlr.internal.InternalUmlValueSpecificationLexer.class); + } + + // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment + public void configureHighlightingTokenDefProvider(com.google.inject.Binder binder) { + binder.bind(org.eclipse.xtext.parser.antlr.ITokenDefProvider.class).annotatedWith(com.google.inject.name.Names.named(org.eclipse.xtext.ui.LexerUIBindings.HIGHLIGHTING)).to(org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider.class); + } + + // contributed by org.eclipse.xtext.generator.exporting.QualifiedNamesFragment + public Class<? extends org.eclipse.xtext.ui.editor.contentassist.PrefixMatcher> bindPrefixMatcher() { + return org.eclipse.xtext.ui.editor.contentassist.FQNPrefixMatcher.class; + } + + // contributed by org.eclipse.xtext.generator.exporting.QualifiedNamesFragment + public Class<? extends org.eclipse.xtext.ui.refactoring.IDependentElementsCalculator> bindIDependentElementsCalculator() { + return org.eclipse.xtext.ui.refactoring.impl.DefaultDependentElementsCalculator.class; + } + + // contributed by org.eclipse.xtext.generator.builder.BuilderIntegrationFragment + public void configureIResourceDescriptionsBuilderScope(com.google.inject.Binder binder) { + binder.bind(org.eclipse.xtext.resource.IResourceDescriptions.class).annotatedWith(com.google.inject.name.Names.named(org.eclipse.xtext.resource.impl.ResourceDescriptionsProvider.NAMED_BUILDER_SCOPE)).to(org.eclipse.xtext.builder.clustering.CurrentDescriptions.ResourceSetAware.class); + } + + // contributed by org.eclipse.xtext.generator.builder.BuilderIntegrationFragment + public Class<? extends org.eclipse.xtext.ui.editor.IXtextEditorCallback> bindIXtextEditorCallback() { + return org.eclipse.xtext.builder.nature.NatureAddingEditorCallback.class; + } + + // contributed by org.eclipse.xtext.generator.builder.BuilderIntegrationFragment + public void configureIResourceDescriptionsPersisted(com.google.inject.Binder binder) { + binder.bind(org.eclipse.xtext.resource.IResourceDescriptions.class).annotatedWith(com.google.inject.name.Names.named(org.eclipse.xtext.resource.impl.ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(org.eclipse.xtext.builder.builderState.IBuilderState.class); + } + + // contributed by org.eclipse.xtext.generator.builder.BuilderIntegrationFragment + public Class<? extends org.eclipse.xtext.ui.editor.DocumentBasedDirtyResource> bindDocumentBasedDirtyResource() { + return org.eclipse.xtext.builder.impl.PersistentDataAwareDirtyResource.class; + } + + // contributed by org.eclipse.xtext.generator.generator.GeneratorFragment + public Class<? extends org.eclipse.xtext.builder.IXtextBuilderParticipant> bindIXtextBuilderParticipant() { + return org.eclipse.xtext.builder.BuilderParticipant.class; + } + + // contributed by org.eclipse.xtext.generator.generator.GeneratorFragment + public org.eclipse.core.resources.IWorkspaceRoot bindIWorkspaceRootToInstance() { + return org.eclipse.core.resources.ResourcesPlugin.getWorkspace().getRoot(); + } + + // contributed by org.eclipse.xtext.generator.generator.GeneratorFragment + public void configureBuilderPreferenceStoreInitializer(com.google.inject.Binder binder) { + binder.bind(org.eclipse.xtext.ui.editor.preferences.IPreferenceStoreInitializer.class).annotatedWith(com.google.inject.name.Names.named("builderPreferenceInitializer")).to(org.eclipse.xtext.builder.preferences.BuilderPreferenceAccess.Initializer.class); + } + + // contributed by org.eclipse.xtext.ui.generator.labeling.LabelProviderFragment + public Class<? extends org.eclipse.jface.viewers.ILabelProvider> bindILabelProvider() { + return org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.labeling.UmlValueSpecificationLabelProvider.class; + } + + // contributed by org.eclipse.xtext.ui.generator.labeling.LabelProviderFragment + public void configureResourceUIServiceLabelProvider(com.google.inject.Binder binder) { + binder.bind(org.eclipse.jface.viewers.ILabelProvider.class).annotatedWith(org.eclipse.xtext.ui.resource.ResourceServiceDescriptionLabelProvider.class).to(org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.labeling.UmlValueSpecificationDescriptionLabelProvider.class); + } + + // contributed by org.eclipse.xtext.ui.generator.outline.OutlineTreeProviderFragment + public Class<? extends org.eclipse.xtext.ui.editor.outline.IOutlineTreeProvider> bindIOutlineTreeProvider() { + return org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.outline.UmlValueSpecificationOutlineTreeProvider.class; + } + + // contributed by org.eclipse.xtext.ui.generator.outline.OutlineTreeProviderFragment + public Class<? extends org.eclipse.xtext.ui.editor.outline.impl.IOutlineTreeStructureProvider> bindIOutlineTreeStructureProvider() { + return org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.outline.UmlValueSpecificationOutlineTreeProvider.class; + } + + // contributed by org.eclipse.xtext.ui.generator.quickfix.QuickfixProviderFragment + public Class<? extends org.eclipse.xtext.ui.editor.quickfix.IssueResolutionProvider> bindIssueResolutionProvider() { + return org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.quickfix.UmlValueSpecificationQuickfixProvider.class; + } + + // contributed by org.eclipse.xtext.ui.generator.contentAssist.JavaBasedContentAssistFragment + public Class<? extends org.eclipse.xtext.ui.editor.contentassist.IContentProposalProvider> bindIContentProposalProvider() { + return org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.contentassist.UmlValueSpecificationProposalProvider.class; + } + + // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrUiGeneratorFragment + public Class<? extends org.eclipse.xtext.ui.editor.contentassist.ContentAssistContext.Factory> bindContentAssistContext$Factory() { + return org.eclipse.xtext.ui.editor.contentassist.antlr.ParserBasedContentAssistContextFactory.class; + } + + // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrUiGeneratorFragment + public Class<? extends org.eclipse.xtext.ui.editor.contentassist.antlr.IContentAssistParser> bindIContentAssistParser() { + return org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.contentassist.antlr.UmlValueSpecificationParser.class; + } + + // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrUiGeneratorFragment + public void configureContentAssistLexerProvider(com.google.inject.Binder binder) { + binder.bind(org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.contentassist.antlr.internal.InternalUmlValueSpecificationLexer.class).toProvider(org.eclipse.xtext.parser.antlr.LexerProvider.create(org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.contentassist.antlr.internal.InternalUmlValueSpecificationLexer.class)); + } + + // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrUiGeneratorFragment + public void configureContentAssistLexer(com.google.inject.Binder binder) { + binder.bind(org.eclipse.xtext.ui.editor.contentassist.antlr.internal.Lexer.class).annotatedWith(com.google.inject.name.Names.named(org.eclipse.xtext.ui.LexerUIBindings.CONTENT_ASSIST)).to(org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.contentassist.antlr.internal.InternalUmlValueSpecificationLexer.class); + } + + +} diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/UmlValueSpecificationExecutableExtensionFactory.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/UmlValueSpecificationExecutableExtensionFactory.java new file mode 100644 index 00000000000..a87a6e3ac4d --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/UmlValueSpecificationExecutableExtensionFactory.java @@ -0,0 +1,29 @@ +/* + * generated by Xtext + */ +package org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui; + +import org.eclipse.xtext.ui.guice.AbstractGuiceAwareExecutableExtensionFactory; +import org.osgi.framework.Bundle; + +import com.google.inject.Injector; + +import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.internal.UmlValueSpecificationActivator; + +/** + * This class was generated. Customizations should only happen in a newly + * introduced subclass. + */ +public class UmlValueSpecificationExecutableExtensionFactory extends AbstractGuiceAwareExecutableExtensionFactory { + + @Override + protected Bundle getBundle() { + return UmlValueSpecificationActivator.getInstance().getBundle(); + } + + @Override + protected Injector getInjector() { + return UmlValueSpecificationActivator.getInstance().getInjector(UmlValueSpecificationActivator.ORG_ECLIPSE_PAPYRUS_UML_TEXTEDIT_VALUESPECIFICATION_XTEXT_UMLVALUESPECIFICATION); + } + +} diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/AbstractUmlValueSpecificationProposalProvider.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/AbstractUmlValueSpecificationProposalProvider.java new file mode 100644 index 00000000000..19b188d3817 --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/AbstractUmlValueSpecificationProposalProvider.java @@ -0,0 +1,97 @@ +/* +* generated by Xtext +*/ +package org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.contentassist; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.xtext.*; +import org.eclipse.xtext.ui.editor.contentassist.ICompletionProposalAcceptor; +import org.eclipse.xtext.ui.editor.contentassist.ContentAssistContext; + +/** + * Represents a generated, default implementation of superclass {@link org.eclipse.xtext.common.ui.contentassist.TerminalsProposalProvider}. + * Methods are dynamically dispatched on the first parameter, i.e., you can override them + * with a more concrete subtype. + */ +@SuppressWarnings("all") +public class AbstractUmlValueSpecificationProposalProvider extends org.eclipse.xtext.common.ui.contentassist.TerminalsProposalProvider { + + public void completeAbstractRule_Visibility(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { + completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); + } + public void completeAbstractRule_Name(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { + completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); + } + public void completeAbstractRule_Value(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { + completeRuleCall(((RuleCall)((Alternatives)assignment.getTerminal()).getElements().get(0)), context, acceptor); + completeRuleCall(((RuleCall)((Alternatives)assignment.getTerminal()).getElements().get(1)), context, acceptor); + completeRuleCall(((RuleCall)((Alternatives)assignment.getTerminal()).getElements().get(2)), context, acceptor); + completeRuleCall(((RuleCall)((Alternatives)assignment.getTerminal()).getElements().get(3)), context, acceptor); + completeRuleCall(((RuleCall)((Alternatives)assignment.getTerminal()).getElements().get(4)), context, acceptor); + } + public void completeAbstractRule_InstanceSpecification(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { + lookupCrossReference(((CrossReference)assignment.getTerminal()), context, acceptor); + } + public void completeAbstractRule_Undefined(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { + completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); + } + public void completeLiteralBooleanRule_Value(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { + // subclasses may override + // subclasses may override + } + public void completeLiteralIntegerOrUnlimitedNaturalRule_Value(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { + completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); + } + public void completeLiteralRealRule_Value(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { + completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); + } + public void completeLiteralNullRule_Value(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { + // subclasses may override + } + public void completeLiteralStringRule_Value(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { + completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); + } + public void completeUndefinedRule_Value(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { + // subclasses may override + } + public void completeVisibilityKind_Public(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { + // subclasses may override + } + public void completeVisibilityKind_Private(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { + // subclasses may override + } + public void completeVisibilityKind_Protected(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { + // subclasses may override + } + public void completeVisibilityKind_Package(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { + // subclasses may override + } + + public void complete_AbstractRule(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { + // subclasses may override + } + public void complete_LiteralBooleanRule(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { + // subclasses may override + } + public void complete_LiteralIntegerOrUnlimitedNaturalRule(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { + // subclasses may override + } + public void complete_LiteralRealRule(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { + // subclasses may override + } + public void complete_DOUBLE(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { + // subclasses may override + } + public void complete_LiteralNullRule(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { + // subclasses may override + } + public void complete_LiteralStringRule(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { + // subclasses may override + } + public void complete_UndefinedRule(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { + // subclasses may override + } + public void complete_VisibilityKind(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { + // subclasses may override + } +} diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/UmlValueSpecificationParser.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/UmlValueSpecificationParser.java new file mode 100644 index 00000000000..43100c04479 --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/UmlValueSpecificationParser.java @@ -0,0 +1,91 @@ +/* +* generated by Xtext +*/ +package org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.contentassist.antlr; + +import java.util.Collection; +import java.util.Map; +import java.util.HashMap; + +import org.antlr.runtime.RecognitionException; +import org.eclipse.xtext.AbstractElement; +import org.eclipse.xtext.ui.editor.contentassist.antlr.AbstractContentAssistParser; +import org.eclipse.xtext.ui.editor.contentassist.antlr.FollowElement; +import org.eclipse.xtext.ui.editor.contentassist.antlr.internal.AbstractInternalContentAssistParser; + +import com.google.inject.Inject; + +import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.services.UmlValueSpecificationGrammarAccess; + +public class UmlValueSpecificationParser extends AbstractContentAssistParser { + + @Inject + private UmlValueSpecificationGrammarAccess grammarAccess; + + private Map<AbstractElement, String> nameMappings; + + @Override + protected org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.contentassist.antlr.internal.InternalUmlValueSpecificationParser createParser() { + org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.contentassist.antlr.internal.InternalUmlValueSpecificationParser result = new org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.contentassist.antlr.internal.InternalUmlValueSpecificationParser(null); + result.setGrammarAccess(grammarAccess); + return result; + } + + @Override + protected String getRuleName(AbstractElement element) { + if (nameMappings == null) { + nameMappings = new HashMap<AbstractElement, String>() { + private static final long serialVersionUID = 1L; + { + put(grammarAccess.getAbstractRuleAccess().getAlternatives(), "rule__AbstractRule__Alternatives"); + put(grammarAccess.getAbstractRuleAccess().getAlternatives_0_2(), "rule__AbstractRule__Alternatives_0_2"); + put(grammarAccess.getAbstractRuleAccess().getValueAlternatives_0_2_0_0(), "rule__AbstractRule__ValueAlternatives_0_2_0_0"); + put(grammarAccess.getLiteralBooleanRuleAccess().getValueAlternatives_0(), "rule__LiteralBooleanRule__ValueAlternatives_0"); + put(grammarAccess.getVisibilityKindAccess().getAlternatives(), "rule__VisibilityKind__Alternatives"); + put(grammarAccess.getAbstractRuleAccess().getGroup_0(), "rule__AbstractRule__Group_0__0"); + put(grammarAccess.getAbstractRuleAccess().getGroup_0_1(), "rule__AbstractRule__Group_0_1__0"); + put(grammarAccess.getAbstractRuleAccess().getVisibilityAssignment_0_0(), "rule__AbstractRule__VisibilityAssignment_0_0"); + put(grammarAccess.getAbstractRuleAccess().getNameAssignment_0_1_0(), "rule__AbstractRule__NameAssignment_0_1_0"); + put(grammarAccess.getAbstractRuleAccess().getValueAssignment_0_2_0(), "rule__AbstractRule__ValueAssignment_0_2_0"); + put(grammarAccess.getAbstractRuleAccess().getInstanceSpecificationAssignment_0_2_1(), "rule__AbstractRule__InstanceSpecificationAssignment_0_2_1"); + put(grammarAccess.getAbstractRuleAccess().getUndefinedAssignment_1(), "rule__AbstractRule__UndefinedAssignment_1"); + put(grammarAccess.getLiteralBooleanRuleAccess().getValueAssignment(), "rule__LiteralBooleanRule__ValueAssignment"); + put(grammarAccess.getLiteralIntegerOrUnlimitedNaturalRuleAccess().getValueAssignment(), "rule__LiteralIntegerOrUnlimitedNaturalRule__ValueAssignment"); + put(grammarAccess.getLiteralRealRuleAccess().getValueAssignment(), "rule__LiteralRealRule__ValueAssignment"); + put(grammarAccess.getLiteralNullRuleAccess().getValueAssignment(), "rule__LiteralNullRule__ValueAssignment"); + put(grammarAccess.getLiteralStringRuleAccess().getValueAssignment(), "rule__LiteralStringRule__ValueAssignment"); + put(grammarAccess.getUndefinedRuleAccess().getValueAssignment(), "rule__UndefinedRule__ValueAssignment"); + put(grammarAccess.getVisibilityKindAccess().getPublicAssignment_0(), "rule__VisibilityKind__PublicAssignment_0"); + put(grammarAccess.getVisibilityKindAccess().getPrivateAssignment_1(), "rule__VisibilityKind__PrivateAssignment_1"); + put(grammarAccess.getVisibilityKindAccess().getProtectedAssignment_2(), "rule__VisibilityKind__ProtectedAssignment_2"); + put(grammarAccess.getVisibilityKindAccess().getPackageAssignment_3(), "rule__VisibilityKind__PackageAssignment_3"); + } + }; + } + return nameMappings.get(element); + } + + @Override + protected Collection<FollowElement> getFollowElements(AbstractInternalContentAssistParser parser) { + try { + org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.contentassist.antlr.internal.InternalUmlValueSpecificationParser typedParser = (org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.contentassist.antlr.internal.InternalUmlValueSpecificationParser) parser; + typedParser.entryRuleAbstractRule(); + return typedParser.getFollowElements(); + } catch(RecognitionException ex) { + throw new RuntimeException(ex); + } + } + + @Override + protected String[] getInitialHiddenTokens() { + return new String[] { "RULE_WS", "RULE_ML_COMMENT", "RULE_SL_COMMENT" }; + } + + public UmlValueSpecificationGrammarAccess getGrammarAccess() { + return this.grammarAccess; + } + + public void setGrammarAccess(UmlValueSpecificationGrammarAccess grammarAccess) { + this.grammarAccess = grammarAccess; + } +} diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g new file mode 100644 index 00000000000..0751a6ee5ab --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g @@ -0,0 +1,882 @@ +/* +* generated by Xtext +*/ +grammar InternalUmlValueSpecification; + +options { + superClass=AbstractInternalContentAssistParser; + +} + +@lexer::header { +package org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.contentassist.antlr.internal; + +// Hack: Use our own Lexer superclass by means of import. +// Currently there is no other way to specify the superclass for the lexer. +import org.eclipse.xtext.ui.editor.contentassist.antlr.internal.Lexer; +} + +@parser::header { +package org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.contentassist.antlr.internal; + +import java.io.InputStream; +import org.eclipse.xtext.*; +import org.eclipse.xtext.parser.*; +import org.eclipse.xtext.parser.impl.*; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.xtext.parser.antlr.XtextTokenStream; +import org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens; +import org.eclipse.xtext.ui.editor.contentassist.antlr.internal.AbstractInternalContentAssistParser; +import org.eclipse.xtext.ui.editor.contentassist.antlr.internal.DFA; +import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.services.UmlValueSpecificationGrammarAccess; + +} + +@parser::members { + + private UmlValueSpecificationGrammarAccess grammarAccess; + + public void setGrammarAccess(UmlValueSpecificationGrammarAccess grammarAccess) { + this.grammarAccess = grammarAccess; + } + + @Override + protected Grammar getGrammar() { + return grammarAccess.getGrammar(); + } + + @Override + protected String getValueForTokenName(String tokenName) { + return tokenName; + } + +} + + + + +// Entry rule entryRuleAbstractRule +entryRuleAbstractRule +: +{ before(grammarAccess.getAbstractRuleRule()); } + ruleAbstractRule +{ after(grammarAccess.getAbstractRuleRule()); } + EOF +; + +// Rule AbstractRule +ruleAbstractRule + @init { + int stackSize = keepStackSize(); + } + : +( +{ before(grammarAccess.getAbstractRuleAccess().getAlternatives()); } +(rule__AbstractRule__Alternatives) +{ after(grammarAccess.getAbstractRuleAccess().getAlternatives()); } +) + +; +finally { + restoreStackSize(stackSize); +} + + + +// Entry rule entryRuleLiteralBooleanRule +entryRuleLiteralBooleanRule +: +{ before(grammarAccess.getLiteralBooleanRuleRule()); } + ruleLiteralBooleanRule +{ after(grammarAccess.getLiteralBooleanRuleRule()); } + EOF +; + +// Rule LiteralBooleanRule +ruleLiteralBooleanRule + @init { + int stackSize = keepStackSize(); + } + : +( +{ before(grammarAccess.getLiteralBooleanRuleAccess().getValueAssignment()); } +(rule__LiteralBooleanRule__ValueAssignment) +{ after(grammarAccess.getLiteralBooleanRuleAccess().getValueAssignment()); } +) + +; +finally { + restoreStackSize(stackSize); +} + + + +// Entry rule entryRuleLiteralIntegerOrUnlimitedNaturalRule +entryRuleLiteralIntegerOrUnlimitedNaturalRule +: +{ before(grammarAccess.getLiteralIntegerOrUnlimitedNaturalRuleRule()); } + ruleLiteralIntegerOrUnlimitedNaturalRule +{ after(grammarAccess.getLiteralIntegerOrUnlimitedNaturalRuleRule()); } + EOF +; + +// Rule LiteralIntegerOrUnlimitedNaturalRule +ruleLiteralIntegerOrUnlimitedNaturalRule + @init { + int stackSize = keepStackSize(); + } + : +( +{ before(grammarAccess.getLiteralIntegerOrUnlimitedNaturalRuleAccess().getValueAssignment()); } +(rule__LiteralIntegerOrUnlimitedNaturalRule__ValueAssignment) +{ after(grammarAccess.getLiteralIntegerOrUnlimitedNaturalRuleAccess().getValueAssignment()); } +) + +; +finally { + restoreStackSize(stackSize); +} + + + +// Entry rule entryRuleLiteralRealRule +entryRuleLiteralRealRule +: +{ before(grammarAccess.getLiteralRealRuleRule()); } + ruleLiteralRealRule +{ after(grammarAccess.getLiteralRealRuleRule()); } + EOF +; + +// Rule LiteralRealRule +ruleLiteralRealRule + @init { + int stackSize = keepStackSize(); + } + : +( +{ before(grammarAccess.getLiteralRealRuleAccess().getValueAssignment()); } +(rule__LiteralRealRule__ValueAssignment) +{ after(grammarAccess.getLiteralRealRuleAccess().getValueAssignment()); } +) + +; +finally { + restoreStackSize(stackSize); +} + + + +// Entry rule entryRuleLiteralNullRule +entryRuleLiteralNullRule +: +{ before(grammarAccess.getLiteralNullRuleRule()); } + ruleLiteralNullRule +{ after(grammarAccess.getLiteralNullRuleRule()); } + EOF +; + +// Rule LiteralNullRule +ruleLiteralNullRule + @init { + int stackSize = keepStackSize(); + } + : +( +{ before(grammarAccess.getLiteralNullRuleAccess().getValueAssignment()); } +(rule__LiteralNullRule__ValueAssignment) +{ after(grammarAccess.getLiteralNullRuleAccess().getValueAssignment()); } +) + +; +finally { + restoreStackSize(stackSize); +} + + + +// Entry rule entryRuleLiteralStringRule +entryRuleLiteralStringRule +: +{ before(grammarAccess.getLiteralStringRuleRule()); } + ruleLiteralStringRule +{ after(grammarAccess.getLiteralStringRuleRule()); } + EOF +; + +// Rule LiteralStringRule +ruleLiteralStringRule + @init { + int stackSize = keepStackSize(); + } + : +( +{ before(grammarAccess.getLiteralStringRuleAccess().getValueAssignment()); } +(rule__LiteralStringRule__ValueAssignment) +{ after(grammarAccess.getLiteralStringRuleAccess().getValueAssignment()); } +) + +; +finally { + restoreStackSize(stackSize); +} + + + +// Entry rule entryRuleUndefinedRule +entryRuleUndefinedRule +: +{ before(grammarAccess.getUndefinedRuleRule()); } + ruleUndefinedRule +{ after(grammarAccess.getUndefinedRuleRule()); } + EOF +; + +// Rule UndefinedRule +ruleUndefinedRule + @init { + int stackSize = keepStackSize(); + } + : +( +{ before(grammarAccess.getUndefinedRuleAccess().getValueAssignment()); } +(rule__UndefinedRule__ValueAssignment) +{ after(grammarAccess.getUndefinedRuleAccess().getValueAssignment()); } +) + +; +finally { + restoreStackSize(stackSize); +} + + + +// Entry rule entryRuleVisibilityKind +entryRuleVisibilityKind +: +{ before(grammarAccess.getVisibilityKindRule()); } + ruleVisibilityKind +{ after(grammarAccess.getVisibilityKindRule()); } + EOF +; + +// Rule VisibilityKind +ruleVisibilityKind + @init { + int stackSize = keepStackSize(); + } + : +( +{ before(grammarAccess.getVisibilityKindAccess().getAlternatives()); } +(rule__VisibilityKind__Alternatives) +{ after(grammarAccess.getVisibilityKindAccess().getAlternatives()); } +) + +; +finally { + restoreStackSize(stackSize); +} + + + + +rule__AbstractRule__Alternatives + @init { + int stackSize = keepStackSize(); + } +: +( +{ before(grammarAccess.getAbstractRuleAccess().getGroup_0()); } +(rule__AbstractRule__Group_0__0) +{ after(grammarAccess.getAbstractRuleAccess().getGroup_0()); } +) + + |( +{ before(grammarAccess.getAbstractRuleAccess().getUndefinedAssignment_1()); } +(rule__AbstractRule__UndefinedAssignment_1) +{ after(grammarAccess.getAbstractRuleAccess().getUndefinedAssignment_1()); } +) + +; +finally { + restoreStackSize(stackSize); +} + +rule__AbstractRule__Alternatives_0_2 + @init { + int stackSize = keepStackSize(); + } +: +( +{ before(grammarAccess.getAbstractRuleAccess().getValueAssignment_0_2_0()); } +(rule__AbstractRule__ValueAssignment_0_2_0) +{ after(grammarAccess.getAbstractRuleAccess().getValueAssignment_0_2_0()); } +) + + |( +{ before(grammarAccess.getAbstractRuleAccess().getInstanceSpecificationAssignment_0_2_1()); } +(rule__AbstractRule__InstanceSpecificationAssignment_0_2_1) +{ after(grammarAccess.getAbstractRuleAccess().getInstanceSpecificationAssignment_0_2_1()); } +) + +; +finally { + restoreStackSize(stackSize); +} + +rule__AbstractRule__ValueAlternatives_0_2_0_0 + @init { + int stackSize = keepStackSize(); + } +: +( +{ before(grammarAccess.getAbstractRuleAccess().getValueLiteralBooleanRuleParserRuleCall_0_2_0_0_0()); } + ruleLiteralBooleanRule +{ after(grammarAccess.getAbstractRuleAccess().getValueLiteralBooleanRuleParserRuleCall_0_2_0_0_0()); } +) + + |( +{ before(grammarAccess.getAbstractRuleAccess().getValueLiteralIntegerOrUnlimitedNaturalRuleParserRuleCall_0_2_0_0_1()); } + ruleLiteralIntegerOrUnlimitedNaturalRule +{ after(grammarAccess.getAbstractRuleAccess().getValueLiteralIntegerOrUnlimitedNaturalRuleParserRuleCall_0_2_0_0_1()); } +) + + |( +{ before(grammarAccess.getAbstractRuleAccess().getValueLiteralRealRuleParserRuleCall_0_2_0_0_2()); } + ruleLiteralRealRule +{ after(grammarAccess.getAbstractRuleAccess().getValueLiteralRealRuleParserRuleCall_0_2_0_0_2()); } +) + + |( +{ before(grammarAccess.getAbstractRuleAccess().getValueLiteralNullRuleParserRuleCall_0_2_0_0_3()); } + ruleLiteralNullRule +{ after(grammarAccess.getAbstractRuleAccess().getValueLiteralNullRuleParserRuleCall_0_2_0_0_3()); } +) + + |( +{ before(grammarAccess.getAbstractRuleAccess().getValueLiteralStringRuleParserRuleCall_0_2_0_0_4()); } + ruleLiteralStringRule +{ after(grammarAccess.getAbstractRuleAccess().getValueLiteralStringRuleParserRuleCall_0_2_0_0_4()); } +) + +; +finally { + restoreStackSize(stackSize); +} + +rule__LiteralBooleanRule__ValueAlternatives_0 + @init { + int stackSize = keepStackSize(); + } +: +( +{ before(grammarAccess.getLiteralBooleanRuleAccess().getValueTrueKeyword_0_0()); } + + 'true' + +{ after(grammarAccess.getLiteralBooleanRuleAccess().getValueTrueKeyword_0_0()); } +) + + |( +{ before(grammarAccess.getLiteralBooleanRuleAccess().getValueFalseKeyword_0_1()); } + + 'false' + +{ after(grammarAccess.getLiteralBooleanRuleAccess().getValueFalseKeyword_0_1()); } +) + +; +finally { + restoreStackSize(stackSize); +} + +rule__VisibilityKind__Alternatives + @init { + int stackSize = keepStackSize(); + } +: +( +{ before(grammarAccess.getVisibilityKindAccess().getPublicAssignment_0()); } +(rule__VisibilityKind__PublicAssignment_0) +{ after(grammarAccess.getVisibilityKindAccess().getPublicAssignment_0()); } +) + + |( +{ before(grammarAccess.getVisibilityKindAccess().getPrivateAssignment_1()); } +(rule__VisibilityKind__PrivateAssignment_1) +{ after(grammarAccess.getVisibilityKindAccess().getPrivateAssignment_1()); } +) + + |( +{ before(grammarAccess.getVisibilityKindAccess().getProtectedAssignment_2()); } +(rule__VisibilityKind__ProtectedAssignment_2) +{ after(grammarAccess.getVisibilityKindAccess().getProtectedAssignment_2()); } +) + + |( +{ before(grammarAccess.getVisibilityKindAccess().getPackageAssignment_3()); } +(rule__VisibilityKind__PackageAssignment_3) +{ after(grammarAccess.getVisibilityKindAccess().getPackageAssignment_3()); } +) + +; +finally { + restoreStackSize(stackSize); +} + + + +rule__AbstractRule__Group_0__0 + @init { + int stackSize = keepStackSize(); + } +: + rule__AbstractRule__Group_0__0__Impl + rule__AbstractRule__Group_0__1 +; +finally { + restoreStackSize(stackSize); +} + +rule__AbstractRule__Group_0__0__Impl + @init { + int stackSize = keepStackSize(); + } +: +( +{ before(grammarAccess.getAbstractRuleAccess().getVisibilityAssignment_0_0()); } +(rule__AbstractRule__VisibilityAssignment_0_0)? +{ after(grammarAccess.getAbstractRuleAccess().getVisibilityAssignment_0_0()); } +) + +; +finally { + restoreStackSize(stackSize); +} + + +rule__AbstractRule__Group_0__1 + @init { + int stackSize = keepStackSize(); + } +: + rule__AbstractRule__Group_0__1__Impl + rule__AbstractRule__Group_0__2 +; +finally { + restoreStackSize(stackSize); +} + +rule__AbstractRule__Group_0__1__Impl + @init { + int stackSize = keepStackSize(); + } +: +( +{ before(grammarAccess.getAbstractRuleAccess().getGroup_0_1()); } +(rule__AbstractRule__Group_0_1__0)? +{ after(grammarAccess.getAbstractRuleAccess().getGroup_0_1()); } +) + +; +finally { + restoreStackSize(stackSize); +} + + +rule__AbstractRule__Group_0__2 + @init { + int stackSize = keepStackSize(); + } +: + rule__AbstractRule__Group_0__2__Impl +; +finally { + restoreStackSize(stackSize); +} + +rule__AbstractRule__Group_0__2__Impl + @init { + int stackSize = keepStackSize(); + } +: +( +{ before(grammarAccess.getAbstractRuleAccess().getAlternatives_0_2()); } +(rule__AbstractRule__Alternatives_0_2) +{ after(grammarAccess.getAbstractRuleAccess().getAlternatives_0_2()); } +) + +; +finally { + restoreStackSize(stackSize); +} + + + + + + + + +rule__AbstractRule__Group_0_1__0 + @init { + int stackSize = keepStackSize(); + } +: + rule__AbstractRule__Group_0_1__0__Impl + rule__AbstractRule__Group_0_1__1 +; +finally { + restoreStackSize(stackSize); +} + +rule__AbstractRule__Group_0_1__0__Impl + @init { + int stackSize = keepStackSize(); + } +: +( +{ before(grammarAccess.getAbstractRuleAccess().getNameAssignment_0_1_0()); } +(rule__AbstractRule__NameAssignment_0_1_0) +{ after(grammarAccess.getAbstractRuleAccess().getNameAssignment_0_1_0()); } +) + +; +finally { + restoreStackSize(stackSize); +} + + +rule__AbstractRule__Group_0_1__1 + @init { + int stackSize = keepStackSize(); + } +: + rule__AbstractRule__Group_0_1__1__Impl +; +finally { + restoreStackSize(stackSize); +} + +rule__AbstractRule__Group_0_1__1__Impl + @init { + int stackSize = keepStackSize(); + } +: +( +{ before(grammarAccess.getAbstractRuleAccess().getEqualsSignKeyword_0_1_1()); } + + '=' + +{ after(grammarAccess.getAbstractRuleAccess().getEqualsSignKeyword_0_1_1()); } +) + +; +finally { + restoreStackSize(stackSize); +} + + + + + + + +rule__AbstractRule__VisibilityAssignment_0_0 + @init { + int stackSize = keepStackSize(); + } +: +( +{ before(grammarAccess.getAbstractRuleAccess().getVisibilityVisibilityKindParserRuleCall_0_0_0()); } + ruleVisibilityKind{ after(grammarAccess.getAbstractRuleAccess().getVisibilityVisibilityKindParserRuleCall_0_0_0()); } +) + +; +finally { + restoreStackSize(stackSize); +} + +rule__AbstractRule__NameAssignment_0_1_0 + @init { + int stackSize = keepStackSize(); + } +: +( +{ before(grammarAccess.getAbstractRuleAccess().getNameIDTerminalRuleCall_0_1_0_0()); } + RULE_ID{ after(grammarAccess.getAbstractRuleAccess().getNameIDTerminalRuleCall_0_1_0_0()); } +) + +; +finally { + restoreStackSize(stackSize); +} + +rule__AbstractRule__ValueAssignment_0_2_0 + @init { + int stackSize = keepStackSize(); + } +: +( +{ before(grammarAccess.getAbstractRuleAccess().getValueAlternatives_0_2_0_0()); } +(rule__AbstractRule__ValueAlternatives_0_2_0_0) +{ after(grammarAccess.getAbstractRuleAccess().getValueAlternatives_0_2_0_0()); } +) + +; +finally { + restoreStackSize(stackSize); +} + +rule__AbstractRule__InstanceSpecificationAssignment_0_2_1 + @init { + int stackSize = keepStackSize(); + } +: +( +{ before(grammarAccess.getAbstractRuleAccess().getInstanceSpecificationInstanceSpecificationCrossReference_0_2_1_0()); } +( +{ before(grammarAccess.getAbstractRuleAccess().getInstanceSpecificationInstanceSpecificationIDTerminalRuleCall_0_2_1_0_1()); } + RULE_ID{ after(grammarAccess.getAbstractRuleAccess().getInstanceSpecificationInstanceSpecificationIDTerminalRuleCall_0_2_1_0_1()); } +) +{ after(grammarAccess.getAbstractRuleAccess().getInstanceSpecificationInstanceSpecificationCrossReference_0_2_1_0()); } +) + +; +finally { + restoreStackSize(stackSize); +} + +rule__AbstractRule__UndefinedAssignment_1 + @init { + int stackSize = keepStackSize(); + } +: +( +{ before(grammarAccess.getAbstractRuleAccess().getUndefinedUndefinedRuleParserRuleCall_1_0()); } + ruleUndefinedRule{ after(grammarAccess.getAbstractRuleAccess().getUndefinedUndefinedRuleParserRuleCall_1_0()); } +) + +; +finally { + restoreStackSize(stackSize); +} + +rule__LiteralBooleanRule__ValueAssignment + @init { + int stackSize = keepStackSize(); + } +: +( +{ before(grammarAccess.getLiteralBooleanRuleAccess().getValueAlternatives_0()); } +(rule__LiteralBooleanRule__ValueAlternatives_0) +{ after(grammarAccess.getLiteralBooleanRuleAccess().getValueAlternatives_0()); } +) + +; +finally { + restoreStackSize(stackSize); +} + +rule__LiteralIntegerOrUnlimitedNaturalRule__ValueAssignment + @init { + int stackSize = keepStackSize(); + } +: +( +{ before(grammarAccess.getLiteralIntegerOrUnlimitedNaturalRuleAccess().getValueINTTerminalRuleCall_0()); } + RULE_INT{ after(grammarAccess.getLiteralIntegerOrUnlimitedNaturalRuleAccess().getValueINTTerminalRuleCall_0()); } +) + +; +finally { + restoreStackSize(stackSize); +} + +rule__LiteralRealRule__ValueAssignment + @init { + int stackSize = keepStackSize(); + } +: +( +{ before(grammarAccess.getLiteralRealRuleAccess().getValueDOUBLETerminalRuleCall_0()); } + RULE_DOUBLE{ after(grammarAccess.getLiteralRealRuleAccess().getValueDOUBLETerminalRuleCall_0()); } +) + +; +finally { + restoreStackSize(stackSize); +} + +rule__LiteralNullRule__ValueAssignment + @init { + int stackSize = keepStackSize(); + } +: +( +{ before(grammarAccess.getLiteralNullRuleAccess().getValueNullKeyword_0()); } +( +{ before(grammarAccess.getLiteralNullRuleAccess().getValueNullKeyword_0()); } + + 'null' + +{ after(grammarAccess.getLiteralNullRuleAccess().getValueNullKeyword_0()); } +) + +{ after(grammarAccess.getLiteralNullRuleAccess().getValueNullKeyword_0()); } +) + +; +finally { + restoreStackSize(stackSize); +} + +rule__LiteralStringRule__ValueAssignment + @init { + int stackSize = keepStackSize(); + } +: +( +{ before(grammarAccess.getLiteralStringRuleAccess().getValueSTRINGTerminalRuleCall_0()); } + RULE_STRING{ after(grammarAccess.getLiteralStringRuleAccess().getValueSTRINGTerminalRuleCall_0()); } +) + +; +finally { + restoreStackSize(stackSize); +} + +rule__UndefinedRule__ValueAssignment + @init { + int stackSize = keepStackSize(); + } +: +( +{ before(grammarAccess.getUndefinedRuleAccess().getValueUndefinedKeyword_0()); } +( +{ before(grammarAccess.getUndefinedRuleAccess().getValueUndefinedKeyword_0()); } + + '<Undefined>' + +{ after(grammarAccess.getUndefinedRuleAccess().getValueUndefinedKeyword_0()); } +) + +{ after(grammarAccess.getUndefinedRuleAccess().getValueUndefinedKeyword_0()); } +) + +; +finally { + restoreStackSize(stackSize); +} + +rule__VisibilityKind__PublicAssignment_0 + @init { + int stackSize = keepStackSize(); + } +: +( +{ before(grammarAccess.getVisibilityKindAccess().getPublicPlusSignKeyword_0_0()); } +( +{ before(grammarAccess.getVisibilityKindAccess().getPublicPlusSignKeyword_0_0()); } + + '+' + +{ after(grammarAccess.getVisibilityKindAccess().getPublicPlusSignKeyword_0_0()); } +) + +{ after(grammarAccess.getVisibilityKindAccess().getPublicPlusSignKeyword_0_0()); } +) + +; +finally { + restoreStackSize(stackSize); +} + +rule__VisibilityKind__PrivateAssignment_1 + @init { + int stackSize = keepStackSize(); + } +: +( +{ before(grammarAccess.getVisibilityKindAccess().getPrivateHyphenMinusKeyword_1_0()); } +( +{ before(grammarAccess.getVisibilityKindAccess().getPrivateHyphenMinusKeyword_1_0()); } + + '-' + +{ after(grammarAccess.getVisibilityKindAccess().getPrivateHyphenMinusKeyword_1_0()); } +) + +{ after(grammarAccess.getVisibilityKindAccess().getPrivateHyphenMinusKeyword_1_0()); } +) + +; +finally { + restoreStackSize(stackSize); +} + +rule__VisibilityKind__ProtectedAssignment_2 + @init { + int stackSize = keepStackSize(); + } +: +( +{ before(grammarAccess.getVisibilityKindAccess().getProtectedNumberSignKeyword_2_0()); } +( +{ before(grammarAccess.getVisibilityKindAccess().getProtectedNumberSignKeyword_2_0()); } + + '#' + +{ after(grammarAccess.getVisibilityKindAccess().getProtectedNumberSignKeyword_2_0()); } +) + +{ after(grammarAccess.getVisibilityKindAccess().getProtectedNumberSignKeyword_2_0()); } +) + +; +finally { + restoreStackSize(stackSize); +} + +rule__VisibilityKind__PackageAssignment_3 + @init { + int stackSize = keepStackSize(); + } +: +( +{ before(grammarAccess.getVisibilityKindAccess().getPackageTildeKeyword_3_0()); } +( +{ before(grammarAccess.getVisibilityKindAccess().getPackageTildeKeyword_3_0()); } + + '~' + +{ after(grammarAccess.getVisibilityKindAccess().getPackageTildeKeyword_3_0()); } +) + +{ after(grammarAccess.getVisibilityKindAccess().getPackageTildeKeyword_3_0()); } +) + +; +finally { + restoreStackSize(stackSize); +} + + +RULE_DOUBLE : ('0'..'9')+ '.' ('0'..'9')+; + +RULE_ID : '^'? ('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'_'|'0'..'9')*; + +RULE_INT : ('0'..'9')+; + +RULE_STRING : ('"' ('\\' .|~(('\\'|'"')))* '"'|'\'' ('\\' .|~(('\\'|'\'')))* '\''); + +RULE_ML_COMMENT : '/*' ( options {greedy=false;} : . )*'*/'; + +RULE_SL_COMMENT : '//' ~(('\n'|'\r'))* ('\r'? '\n')?; + +RULE_WS : (' '|'\t'|'\r'|'\n')+; + +RULE_ANY_OTHER : .; + + diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.tokens b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.tokens new file mode 100644 index 00000000000..4a9630aa190 --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.tokens @@ -0,0 +1,26 @@ +'#'=19 +'+'=17 +'-'=18 +'<Undefined>'=16 +'='=14 +'false'=13 +'null'=15 +'true'=12 +'~'=20 +RULE_ANY_OTHER=11 +RULE_DOUBLE=6 +RULE_ID=4 +RULE_INT=5 +RULE_ML_COMMENT=8 +RULE_SL_COMMENT=9 +RULE_STRING=7 +RULE_WS=10 +T__12=12 +T__13=13 +T__14=14 +T__15=15 +T__16=16 +T__17=17 +T__18=18 +T__19=19 +T__20=20 diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecificationLexer.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecificationLexer.java new file mode 100644 index 00000000000..893a605954c --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecificationLexer.java @@ -0,0 +1,1117 @@ +package org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.contentassist.antlr.internal; + +// Hack: Use our own Lexer superclass by means of import. +// Currently there is no other way to specify the superclass for the lexer. +import org.eclipse.xtext.ui.editor.contentassist.antlr.internal.Lexer; + + +import org.antlr.runtime.*; +import java.util.Stack; +import java.util.List; +import java.util.ArrayList; + +@SuppressWarnings("all") +public class InternalUmlValueSpecificationLexer extends Lexer { + public static final int T__19=19; + public static final int RULE_ID=4; + public static final int RULE_STRING=7; + public static final int T__16=16; + public static final int T__15=15; + public static final int T__18=18; + public static final int T__17=17; + public static final int T__12=12; + public static final int T__14=14; + public static final int T__13=13; + public static final int RULE_ANY_OTHER=11; + public static final int T__20=20; + public static final int RULE_INT=5; + public static final int RULE_WS=10; + public static final int RULE_SL_COMMENT=9; + public static final int EOF=-1; + public static final int RULE_DOUBLE=6; + public static final int RULE_ML_COMMENT=8; + + // delegates + // delegators + + public InternalUmlValueSpecificationLexer() {;} + public InternalUmlValueSpecificationLexer(CharStream input) { + this(input, new RecognizerSharedState()); + } + public InternalUmlValueSpecificationLexer(CharStream input, RecognizerSharedState state) { + super(input,state); + + } + public String getGrammarFileName() { return "../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g"; } + + // $ANTLR start "T__12" + public final void mT__12() throws RecognitionException { + try { + int _type = T__12; + int _channel = DEFAULT_TOKEN_CHANNEL; + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:11:7: ( 'true' ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:11:9: 'true' + { + match("true"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__12" + + // $ANTLR start "T__13" + public final void mT__13() throws RecognitionException { + try { + int _type = T__13; + int _channel = DEFAULT_TOKEN_CHANNEL; + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:12:7: ( 'false' ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:12:9: 'false' + { + match("false"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__13" + + // $ANTLR start "T__14" + public final void mT__14() throws RecognitionException { + try { + int _type = T__14; + int _channel = DEFAULT_TOKEN_CHANNEL; + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:13:7: ( '=' ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:13:9: '=' + { + match('='); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__14" + + // $ANTLR start "T__15" + public final void mT__15() throws RecognitionException { + try { + int _type = T__15; + int _channel = DEFAULT_TOKEN_CHANNEL; + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:14:7: ( 'null' ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:14:9: 'null' + { + match("null"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__15" + + // $ANTLR start "T__16" + public final void mT__16() throws RecognitionException { + try { + int _type = T__16; + int _channel = DEFAULT_TOKEN_CHANNEL; + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:15:7: ( '<Undefined>' ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:15:9: '<Undefined>' + { + match("<Undefined>"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__16" + + // $ANTLR start "T__17" + public final void mT__17() throws RecognitionException { + try { + int _type = T__17; + int _channel = DEFAULT_TOKEN_CHANNEL; + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:16:7: ( '+' ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:16:9: '+' + { + match('+'); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__17" + + // $ANTLR start "T__18" + public final void mT__18() throws RecognitionException { + try { + int _type = T__18; + int _channel = DEFAULT_TOKEN_CHANNEL; + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:17:7: ( '-' ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:17:9: '-' + { + match('-'); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__18" + + // $ANTLR start "T__19" + public final void mT__19() throws RecognitionException { + try { + int _type = T__19; + int _channel = DEFAULT_TOKEN_CHANNEL; + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:18:7: ( '#' ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:18:9: '#' + { + match('#'); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__19" + + // $ANTLR start "T__20" + public final void mT__20() throws RecognitionException { + try { + int _type = T__20; + int _channel = DEFAULT_TOKEN_CHANNEL; + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:19:7: ( '~' ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:19:9: '~' + { + match('~'); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__20" + + // $ANTLR start "RULE_DOUBLE" + public final void mRULE_DOUBLE() throws RecognitionException { + try { + int _type = RULE_DOUBLE; + int _channel = DEFAULT_TOKEN_CHANNEL; + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:866:13: ( ( '0' .. '9' )+ '.' ( '0' .. '9' )+ ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:866:15: ( '0' .. '9' )+ '.' ( '0' .. '9' )+ + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:866:15: ( '0' .. '9' )+ + int cnt1=0; + loop1: + do { + int alt1=2; + int LA1_0 = input.LA(1); + + if ( ((LA1_0>='0' && LA1_0<='9')) ) { + alt1=1; + } + + + switch (alt1) { + case 1 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:866:16: '0' .. '9' + { + matchRange('0','9'); + + } + break; + + default : + if ( cnt1 >= 1 ) break loop1; + EarlyExitException eee = + new EarlyExitException(1, input); + throw eee; + } + cnt1++; + } while (true); + + match('.'); + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:866:31: ( '0' .. '9' )+ + int cnt2=0; + loop2: + do { + int alt2=2; + int LA2_0 = input.LA(1); + + if ( ((LA2_0>='0' && LA2_0<='9')) ) { + alt2=1; + } + + + switch (alt2) { + case 1 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:866:32: '0' .. '9' + { + matchRange('0','9'); + + } + break; + + default : + if ( cnt2 >= 1 ) break loop2; + EarlyExitException eee = + new EarlyExitException(2, input); + throw eee; + } + cnt2++; + } while (true); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_DOUBLE" + + // $ANTLR start "RULE_ID" + public final void mRULE_ID() throws RecognitionException { + try { + int _type = RULE_ID; + int _channel = DEFAULT_TOKEN_CHANNEL; + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:868:9: ( ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:868:11: ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:868:11: ( '^' )? + int alt3=2; + int LA3_0 = input.LA(1); + + if ( (LA3_0=='^') ) { + alt3=1; + } + switch (alt3) { + case 1 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:868:11: '^' + { + match('^'); + + } + break; + + } + + if ( (input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z') ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:868:40: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* + loop4: + do { + int alt4=2; + int LA4_0 = input.LA(1); + + if ( ((LA4_0>='0' && LA4_0<='9')||(LA4_0>='A' && LA4_0<='Z')||LA4_0=='_'||(LA4_0>='a' && LA4_0<='z')) ) { + alt4=1; + } + + + switch (alt4) { + case 1 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g: + { + if ( (input.LA(1)>='0' && input.LA(1)<='9')||(input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z') ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + + } + break; + + default : + break loop4; + } + } while (true); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_ID" + + // $ANTLR start "RULE_INT" + public final void mRULE_INT() throws RecognitionException { + try { + int _type = RULE_INT; + int _channel = DEFAULT_TOKEN_CHANNEL; + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:870:10: ( ( '0' .. '9' )+ ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:870:12: ( '0' .. '9' )+ + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:870:12: ( '0' .. '9' )+ + int cnt5=0; + loop5: + do { + int alt5=2; + int LA5_0 = input.LA(1); + + if ( ((LA5_0>='0' && LA5_0<='9')) ) { + alt5=1; + } + + + switch (alt5) { + case 1 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:870:13: '0' .. '9' + { + matchRange('0','9'); + + } + break; + + default : + if ( cnt5 >= 1 ) break loop5; + EarlyExitException eee = + new EarlyExitException(5, input); + throw eee; + } + cnt5++; + } while (true); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_INT" + + // $ANTLR start "RULE_STRING" + public final void mRULE_STRING() throws RecognitionException { + try { + int _type = RULE_STRING; + int _channel = DEFAULT_TOKEN_CHANNEL; + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:872:13: ( ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:872:15: ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:872:15: ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' ) + int alt8=2; + int LA8_0 = input.LA(1); + + if ( (LA8_0=='\"') ) { + alt8=1; + } + else if ( (LA8_0=='\'') ) { + alt8=2; + } + else { + NoViableAltException nvae = + new NoViableAltException("", 8, 0, input); + + throw nvae; + } + switch (alt8) { + case 1 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:872:16: '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' + { + match('\"'); + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:872:20: ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* + loop6: + do { + int alt6=3; + int LA6_0 = input.LA(1); + + if ( (LA6_0=='\\') ) { + alt6=1; + } + else if ( ((LA6_0>='\u0000' && LA6_0<='!')||(LA6_0>='#' && LA6_0<='[')||(LA6_0>=']' && LA6_0<='\uFFFF')) ) { + alt6=2; + } + + + switch (alt6) { + case 1 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:872:21: '\\\\' . + { + match('\\'); + matchAny(); + + } + break; + case 2 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:872:28: ~ ( ( '\\\\' | '\"' ) ) + { + if ( (input.LA(1)>='\u0000' && input.LA(1)<='!')||(input.LA(1)>='#' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFF') ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + + } + break; + + default : + break loop6; + } + } while (true); + + match('\"'); + + } + break; + case 2 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:872:48: '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' + { + match('\''); + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:872:53: ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* + loop7: + do { + int alt7=3; + int LA7_0 = input.LA(1); + + if ( (LA7_0=='\\') ) { + alt7=1; + } + else if ( ((LA7_0>='\u0000' && LA7_0<='&')||(LA7_0>='(' && LA7_0<='[')||(LA7_0>=']' && LA7_0<='\uFFFF')) ) { + alt7=2; + } + + + switch (alt7) { + case 1 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:872:54: '\\\\' . + { + match('\\'); + matchAny(); + + } + break; + case 2 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:872:61: ~ ( ( '\\\\' | '\\'' ) ) + { + if ( (input.LA(1)>='\u0000' && input.LA(1)<='&')||(input.LA(1)>='(' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFF') ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + + } + break; + + default : + break loop7; + } + } while (true); + + match('\''); + + } + break; + + } + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_STRING" + + // $ANTLR start "RULE_ML_COMMENT" + public final void mRULE_ML_COMMENT() throws RecognitionException { + try { + int _type = RULE_ML_COMMENT; + int _channel = DEFAULT_TOKEN_CHANNEL; + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:874:17: ( '/*' ( options {greedy=false; } : . )* '*/' ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:874:19: '/*' ( options {greedy=false; } : . )* '*/' + { + match("/*"); + + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:874:24: ( options {greedy=false; } : . )* + loop9: + do { + int alt9=2; + int LA9_0 = input.LA(1); + + if ( (LA9_0=='*') ) { + int LA9_1 = input.LA(2); + + if ( (LA9_1=='/') ) { + alt9=2; + } + else if ( ((LA9_1>='\u0000' && LA9_1<='.')||(LA9_1>='0' && LA9_1<='\uFFFF')) ) { + alt9=1; + } + + + } + else if ( ((LA9_0>='\u0000' && LA9_0<=')')||(LA9_0>='+' && LA9_0<='\uFFFF')) ) { + alt9=1; + } + + + switch (alt9) { + case 1 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:874:52: . + { + matchAny(); + + } + break; + + default : + break loop9; + } + } while (true); + + match("*/"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_ML_COMMENT" + + // $ANTLR start "RULE_SL_COMMENT" + public final void mRULE_SL_COMMENT() throws RecognitionException { + try { + int _type = RULE_SL_COMMENT; + int _channel = DEFAULT_TOKEN_CHANNEL; + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:876:17: ( '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:876:19: '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? + { + match("//"); + + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:876:24: (~ ( ( '\\n' | '\\r' ) ) )* + loop10: + do { + int alt10=2; + int LA10_0 = input.LA(1); + + if ( ((LA10_0>='\u0000' && LA10_0<='\t')||(LA10_0>='\u000B' && LA10_0<='\f')||(LA10_0>='\u000E' && LA10_0<='\uFFFF')) ) { + alt10=1; + } + + + switch (alt10) { + case 1 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:876:24: ~ ( ( '\\n' | '\\r' ) ) + { + if ( (input.LA(1)>='\u0000' && input.LA(1)<='\t')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\uFFFF') ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + + } + break; + + default : + break loop10; + } + } while (true); + + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:876:40: ( ( '\\r' )? '\\n' )? + int alt12=2; + int LA12_0 = input.LA(1); + + if ( (LA12_0=='\n'||LA12_0=='\r') ) { + alt12=1; + } + switch (alt12) { + case 1 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:876:41: ( '\\r' )? '\\n' + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:876:41: ( '\\r' )? + int alt11=2; + int LA11_0 = input.LA(1); + + if ( (LA11_0=='\r') ) { + alt11=1; + } + switch (alt11) { + case 1 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:876:41: '\\r' + { + match('\r'); + + } + break; + + } + + match('\n'); + + } + break; + + } + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_SL_COMMENT" + + // $ANTLR start "RULE_WS" + public final void mRULE_WS() throws RecognitionException { + try { + int _type = RULE_WS; + int _channel = DEFAULT_TOKEN_CHANNEL; + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:878:9: ( ( ' ' | '\\t' | '\\r' | '\\n' )+ ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:878:11: ( ' ' | '\\t' | '\\r' | '\\n' )+ + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:878:11: ( ' ' | '\\t' | '\\r' | '\\n' )+ + int cnt13=0; + loop13: + do { + int alt13=2; + int LA13_0 = input.LA(1); + + if ( ((LA13_0>='\t' && LA13_0<='\n')||LA13_0=='\r'||LA13_0==' ') ) { + alt13=1; + } + + + switch (alt13) { + case 1 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g: + { + if ( (input.LA(1)>='\t' && input.LA(1)<='\n')||input.LA(1)=='\r'||input.LA(1)==' ' ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + + } + break; + + default : + if ( cnt13 >= 1 ) break loop13; + EarlyExitException eee = + new EarlyExitException(13, input); + throw eee; + } + cnt13++; + } while (true); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_WS" + + // $ANTLR start "RULE_ANY_OTHER" + public final void mRULE_ANY_OTHER() throws RecognitionException { + try { + int _type = RULE_ANY_OTHER; + int _channel = DEFAULT_TOKEN_CHANNEL; + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:880:16: ( . ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:880:18: . + { + matchAny(); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_ANY_OTHER" + + public void mTokens() throws RecognitionException { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:1:8: ( T__12 | T__13 | T__14 | T__15 | T__16 | T__17 | T__18 | T__19 | T__20 | RULE_DOUBLE | RULE_ID | RULE_INT | RULE_STRING | RULE_ML_COMMENT | RULE_SL_COMMENT | RULE_WS | RULE_ANY_OTHER ) + int alt14=17; + alt14 = dfa14.predict(input); + switch (alt14) { + case 1 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:1:10: T__12 + { + mT__12(); + + } + break; + case 2 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:1:16: T__13 + { + mT__13(); + + } + break; + case 3 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:1:22: T__14 + { + mT__14(); + + } + break; + case 4 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:1:28: T__15 + { + mT__15(); + + } + break; + case 5 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:1:34: T__16 + { + mT__16(); + + } + break; + case 6 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:1:40: T__17 + { + mT__17(); + + } + break; + case 7 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:1:46: T__18 + { + mT__18(); + + } + break; + case 8 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:1:52: T__19 + { + mT__19(); + + } + break; + case 9 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:1:58: T__20 + { + mT__20(); + + } + break; + case 10 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:1:64: RULE_DOUBLE + { + mRULE_DOUBLE(); + + } + break; + case 11 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:1:76: RULE_ID + { + mRULE_ID(); + + } + break; + case 12 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:1:84: RULE_INT + { + mRULE_INT(); + + } + break; + case 13 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:1:93: RULE_STRING + { + mRULE_STRING(); + + } + break; + case 14 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:1:105: RULE_ML_COMMENT + { + mRULE_ML_COMMENT(); + + } + break; + case 15 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:1:121: RULE_SL_COMMENT + { + mRULE_SL_COMMENT(); + + } + break; + case 16 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:1:137: RULE_WS + { + mRULE_WS(); + + } + break; + case 17 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:1:145: RULE_ANY_OTHER + { + mRULE_ANY_OTHER(); + + } + break; + + } + + } + + + protected DFA14 dfa14 = new DFA14(this); + static final String DFA14_eotS = + "\1\uffff\2\23\1\uffff\1\23\1\21\4\uffff\1\34\1\21\1\uffff\3\21"+ + "\2\uffff\1\23\1\uffff\1\23\1\uffff\1\23\6\uffff\1\34\5\uffff\3\23"+ + "\1\51\1\23\1\53\1\uffff\1\54\2\uffff"; + static final String DFA14_eofS = + "\55\uffff"; + static final String DFA14_minS = + "\1\0\1\162\1\141\1\uffff\1\165\1\125\4\uffff\1\56\1\101\1\uffff"+ + "\2\0\1\52\2\uffff\1\165\1\uffff\1\154\1\uffff\1\154\6\uffff\1\56"+ + "\5\uffff\1\145\1\163\1\154\1\60\1\145\1\60\1\uffff\1\60\2\uffff"; + static final String DFA14_maxS = + "\1\uffff\1\162\1\141\1\uffff\1\165\1\125\4\uffff\1\71\1\172\1\uffff"+ + "\2\uffff\1\57\2\uffff\1\165\1\uffff\1\154\1\uffff\1\154\6\uffff"+ + "\1\71\5\uffff\1\145\1\163\1\154\1\172\1\145\1\172\1\uffff\1\172"+ + "\2\uffff"; + static final String DFA14_acceptS = + "\3\uffff\1\3\2\uffff\1\6\1\7\1\10\1\11\2\uffff\1\13\3\uffff\1\20"+ + "\1\21\1\uffff\1\13\1\uffff\1\3\1\uffff\1\5\1\6\1\7\1\10\1\11\1\14"+ + "\1\uffff\1\12\1\15\1\16\1\17\1\20\6\uffff\1\1\1\uffff\1\4\1\2"; + static final String DFA14_specialS = + "\1\2\14\uffff\1\1\1\0\36\uffff}>"; + static final String[] DFA14_transitionS = { + "\11\21\2\20\2\21\1\20\22\21\1\20\1\21\1\15\1\10\3\21\1\16\3"+ + "\21\1\6\1\21\1\7\1\21\1\17\12\12\2\21\1\5\1\3\3\21\32\14\3\21"+ + "\1\13\1\14\1\21\5\14\1\2\7\14\1\4\5\14\1\1\6\14\3\21\1\11\uff81"+ + "\21", + "\1\22", + "\1\24", + "", + "\1\26", + "\1\27", + "", + "", + "", + "", + "\1\36\1\uffff\12\35", + "\32\23\4\uffff\1\23\1\uffff\32\23", + "", + "\0\37", + "\0\37", + "\1\40\4\uffff\1\41", + "", + "", + "\1\43", + "", + "\1\44", + "", + "\1\45", + "", + "", + "", + "", + "", + "", + "\1\36\1\uffff\12\35", + "", + "", + "", + "", + "", + "\1\46", + "\1\47", + "\1\50", + "\12\23\7\uffff\32\23\4\uffff\1\23\1\uffff\32\23", + "\1\52", + "\12\23\7\uffff\32\23\4\uffff\1\23\1\uffff\32\23", + "", + "\12\23\7\uffff\32\23\4\uffff\1\23\1\uffff\32\23", + "", + "" + }; + + static final short[] DFA14_eot = DFA.unpackEncodedString(DFA14_eotS); + static final short[] DFA14_eof = DFA.unpackEncodedString(DFA14_eofS); + static final char[] DFA14_min = DFA.unpackEncodedStringToUnsignedChars(DFA14_minS); + static final char[] DFA14_max = DFA.unpackEncodedStringToUnsignedChars(DFA14_maxS); + static final short[] DFA14_accept = DFA.unpackEncodedString(DFA14_acceptS); + static final short[] DFA14_special = DFA.unpackEncodedString(DFA14_specialS); + static final short[][] DFA14_transition; + + static { + int numStates = DFA14_transitionS.length; + DFA14_transition = new short[numStates][]; + for (int i=0; i<numStates; i++) { + DFA14_transition[i] = DFA.unpackEncodedString(DFA14_transitionS[i]); + } + } + + class DFA14 extends DFA { + + public DFA14(BaseRecognizer recognizer) { + this.recognizer = recognizer; + this.decisionNumber = 14; + this.eot = DFA14_eot; + this.eof = DFA14_eof; + this.min = DFA14_min; + this.max = DFA14_max; + this.accept = DFA14_accept; + this.special = DFA14_special; + this.transition = DFA14_transition; + } + public String getDescription() { + return "1:1: Tokens : ( T__12 | T__13 | T__14 | T__15 | T__16 | T__17 | T__18 | T__19 | T__20 | RULE_DOUBLE | RULE_ID | RULE_INT | RULE_STRING | RULE_ML_COMMENT | RULE_SL_COMMENT | RULE_WS | RULE_ANY_OTHER );"; + } + public int specialStateTransition(int s, IntStream _input) throws NoViableAltException { + IntStream input = _input; + int _s = s; + switch ( s ) { + case 0 : + int LA14_14 = input.LA(1); + + s = -1; + if ( ((LA14_14>='\u0000' && LA14_14<='\uFFFF')) ) {s = 31;} + + else s = 17; + + if ( s>=0 ) return s; + break; + case 1 : + int LA14_13 = input.LA(1); + + s = -1; + if ( ((LA14_13>='\u0000' && LA14_13<='\uFFFF')) ) {s = 31;} + + else s = 17; + + if ( s>=0 ) return s; + break; + case 2 : + int LA14_0 = input.LA(1); + + s = -1; + if ( (LA14_0=='t') ) {s = 1;} + + else if ( (LA14_0=='f') ) {s = 2;} + + else if ( (LA14_0=='=') ) {s = 3;} + + else if ( (LA14_0=='n') ) {s = 4;} + + else if ( (LA14_0=='<') ) {s = 5;} + + else if ( (LA14_0=='+') ) {s = 6;} + + else if ( (LA14_0=='-') ) {s = 7;} + + else if ( (LA14_0=='#') ) {s = 8;} + + else if ( (LA14_0=='~') ) {s = 9;} + + else if ( ((LA14_0>='0' && LA14_0<='9')) ) {s = 10;} + + else if ( (LA14_0=='^') ) {s = 11;} + + else if ( ((LA14_0>='A' && LA14_0<='Z')||LA14_0=='_'||(LA14_0>='a' && LA14_0<='e')||(LA14_0>='g' && LA14_0<='m')||(LA14_0>='o' && LA14_0<='s')||(LA14_0>='u' && LA14_0<='z')) ) {s = 12;} + + else if ( (LA14_0=='\"') ) {s = 13;} + + else if ( (LA14_0=='\'') ) {s = 14;} + + else if ( (LA14_0=='/') ) {s = 15;} + + else if ( ((LA14_0>='\t' && LA14_0<='\n')||LA14_0=='\r'||LA14_0==' ') ) {s = 16;} + + else if ( ((LA14_0>='\u0000' && LA14_0<='\b')||(LA14_0>='\u000B' && LA14_0<='\f')||(LA14_0>='\u000E' && LA14_0<='\u001F')||LA14_0=='!'||(LA14_0>='$' && LA14_0<='&')||(LA14_0>='(' && LA14_0<='*')||LA14_0==','||LA14_0=='.'||(LA14_0>=':' && LA14_0<=';')||(LA14_0>='>' && LA14_0<='@')||(LA14_0>='[' && LA14_0<=']')||LA14_0=='`'||(LA14_0>='{' && LA14_0<='}')||(LA14_0>='\u007F' && LA14_0<='\uFFFF')) ) {s = 17;} + + if ( s>=0 ) return s; + break; + } + NoViableAltException nvae = + new NoViableAltException(getDescription(), 14, _s, input); + error(nvae); + throw nvae; + } + } + + +}
\ No newline at end of file diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecificationParser.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecificationParser.java new file mode 100644 index 00000000000..0198b81e511 --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecificationParser.java @@ -0,0 +1,2405 @@ +package org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.contentassist.antlr.internal; + +import java.io.InputStream; +import org.eclipse.xtext.*; +import org.eclipse.xtext.parser.*; +import org.eclipse.xtext.parser.impl.*; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.xtext.parser.antlr.XtextTokenStream; +import org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens; +import org.eclipse.xtext.ui.editor.contentassist.antlr.internal.AbstractInternalContentAssistParser; +import org.eclipse.xtext.ui.editor.contentassist.antlr.internal.DFA; +import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.services.UmlValueSpecificationGrammarAccess; + + + +import org.antlr.runtime.*; +import java.util.Stack; +import java.util.List; +import java.util.ArrayList; + +@SuppressWarnings("all") +public class InternalUmlValueSpecificationParser extends AbstractInternalContentAssistParser { + public static final String[] tokenNames = new String[] { + "<invalid>", "<EOR>", "<DOWN>", "<UP>", "RULE_ID", "RULE_INT", "RULE_DOUBLE", "RULE_STRING", "RULE_ML_COMMENT", "RULE_SL_COMMENT", "RULE_WS", "RULE_ANY_OTHER", "'true'", "'false'", "'='", "'null'", "'<Undefined>'", "'+'", "'-'", "'#'", "'~'" + }; + public static final int T__19=19; + public static final int RULE_ID=4; + public static final int RULE_STRING=7; + public static final int T__16=16; + public static final int T__15=15; + public static final int T__18=18; + public static final int T__17=17; + public static final int T__12=12; + public static final int T__14=14; + public static final int T__13=13; + public static final int RULE_ANY_OTHER=11; + public static final int T__20=20; + public static final int RULE_INT=5; + public static final int RULE_WS=10; + public static final int RULE_SL_COMMENT=9; + public static final int EOF=-1; + public static final int RULE_DOUBLE=6; + public static final int RULE_ML_COMMENT=8; + + // delegates + // delegators + + + public InternalUmlValueSpecificationParser(TokenStream input) { + this(input, new RecognizerSharedState()); + } + public InternalUmlValueSpecificationParser(TokenStream input, RecognizerSharedState state) { + super(input, state); + + } + + + public String[] getTokenNames() { return InternalUmlValueSpecificationParser.tokenNames; } + public String getGrammarFileName() { return "../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g"; } + + + + private UmlValueSpecificationGrammarAccess grammarAccess; + + public void setGrammarAccess(UmlValueSpecificationGrammarAccess grammarAccess) { + this.grammarAccess = grammarAccess; + } + + @Override + protected Grammar getGrammar() { + return grammarAccess.getGrammar(); + } + + @Override + protected String getValueForTokenName(String tokenName) { + return tokenName; + } + + + + + // $ANTLR start "entryRuleAbstractRule" + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:60:1: entryRuleAbstractRule : ruleAbstractRule EOF ; + public final void entryRuleAbstractRule() throws RecognitionException { + try { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:61:1: ( ruleAbstractRule EOF ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:62:1: ruleAbstractRule EOF + { + before(grammarAccess.getAbstractRuleRule()); + pushFollow(FOLLOW_ruleAbstractRule_in_entryRuleAbstractRule61); + ruleAbstractRule(); + + state._fsp--; + + after(grammarAccess.getAbstractRuleRule()); + match(input,EOF,FOLLOW_EOF_in_entryRuleAbstractRule68); + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + } + return ; + } + // $ANTLR end "entryRuleAbstractRule" + + + // $ANTLR start "ruleAbstractRule" + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:69:1: ruleAbstractRule : ( ( rule__AbstractRule__Alternatives ) ) ; + public final void ruleAbstractRule() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:73:2: ( ( ( rule__AbstractRule__Alternatives ) ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:74:1: ( ( rule__AbstractRule__Alternatives ) ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:74:1: ( ( rule__AbstractRule__Alternatives ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:75:1: ( rule__AbstractRule__Alternatives ) + { + before(grammarAccess.getAbstractRuleAccess().getAlternatives()); + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:76:1: ( rule__AbstractRule__Alternatives ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:76:2: rule__AbstractRule__Alternatives + { + pushFollow(FOLLOW_rule__AbstractRule__Alternatives_in_ruleAbstractRule94); + rule__AbstractRule__Alternatives(); + + state._fsp--; + + + } + + after(grammarAccess.getAbstractRuleAccess().getAlternatives()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "ruleAbstractRule" + + + // $ANTLR start "entryRuleLiteralBooleanRule" + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:88:1: entryRuleLiteralBooleanRule : ruleLiteralBooleanRule EOF ; + public final void entryRuleLiteralBooleanRule() throws RecognitionException { + try { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:89:1: ( ruleLiteralBooleanRule EOF ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:90:1: ruleLiteralBooleanRule EOF + { + before(grammarAccess.getLiteralBooleanRuleRule()); + pushFollow(FOLLOW_ruleLiteralBooleanRule_in_entryRuleLiteralBooleanRule121); + ruleLiteralBooleanRule(); + + state._fsp--; + + after(grammarAccess.getLiteralBooleanRuleRule()); + match(input,EOF,FOLLOW_EOF_in_entryRuleLiteralBooleanRule128); + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + } + return ; + } + // $ANTLR end "entryRuleLiteralBooleanRule" + + + // $ANTLR start "ruleLiteralBooleanRule" + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:97:1: ruleLiteralBooleanRule : ( ( rule__LiteralBooleanRule__ValueAssignment ) ) ; + public final void ruleLiteralBooleanRule() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:101:2: ( ( ( rule__LiteralBooleanRule__ValueAssignment ) ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:102:1: ( ( rule__LiteralBooleanRule__ValueAssignment ) ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:102:1: ( ( rule__LiteralBooleanRule__ValueAssignment ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:103:1: ( rule__LiteralBooleanRule__ValueAssignment ) + { + before(grammarAccess.getLiteralBooleanRuleAccess().getValueAssignment()); + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:104:1: ( rule__LiteralBooleanRule__ValueAssignment ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:104:2: rule__LiteralBooleanRule__ValueAssignment + { + pushFollow(FOLLOW_rule__LiteralBooleanRule__ValueAssignment_in_ruleLiteralBooleanRule154); + rule__LiteralBooleanRule__ValueAssignment(); + + state._fsp--; + + + } + + after(grammarAccess.getLiteralBooleanRuleAccess().getValueAssignment()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "ruleLiteralBooleanRule" + + + // $ANTLR start "entryRuleLiteralIntegerOrUnlimitedNaturalRule" + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:116:1: entryRuleLiteralIntegerOrUnlimitedNaturalRule : ruleLiteralIntegerOrUnlimitedNaturalRule EOF ; + public final void entryRuleLiteralIntegerOrUnlimitedNaturalRule() throws RecognitionException { + try { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:117:1: ( ruleLiteralIntegerOrUnlimitedNaturalRule EOF ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:118:1: ruleLiteralIntegerOrUnlimitedNaturalRule EOF + { + before(grammarAccess.getLiteralIntegerOrUnlimitedNaturalRuleRule()); + pushFollow(FOLLOW_ruleLiteralIntegerOrUnlimitedNaturalRule_in_entryRuleLiteralIntegerOrUnlimitedNaturalRule181); + ruleLiteralIntegerOrUnlimitedNaturalRule(); + + state._fsp--; + + after(grammarAccess.getLiteralIntegerOrUnlimitedNaturalRuleRule()); + match(input,EOF,FOLLOW_EOF_in_entryRuleLiteralIntegerOrUnlimitedNaturalRule188); + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + } + return ; + } + // $ANTLR end "entryRuleLiteralIntegerOrUnlimitedNaturalRule" + + + // $ANTLR start "ruleLiteralIntegerOrUnlimitedNaturalRule" + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:125:1: ruleLiteralIntegerOrUnlimitedNaturalRule : ( ( rule__LiteralIntegerOrUnlimitedNaturalRule__ValueAssignment ) ) ; + public final void ruleLiteralIntegerOrUnlimitedNaturalRule() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:129:2: ( ( ( rule__LiteralIntegerOrUnlimitedNaturalRule__ValueAssignment ) ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:130:1: ( ( rule__LiteralIntegerOrUnlimitedNaturalRule__ValueAssignment ) ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:130:1: ( ( rule__LiteralIntegerOrUnlimitedNaturalRule__ValueAssignment ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:131:1: ( rule__LiteralIntegerOrUnlimitedNaturalRule__ValueAssignment ) + { + before(grammarAccess.getLiteralIntegerOrUnlimitedNaturalRuleAccess().getValueAssignment()); + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:132:1: ( rule__LiteralIntegerOrUnlimitedNaturalRule__ValueAssignment ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:132:2: rule__LiteralIntegerOrUnlimitedNaturalRule__ValueAssignment + { + pushFollow(FOLLOW_rule__LiteralIntegerOrUnlimitedNaturalRule__ValueAssignment_in_ruleLiteralIntegerOrUnlimitedNaturalRule214); + rule__LiteralIntegerOrUnlimitedNaturalRule__ValueAssignment(); + + state._fsp--; + + + } + + after(grammarAccess.getLiteralIntegerOrUnlimitedNaturalRuleAccess().getValueAssignment()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "ruleLiteralIntegerOrUnlimitedNaturalRule" + + + // $ANTLR start "entryRuleLiteralRealRule" + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:144:1: entryRuleLiteralRealRule : ruleLiteralRealRule EOF ; + public final void entryRuleLiteralRealRule() throws RecognitionException { + try { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:145:1: ( ruleLiteralRealRule EOF ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:146:1: ruleLiteralRealRule EOF + { + before(grammarAccess.getLiteralRealRuleRule()); + pushFollow(FOLLOW_ruleLiteralRealRule_in_entryRuleLiteralRealRule241); + ruleLiteralRealRule(); + + state._fsp--; + + after(grammarAccess.getLiteralRealRuleRule()); + match(input,EOF,FOLLOW_EOF_in_entryRuleLiteralRealRule248); + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + } + return ; + } + // $ANTLR end "entryRuleLiteralRealRule" + + + // $ANTLR start "ruleLiteralRealRule" + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:153:1: ruleLiteralRealRule : ( ( rule__LiteralRealRule__ValueAssignment ) ) ; + public final void ruleLiteralRealRule() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:157:2: ( ( ( rule__LiteralRealRule__ValueAssignment ) ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:158:1: ( ( rule__LiteralRealRule__ValueAssignment ) ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:158:1: ( ( rule__LiteralRealRule__ValueAssignment ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:159:1: ( rule__LiteralRealRule__ValueAssignment ) + { + before(grammarAccess.getLiteralRealRuleAccess().getValueAssignment()); + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:160:1: ( rule__LiteralRealRule__ValueAssignment ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:160:2: rule__LiteralRealRule__ValueAssignment + { + pushFollow(FOLLOW_rule__LiteralRealRule__ValueAssignment_in_ruleLiteralRealRule274); + rule__LiteralRealRule__ValueAssignment(); + + state._fsp--; + + + } + + after(grammarAccess.getLiteralRealRuleAccess().getValueAssignment()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "ruleLiteralRealRule" + + + // $ANTLR start "entryRuleLiteralNullRule" + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:172:1: entryRuleLiteralNullRule : ruleLiteralNullRule EOF ; + public final void entryRuleLiteralNullRule() throws RecognitionException { + try { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:173:1: ( ruleLiteralNullRule EOF ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:174:1: ruleLiteralNullRule EOF + { + before(grammarAccess.getLiteralNullRuleRule()); + pushFollow(FOLLOW_ruleLiteralNullRule_in_entryRuleLiteralNullRule301); + ruleLiteralNullRule(); + + state._fsp--; + + after(grammarAccess.getLiteralNullRuleRule()); + match(input,EOF,FOLLOW_EOF_in_entryRuleLiteralNullRule308); + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + } + return ; + } + // $ANTLR end "entryRuleLiteralNullRule" + + + // $ANTLR start "ruleLiteralNullRule" + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:181:1: ruleLiteralNullRule : ( ( rule__LiteralNullRule__ValueAssignment ) ) ; + public final void ruleLiteralNullRule() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:185:2: ( ( ( rule__LiteralNullRule__ValueAssignment ) ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:186:1: ( ( rule__LiteralNullRule__ValueAssignment ) ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:186:1: ( ( rule__LiteralNullRule__ValueAssignment ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:187:1: ( rule__LiteralNullRule__ValueAssignment ) + { + before(grammarAccess.getLiteralNullRuleAccess().getValueAssignment()); + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:188:1: ( rule__LiteralNullRule__ValueAssignment ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:188:2: rule__LiteralNullRule__ValueAssignment + { + pushFollow(FOLLOW_rule__LiteralNullRule__ValueAssignment_in_ruleLiteralNullRule334); + rule__LiteralNullRule__ValueAssignment(); + + state._fsp--; + + + } + + after(grammarAccess.getLiteralNullRuleAccess().getValueAssignment()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "ruleLiteralNullRule" + + + // $ANTLR start "entryRuleLiteralStringRule" + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:200:1: entryRuleLiteralStringRule : ruleLiteralStringRule EOF ; + public final void entryRuleLiteralStringRule() throws RecognitionException { + try { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:201:1: ( ruleLiteralStringRule EOF ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:202:1: ruleLiteralStringRule EOF + { + before(grammarAccess.getLiteralStringRuleRule()); + pushFollow(FOLLOW_ruleLiteralStringRule_in_entryRuleLiteralStringRule361); + ruleLiteralStringRule(); + + state._fsp--; + + after(grammarAccess.getLiteralStringRuleRule()); + match(input,EOF,FOLLOW_EOF_in_entryRuleLiteralStringRule368); + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + } + return ; + } + // $ANTLR end "entryRuleLiteralStringRule" + + + // $ANTLR start "ruleLiteralStringRule" + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:209:1: ruleLiteralStringRule : ( ( rule__LiteralStringRule__ValueAssignment ) ) ; + public final void ruleLiteralStringRule() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:213:2: ( ( ( rule__LiteralStringRule__ValueAssignment ) ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:214:1: ( ( rule__LiteralStringRule__ValueAssignment ) ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:214:1: ( ( rule__LiteralStringRule__ValueAssignment ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:215:1: ( rule__LiteralStringRule__ValueAssignment ) + { + before(grammarAccess.getLiteralStringRuleAccess().getValueAssignment()); + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:216:1: ( rule__LiteralStringRule__ValueAssignment ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:216:2: rule__LiteralStringRule__ValueAssignment + { + pushFollow(FOLLOW_rule__LiteralStringRule__ValueAssignment_in_ruleLiteralStringRule394); + rule__LiteralStringRule__ValueAssignment(); + + state._fsp--; + + + } + + after(grammarAccess.getLiteralStringRuleAccess().getValueAssignment()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "ruleLiteralStringRule" + + + // $ANTLR start "entryRuleUndefinedRule" + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:228:1: entryRuleUndefinedRule : ruleUndefinedRule EOF ; + public final void entryRuleUndefinedRule() throws RecognitionException { + try { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:229:1: ( ruleUndefinedRule EOF ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:230:1: ruleUndefinedRule EOF + { + before(grammarAccess.getUndefinedRuleRule()); + pushFollow(FOLLOW_ruleUndefinedRule_in_entryRuleUndefinedRule421); + ruleUndefinedRule(); + + state._fsp--; + + after(grammarAccess.getUndefinedRuleRule()); + match(input,EOF,FOLLOW_EOF_in_entryRuleUndefinedRule428); + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + } + return ; + } + // $ANTLR end "entryRuleUndefinedRule" + + + // $ANTLR start "ruleUndefinedRule" + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:237:1: ruleUndefinedRule : ( ( rule__UndefinedRule__ValueAssignment ) ) ; + public final void ruleUndefinedRule() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:241:2: ( ( ( rule__UndefinedRule__ValueAssignment ) ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:242:1: ( ( rule__UndefinedRule__ValueAssignment ) ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:242:1: ( ( rule__UndefinedRule__ValueAssignment ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:243:1: ( rule__UndefinedRule__ValueAssignment ) + { + before(grammarAccess.getUndefinedRuleAccess().getValueAssignment()); + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:244:1: ( rule__UndefinedRule__ValueAssignment ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:244:2: rule__UndefinedRule__ValueAssignment + { + pushFollow(FOLLOW_rule__UndefinedRule__ValueAssignment_in_ruleUndefinedRule454); + rule__UndefinedRule__ValueAssignment(); + + state._fsp--; + + + } + + after(grammarAccess.getUndefinedRuleAccess().getValueAssignment()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "ruleUndefinedRule" + + + // $ANTLR start "entryRuleVisibilityKind" + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:256:1: entryRuleVisibilityKind : ruleVisibilityKind EOF ; + public final void entryRuleVisibilityKind() throws RecognitionException { + try { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:257:1: ( ruleVisibilityKind EOF ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:258:1: ruleVisibilityKind EOF + { + before(grammarAccess.getVisibilityKindRule()); + pushFollow(FOLLOW_ruleVisibilityKind_in_entryRuleVisibilityKind481); + ruleVisibilityKind(); + + state._fsp--; + + after(grammarAccess.getVisibilityKindRule()); + match(input,EOF,FOLLOW_EOF_in_entryRuleVisibilityKind488); + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + } + return ; + } + // $ANTLR end "entryRuleVisibilityKind" + + + // $ANTLR start "ruleVisibilityKind" + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:265:1: ruleVisibilityKind : ( ( rule__VisibilityKind__Alternatives ) ) ; + public final void ruleVisibilityKind() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:269:2: ( ( ( rule__VisibilityKind__Alternatives ) ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:270:1: ( ( rule__VisibilityKind__Alternatives ) ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:270:1: ( ( rule__VisibilityKind__Alternatives ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:271:1: ( rule__VisibilityKind__Alternatives ) + { + before(grammarAccess.getVisibilityKindAccess().getAlternatives()); + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:272:1: ( rule__VisibilityKind__Alternatives ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:272:2: rule__VisibilityKind__Alternatives + { + pushFollow(FOLLOW_rule__VisibilityKind__Alternatives_in_ruleVisibilityKind514); + rule__VisibilityKind__Alternatives(); + + state._fsp--; + + + } + + after(grammarAccess.getVisibilityKindAccess().getAlternatives()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "ruleVisibilityKind" + + + // $ANTLR start "rule__AbstractRule__Alternatives" + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:284:1: rule__AbstractRule__Alternatives : ( ( ( rule__AbstractRule__Group_0__0 ) ) | ( ( rule__AbstractRule__UndefinedAssignment_1 ) ) ); + public final void rule__AbstractRule__Alternatives() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:288:1: ( ( ( rule__AbstractRule__Group_0__0 ) ) | ( ( rule__AbstractRule__UndefinedAssignment_1 ) ) ) + int alt1=2; + int LA1_0 = input.LA(1); + + if ( ((LA1_0>=RULE_ID && LA1_0<=RULE_STRING)||(LA1_0>=12 && LA1_0<=13)||LA1_0==15||(LA1_0>=17 && LA1_0<=20)) ) { + alt1=1; + } + else if ( (LA1_0==16) ) { + alt1=2; + } + else { + NoViableAltException nvae = + new NoViableAltException("", 1, 0, input); + + throw nvae; + } + switch (alt1) { + case 1 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:289:1: ( ( rule__AbstractRule__Group_0__0 ) ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:289:1: ( ( rule__AbstractRule__Group_0__0 ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:290:1: ( rule__AbstractRule__Group_0__0 ) + { + before(grammarAccess.getAbstractRuleAccess().getGroup_0()); + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:291:1: ( rule__AbstractRule__Group_0__0 ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:291:2: rule__AbstractRule__Group_0__0 + { + pushFollow(FOLLOW_rule__AbstractRule__Group_0__0_in_rule__AbstractRule__Alternatives550); + rule__AbstractRule__Group_0__0(); + + state._fsp--; + + + } + + after(grammarAccess.getAbstractRuleAccess().getGroup_0()); + + } + + + } + break; + case 2 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:295:6: ( ( rule__AbstractRule__UndefinedAssignment_1 ) ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:295:6: ( ( rule__AbstractRule__UndefinedAssignment_1 ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:296:1: ( rule__AbstractRule__UndefinedAssignment_1 ) + { + before(grammarAccess.getAbstractRuleAccess().getUndefinedAssignment_1()); + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:297:1: ( rule__AbstractRule__UndefinedAssignment_1 ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:297:2: rule__AbstractRule__UndefinedAssignment_1 + { + pushFollow(FOLLOW_rule__AbstractRule__UndefinedAssignment_1_in_rule__AbstractRule__Alternatives568); + rule__AbstractRule__UndefinedAssignment_1(); + + state._fsp--; + + + } + + after(grammarAccess.getAbstractRuleAccess().getUndefinedAssignment_1()); + + } + + + } + break; + + } + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__AbstractRule__Alternatives" + + + // $ANTLR start "rule__AbstractRule__Alternatives_0_2" + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:306:1: rule__AbstractRule__Alternatives_0_2 : ( ( ( rule__AbstractRule__ValueAssignment_0_2_0 ) ) | ( ( rule__AbstractRule__InstanceSpecificationAssignment_0_2_1 ) ) ); + public final void rule__AbstractRule__Alternatives_0_2() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:310:1: ( ( ( rule__AbstractRule__ValueAssignment_0_2_0 ) ) | ( ( rule__AbstractRule__InstanceSpecificationAssignment_0_2_1 ) ) ) + int alt2=2; + int LA2_0 = input.LA(1); + + if ( ((LA2_0>=RULE_INT && LA2_0<=RULE_STRING)||(LA2_0>=12 && LA2_0<=13)||LA2_0==15) ) { + alt2=1; + } + else if ( (LA2_0==RULE_ID) ) { + alt2=2; + } + else { + NoViableAltException nvae = + new NoViableAltException("", 2, 0, input); + + throw nvae; + } + switch (alt2) { + case 1 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:311:1: ( ( rule__AbstractRule__ValueAssignment_0_2_0 ) ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:311:1: ( ( rule__AbstractRule__ValueAssignment_0_2_0 ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:312:1: ( rule__AbstractRule__ValueAssignment_0_2_0 ) + { + before(grammarAccess.getAbstractRuleAccess().getValueAssignment_0_2_0()); + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:313:1: ( rule__AbstractRule__ValueAssignment_0_2_0 ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:313:2: rule__AbstractRule__ValueAssignment_0_2_0 + { + pushFollow(FOLLOW_rule__AbstractRule__ValueAssignment_0_2_0_in_rule__AbstractRule__Alternatives_0_2601); + rule__AbstractRule__ValueAssignment_0_2_0(); + + state._fsp--; + + + } + + after(grammarAccess.getAbstractRuleAccess().getValueAssignment_0_2_0()); + + } + + + } + break; + case 2 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:317:6: ( ( rule__AbstractRule__InstanceSpecificationAssignment_0_2_1 ) ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:317:6: ( ( rule__AbstractRule__InstanceSpecificationAssignment_0_2_1 ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:318:1: ( rule__AbstractRule__InstanceSpecificationAssignment_0_2_1 ) + { + before(grammarAccess.getAbstractRuleAccess().getInstanceSpecificationAssignment_0_2_1()); + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:319:1: ( rule__AbstractRule__InstanceSpecificationAssignment_0_2_1 ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:319:2: rule__AbstractRule__InstanceSpecificationAssignment_0_2_1 + { + pushFollow(FOLLOW_rule__AbstractRule__InstanceSpecificationAssignment_0_2_1_in_rule__AbstractRule__Alternatives_0_2619); + rule__AbstractRule__InstanceSpecificationAssignment_0_2_1(); + + state._fsp--; + + + } + + after(grammarAccess.getAbstractRuleAccess().getInstanceSpecificationAssignment_0_2_1()); + + } + + + } + break; + + } + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__AbstractRule__Alternatives_0_2" + + + // $ANTLR start "rule__AbstractRule__ValueAlternatives_0_2_0_0" + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:328:1: rule__AbstractRule__ValueAlternatives_0_2_0_0 : ( ( ruleLiteralBooleanRule ) | ( ruleLiteralIntegerOrUnlimitedNaturalRule ) | ( ruleLiteralRealRule ) | ( ruleLiteralNullRule ) | ( ruleLiteralStringRule ) ); + public final void rule__AbstractRule__ValueAlternatives_0_2_0_0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:332:1: ( ( ruleLiteralBooleanRule ) | ( ruleLiteralIntegerOrUnlimitedNaturalRule ) | ( ruleLiteralRealRule ) | ( ruleLiteralNullRule ) | ( ruleLiteralStringRule ) ) + int alt3=5; + switch ( input.LA(1) ) { + case 12: + case 13: + { + alt3=1; + } + break; + case RULE_INT: + { + alt3=2; + } + break; + case RULE_DOUBLE: + { + alt3=3; + } + break; + case 15: + { + alt3=4; + } + break; + case RULE_STRING: + { + alt3=5; + } + break; + default: + NoViableAltException nvae = + new NoViableAltException("", 3, 0, input); + + throw nvae; + } + + switch (alt3) { + case 1 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:333:1: ( ruleLiteralBooleanRule ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:333:1: ( ruleLiteralBooleanRule ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:334:1: ruleLiteralBooleanRule + { + before(grammarAccess.getAbstractRuleAccess().getValueLiteralBooleanRuleParserRuleCall_0_2_0_0_0()); + pushFollow(FOLLOW_ruleLiteralBooleanRule_in_rule__AbstractRule__ValueAlternatives_0_2_0_0652); + ruleLiteralBooleanRule(); + + state._fsp--; + + after(grammarAccess.getAbstractRuleAccess().getValueLiteralBooleanRuleParserRuleCall_0_2_0_0_0()); + + } + + + } + break; + case 2 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:339:6: ( ruleLiteralIntegerOrUnlimitedNaturalRule ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:339:6: ( ruleLiteralIntegerOrUnlimitedNaturalRule ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:340:1: ruleLiteralIntegerOrUnlimitedNaturalRule + { + before(grammarAccess.getAbstractRuleAccess().getValueLiteralIntegerOrUnlimitedNaturalRuleParserRuleCall_0_2_0_0_1()); + pushFollow(FOLLOW_ruleLiteralIntegerOrUnlimitedNaturalRule_in_rule__AbstractRule__ValueAlternatives_0_2_0_0669); + ruleLiteralIntegerOrUnlimitedNaturalRule(); + + state._fsp--; + + after(grammarAccess.getAbstractRuleAccess().getValueLiteralIntegerOrUnlimitedNaturalRuleParserRuleCall_0_2_0_0_1()); + + } + + + } + break; + case 3 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:345:6: ( ruleLiteralRealRule ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:345:6: ( ruleLiteralRealRule ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:346:1: ruleLiteralRealRule + { + before(grammarAccess.getAbstractRuleAccess().getValueLiteralRealRuleParserRuleCall_0_2_0_0_2()); + pushFollow(FOLLOW_ruleLiteralRealRule_in_rule__AbstractRule__ValueAlternatives_0_2_0_0686); + ruleLiteralRealRule(); + + state._fsp--; + + after(grammarAccess.getAbstractRuleAccess().getValueLiteralRealRuleParserRuleCall_0_2_0_0_2()); + + } + + + } + break; + case 4 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:351:6: ( ruleLiteralNullRule ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:351:6: ( ruleLiteralNullRule ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:352:1: ruleLiteralNullRule + { + before(grammarAccess.getAbstractRuleAccess().getValueLiteralNullRuleParserRuleCall_0_2_0_0_3()); + pushFollow(FOLLOW_ruleLiteralNullRule_in_rule__AbstractRule__ValueAlternatives_0_2_0_0703); + ruleLiteralNullRule(); + + state._fsp--; + + after(grammarAccess.getAbstractRuleAccess().getValueLiteralNullRuleParserRuleCall_0_2_0_0_3()); + + } + + + } + break; + case 5 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:357:6: ( ruleLiteralStringRule ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:357:6: ( ruleLiteralStringRule ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:358:1: ruleLiteralStringRule + { + before(grammarAccess.getAbstractRuleAccess().getValueLiteralStringRuleParserRuleCall_0_2_0_0_4()); + pushFollow(FOLLOW_ruleLiteralStringRule_in_rule__AbstractRule__ValueAlternatives_0_2_0_0720); + ruleLiteralStringRule(); + + state._fsp--; + + after(grammarAccess.getAbstractRuleAccess().getValueLiteralStringRuleParserRuleCall_0_2_0_0_4()); + + } + + + } + break; + + } + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__AbstractRule__ValueAlternatives_0_2_0_0" + + + // $ANTLR start "rule__LiteralBooleanRule__ValueAlternatives_0" + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:368:1: rule__LiteralBooleanRule__ValueAlternatives_0 : ( ( 'true' ) | ( 'false' ) ); + public final void rule__LiteralBooleanRule__ValueAlternatives_0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:372:1: ( ( 'true' ) | ( 'false' ) ) + int alt4=2; + int LA4_0 = input.LA(1); + + if ( (LA4_0==12) ) { + alt4=1; + } + else if ( (LA4_0==13) ) { + alt4=2; + } + else { + NoViableAltException nvae = + new NoViableAltException("", 4, 0, input); + + throw nvae; + } + switch (alt4) { + case 1 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:373:1: ( 'true' ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:373:1: ( 'true' ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:374:1: 'true' + { + before(grammarAccess.getLiteralBooleanRuleAccess().getValueTrueKeyword_0_0()); + match(input,12,FOLLOW_12_in_rule__LiteralBooleanRule__ValueAlternatives_0753); + after(grammarAccess.getLiteralBooleanRuleAccess().getValueTrueKeyword_0_0()); + + } + + + } + break; + case 2 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:381:6: ( 'false' ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:381:6: ( 'false' ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:382:1: 'false' + { + before(grammarAccess.getLiteralBooleanRuleAccess().getValueFalseKeyword_0_1()); + match(input,13,FOLLOW_13_in_rule__LiteralBooleanRule__ValueAlternatives_0773); + after(grammarAccess.getLiteralBooleanRuleAccess().getValueFalseKeyword_0_1()); + + } + + + } + break; + + } + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__LiteralBooleanRule__ValueAlternatives_0" + + + // $ANTLR start "rule__VisibilityKind__Alternatives" + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:394:1: rule__VisibilityKind__Alternatives : ( ( ( rule__VisibilityKind__PublicAssignment_0 ) ) | ( ( rule__VisibilityKind__PrivateAssignment_1 ) ) | ( ( rule__VisibilityKind__ProtectedAssignment_2 ) ) | ( ( rule__VisibilityKind__PackageAssignment_3 ) ) ); + public final void rule__VisibilityKind__Alternatives() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:398:1: ( ( ( rule__VisibilityKind__PublicAssignment_0 ) ) | ( ( rule__VisibilityKind__PrivateAssignment_1 ) ) | ( ( rule__VisibilityKind__ProtectedAssignment_2 ) ) | ( ( rule__VisibilityKind__PackageAssignment_3 ) ) ) + int alt5=4; + switch ( input.LA(1) ) { + case 17: + { + alt5=1; + } + break; + case 18: + { + alt5=2; + } + break; + case 19: + { + alt5=3; + } + break; + case 20: + { + alt5=4; + } + break; + default: + NoViableAltException nvae = + new NoViableAltException("", 5, 0, input); + + throw nvae; + } + + switch (alt5) { + case 1 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:399:1: ( ( rule__VisibilityKind__PublicAssignment_0 ) ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:399:1: ( ( rule__VisibilityKind__PublicAssignment_0 ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:400:1: ( rule__VisibilityKind__PublicAssignment_0 ) + { + before(grammarAccess.getVisibilityKindAccess().getPublicAssignment_0()); + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:401:1: ( rule__VisibilityKind__PublicAssignment_0 ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:401:2: rule__VisibilityKind__PublicAssignment_0 + { + pushFollow(FOLLOW_rule__VisibilityKind__PublicAssignment_0_in_rule__VisibilityKind__Alternatives807); + rule__VisibilityKind__PublicAssignment_0(); + + state._fsp--; + + + } + + after(grammarAccess.getVisibilityKindAccess().getPublicAssignment_0()); + + } + + + } + break; + case 2 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:405:6: ( ( rule__VisibilityKind__PrivateAssignment_1 ) ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:405:6: ( ( rule__VisibilityKind__PrivateAssignment_1 ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:406:1: ( rule__VisibilityKind__PrivateAssignment_1 ) + { + before(grammarAccess.getVisibilityKindAccess().getPrivateAssignment_1()); + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:407:1: ( rule__VisibilityKind__PrivateAssignment_1 ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:407:2: rule__VisibilityKind__PrivateAssignment_1 + { + pushFollow(FOLLOW_rule__VisibilityKind__PrivateAssignment_1_in_rule__VisibilityKind__Alternatives825); + rule__VisibilityKind__PrivateAssignment_1(); + + state._fsp--; + + + } + + after(grammarAccess.getVisibilityKindAccess().getPrivateAssignment_1()); + + } + + + } + break; + case 3 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:411:6: ( ( rule__VisibilityKind__ProtectedAssignment_2 ) ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:411:6: ( ( rule__VisibilityKind__ProtectedAssignment_2 ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:412:1: ( rule__VisibilityKind__ProtectedAssignment_2 ) + { + before(grammarAccess.getVisibilityKindAccess().getProtectedAssignment_2()); + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:413:1: ( rule__VisibilityKind__ProtectedAssignment_2 ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:413:2: rule__VisibilityKind__ProtectedAssignment_2 + { + pushFollow(FOLLOW_rule__VisibilityKind__ProtectedAssignment_2_in_rule__VisibilityKind__Alternatives843); + rule__VisibilityKind__ProtectedAssignment_2(); + + state._fsp--; + + + } + + after(grammarAccess.getVisibilityKindAccess().getProtectedAssignment_2()); + + } + + + } + break; + case 4 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:417:6: ( ( rule__VisibilityKind__PackageAssignment_3 ) ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:417:6: ( ( rule__VisibilityKind__PackageAssignment_3 ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:418:1: ( rule__VisibilityKind__PackageAssignment_3 ) + { + before(grammarAccess.getVisibilityKindAccess().getPackageAssignment_3()); + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:419:1: ( rule__VisibilityKind__PackageAssignment_3 ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:419:2: rule__VisibilityKind__PackageAssignment_3 + { + pushFollow(FOLLOW_rule__VisibilityKind__PackageAssignment_3_in_rule__VisibilityKind__Alternatives861); + rule__VisibilityKind__PackageAssignment_3(); + + state._fsp--; + + + } + + after(grammarAccess.getVisibilityKindAccess().getPackageAssignment_3()); + + } + + + } + break; + + } + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__VisibilityKind__Alternatives" + + + // $ANTLR start "rule__AbstractRule__Group_0__0" + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:430:1: rule__AbstractRule__Group_0__0 : rule__AbstractRule__Group_0__0__Impl rule__AbstractRule__Group_0__1 ; + public final void rule__AbstractRule__Group_0__0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:434:1: ( rule__AbstractRule__Group_0__0__Impl rule__AbstractRule__Group_0__1 ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:435:2: rule__AbstractRule__Group_0__0__Impl rule__AbstractRule__Group_0__1 + { + pushFollow(FOLLOW_rule__AbstractRule__Group_0__0__Impl_in_rule__AbstractRule__Group_0__0892); + rule__AbstractRule__Group_0__0__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_rule__AbstractRule__Group_0__1_in_rule__AbstractRule__Group_0__0895); + rule__AbstractRule__Group_0__1(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__AbstractRule__Group_0__0" + + + // $ANTLR start "rule__AbstractRule__Group_0__0__Impl" + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:442:1: rule__AbstractRule__Group_0__0__Impl : ( ( rule__AbstractRule__VisibilityAssignment_0_0 )? ) ; + public final void rule__AbstractRule__Group_0__0__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:446:1: ( ( ( rule__AbstractRule__VisibilityAssignment_0_0 )? ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:447:1: ( ( rule__AbstractRule__VisibilityAssignment_0_0 )? ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:447:1: ( ( rule__AbstractRule__VisibilityAssignment_0_0 )? ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:448:1: ( rule__AbstractRule__VisibilityAssignment_0_0 )? + { + before(grammarAccess.getAbstractRuleAccess().getVisibilityAssignment_0_0()); + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:449:1: ( rule__AbstractRule__VisibilityAssignment_0_0 )? + int alt6=2; + int LA6_0 = input.LA(1); + + if ( ((LA6_0>=17 && LA6_0<=20)) ) { + alt6=1; + } + switch (alt6) { + case 1 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:449:2: rule__AbstractRule__VisibilityAssignment_0_0 + { + pushFollow(FOLLOW_rule__AbstractRule__VisibilityAssignment_0_0_in_rule__AbstractRule__Group_0__0__Impl922); + rule__AbstractRule__VisibilityAssignment_0_0(); + + state._fsp--; + + + } + break; + + } + + after(grammarAccess.getAbstractRuleAccess().getVisibilityAssignment_0_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__AbstractRule__Group_0__0__Impl" + + + // $ANTLR start "rule__AbstractRule__Group_0__1" + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:459:1: rule__AbstractRule__Group_0__1 : rule__AbstractRule__Group_0__1__Impl rule__AbstractRule__Group_0__2 ; + public final void rule__AbstractRule__Group_0__1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:463:1: ( rule__AbstractRule__Group_0__1__Impl rule__AbstractRule__Group_0__2 ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:464:2: rule__AbstractRule__Group_0__1__Impl rule__AbstractRule__Group_0__2 + { + pushFollow(FOLLOW_rule__AbstractRule__Group_0__1__Impl_in_rule__AbstractRule__Group_0__1953); + rule__AbstractRule__Group_0__1__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_rule__AbstractRule__Group_0__2_in_rule__AbstractRule__Group_0__1956); + rule__AbstractRule__Group_0__2(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__AbstractRule__Group_0__1" + + + // $ANTLR start "rule__AbstractRule__Group_0__1__Impl" + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:471:1: rule__AbstractRule__Group_0__1__Impl : ( ( rule__AbstractRule__Group_0_1__0 )? ) ; + public final void rule__AbstractRule__Group_0__1__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:475:1: ( ( ( rule__AbstractRule__Group_0_1__0 )? ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:476:1: ( ( rule__AbstractRule__Group_0_1__0 )? ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:476:1: ( ( rule__AbstractRule__Group_0_1__0 )? ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:477:1: ( rule__AbstractRule__Group_0_1__0 )? + { + before(grammarAccess.getAbstractRuleAccess().getGroup_0_1()); + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:478:1: ( rule__AbstractRule__Group_0_1__0 )? + int alt7=2; + int LA7_0 = input.LA(1); + + if ( (LA7_0==RULE_ID) ) { + int LA7_1 = input.LA(2); + + if ( (LA7_1==14) ) { + alt7=1; + } + } + switch (alt7) { + case 1 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:478:2: rule__AbstractRule__Group_0_1__0 + { + pushFollow(FOLLOW_rule__AbstractRule__Group_0_1__0_in_rule__AbstractRule__Group_0__1__Impl983); + rule__AbstractRule__Group_0_1__0(); + + state._fsp--; + + + } + break; + + } + + after(grammarAccess.getAbstractRuleAccess().getGroup_0_1()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__AbstractRule__Group_0__1__Impl" + + + // $ANTLR start "rule__AbstractRule__Group_0__2" + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:488:1: rule__AbstractRule__Group_0__2 : rule__AbstractRule__Group_0__2__Impl ; + public final void rule__AbstractRule__Group_0__2() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:492:1: ( rule__AbstractRule__Group_0__2__Impl ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:493:2: rule__AbstractRule__Group_0__2__Impl + { + pushFollow(FOLLOW_rule__AbstractRule__Group_0__2__Impl_in_rule__AbstractRule__Group_0__21014); + rule__AbstractRule__Group_0__2__Impl(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__AbstractRule__Group_0__2" + + + // $ANTLR start "rule__AbstractRule__Group_0__2__Impl" + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:499:1: rule__AbstractRule__Group_0__2__Impl : ( ( rule__AbstractRule__Alternatives_0_2 ) ) ; + public final void rule__AbstractRule__Group_0__2__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:503:1: ( ( ( rule__AbstractRule__Alternatives_0_2 ) ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:504:1: ( ( rule__AbstractRule__Alternatives_0_2 ) ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:504:1: ( ( rule__AbstractRule__Alternatives_0_2 ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:505:1: ( rule__AbstractRule__Alternatives_0_2 ) + { + before(grammarAccess.getAbstractRuleAccess().getAlternatives_0_2()); + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:506:1: ( rule__AbstractRule__Alternatives_0_2 ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:506:2: rule__AbstractRule__Alternatives_0_2 + { + pushFollow(FOLLOW_rule__AbstractRule__Alternatives_0_2_in_rule__AbstractRule__Group_0__2__Impl1041); + rule__AbstractRule__Alternatives_0_2(); + + state._fsp--; + + + } + + after(grammarAccess.getAbstractRuleAccess().getAlternatives_0_2()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__AbstractRule__Group_0__2__Impl" + + + // $ANTLR start "rule__AbstractRule__Group_0_1__0" + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:522:1: rule__AbstractRule__Group_0_1__0 : rule__AbstractRule__Group_0_1__0__Impl rule__AbstractRule__Group_0_1__1 ; + public final void rule__AbstractRule__Group_0_1__0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:526:1: ( rule__AbstractRule__Group_0_1__0__Impl rule__AbstractRule__Group_0_1__1 ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:527:2: rule__AbstractRule__Group_0_1__0__Impl rule__AbstractRule__Group_0_1__1 + { + pushFollow(FOLLOW_rule__AbstractRule__Group_0_1__0__Impl_in_rule__AbstractRule__Group_0_1__01077); + rule__AbstractRule__Group_0_1__0__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_rule__AbstractRule__Group_0_1__1_in_rule__AbstractRule__Group_0_1__01080); + rule__AbstractRule__Group_0_1__1(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__AbstractRule__Group_0_1__0" + + + // $ANTLR start "rule__AbstractRule__Group_0_1__0__Impl" + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:534:1: rule__AbstractRule__Group_0_1__0__Impl : ( ( rule__AbstractRule__NameAssignment_0_1_0 ) ) ; + public final void rule__AbstractRule__Group_0_1__0__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:538:1: ( ( ( rule__AbstractRule__NameAssignment_0_1_0 ) ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:539:1: ( ( rule__AbstractRule__NameAssignment_0_1_0 ) ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:539:1: ( ( rule__AbstractRule__NameAssignment_0_1_0 ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:540:1: ( rule__AbstractRule__NameAssignment_0_1_0 ) + { + before(grammarAccess.getAbstractRuleAccess().getNameAssignment_0_1_0()); + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:541:1: ( rule__AbstractRule__NameAssignment_0_1_0 ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:541:2: rule__AbstractRule__NameAssignment_0_1_0 + { + pushFollow(FOLLOW_rule__AbstractRule__NameAssignment_0_1_0_in_rule__AbstractRule__Group_0_1__0__Impl1107); + rule__AbstractRule__NameAssignment_0_1_0(); + + state._fsp--; + + + } + + after(grammarAccess.getAbstractRuleAccess().getNameAssignment_0_1_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__AbstractRule__Group_0_1__0__Impl" + + + // $ANTLR start "rule__AbstractRule__Group_0_1__1" + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:551:1: rule__AbstractRule__Group_0_1__1 : rule__AbstractRule__Group_0_1__1__Impl ; + public final void rule__AbstractRule__Group_0_1__1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:555:1: ( rule__AbstractRule__Group_0_1__1__Impl ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:556:2: rule__AbstractRule__Group_0_1__1__Impl + { + pushFollow(FOLLOW_rule__AbstractRule__Group_0_1__1__Impl_in_rule__AbstractRule__Group_0_1__11137); + rule__AbstractRule__Group_0_1__1__Impl(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__AbstractRule__Group_0_1__1" + + + // $ANTLR start "rule__AbstractRule__Group_0_1__1__Impl" + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:562:1: rule__AbstractRule__Group_0_1__1__Impl : ( '=' ) ; + public final void rule__AbstractRule__Group_0_1__1__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:566:1: ( ( '=' ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:567:1: ( '=' ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:567:1: ( '=' ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:568:1: '=' + { + before(grammarAccess.getAbstractRuleAccess().getEqualsSignKeyword_0_1_1()); + match(input,14,FOLLOW_14_in_rule__AbstractRule__Group_0_1__1__Impl1165); + after(grammarAccess.getAbstractRuleAccess().getEqualsSignKeyword_0_1_1()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__AbstractRule__Group_0_1__1__Impl" + + + // $ANTLR start "rule__AbstractRule__VisibilityAssignment_0_0" + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:586:1: rule__AbstractRule__VisibilityAssignment_0_0 : ( ruleVisibilityKind ) ; + public final void rule__AbstractRule__VisibilityAssignment_0_0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:590:1: ( ( ruleVisibilityKind ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:591:1: ( ruleVisibilityKind ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:591:1: ( ruleVisibilityKind ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:592:1: ruleVisibilityKind + { + before(grammarAccess.getAbstractRuleAccess().getVisibilityVisibilityKindParserRuleCall_0_0_0()); + pushFollow(FOLLOW_ruleVisibilityKind_in_rule__AbstractRule__VisibilityAssignment_0_01205); + ruleVisibilityKind(); + + state._fsp--; + + after(grammarAccess.getAbstractRuleAccess().getVisibilityVisibilityKindParserRuleCall_0_0_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__AbstractRule__VisibilityAssignment_0_0" + + + // $ANTLR start "rule__AbstractRule__NameAssignment_0_1_0" + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:601:1: rule__AbstractRule__NameAssignment_0_1_0 : ( RULE_ID ) ; + public final void rule__AbstractRule__NameAssignment_0_1_0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:605:1: ( ( RULE_ID ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:606:1: ( RULE_ID ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:606:1: ( RULE_ID ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:607:1: RULE_ID + { + before(grammarAccess.getAbstractRuleAccess().getNameIDTerminalRuleCall_0_1_0_0()); + match(input,RULE_ID,FOLLOW_RULE_ID_in_rule__AbstractRule__NameAssignment_0_1_01236); + after(grammarAccess.getAbstractRuleAccess().getNameIDTerminalRuleCall_0_1_0_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__AbstractRule__NameAssignment_0_1_0" + + + // $ANTLR start "rule__AbstractRule__ValueAssignment_0_2_0" + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:616:1: rule__AbstractRule__ValueAssignment_0_2_0 : ( ( rule__AbstractRule__ValueAlternatives_0_2_0_0 ) ) ; + public final void rule__AbstractRule__ValueAssignment_0_2_0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:620:1: ( ( ( rule__AbstractRule__ValueAlternatives_0_2_0_0 ) ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:621:1: ( ( rule__AbstractRule__ValueAlternatives_0_2_0_0 ) ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:621:1: ( ( rule__AbstractRule__ValueAlternatives_0_2_0_0 ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:622:1: ( rule__AbstractRule__ValueAlternatives_0_2_0_0 ) + { + before(grammarAccess.getAbstractRuleAccess().getValueAlternatives_0_2_0_0()); + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:623:1: ( rule__AbstractRule__ValueAlternatives_0_2_0_0 ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:623:2: rule__AbstractRule__ValueAlternatives_0_2_0_0 + { + pushFollow(FOLLOW_rule__AbstractRule__ValueAlternatives_0_2_0_0_in_rule__AbstractRule__ValueAssignment_0_2_01267); + rule__AbstractRule__ValueAlternatives_0_2_0_0(); + + state._fsp--; + + + } + + after(grammarAccess.getAbstractRuleAccess().getValueAlternatives_0_2_0_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__AbstractRule__ValueAssignment_0_2_0" + + + // $ANTLR start "rule__AbstractRule__InstanceSpecificationAssignment_0_2_1" + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:632:1: rule__AbstractRule__InstanceSpecificationAssignment_0_2_1 : ( ( RULE_ID ) ) ; + public final void rule__AbstractRule__InstanceSpecificationAssignment_0_2_1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:636:1: ( ( ( RULE_ID ) ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:637:1: ( ( RULE_ID ) ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:637:1: ( ( RULE_ID ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:638:1: ( RULE_ID ) + { + before(grammarAccess.getAbstractRuleAccess().getInstanceSpecificationInstanceSpecificationCrossReference_0_2_1_0()); + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:639:1: ( RULE_ID ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:640:1: RULE_ID + { + before(grammarAccess.getAbstractRuleAccess().getInstanceSpecificationInstanceSpecificationIDTerminalRuleCall_0_2_1_0_1()); + match(input,RULE_ID,FOLLOW_RULE_ID_in_rule__AbstractRule__InstanceSpecificationAssignment_0_2_11304); + after(grammarAccess.getAbstractRuleAccess().getInstanceSpecificationInstanceSpecificationIDTerminalRuleCall_0_2_1_0_1()); + + } + + after(grammarAccess.getAbstractRuleAccess().getInstanceSpecificationInstanceSpecificationCrossReference_0_2_1_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__AbstractRule__InstanceSpecificationAssignment_0_2_1" + + + // $ANTLR start "rule__AbstractRule__UndefinedAssignment_1" + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:651:1: rule__AbstractRule__UndefinedAssignment_1 : ( ruleUndefinedRule ) ; + public final void rule__AbstractRule__UndefinedAssignment_1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:655:1: ( ( ruleUndefinedRule ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:656:1: ( ruleUndefinedRule ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:656:1: ( ruleUndefinedRule ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:657:1: ruleUndefinedRule + { + before(grammarAccess.getAbstractRuleAccess().getUndefinedUndefinedRuleParserRuleCall_1_0()); + pushFollow(FOLLOW_ruleUndefinedRule_in_rule__AbstractRule__UndefinedAssignment_11339); + ruleUndefinedRule(); + + state._fsp--; + + after(grammarAccess.getAbstractRuleAccess().getUndefinedUndefinedRuleParserRuleCall_1_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__AbstractRule__UndefinedAssignment_1" + + + // $ANTLR start "rule__LiteralBooleanRule__ValueAssignment" + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:666:1: rule__LiteralBooleanRule__ValueAssignment : ( ( rule__LiteralBooleanRule__ValueAlternatives_0 ) ) ; + public final void rule__LiteralBooleanRule__ValueAssignment() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:670:1: ( ( ( rule__LiteralBooleanRule__ValueAlternatives_0 ) ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:671:1: ( ( rule__LiteralBooleanRule__ValueAlternatives_0 ) ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:671:1: ( ( rule__LiteralBooleanRule__ValueAlternatives_0 ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:672:1: ( rule__LiteralBooleanRule__ValueAlternatives_0 ) + { + before(grammarAccess.getLiteralBooleanRuleAccess().getValueAlternatives_0()); + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:673:1: ( rule__LiteralBooleanRule__ValueAlternatives_0 ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:673:2: rule__LiteralBooleanRule__ValueAlternatives_0 + { + pushFollow(FOLLOW_rule__LiteralBooleanRule__ValueAlternatives_0_in_rule__LiteralBooleanRule__ValueAssignment1370); + rule__LiteralBooleanRule__ValueAlternatives_0(); + + state._fsp--; + + + } + + after(grammarAccess.getLiteralBooleanRuleAccess().getValueAlternatives_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__LiteralBooleanRule__ValueAssignment" + + + // $ANTLR start "rule__LiteralIntegerOrUnlimitedNaturalRule__ValueAssignment" + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:682:1: rule__LiteralIntegerOrUnlimitedNaturalRule__ValueAssignment : ( RULE_INT ) ; + public final void rule__LiteralIntegerOrUnlimitedNaturalRule__ValueAssignment() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:686:1: ( ( RULE_INT ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:687:1: ( RULE_INT ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:687:1: ( RULE_INT ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:688:1: RULE_INT + { + before(grammarAccess.getLiteralIntegerOrUnlimitedNaturalRuleAccess().getValueINTTerminalRuleCall_0()); + match(input,RULE_INT,FOLLOW_RULE_INT_in_rule__LiteralIntegerOrUnlimitedNaturalRule__ValueAssignment1403); + after(grammarAccess.getLiteralIntegerOrUnlimitedNaturalRuleAccess().getValueINTTerminalRuleCall_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__LiteralIntegerOrUnlimitedNaturalRule__ValueAssignment" + + + // $ANTLR start "rule__LiteralRealRule__ValueAssignment" + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:697:1: rule__LiteralRealRule__ValueAssignment : ( RULE_DOUBLE ) ; + public final void rule__LiteralRealRule__ValueAssignment() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:701:1: ( ( RULE_DOUBLE ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:702:1: ( RULE_DOUBLE ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:702:1: ( RULE_DOUBLE ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:703:1: RULE_DOUBLE + { + before(grammarAccess.getLiteralRealRuleAccess().getValueDOUBLETerminalRuleCall_0()); + match(input,RULE_DOUBLE,FOLLOW_RULE_DOUBLE_in_rule__LiteralRealRule__ValueAssignment1434); + after(grammarAccess.getLiteralRealRuleAccess().getValueDOUBLETerminalRuleCall_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__LiteralRealRule__ValueAssignment" + + + // $ANTLR start "rule__LiteralNullRule__ValueAssignment" + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:712:1: rule__LiteralNullRule__ValueAssignment : ( ( 'null' ) ) ; + public final void rule__LiteralNullRule__ValueAssignment() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:716:1: ( ( ( 'null' ) ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:717:1: ( ( 'null' ) ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:717:1: ( ( 'null' ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:718:1: ( 'null' ) + { + before(grammarAccess.getLiteralNullRuleAccess().getValueNullKeyword_0()); + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:719:1: ( 'null' ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:720:1: 'null' + { + before(grammarAccess.getLiteralNullRuleAccess().getValueNullKeyword_0()); + match(input,15,FOLLOW_15_in_rule__LiteralNullRule__ValueAssignment1470); + after(grammarAccess.getLiteralNullRuleAccess().getValueNullKeyword_0()); + + } + + after(grammarAccess.getLiteralNullRuleAccess().getValueNullKeyword_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__LiteralNullRule__ValueAssignment" + + + // $ANTLR start "rule__LiteralStringRule__ValueAssignment" + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:735:1: rule__LiteralStringRule__ValueAssignment : ( RULE_STRING ) ; + public final void rule__LiteralStringRule__ValueAssignment() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:739:1: ( ( RULE_STRING ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:740:1: ( RULE_STRING ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:740:1: ( RULE_STRING ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:741:1: RULE_STRING + { + before(grammarAccess.getLiteralStringRuleAccess().getValueSTRINGTerminalRuleCall_0()); + match(input,RULE_STRING,FOLLOW_RULE_STRING_in_rule__LiteralStringRule__ValueAssignment1509); + after(grammarAccess.getLiteralStringRuleAccess().getValueSTRINGTerminalRuleCall_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__LiteralStringRule__ValueAssignment" + + + // $ANTLR start "rule__UndefinedRule__ValueAssignment" + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:750:1: rule__UndefinedRule__ValueAssignment : ( ( '<Undefined>' ) ) ; + public final void rule__UndefinedRule__ValueAssignment() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:754:1: ( ( ( '<Undefined>' ) ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:755:1: ( ( '<Undefined>' ) ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:755:1: ( ( '<Undefined>' ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:756:1: ( '<Undefined>' ) + { + before(grammarAccess.getUndefinedRuleAccess().getValueUndefinedKeyword_0()); + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:757:1: ( '<Undefined>' ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:758:1: '<Undefined>' + { + before(grammarAccess.getUndefinedRuleAccess().getValueUndefinedKeyword_0()); + match(input,16,FOLLOW_16_in_rule__UndefinedRule__ValueAssignment1545); + after(grammarAccess.getUndefinedRuleAccess().getValueUndefinedKeyword_0()); + + } + + after(grammarAccess.getUndefinedRuleAccess().getValueUndefinedKeyword_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__UndefinedRule__ValueAssignment" + + + // $ANTLR start "rule__VisibilityKind__PublicAssignment_0" + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:773:1: rule__VisibilityKind__PublicAssignment_0 : ( ( '+' ) ) ; + public final void rule__VisibilityKind__PublicAssignment_0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:777:1: ( ( ( '+' ) ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:778:1: ( ( '+' ) ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:778:1: ( ( '+' ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:779:1: ( '+' ) + { + before(grammarAccess.getVisibilityKindAccess().getPublicPlusSignKeyword_0_0()); + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:780:1: ( '+' ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:781:1: '+' + { + before(grammarAccess.getVisibilityKindAccess().getPublicPlusSignKeyword_0_0()); + match(input,17,FOLLOW_17_in_rule__VisibilityKind__PublicAssignment_01589); + after(grammarAccess.getVisibilityKindAccess().getPublicPlusSignKeyword_0_0()); + + } + + after(grammarAccess.getVisibilityKindAccess().getPublicPlusSignKeyword_0_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__VisibilityKind__PublicAssignment_0" + + + // $ANTLR start "rule__VisibilityKind__PrivateAssignment_1" + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:796:1: rule__VisibilityKind__PrivateAssignment_1 : ( ( '-' ) ) ; + public final void rule__VisibilityKind__PrivateAssignment_1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:800:1: ( ( ( '-' ) ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:801:1: ( ( '-' ) ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:801:1: ( ( '-' ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:802:1: ( '-' ) + { + before(grammarAccess.getVisibilityKindAccess().getPrivateHyphenMinusKeyword_1_0()); + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:803:1: ( '-' ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:804:1: '-' + { + before(grammarAccess.getVisibilityKindAccess().getPrivateHyphenMinusKeyword_1_0()); + match(input,18,FOLLOW_18_in_rule__VisibilityKind__PrivateAssignment_11633); + after(grammarAccess.getVisibilityKindAccess().getPrivateHyphenMinusKeyword_1_0()); + + } + + after(grammarAccess.getVisibilityKindAccess().getPrivateHyphenMinusKeyword_1_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__VisibilityKind__PrivateAssignment_1" + + + // $ANTLR start "rule__VisibilityKind__ProtectedAssignment_2" + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:819:1: rule__VisibilityKind__ProtectedAssignment_2 : ( ( '#' ) ) ; + public final void rule__VisibilityKind__ProtectedAssignment_2() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:823:1: ( ( ( '#' ) ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:824:1: ( ( '#' ) ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:824:1: ( ( '#' ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:825:1: ( '#' ) + { + before(grammarAccess.getVisibilityKindAccess().getProtectedNumberSignKeyword_2_0()); + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:826:1: ( '#' ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:827:1: '#' + { + before(grammarAccess.getVisibilityKindAccess().getProtectedNumberSignKeyword_2_0()); + match(input,19,FOLLOW_19_in_rule__VisibilityKind__ProtectedAssignment_21677); + after(grammarAccess.getVisibilityKindAccess().getProtectedNumberSignKeyword_2_0()); + + } + + after(grammarAccess.getVisibilityKindAccess().getProtectedNumberSignKeyword_2_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__VisibilityKind__ProtectedAssignment_2" + + + // $ANTLR start "rule__VisibilityKind__PackageAssignment_3" + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:842:1: rule__VisibilityKind__PackageAssignment_3 : ( ( '~' ) ) ; + public final void rule__VisibilityKind__PackageAssignment_3() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:846:1: ( ( ( '~' ) ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:847:1: ( ( '~' ) ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:847:1: ( ( '~' ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:848:1: ( '~' ) + { + before(grammarAccess.getVisibilityKindAccess().getPackageTildeKeyword_3_0()); + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:849:1: ( '~' ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:850:1: '~' + { + before(grammarAccess.getVisibilityKindAccess().getPackageTildeKeyword_3_0()); + match(input,20,FOLLOW_20_in_rule__VisibilityKind__PackageAssignment_31721); + after(grammarAccess.getVisibilityKindAccess().getPackageTildeKeyword_3_0()); + + } + + after(grammarAccess.getVisibilityKindAccess().getPackageTildeKeyword_3_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__VisibilityKind__PackageAssignment_3" + + // Delegated rules + + + + + public static final BitSet FOLLOW_ruleAbstractRule_in_entryRuleAbstractRule61 = new BitSet(new long[]{0x0000000000000000L}); + public static final BitSet FOLLOW_EOF_in_entryRuleAbstractRule68 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_rule__AbstractRule__Alternatives_in_ruleAbstractRule94 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_ruleLiteralBooleanRule_in_entryRuleLiteralBooleanRule121 = new BitSet(new long[]{0x0000000000000000L}); + public static final BitSet FOLLOW_EOF_in_entryRuleLiteralBooleanRule128 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_rule__LiteralBooleanRule__ValueAssignment_in_ruleLiteralBooleanRule154 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_ruleLiteralIntegerOrUnlimitedNaturalRule_in_entryRuleLiteralIntegerOrUnlimitedNaturalRule181 = new BitSet(new long[]{0x0000000000000000L}); + public static final BitSet FOLLOW_EOF_in_entryRuleLiteralIntegerOrUnlimitedNaturalRule188 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_rule__LiteralIntegerOrUnlimitedNaturalRule__ValueAssignment_in_ruleLiteralIntegerOrUnlimitedNaturalRule214 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_ruleLiteralRealRule_in_entryRuleLiteralRealRule241 = new BitSet(new long[]{0x0000000000000000L}); + public static final BitSet FOLLOW_EOF_in_entryRuleLiteralRealRule248 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_rule__LiteralRealRule__ValueAssignment_in_ruleLiteralRealRule274 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_ruleLiteralNullRule_in_entryRuleLiteralNullRule301 = new BitSet(new long[]{0x0000000000000000L}); + public static final BitSet FOLLOW_EOF_in_entryRuleLiteralNullRule308 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_rule__LiteralNullRule__ValueAssignment_in_ruleLiteralNullRule334 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_ruleLiteralStringRule_in_entryRuleLiteralStringRule361 = new BitSet(new long[]{0x0000000000000000L}); + public static final BitSet FOLLOW_EOF_in_entryRuleLiteralStringRule368 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_rule__LiteralStringRule__ValueAssignment_in_ruleLiteralStringRule394 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_ruleUndefinedRule_in_entryRuleUndefinedRule421 = new BitSet(new long[]{0x0000000000000000L}); + public static final BitSet FOLLOW_EOF_in_entryRuleUndefinedRule428 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_rule__UndefinedRule__ValueAssignment_in_ruleUndefinedRule454 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_ruleVisibilityKind_in_entryRuleVisibilityKind481 = new BitSet(new long[]{0x0000000000000000L}); + public static final BitSet FOLLOW_EOF_in_entryRuleVisibilityKind488 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_rule__VisibilityKind__Alternatives_in_ruleVisibilityKind514 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_rule__AbstractRule__Group_0__0_in_rule__AbstractRule__Alternatives550 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_rule__AbstractRule__UndefinedAssignment_1_in_rule__AbstractRule__Alternatives568 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_rule__AbstractRule__ValueAssignment_0_2_0_in_rule__AbstractRule__Alternatives_0_2601 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_rule__AbstractRule__InstanceSpecificationAssignment_0_2_1_in_rule__AbstractRule__Alternatives_0_2619 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_ruleLiteralBooleanRule_in_rule__AbstractRule__ValueAlternatives_0_2_0_0652 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_ruleLiteralIntegerOrUnlimitedNaturalRule_in_rule__AbstractRule__ValueAlternatives_0_2_0_0669 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_ruleLiteralRealRule_in_rule__AbstractRule__ValueAlternatives_0_2_0_0686 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_ruleLiteralNullRule_in_rule__AbstractRule__ValueAlternatives_0_2_0_0703 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_ruleLiteralStringRule_in_rule__AbstractRule__ValueAlternatives_0_2_0_0720 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_12_in_rule__LiteralBooleanRule__ValueAlternatives_0753 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_13_in_rule__LiteralBooleanRule__ValueAlternatives_0773 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_rule__VisibilityKind__PublicAssignment_0_in_rule__VisibilityKind__Alternatives807 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_rule__VisibilityKind__PrivateAssignment_1_in_rule__VisibilityKind__Alternatives825 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_rule__VisibilityKind__ProtectedAssignment_2_in_rule__VisibilityKind__Alternatives843 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_rule__VisibilityKind__PackageAssignment_3_in_rule__VisibilityKind__Alternatives861 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_rule__AbstractRule__Group_0__0__Impl_in_rule__AbstractRule__Group_0__0892 = new BitSet(new long[]{0x000000000000B0F0L}); + public static final BitSet FOLLOW_rule__AbstractRule__Group_0__1_in_rule__AbstractRule__Group_0__0895 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_rule__AbstractRule__VisibilityAssignment_0_0_in_rule__AbstractRule__Group_0__0__Impl922 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_rule__AbstractRule__Group_0__1__Impl_in_rule__AbstractRule__Group_0__1953 = new BitSet(new long[]{0x000000000000B0F0L}); + public static final BitSet FOLLOW_rule__AbstractRule__Group_0__2_in_rule__AbstractRule__Group_0__1956 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_rule__AbstractRule__Group_0_1__0_in_rule__AbstractRule__Group_0__1__Impl983 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_rule__AbstractRule__Group_0__2__Impl_in_rule__AbstractRule__Group_0__21014 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_rule__AbstractRule__Alternatives_0_2_in_rule__AbstractRule__Group_0__2__Impl1041 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_rule__AbstractRule__Group_0_1__0__Impl_in_rule__AbstractRule__Group_0_1__01077 = new BitSet(new long[]{0x0000000000004000L}); + public static final BitSet FOLLOW_rule__AbstractRule__Group_0_1__1_in_rule__AbstractRule__Group_0_1__01080 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_rule__AbstractRule__NameAssignment_0_1_0_in_rule__AbstractRule__Group_0_1__0__Impl1107 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_rule__AbstractRule__Group_0_1__1__Impl_in_rule__AbstractRule__Group_0_1__11137 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_14_in_rule__AbstractRule__Group_0_1__1__Impl1165 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_ruleVisibilityKind_in_rule__AbstractRule__VisibilityAssignment_0_01205 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_RULE_ID_in_rule__AbstractRule__NameAssignment_0_1_01236 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_rule__AbstractRule__ValueAlternatives_0_2_0_0_in_rule__AbstractRule__ValueAssignment_0_2_01267 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_RULE_ID_in_rule__AbstractRule__InstanceSpecificationAssignment_0_2_11304 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_ruleUndefinedRule_in_rule__AbstractRule__UndefinedAssignment_11339 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_rule__LiteralBooleanRule__ValueAlternatives_0_in_rule__LiteralBooleanRule__ValueAssignment1370 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_RULE_INT_in_rule__LiteralIntegerOrUnlimitedNaturalRule__ValueAssignment1403 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_RULE_DOUBLE_in_rule__LiteralRealRule__ValueAssignment1434 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_15_in_rule__LiteralNullRule__ValueAssignment1470 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_RULE_STRING_in_rule__LiteralStringRule__ValueAssignment1509 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_16_in_rule__UndefinedRule__ValueAssignment1545 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_17_in_rule__VisibilityKind__PublicAssignment_01589 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_18_in_rule__VisibilityKind__PrivateAssignment_11633 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_19_in_rule__VisibilityKind__ProtectedAssignment_21677 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_20_in_rule__VisibilityKind__PackageAssignment_31721 = new BitSet(new long[]{0x0000000000000002L}); + +}
\ No newline at end of file diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/internal/UmlValueSpecificationActivator.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/internal/UmlValueSpecificationActivator.java new file mode 100644 index 00000000000..b56d93ec5a8 --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/internal/UmlValueSpecificationActivator.java @@ -0,0 +1,95 @@ +/* + * generated by Xtext + */ +package org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.internal; + +import java.util.Collections; +import java.util.Map; + +import org.apache.log4j.Logger; +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.eclipse.xtext.ui.shared.SharedStateModule; +import org.eclipse.xtext.util.Modules2; +import org.osgi.framework.BundleContext; + +import com.google.common.collect.Maps; +import com.google.inject.Guice; +import com.google.inject.Injector; +import com.google.inject.Module; + +/** + * This class was generated. Customizations should only happen in a newly + * introduced subclass. + */ +public class UmlValueSpecificationActivator extends AbstractUIPlugin { + + public static final String ORG_ECLIPSE_PAPYRUS_UML_TEXTEDIT_VALUESPECIFICATION_XTEXT_UMLVALUESPECIFICATION = "org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification"; + + private static final Logger logger = Logger.getLogger(UmlValueSpecificationActivator.class); + + private static UmlValueSpecificationActivator INSTANCE; + + private Map<String, Injector> injectors = Collections.synchronizedMap(Maps.<String, Injector> newHashMapWithExpectedSize(1)); + + @Override + public void start(BundleContext context) throws Exception { + super.start(context); + INSTANCE = this; + } + + @Override + public void stop(BundleContext context) throws Exception { + injectors.clear(); + INSTANCE = null; + super.stop(context); + } + + public static UmlValueSpecificationActivator getInstance() { + return INSTANCE; + } + + public Injector getInjector(String language) { + synchronized (injectors) { + Injector injector = injectors.get(language); + if (injector == null) { + injectors.put(language, injector = createInjector(language)); + } + return injector; + } + } + + protected Injector createInjector(String language) { + try { + Module runtimeModule = getRuntimeModule(language); + Module sharedStateModule = getSharedStateModule(); + Module uiModule = getUiModule(language); + Module mergedModule = Modules2.mixin(runtimeModule, sharedStateModule, uiModule); + return Guice.createInjector(mergedModule); + } catch (Exception e) { + logger.error("Failed to create injector for " + language); + logger.error(e.getMessage(), e); + throw new RuntimeException("Failed to create injector for " + language, e); + } + } + + protected Module getRuntimeModule(String grammar) { + if (ORG_ECLIPSE_PAPYRUS_UML_TEXTEDIT_VALUESPECIFICATION_XTEXT_UMLVALUESPECIFICATION.equals(grammar)) { + return new org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecificationRuntimeModule(); + } + + throw new IllegalArgumentException(grammar); + } + + protected Module getUiModule(String grammar) { + if (ORG_ECLIPSE_PAPYRUS_UML_TEXTEDIT_VALUESPECIFICATION_XTEXT_UMLVALUESPECIFICATION.equals(grammar)) { + return new org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationUiModule(this); + } + + throw new IllegalArgumentException(grammar); + } + + protected Module getSharedStateModule() { + return new SharedStateModule(); + } + +} diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/UmlValueSpecificationUiModule.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/UmlValueSpecificationUiModule.java new file mode 100644 index 00000000000..f998f0a162c --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/UmlValueSpecificationUiModule.java @@ -0,0 +1,15 @@ +/* + * generated by Xtext + */ +package org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui; + +import org.eclipse.ui.plugin.AbstractUIPlugin; + +/** + * Use this class to register components to be used within the IDE. + */ +public class UmlValueSpecificationUiModule extends org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.AbstractUmlValueSpecificationUiModule { + public UmlValueSpecificationUiModule(AbstractUIPlugin plugin) { + super(plugin); + } +} diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/UmlValueSpecificationProposalProvider.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/UmlValueSpecificationProposalProvider.java new file mode 100644 index 00000000000..7e0f71c0d2c --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/UmlValueSpecificationProposalProvider.java @@ -0,0 +1,11 @@ +/* +* generated by Xtext +*/ +package org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.contentassist; + +/** + * see http://www.eclipse.org/Xtext/documentation.html#contentAssist on how to customize content assistant + */ +public class UmlValueSpecificationProposalProvider extends org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.contentassist.AbstractUmlValueSpecificationProposalProvider { + +} diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contribution/ValueSpecificationXtextDirectEditorConfiguration.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contribution/ValueSpecificationXtextDirectEditorConfiguration.java new file mode 100644 index 00000000000..4a403ff51ec --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contribution/ValueSpecificationXtextDirectEditorConfiguration.java @@ -0,0 +1,180 @@ +/***************************************************************************** + * Copyright (c) 2015 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: + * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.contribution; + +import java.util.Collection; +import java.util.Collections; +import java.util.Iterator; + +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.gmf.runtime.common.core.command.ICommand; +import org.eclipse.gmf.runtime.common.ui.services.parser.IParser; +import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus; +import org.eclipse.jface.text.contentassist.IContentAssistProcessor; +import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration; +import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.internal.UmlValueSpecificationActivator; +import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils.commands.ValueSpecificationSetCommand; +import org.eclipse.papyrus.uml.tools.providers.UMLLabelProvider; +import org.eclipse.papyrus.uml.xtext.integration.DefaultXtextDirectEditorConfiguration; +import org.eclipse.uml2.uml.ValueSpecification; + +import com.google.inject.Injector; + +/** + * This class is used for contribution to the Papyrus extension point DirectEditor. It is used for the integration of an xtext generatededitor, for properties of UML classifiers. + */ +public class ValueSpecificationXtextDirectEditorConfiguration extends DefaultXtextDirectEditorConfiguration { + + /** + * The contant for the string "not a ValueSpecification". + */ + private static final String NOT_A_VALUE_SPECIFICATION = "not a ValueSpecification"; //$NON-NLS-1$ + + /** + * The xtext string value. + */ + private String xtextStringValue = ""; //$NON-NLS-1$ + + /** + * The structural feature to edit. + */ + private EStructuralFeature structuralFeature = null; + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.xtext.integration.DefaultXtextDirectEditorConfiguration#getInjector() + */ + @Override + public Injector getInjector() { + return UmlValueSpecificationActivator.getInstance().getInjector( + UmlValueSpecificationActivator.ORG_ECLIPSE_PAPYRUS_UML_TEXTEDIT_VALUESPECIFICATION_XTEXT_UMLVALUESPECIFICATION); + } + + /** + * Adapts {@link IDirectEditorConfiguration} to gmfs {@link IParser} interface for reuse in GMF direct editing infrastructure. + */ + @Override + public IParser createParser(final EObject semanticObject) { + objectToEdit = semanticObject; + return new IParser() { + + public String getEditString(final IAdaptable element, final int flags) { + return ValueSpecificationXtextDirectEditorConfiguration.this.getTextToEditInternal(semanticObject); + } + + public ICommand getParseCommand(final IAdaptable element, final String newString, final int flags) { + xtextStringValue = newString; + EObject initialValue = null; + // Try to get the structural feature + structuralFeature = (EStructuralFeature) element.getAdapter(EStructuralFeature.class); + if (null == structuralFeature) { + // If the element is an EObject, try to get the structural feature corresponding + initialValue = (EObject) element.getAdapter(ValueSpecification.class); + structuralFeature = getStructuralFeature((EObject) objectToEdit, initialValue); + } else { + // Get the initial value specification corresponding to the structural feature + initialValue = (EObject) ((EObject) objectToEdit).eGet(structuralFeature); + } + return ValueSpecificationXtextDirectEditorConfiguration.this.getParseCommand(initialValue, null); + } + + public String getPrintString(final IAdaptable element, final int flags) { + return ValueSpecificationXtextDirectEditorConfiguration.this.getTextToEdit(semanticObject); + } + + public boolean isAffectingEvent(final Object event, final int flags) { + return false; + } + + public IContentAssistProcessor getCompletionProcessor(final IAdaptable element) { + // Not used + return null; + } + + public IParserEditStatus isValidEditString(final IAdaptable element, final String editString) { + // Not used + return null; + } + }; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.xtext.integration.DefaultXtextDirectEditorConfiguration#getParseCommand(org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.EObject) + */ + @Override + protected ICommand getParseCommand(final EObject initialValue, final EObject xtextObject) { + ICommand result = null; + if (objectToEdit instanceof EObject && null != structuralFeature) { + // If the xtext object is not null, that means the xtext was already parsed + if (null == xtextObject) { + result = ValueSpecificationSetCommand.getInstance().createSetCommand(getInjector(), (EObject) objectToEdit, structuralFeature, xtextStringValue, getDefaultLanguages()); + } else { + result = ValueSpecificationSetCommand.getInstance().getParseCommand((EObject) objectToEdit, structuralFeature, xtextObject, xtextStringValue, getDefaultLanguages()); + } + } + return result; + } + + /** + * This allow to define the default languages for an opaque expression. + * + * @return The list of default languages. + */ + protected Collection<String> getDefaultLanguages() { + // This method will be redefined to define the default languages of an opaque expression + return Collections.emptyList(); + } + + /** + * This allow to get the structural feature from the parent corresponding to the value. + * + * @param parent + * The parent EObject. + * @param value + * The value to search. + * @return The {@link EStructuralFeature} corresponding or <code>null</code>. + */ + protected EStructuralFeature getStructuralFeature(final EObject parent, final EObject value) { + EStructuralFeature feature = null; + if (null != parent && null != value) { + final Iterator<EStructuralFeature> features = parent.eClass().getEAllStructuralFeatures().iterator(); + while (null == feature && features.hasNext()) { + final EStructuralFeature currentFeature = features.next(); + final Object currentValue = parent.eGet(currentFeature); + if (currentFeature.isChangeable() && !currentFeature.isUnsettable() && null != currentValue && currentValue.equals(value)) { + feature = currentFeature; + } + } + } + return feature; + } + + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.extensionpoints.editors.configuration.DefaultDirectEditorConfiguration#getTextToEdit(java.lang.Object) + */ + @Override + public String getTextToEdit(Object editedObject) { + if (editedObject instanceof ValueSpecification) { + return new UMLLabelProvider().getText(editedObject); + } + return NOT_A_VALUE_SPECIFICATION; + } +} diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/labeling/UmlValueSpecificationDescriptionLabelProvider.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/labeling/UmlValueSpecificationDescriptionLabelProvider.java new file mode 100644 index 00000000000..ca78599c879 --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/labeling/UmlValueSpecificationDescriptionLabelProvider.java @@ -0,0 +1,22 @@ +/* +* generated by Xtext +*/ +package org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.labeling; + +/** + * Provides labels for a IEObjectDescriptions and IResourceDescriptions. + * + * see http://www.eclipse.org/Xtext/documentation.html#labelProvider + */ +public class UmlValueSpecificationDescriptionLabelProvider extends org.eclipse.xtext.ui.label.DefaultDescriptionLabelProvider { + + // Labels and icons can be computed like this: + +// String text(IEObjectDescription ele) { +// return ele.getName().toString(); +// } +// +// String image(IEObjectDescription ele) { +// return ele.getEClass().getName() + ".gif"; +// } +} diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/labeling/UmlValueSpecificationLabelProvider.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/labeling/UmlValueSpecificationLabelProvider.java new file mode 100644 index 00000000000..9388a942793 --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/labeling/UmlValueSpecificationLabelProvider.java @@ -0,0 +1,29 @@ +/* +* generated by Xtext +*/ +package org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.labeling; + +import com.google.inject.Inject; + +/** + * Provides labels for a EObjects. + * + * see http://www.eclipse.org/Xtext/documentation.html#labelProvider + */ +public class UmlValueSpecificationLabelProvider extends org.eclipse.xtext.ui.label.DefaultEObjectLabelProvider { + + @Inject + public UmlValueSpecificationLabelProvider(org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider delegate) { + super(delegate); + } + + // Labels and icons can be computed like this: + +// String text(Greeting ele) { +// return "A greeting to " + ele.getName(); +// } +// +// String image(Greeting ele) { +// return "Greeting.gif"; +// } +} diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/outline/UmlValueSpecificationOutlineTreeProvider.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/outline/UmlValueSpecificationOutlineTreeProvider.java new file mode 100644 index 00000000000..40bf11d5666 --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/outline/UmlValueSpecificationOutlineTreeProvider.java @@ -0,0 +1,13 @@ +/* +* generated by Xtext +*/ +package org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.outline; + +/** + * Customization of the default outline structure. + * + * see http://www.eclipse.org/Xtext/documentation.html#outline + */ +public class UmlValueSpecificationOutlineTreeProvider extends org.eclipse.xtext.ui.editor.outline.impl.DefaultOutlineTreeProvider { + +} diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/quickfix/UmlValueSpecificationQuickfixProvider.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/quickfix/UmlValueSpecificationQuickfixProvider.java new file mode 100644 index 00000000000..bdf1c25d789 --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/quickfix/UmlValueSpecificationQuickfixProvider.java @@ -0,0 +1,24 @@ +/* +* generated by Xtext +*/ +package org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.quickfix; + +/** + * Custom quickfixes. + * + * see http://www.eclipse.org/Xtext/documentation.html#quickfixes + */ +public class UmlValueSpecificationQuickfixProvider extends org.eclipse.xtext.ui.editor.quickfix.DefaultQuickfixProvider { + +// @Fix(MyJavaValidator.INVALID_NAME) +// public void capitalizeName(final Issue issue, IssueResolutionAcceptor acceptor) { +// acceptor.accept(issue, "Capitalize name", "Capitalize the name.", "upcase.png", new IModification() { +// public void apply(IModificationContext context) throws BadLocationException { +// IXtextDocument xtextDocument = context.getXtextDocument(); +// String firstLetter = xtextDocument.get(issue.getOffset(), 1); +// xtextDocument.replace(issue.getOffset(), 1, firstLetter.toUpperCase()); +// } +// }); +// } + +} diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils/.classpath b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils/.classpath new file mode 100644 index 00000000000..ad32c83a788 --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils/.classpath @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="src" path="src"/> + <classpathentry kind="output" path="bin"/> +</classpath> diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils/.project b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils/.project new file mode 100644 index 00000000000..8399f261ed4 --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils/.project @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.ManifestBuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.SchemaBuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.pde.PluginNature</nature> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils/.settings/org.eclipse.jdt.core.prefs b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000000..c585cc455ae --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,291 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 +org.eclipse.jdt.core.compiler.compliance=1.5 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.5 +org.eclipse.jdt.core.formatter.align_type_members_on_columns=false +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_assignment=0 +org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 +org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 +org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 +org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16 +org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_after_package=1 +org.eclipse.jdt.core.formatter.blank_lines_before_field=0 +org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 +org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 +org.eclipse.jdt.core.formatter.blank_lines_before_method=1 +org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 +org.eclipse.jdt.core.formatter.blank_lines_before_package=0 +org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 +org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 +org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false +org.eclipse.jdt.core.formatter.comment.format_block_comments=true +org.eclipse.jdt.core.formatter.comment.format_header=false +org.eclipse.jdt.core.formatter.comment.format_html=true +org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true +org.eclipse.jdt.core.formatter.comment.format_line_comments=true +org.eclipse.jdt.core.formatter.comment.format_source_code=true +org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true +org.eclipse.jdt.core.formatter.comment.indent_root_tags=true +org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert +org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert +org.eclipse.jdt.core.formatter.comment.line_length=260 +org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true +org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true +org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false +org.eclipse.jdt.core.formatter.compact_else_if=true +org.eclipse.jdt.core.formatter.continuation_indentation=2 +org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 +org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off +org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on +org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false +org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true +org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_empty_lines=false +org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true +org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false +org.eclipse.jdt.core.formatter.indentation.size=4 +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert +org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert +org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert +org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.join_lines_in_comments=false +org.eclipse.jdt.core.formatter.join_wrapped_lines=false +org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false +org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false +org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false +org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false +org.eclipse.jdt.core.formatter.lineSplit=260 +org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false +org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5 +org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true +org.eclipse.jdt.core.formatter.tabulation.char=tab +org.eclipse.jdt.core.formatter.tabulation.size=4 +org.eclipse.jdt.core.formatter.use_on_off_tags=false +org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false +org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true +org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true +org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils/.settings/org.eclipse.jdt.ui.prefs b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 00000000000..954281dbc31 --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,68 @@ +cleanup.add_default_serial_version_id=true +cleanup.add_generated_serial_version_id=false +cleanup.add_missing_annotations=true +cleanup.add_missing_deprecated_annotations=true +cleanup.add_missing_methods=false +cleanup.add_missing_nls_tags=false +cleanup.add_missing_override_annotations=true +cleanup.add_missing_override_annotations_interface_methods=true +cleanup.add_serial_version_id=false +cleanup.always_use_blocks=true +cleanup.always_use_parentheses_in_expressions=false +cleanup.always_use_this_for_non_static_field_access=false +cleanup.always_use_this_for_non_static_method_access=false +cleanup.convert_functional_interfaces=false +cleanup.convert_to_enhanced_for_loop=false +cleanup.correct_indentation=false +cleanup.format_source_code=false +cleanup.format_source_code_changes_only=false +cleanup.insert_inferred_type_arguments=false +cleanup.make_local_variable_final=true +cleanup.make_parameters_final=false +cleanup.make_private_fields_final=true +cleanup.make_type_abstract_if_missing_method=false +cleanup.make_variable_declarations_final=false +cleanup.never_use_blocks=false +cleanup.never_use_parentheses_in_expressions=true +cleanup.organize_imports=false +cleanup.qualify_static_field_accesses_with_declaring_class=false +cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +cleanup.qualify_static_member_accesses_with_declaring_class=true +cleanup.qualify_static_method_accesses_with_declaring_class=false +cleanup.remove_private_constructors=true +cleanup.remove_redundant_type_arguments=true +cleanup.remove_trailing_whitespaces=true +cleanup.remove_trailing_whitespaces_all=true +cleanup.remove_trailing_whitespaces_ignore_empty=false +cleanup.remove_unnecessary_casts=true +cleanup.remove_unnecessary_nls_tags=true +cleanup.remove_unused_imports=true +cleanup.remove_unused_local_variables=false +cleanup.remove_unused_private_fields=true +cleanup.remove_unused_private_members=false +cleanup.remove_unused_private_methods=true +cleanup.remove_unused_private_types=true +cleanup.sort_members=false +cleanup.sort_members_all=false +cleanup.use_anonymous_class_creation=false +cleanup.use_blocks=true +cleanup.use_blocks_only_for_return_and_throw=false +cleanup.use_lambda=true +cleanup.use_parentheses_in_expressions=false +cleanup.use_this_for_non_static_field_access=false +cleanup.use_this_for_non_static_field_access_only_if_necessary=true +cleanup.use_this_for_non_static_method_access=false +cleanup.use_this_for_non_static_method_access_only_if_necessary=true +cleanup.use_type_arguments=false +cleanup_profile=_Papyrus +cleanup_settings_version=2 +eclipse.preferences.version=1 +formatter_profile=_Papyrus +formatter_settings_version=12 +org.eclipse.jdt.ui.ignorelowercasenames=true +org.eclipse.jdt.ui.importorder=java;javax;org;com; +org.eclipse.jdt.ui.javadoc=true +org.eclipse.jdt.ui.ondemandthreshold=99 +org.eclipse.jdt.ui.staticondemandthreshold=99 +org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates> diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils/META-INF/MANIFEST.MF b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils/META-INF/MANIFEST.MF new file mode 100644 index 00000000000..5dc8ecbdf66 --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils/META-INF/MANIFEST.MF @@ -0,0 +1,28 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-Localization: plugin +Bundle-SymbolicName: org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils;singleton:=true +Bundle-Version: 1.0.2.qualifier +Bundle-Activator: org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils.Activator +Require-Bundle: org.eclipse.core.runtime, + org.eclipse.emf.ecore, + org.eclipse.uml2.uml, + org.eclipse.gmf.runtime.common.core, + org.eclipse.gmf.runtime.emf.type.core, + org.eclipse.papyrus.infra.services.edit;bundle-version="1.0.2", + org.eclipse.papyrus.uml.textedit.valuespecification.xtext;bundle-version="1.0.2", + org.eclipse.papyrus.uml.xtext.integration.core;bundle-version="1.0.2", + com.google.inject, + org.eclipse.papyrus.uml.xtext.integration.ui;bundle-version="1.0.2", + org.eclipse.xtext, + org.eclipse.papyrus.infra.services.validation;bundle-version="1.0.2", + org.eclipse.papyrus.uml.service.validation;bundle-version="1.0.2", + org.eclipse.ui.workbench, + org.eclipse.papyrus.infra.core.log;bundle-version="1.0.2" +Bundle-RequiredExecutionEnvironment: JavaSE-1.6 +Bundle-ActivationPolicy: lazy +Export-Package: org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils;uses:="org.osgi.framework", + org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils.commands +Bundle-Vendor: %providerName +Bundle-Description: %pluginDescription diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils/about.html b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils/about.html new file mode 100644 index 00000000000..d35d5aed64c --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils/about.html @@ -0,0 +1,28 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> +<title>About</title> +</head> +<body lang="EN-US"> +<h2>About This Content</h2> + +<p>June 5, 2007</p> +<h3>License</h3> + +<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise +indicated below, the Content is provided to you under the terms and conditions of the +Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available +at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>. +For purposes of the EPL, "Program" will mean the Content.</p> + +<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is +being redistributed by another party ("Redistributor") and different terms and conditions may +apply to your use of any object code in the Content. Check the Redistributor's license that was +provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise +indicated below, the terms and conditions of the EPL still apply to any source code in the Content +and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p> + +</body> +</html> diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils/build.properties b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils/build.properties new file mode 100644 index 00000000000..a13d81977ab --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils/build.properties @@ -0,0 +1,7 @@ +source.. = src/ +bin.includes = META-INF/,\ + .,\ + plugin.properties,\ + about.html + +src.includes = about.html diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils/plugin.properties b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils/plugin.properties new file mode 100644 index 00000000000..12b0b071d44 --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils/plugin.properties @@ -0,0 +1,13 @@ +################################################################################# +# Copyright (c) 2015 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: +# Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - initial API and implementation +################################################################################## +pluginName=Papyrus ValueSpecification xtext utils direct editor +providerName=Eclipse Modeling Project +pluginDescription=This allow to define the classes utils for the xtext editor
\ No newline at end of file diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils/pom.xml b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils/pom.xml new file mode 100644 index 00000000000..1ac09c9b6fe --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils/pom.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project> + <modelVersion>4.0.0</modelVersion> + <parent> + <artifactId>org.eclipse.papyrus</artifactId> + <groupId>org.eclipse.papyrus</groupId> + <version>1.0.2-SNAPSHOT</version> + <relativePath>../../../../releng/top-pom-main.xml</relativePath> + </parent> + <artifactId>org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils</artifactId> + <groupId>org.eclipse.papyrus</groupId> + <version>1.0.2-SNAPSHOT</version> + <packaging>eclipse-plugin</packaging> +</project>
\ No newline at end of file diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/utils/Activator.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/utils/Activator.java new file mode 100644 index 00000000000..4460b973330 --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/utils/Activator.java @@ -0,0 +1,77 @@ +/***************************************************************************** + * Copyright (c) 2015 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: + * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils; + +import org.eclipse.papyrus.infra.core.log.LogHelper; +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.BundleContext; + +/** + * The activator class controls the plug-in life cycle + */ +public class Activator extends AbstractUIPlugin { + + /** + * The plug-in ID. + */ + public static final String PLUGIN_ID = "org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils"; //$NON-NLS-1$ + + /** + * The shared instance. + */ + private static Activator plugin; + + /** + * The log helper. + */ + public static LogHelper log; + + /** + * The constructor + */ + public Activator() { + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) + */ + @Override + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + log = new LogHelper(this); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) + */ + @Override + public void stop(BundleContext context) throws Exception { + plugin = null; + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static Activator getDefault() { + return plugin; + } + +} diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/utils/commands/ValueSpecificationSetCommand.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/utils/commands/ValueSpecificationSetCommand.java new file mode 100644 index 00000000000..d38529127b8 --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/utils/commands/ValueSpecificationSetCommand.java @@ -0,0 +1,602 @@ +/***************************************************************************** + * Copyright (c) 2015 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: + * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils.commands; + +import java.io.IOException; +import java.util.Collection; +import java.util.Collections; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.gmf.runtime.common.core.command.CompositeCommand; +import org.eclipse.gmf.runtime.common.core.command.ICommand; +import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest; +import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils; +import org.eclipse.papyrus.infra.services.edit.service.IElementEditService; +import org.eclipse.papyrus.infra.services.validation.commands.AbstractValidateCommand; +import org.eclipse.papyrus.infra.services.validation.commands.AsyncValidateSubtreeCommand; +import org.eclipse.papyrus.uml.service.validation.UMLDiagnostician; +import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.AbstractRule; +import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralBooleanRule; +import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralIntegerOrUnlimitedNaturalRule; +import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralNullRule; +import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralRealRule; +import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralStringRule; +import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils.Activator; +import org.eclipse.papyrus.uml.xtext.integration.XtextFakeResourceContext; +import org.eclipse.papyrus.uml.xtext.integration.core.ContextElementAdapter; +import org.eclipse.papyrus.uml.xtext.integration.core.ContextElementAdapter.IContextElementProvider; +import org.eclipse.papyrus.uml.xtext.integration.core.ContextElementAdapter.IContextElementProviderWithInit; +import org.eclipse.uml2.uml.InstanceValue; +import org.eclipse.uml2.uml.LiteralBoolean; +import org.eclipse.uml2.uml.LiteralInteger; +import org.eclipse.uml2.uml.LiteralReal; +import org.eclipse.uml2.uml.LiteralString; +import org.eclipse.uml2.uml.LiteralUnlimitedNatural; +import org.eclipse.uml2.uml.MultiplicityElement; +import org.eclipse.uml2.uml.OpaqueExpression; +import org.eclipse.uml2.uml.PrimitiveType; +import org.eclipse.uml2.uml.TypedElement; +import org.eclipse.uml2.uml.UMLFactory; +import org.eclipse.uml2.uml.UMLPackage; +import org.eclipse.uml2.uml.ValueSpecification; +import org.eclipse.uml2.uml.VisibilityKind; +import org.eclipse.uml2.uml.util.UMLUtil; +import org.eclipse.xtext.EcoreUtil2; +import org.eclipse.xtext.util.CancelIndicator; +import org.eclipse.xtext.util.StringInputStream; + +import com.google.inject.Injector; + +/** + * This class allow to create the Set command from a xtext string value fill by + * the user. + */ +public class ValueSpecificationSetCommand { + + /** + * The instance of the class. + */ + private static ValueSpecificationSetCommand instance = new ValueSpecificationSetCommand(); + + /** + * Constructor. + */ + public ValueSpecificationSetCommand() { + // Nothing + } + + /** + * Get the single instance of ValueSpecificationSetCommand. + * + * @return The single instance of ValueSpecificationSetCommand. + */ + public static ValueSpecificationSetCommand getInstance() { + return instance; + } + + /** + * This allow to create the set command for the value specification from a + * xtext string value (need to parse it with xtext parser). + * + * @param injector + * The injector used to parse the xtext string value. + * @param objectToEdit + * The parent object of value specification. + * @param structuralFeature + * The structural feature. + * @param xtextStringValue + * The initial xtext string value. + * @param defaultLanguages + * The default languages for an opaque expression. + * @return The created set command allow to set the value specification on + * the objectToEdit. + */ + public CompositeCommand createSetCommand(final Injector injector, + final EObject objectToEdit, + final EStructuralFeature structuralFeature, + final String xtextStringValue, + final Collection<String> defaultLanguages) { + + // Get the initial value specification + ValueSpecification initialValueSpecification = null; + if (null != structuralFeature) { + initialValueSpecification = (ValueSpecification) objectToEdit + .eGet(structuralFeature); + } + + // Prepare the composite command + final CompositeCommand result = new CompositeCommand("validation"); //$NON-NLS-1$ + final IContextElementProvider provider = getContextProvider(objectToEdit); + + // Get the xtext face resource context (needed to parse the xtext string + // value + XtextFakeResourceContext context = new XtextFakeResourceContext( + injector); + context.getFakeResource().eAdapters() + .add(new ContextElementAdapter(provider)); + // Load the xtext string value + try { + context.getFakeResource().load( + new StringInputStream(xtextStringValue), + Collections.EMPTY_MAP); + } catch (IOException e) { + Activator.log.error(e); + } + if (provider instanceof IContextElementProviderWithInit) { + ((IContextElementProviderWithInit) provider).initResource(context + .getFakeResource()); + } + EcoreUtil2.resolveLazyCrossReferences(context.getFakeResource(), + CancelIndicator.NullImpl); + if (!context.getFakeResource().getParseResult().hasSyntaxErrors() + && context.getFakeResource().getErrors().size() == 0) { + // No error during the parser of xtext string value + EObject xtextObject = context.getFakeResource().getParseResult() + .getRootASTElement(); + ICommand cmd = getParseCommand(objectToEdit, + initialValueSpecification, structuralFeature, xtextObject, + xtextStringValue, defaultLanguages); + if (null != cmd) { + result.add(cmd); + } + } else { + // The parser of xtext string value throw errors + result.add(getOpaqueExpressionCommand(objectToEdit, + initialValueSpecification, structuralFeature, + xtextStringValue, defaultLanguages)); + } + AbstractValidateCommand validationCommand = new AsyncValidateSubtreeCommand( + objectToEdit, new UMLDiagnostician()); + validationCommand.disableUIFeedback(); + result.add(validationCommand); + return result; + } + + /** + * This allow to create the parse command of value specification (manage to + * create the value specification or the opaque expression). + * + * @param objectToEdit + * The parent object of value specification. + * @param structuralFeature + * The structural feature. + * @param xtextObject + * The xtext object. + * @param xtextStringValue + * The initial xtext string value. + * @param defaultLanguages + * The default languages for an opaque expression. + * @return The created set command allow to set the value specification on + * the objectToEdit. + */ + public ICommand getParseCommand(final EObject objectToEdit, + final EStructuralFeature structuralFeature, + final EObject xtextObject, final String xtextStringValue, + final Collection<String> defaultLanguages) { + + // Get the initial value specification + ValueSpecification initialValueSpecification = null; + if (null != structuralFeature) { + initialValueSpecification = (ValueSpecification) objectToEdit + .eGet(structuralFeature); + } + + return getParseCommand(objectToEdit, initialValueSpecification, + structuralFeature, xtextObject, xtextStringValue, + defaultLanguages); + } + + /** + * This allow to create the parse command of value specification (manage to + * create the value specification or the opaque expression). + * + * @param objectToEdit + * The parent object of value specification. + * @param initialValueSpecification + * The initial value specfication. + * @param structuralFeature + * The structural feature. + * @param xtextObject + * The xtext object. + * @param xtextStringValue + * The initial xtext string value. + * @param defaultLanguages + * The default languages for an opaque expression. + * @return The created set command allow to set the value specification on + * the objectToEdit. + */ + protected ICommand getParseCommand(final EObject objectToEdit, + final ValueSpecification initialValueSpecification, + final EStructuralFeature structuralFeature, + final EObject xtextObject, final String xtextStringValue, + final Collection<String> defaultLanguages) { + + ValueSpecification createdValueSpecification = null; + + // Check if the object to edit is not multi-valued + if (null != objectToEdit + && (!(objectToEdit instanceof MultiplicityElement) || !(((MultiplicityElement) objectToEdit) + .isMultivalued()))) { + createdValueSpecification = createValueSpecification(objectToEdit, + initialValueSpecification, xtextObject, xtextStringValue, + defaultLanguages); + } else { + // The object is multi-valued, create an opaque expression + createdValueSpecification = createOpaqueExpression( + initialValueSpecification, xtextStringValue, + defaultLanguages); + } + return createCommand((EObject) objectToEdit, structuralFeature, + createdValueSpecification); + } + + /** + * Create he command for the opaque expression creation. + * + * @param objectToEdit + * The parent object of value specification. + * @param initialValueSpecification + * The initial value specification. + * @param structuralFeature + * The structural feature. + * @param xtextStringValue + * The initial xtext string value. + * @param defaultLanguages + * The default languages for an opaque expression. + * @return The command to set the value specification. + */ + protected ICommand getOpaqueExpressionCommand(final EObject objectToEdit, + final ValueSpecification initialValueSpecification, + final EStructuralFeature structuralFeature, + final String xtextStringValue, + final Collection<String> defaultLanguages) { + + // Just return a command of opaque expression + return createCommand( + objectToEdit, + structuralFeature, + createOpaqueExpression(initialValueSpecification, + xtextStringValue, defaultLanguages)); + } + + /** + * This allow to create the command from the request. + * + * @param objectToEdit + * The parent object of value specification. + * @param structuralFeature + * The structural feature. + * @param valueSpecification + * The value specification created. + * @return The command corresponding to the request. + */ + protected ICommand createCommand(final EObject objectToEdit, + final EStructuralFeature structuralFeature, + final ValueSpecification valueSpecification) { + + final CompositeCommand setValueCommand = new CompositeCommand( + "Set Value Specification Command"); //$NON-NLS-1$ + + final SetRequest request = new SetRequest(objectToEdit, + structuralFeature, valueSpecification); + + final IElementEditService commandProvider = ElementEditServiceUtils + .getCommandProvider(objectToEdit); + ICommand setDefaultValueCommand = commandProvider + .getEditCommand(request); + if (null != setDefaultValueCommand + && setDefaultValueCommand.canExecute()) { + setValueCommand.add(setDefaultValueCommand); + } else { + setValueCommand + .add(org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand.INSTANCE); + } + return setValueCommand.isEmpty() ? null : setValueCommand; + } + + /** + * This allow to create the value specification from the xtext parser. + * + * @param objectToEdit + * The parent object of value specification. + * @param initialValueSpecification + * The initial value specification. + * @param xtextObject + * The object created by the text parsing. + * @param xtextStringValue + * The string parsed. + * @param defaultLanguages + * The default languages for an opaque expression. + * @return The create {@link ValueSpecification} + */ + protected ValueSpecification createValueSpecification( + final EObject objectToEdit, + final ValueSpecification initialValueSpecification, + final EObject xtextObject, final String xtextStringValue, + final Collection<String> defaultLanguages) { + + ValueSpecification createdValueSpecification = null; + + // Check that the xtext object parsed is the correct one + if (xtextObject instanceof AbstractRule + && null == ((AbstractRule) xtextObject).getUndefined()) { + final AbstractRule abstractRule = (AbstractRule) xtextObject; + final EObject value = abstractRule.getValue(); + if (null != abstractRule.getInstanceSpecification()) { + // Create an instance value with specification value + createdValueSpecification = UMLFactory.eINSTANCE + .createInstanceValue(); + ((InstanceValue) createdValueSpecification) + .setInstance(abstractRule.getInstanceSpecification()); + } else { + if (value instanceof LiteralBooleanRule) { + // Check that the type of the parent is a boolean + if (isTypeNeeeded(objectToEdit, + UMLPackage.Literals.LITERAL_BOOLEAN)) { + // Create a literal boolean + createdValueSpecification = UMLFactory.eINSTANCE + .createLiteralBoolean(); + copyFeatureValues(createdValueSpecification, + initialValueSpecification); + ((LiteralBoolean) createdValueSpecification) + .setValue(Boolean + .parseBoolean(((LiteralBooleanRule) value) + .getValue())); + } + } else if (value instanceof LiteralIntegerOrUnlimitedNaturalRule) { + boolean created = false; + final LiteralIntegerOrUnlimitedNaturalRule integerValue = (LiteralIntegerOrUnlimitedNaturalRule) value; + // Check that the value is upper than 0 and the type of the + // parent is a integer + if (0 <= integerValue.getValue() + && isTypeNeeeded( + objectToEdit, + UMLPackage.Literals.LITERAL_UNLIMITED_NATURAL)) { + // Create a literal unlimited natural + createdValueSpecification = UMLFactory.eINSTANCE + .createLiteralUnlimitedNatural(); + copyFeatureValues(createdValueSpecification, + initialValueSpecification); + ((LiteralUnlimitedNatural) createdValueSpecification) + .setValue(integerValue.getValue()); + created = true; + } + + // Check that the value specification is not already created + // and the type of the parent is an integer + if (!created + && isTypeNeeeded(objectToEdit, + UMLPackage.Literals.LITERAL_INTEGER)) { + // Create a literal unlimited natural + createdValueSpecification = UMLFactory.eINSTANCE + .createLiteralInteger(); + copyFeatureValues(createdValueSpecification, + initialValueSpecification); + ((LiteralInteger) createdValueSpecification) + .setValue(integerValue.getValue()); + created = true; + } + + // Check that the value specification is not already created + // and the type of the parent is a real + if (!created + && isTypeNeeeded(objectToEdit, + UMLPackage.Literals.LITERAL_REAL)) { + // Create a literal unlimited natural + createdValueSpecification = UMLFactory.eINSTANCE + .createLiteralReal(); + copyFeatureValues(createdValueSpecification, + initialValueSpecification); + ((LiteralReal) createdValueSpecification) + .setValue(integerValue.getValue()); + } + } else if (value instanceof LiteralRealRule) { + // Check that the type of the parent is a real + if (isTypeNeeeded(objectToEdit, + UMLPackage.Literals.LITERAL_REAL)) { + // Create a literal real + createdValueSpecification = UMLFactory.eINSTANCE + .createLiteralReal(); + copyFeatureValues(createdValueSpecification, + initialValueSpecification); + ((LiteralReal) createdValueSpecification) + .setValue(((LiteralRealRule) value).getValue()); + } + } else if (value instanceof LiteralNullRule) { + // Create a literal null + createdValueSpecification = UMLFactory.eINSTANCE + .createLiteralNull(); + copyFeatureValues(createdValueSpecification, + initialValueSpecification); + } else if (value instanceof LiteralStringRule) { + // Create a literal real + createdValueSpecification = UMLFactory.eINSTANCE + .createLiteralString(); + copyFeatureValues(createdValueSpecification, + initialValueSpecification); + ((LiteralString) createdValueSpecification) + .setValue(((LiteralStringRule) value).getValue()); + } + } + + if (null != createdValueSpecification) { + // Affect the name and the visibility + affectAttributes(createdValueSpecification, abstractRule); + } else { + // Create the opaque expression if no value specification + // was created + createdValueSpecification = createOpaqueExpression( + initialValueSpecification, xtextStringValue, + defaultLanguages); + } + } + return createdValueSpecification; + } + + /** + * This allow to affect the attributes of the value specification (name and + * visibility). + * + * @param createdValueSpecification + * The created {@link ValueSpecification}. + * @param abstractRule + * The abstract rule. + */ + protected void affectAttributes( + final ValueSpecification createdValueSpecification, + final AbstractRule abstractRule) { + // Check that the visibility was set + if (null != abstractRule.getVisibility()) { + VisibilityKind visibility = null; + if (null != abstractRule.getVisibility().getPublic()) { + visibility = VisibilityKind.PUBLIC_LITERAL; + } else if (null != abstractRule.getVisibility().getPackage()) { + visibility = VisibilityKind.PACKAGE_LITERAL; + } else if (null != abstractRule.getVisibility().getProtected()) { + visibility = VisibilityKind.PROTECTED_LITERAL; + } else if (null != abstractRule.getVisibility().getPrivate()) { + visibility = VisibilityKind.PRIVATE_LITERAL; + } + // Affect the correct visibility + createdValueSpecification.setVisibility(visibility); + } + + // Set the name if it was created + if (null != abstractRule.getName()) { + createdValueSpecification.setName(abstractRule.getName()); + } + } + + /** + * This allow to copy all the old feature values from the existing object to + * the new one. + * + * @param newValueSpecification + * The new value specification. + * @param existingObject + * The existing {@link EObject}. + */ + protected void copyFeatureValues( + final ValueSpecification newValueSpecification, + final EObject existingObject) { + + if (null != existingObject + && existingObject instanceof ValueSpecification) { + ValueSpecification existingValueSpecification = (ValueSpecification) existingObject; + // Loop on each structural features + for (EStructuralFeature structuralFeature : existingValueSpecification + .eClass().getEAllStructuralFeatures()) { + // Check that the structural is changeable and that the new + // value specification contains this structural feature (it is + // needed because the sub classes of ValueSpecification + if (structuralFeature.isChangeable() + && newValueSpecification.eClass() + .getEAllStructuralFeatures() + .contains(structuralFeature)) { + newValueSpecification.eSet(structuralFeature, + existingObject.eGet(structuralFeature)); + } + } + } + } + + /** + * Check the type of the object with the type needed (represented by + * string). + * + * @param object + * The object to check. + * @param typeNeeded + * The type needed. + * @return <code>true</code> if the object allow the typed needed, + * <code>false</code> otherwise. + */ + protected boolean isTypeNeeeded(final Object object, final Object typeNeeded) { + + boolean result = false; + if (!(object instanceof TypedElement)) { + // If the object is a typed element + result = true; + } else { + TypedElement typedElement = (TypedElement) object; + if (null == typedElement.getType() + || !(typedElement.getType() instanceof PrimitiveType)) { + result = true; + } else if (typedElement.getType() instanceof PrimitiveType) { + PrimitiveType type = (PrimitiveType) typedElement.getType(); + if (typeNeeded.equals(UMLPackage.Literals.LITERAL_BOOLEAN)) { + result = UMLUtil.isBoolean(type); + } else if (typeNeeded + .equals(UMLPackage.Literals.LITERAL_UNLIMITED_NATURAL)) { + result = UMLUtil.isUnlimitedNatural(type); + } else if (typeNeeded + .equals(UMLPackage.Literals.LITERAL_INTEGER)) { + result = UMLUtil.isInteger(type); + } else if (typeNeeded.equals(UMLPackage.Literals.LITERAL_REAL)) { + result = UMLUtil.isReal(type); + } + } + } + return result; + } + + /** + * This allow to create the opaque expression. + * + * @param initialEObject + * The initial EObject. + * @param xtextStringValue + * The xtext string value. + * @param defaultLanguages + * The default languages for an opaque expression. + * @return The created {@link OpaqueExpression}. + */ + protected ValueSpecification createOpaqueExpression( + final EObject initialEObject, final String xtextStringValue, + final Collection<String> defaultLanguages) { + + if (!xtextStringValue.isEmpty()) { + // Create the opaque expression + ValueSpecification valueSpecification = UMLFactory.eINSTANCE + .createOpaqueExpression(); + copyFeatureValues(valueSpecification, initialEObject); + ((OpaqueExpression) valueSpecification).getLanguages().addAll( + defaultLanguages); + valueSpecification.setName(xtextStringValue); + return valueSpecification; + } + return null; + } + + /** + * Get the context provider of the object to edit. + * + * @param objectToEdit + * The object to edit. + * @return The context element provider corresponding to the object to edit. + */ + protected IContextElementProvider getContextProvider( + final EObject objectToEdit) { + + return new IContextElementProvider() { + + public EObject getContextObject() { + if (objectToEdit instanceof EObject) { + return (EObject) objectToEdit; + } + return null; + } + }; + } +} diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/.classpath b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/.classpath new file mode 100644 index 00000000000..406ca4abdc6 --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/.classpath @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="src" path="src"/> + <classpathentry kind="src" path="src-gen"/> + <classpathentry kind="src" path="xtend-gen"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="output" path="bin"/> +</classpath> diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/.launch/Generate Language Infrastructure (org.eclipse.papyrus.uml.textedit.port.xtext).launch b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/.launch/Generate Language Infrastructure (org.eclipse.papyrus.uml.textedit.port.xtext).launch new file mode 100644 index 00000000000..2ec48489301 --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/.launch/Generate Language Infrastructure (org.eclipse.papyrus.uml.textedit.port.xtext).launch @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<launchConfiguration type="org.eclipse.emf.mwe2.launch.Mwe2LaunchConfigurationType"> +<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${working_set:<?xml version="1.0" encoding="UTF-8"?> <launchConfigurationWorkingSet factoryID="org.eclipse.ui.internal.WorkingSetFactory" id="1299248699643_13" label="working set" name="working set"> <item factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/org.eclipse.papyrus.uml.textedit.valuespecification.xtext" type="4"/> <item factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.generator" type="4"/> <item factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.tests" type="4"/> <item factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui" type="4"/> </launchConfigurationWorkingSet>}"/> +<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> +<listEntry value="/org.eclipse.papyrus.uml.textedit.valuespecification.xtext"/> +</listAttribute> +<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"> +<listEntry value="4"/> +</listAttribute> +<listAttribute key="org.eclipse.debug.ui.favoriteGroups"> +<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/> +<listEntry value="org.eclipse.debug.ui.launchGroup.run"/> +</listAttribute> +<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher"/> +<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="src/UmlValueSpecification/GenerateUmlValueSpecification.mwe2"/> +<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.papyrus.uml.textedit.valuespecification.xtext"/> +<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xmx512m"/> +</launchConfiguration> diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/.launch/Launch Runtime Eclipse.launch b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/.launch/Launch Runtime Eclipse.launch new file mode 100644 index 00000000000..acc8823d435 --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/.launch/Launch Runtime Eclipse.launch @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<launchConfiguration type="org.eclipse.pde.ui.RuntimeWorkbench"> +<booleanAttribute key="append.args" value="true"/> +<booleanAttribute key="askclear" value="true"/> +<booleanAttribute key="automaticAdd" value="true"/> +<booleanAttribute key="automaticValidate" value="false"/> +<stringAttribute key="bad_container_name" value="/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/.launch/"/> +<stringAttribute key="bootstrap" value=""/> +<stringAttribute key="checked" value="[NONE]"/> +<booleanAttribute key="clearConfig" value="false"/> +<booleanAttribute key="clearws" value="false"/> +<booleanAttribute key="clearwslog" value="false"/> +<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/Launch Runtime Eclipse"/> +<booleanAttribute key="default" value="true"/> +<booleanAttribute key="includeOptional" value="true"/> +<stringAttribute key="location" value="${workspace_loc}/../runtime-EclipseXtext"/> +<listAttribute key="org.eclipse.debug.ui.favoriteGroups"> +<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/> +<listEntry value="org.eclipse.debug.ui.launchGroup.run"/> +</listAttribute> +<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/> +<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl}"/> +<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/> +<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms40m -Xmx512m -XX:MaxPermSize=256m"/> +<stringAttribute key="pde.version" value="3.3"/> +<stringAttribute key="product" value="org.eclipse.platform.ide"/> +<booleanAttribute key="show_selected_only" value="false"/> +<stringAttribute key="templateConfig" value="${target_home}/configuration/config.ini"/> +<booleanAttribute key="tracing" value="false"/> +<booleanAttribute key="useDefaultConfig" value="true"/> +<booleanAttribute key="useDefaultConfigArea" value="true"/> +<booleanAttribute key="useProduct" value="true"/> +<booleanAttribute key="usefeatures" value="false"/> +</launchConfiguration> diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/.project b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/.project new file mode 100644 index 00000000000..8227d335487 --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/.project @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.eclipse.papyrus.uml.textedit.valuespecification.xtext</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.ManifestBuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.SchemaBuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.xtext.ui.shared.xtextBuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.jdt.core.javanature</nature> + <nature>org.eclipse.pde.PluginNature</nature> + <nature>org.eclipse.xtext.ui.shared.xtextNature</nature> + </natures> +</projectDescription> diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/.settings/org.eclipse.jdt.core.prefs b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000000..4d72ad12656 --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,288 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.formatter.align_type_members_on_columns=false +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_assignment=0 +org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 +org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 +org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 +org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16 +org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_after_package=1 +org.eclipse.jdt.core.formatter.blank_lines_before_field=0 +org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 +org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 +org.eclipse.jdt.core.formatter.blank_lines_before_method=1 +org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 +org.eclipse.jdt.core.formatter.blank_lines_before_package=0 +org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 +org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 +org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false +org.eclipse.jdt.core.formatter.comment.format_block_comments=true +org.eclipse.jdt.core.formatter.comment.format_header=false +org.eclipse.jdt.core.formatter.comment.format_html=true +org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true +org.eclipse.jdt.core.formatter.comment.format_line_comments=true +org.eclipse.jdt.core.formatter.comment.format_source_code=true +org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true +org.eclipse.jdt.core.formatter.comment.indent_root_tags=true +org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert +org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert +org.eclipse.jdt.core.formatter.comment.line_length=260 +org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true +org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true +org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false +org.eclipse.jdt.core.formatter.compact_else_if=true +org.eclipse.jdt.core.formatter.continuation_indentation=2 +org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 +org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off +org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on +org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false +org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true +org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_empty_lines=false +org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true +org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false +org.eclipse.jdt.core.formatter.indentation.size=4 +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert +org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert +org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert +org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.join_lines_in_comments=false +org.eclipse.jdt.core.formatter.join_wrapped_lines=false +org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false +org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false +org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false +org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false +org.eclipse.jdt.core.formatter.lineSplit=260 +org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false +org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5 +org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true +org.eclipse.jdt.core.formatter.tabulation.char=tab +org.eclipse.jdt.core.formatter.tabulation.size=4 +org.eclipse.jdt.core.formatter.use_on_off_tags=false +org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false +org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true +org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true +org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/.settings/org.eclipse.jdt.ui.prefs b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 00000000000..954281dbc31 --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,68 @@ +cleanup.add_default_serial_version_id=true +cleanup.add_generated_serial_version_id=false +cleanup.add_missing_annotations=true +cleanup.add_missing_deprecated_annotations=true +cleanup.add_missing_methods=false +cleanup.add_missing_nls_tags=false +cleanup.add_missing_override_annotations=true +cleanup.add_missing_override_annotations_interface_methods=true +cleanup.add_serial_version_id=false +cleanup.always_use_blocks=true +cleanup.always_use_parentheses_in_expressions=false +cleanup.always_use_this_for_non_static_field_access=false +cleanup.always_use_this_for_non_static_method_access=false +cleanup.convert_functional_interfaces=false +cleanup.convert_to_enhanced_for_loop=false +cleanup.correct_indentation=false +cleanup.format_source_code=false +cleanup.format_source_code_changes_only=false +cleanup.insert_inferred_type_arguments=false +cleanup.make_local_variable_final=true +cleanup.make_parameters_final=false +cleanup.make_private_fields_final=true +cleanup.make_type_abstract_if_missing_method=false +cleanup.make_variable_declarations_final=false +cleanup.never_use_blocks=false +cleanup.never_use_parentheses_in_expressions=true +cleanup.organize_imports=false +cleanup.qualify_static_field_accesses_with_declaring_class=false +cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +cleanup.qualify_static_member_accesses_with_declaring_class=true +cleanup.qualify_static_method_accesses_with_declaring_class=false +cleanup.remove_private_constructors=true +cleanup.remove_redundant_type_arguments=true +cleanup.remove_trailing_whitespaces=true +cleanup.remove_trailing_whitespaces_all=true +cleanup.remove_trailing_whitespaces_ignore_empty=false +cleanup.remove_unnecessary_casts=true +cleanup.remove_unnecessary_nls_tags=true +cleanup.remove_unused_imports=true +cleanup.remove_unused_local_variables=false +cleanup.remove_unused_private_fields=true +cleanup.remove_unused_private_members=false +cleanup.remove_unused_private_methods=true +cleanup.remove_unused_private_types=true +cleanup.sort_members=false +cleanup.sort_members_all=false +cleanup.use_anonymous_class_creation=false +cleanup.use_blocks=true +cleanup.use_blocks_only_for_return_and_throw=false +cleanup.use_lambda=true +cleanup.use_parentheses_in_expressions=false +cleanup.use_this_for_non_static_field_access=false +cleanup.use_this_for_non_static_field_access_only_if_necessary=true +cleanup.use_this_for_non_static_method_access=false +cleanup.use_this_for_non_static_method_access_only_if_necessary=true +cleanup.use_type_arguments=false +cleanup_profile=_Papyrus +cleanup_settings_version=2 +eclipse.preferences.version=1 +formatter_profile=_Papyrus +formatter_settings_version=12 +org.eclipse.jdt.ui.ignorelowercasenames=true +org.eclipse.jdt.ui.importorder=java;javax;org;com; +org.eclipse.jdt.ui.javadoc=true +org.eclipse.jdt.ui.ondemandthreshold=99 +org.eclipse.jdt.ui.staticondemandthreshold=99 +org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates> diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/META-INF/MANIFEST.MF b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/META-INF/MANIFEST.MF new file mode 100644 index 00000000000..ea3b0279f93 --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/META-INF/MANIFEST.MF @@ -0,0 +1,41 @@ +Manifest-Version: 1.0 +Require-Bundle: org.eclipse.xtext, + org.eclipse.xtext.xbase;resolution:=optional, + org.eclipse.xtext.generator;resolution:=optional, + org.apache.commons.logging;bundle-version="1.0.4";resolution:=optional, + org.eclipse.emf.codegen.ecore;resolution:=optional, + org.eclipse.emf.mwe.utils;resolution:=optional, + org.eclipse.emf.mwe2.launch;resolution:=optional, + org.eclipse.uml2.uml;bundle-version="4.1.0", + org.eclipse.uml2.codegen.ecore;bundle-version="1.9.0", + org.eclipse.xtext.util, + org.eclipse.emf.ecore, + org.eclipse.emf.common, + org.antlr.runtime, + org.apache.log4j, + org.eclipse.papyrus.uml.xtext.integration.core;bundle-version="1.1.0", + org.eclipse.xtext.xbase.lib, + org.eclipse.papyrus.infra.emf;bundle-version="1.1.0" +Export-Package: org.eclipse.papyrus.uml.textedit.valuespecification.xtext, + org.eclipse.papyrus.uml.textedit.valuespecification.xtext.formatting, + org.eclipse.papyrus.uml.textedit.valuespecification.xtext.generator, + org.eclipse.papyrus.uml.textedit.valuespecification.xtext.parser.antlr, + org.eclipse.papyrus.uml.textedit.valuespecification.xtext.parser.antlr.internal, + org.eclipse.papyrus.uml.textedit.valuespecification.xtext.scoping, + org.eclipse.papyrus.uml.textedit.valuespecification.xtext.serializer, + org.eclipse.papyrus.uml.textedit.valuespecification.xtext.services, + org.eclipse.papyrus.uml.textedit.valuespecification.xtext.validation, + org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification, + org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl, + org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.util +Bundle-Vendor: %providerName +Bundle-ActivationPolicy: lazy +Bundle-Version: 1.1.0.qualifier +Bundle-Name: %pluginName +Bundle-Localization: plugin +Bundle-ManifestVersion: 2 +Bundle-SymbolicName: org.eclipse.papyrus.uml.textedit.valuespecification.xtext;singleton:=true +Import-Package: org.apache.log4j, + org.eclipse.xtext.xbase.lib +Bundle-RequiredExecutionEnvironment: JavaSE-1.6 +Bundle-Description: %pluginDescription diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/about.html b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/about.html new file mode 100644 index 00000000000..d35d5aed64c --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/about.html @@ -0,0 +1,28 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> +<title>About</title> +</head> +<body lang="EN-US"> +<h2>About This Content</h2> + +<p>June 5, 2007</p> +<h3>License</h3> + +<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise +indicated below, the Content is provided to you under the terms and conditions of the +Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available +at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>. +For purposes of the EPL, "Program" will mean the Content.</p> + +<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is +being redistributed by another party ("Redistributor") and different terms and conditions may +apply to your use of any object code in the Content. Check the Redistributor's license that was +provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise +indicated below, the terms and conditions of the EPL still apply to any source code in the Content +and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p> + +</body> +</html> diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/build.properties b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/build.properties new file mode 100644 index 00000000000..f8a52f1504a --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/build.properties @@ -0,0 +1,10 @@ +source.. = src/,\ + src-gen/,\ + xtend-gen/ +bin.includes = META-INF/,\ + .,\ + plugin.xml,\ + plugin.properties,\ + about.html + +src.includes = about.html diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/plugin.properties b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/plugin.properties new file mode 100644 index 00000000000..d7c84072ffa --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/plugin.properties @@ -0,0 +1,13 @@ +################################################################################# +# Copyright (c) 2015 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: +# Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - initial API and implementation +################################################################################## +pluginName=Papyrus ValueSpecification xtext direct editor +providerName=Eclipse Modeling Project +pluginDescription=This allow to define the xtext editor for the ValueSpecification object
\ No newline at end of file diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/plugin.xml b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/plugin.xml new file mode 100644 index 00000000000..d6458f6a652 --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/plugin.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.0"?> + +<plugin> + + <extension point="org.eclipse.emf.ecore.generated_package"> + <package + uri = "http://www.eclipse.org/papyrus/uml/textedit/valuespecification/xtext/UmlValueSpecification" + class = "org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.UmlValueSpecificationPackage" + genModel = "org/eclipse/papyrus/uml/textedit/valuespecification/xtext/UmlValueSpecification.genmodel" /> + + </extension> + + + + + +</plugin> diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/plugin.xml_gen b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/plugin.xml_gen new file mode 100644 index 00000000000..8967cc0fa01 --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/plugin.xml_gen @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.0"?> + +<plugin> + + <extension point="org.eclipse.emf.ecore.generated_package"> + <package + uri = "http://www.eclipse.org/papyrus/uml/textedit/valuespecification/xtext/UmlValueSpecification" + class = "org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.UmlValueSpecificationPackage" + genModel = "org/eclipse/papyrus/uml/textedit/valuespecification/xtext/UmlValueSpecification.genmodel" /> + + </extension> + + + + +</plugin> diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/pom.xml b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/pom.xml new file mode 100644 index 00000000000..400fc663d88 --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/pom.xml @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project> + <modelVersion>4.0.0</modelVersion> + <parent> + <artifactId>org.eclipse.papyrus</artifactId> + <groupId>org.eclipse.papyrus</groupId> + <version>1.0.2-SNAPSHOT</version> + <relativePath>../../../../releng/top-pom-main.xml</relativePath> + </parent> + <artifactId>org.eclipse.papyrus.uml.textedit.valuespecification.xtext</artifactId> + <groupId>org.eclipse.papyrus</groupId> + <version>1.0.2-SNAPSHOT</version> + <packaging>eclipse-plugin</packaging> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-clean-plugin</artifactId> + <configuration> + <fileset> + <directory>xtend-gen</directory> + <includes> + <include>**/*</include> + </includes> + <excludes> + <exclude>.gitignore</exclude> + </excludes> + </fileset> + </configuration> + </plugin> + <plugin> + <groupId>org.eclipse.xtend</groupId> + <artifactId>xtend-maven-plugin</artifactId> + <executions> + <execution> + <phase>generate-sources</phase> + <goals> + <goal>compile</goal> + </goals> + </execution> + </executions> + <configuration> + <outputDirectory>xtend-gen</outputDirectory> + <testOutputDirectory>${project.build.directory}/xtend-gen/test</testOutputDirectory> + </configuration> + </plugin> + </plugins> + </build> +</project>
\ No newline at end of file diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/AbstractUmlValueSpecificationRuntimeModule.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/AbstractUmlValueSpecificationRuntimeModule.java new file mode 100644 index 00000000000..96e2b1af5c5 --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/AbstractUmlValueSpecificationRuntimeModule.java @@ -0,0 +1,157 @@ +/* + * generated by Xtext + */ +package org.eclipse.papyrus.uml.textedit.valuespecification.xtext; + +import java.util.Properties; + +import org.eclipse.xtext.Constants; +import org.eclipse.xtext.service.DefaultRuntimeModule; + +import com.google.inject.Binder; +import com.google.inject.name.Names; + +/** + * Manual modifications go to {org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecificationRuntimeModule} + */ + @SuppressWarnings("all") +public abstract class AbstractUmlValueSpecificationRuntimeModule extends DefaultRuntimeModule { + + protected Properties properties = null; + + @Override + public void configure(Binder binder) { + properties = tryBindProperties(binder, "org/eclipse/papyrus/uml/textedit/valuespecification/xtext/UmlValueSpecification.properties"); + super.configure(binder); + } + + public void configureLanguageName(Binder binder) { + binder.bind(String.class).annotatedWith(Names.named(Constants.LANGUAGE_NAME)).toInstance("org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification"); + } + + public void configureFileExtensions(Binder binder) { + if (properties == null || properties.getProperty(Constants.FILE_EXTENSIONS) == null) + binder.bind(String.class).annotatedWith(Names.named(Constants.FILE_EXTENSIONS)).toInstance("umlvaluespecification"); + } + + // contributed by org.eclipse.xtext.generator.grammarAccess.GrammarAccessFragment + public java.lang.ClassLoader bindClassLoaderToInstance() { + return getClass().getClassLoader(); + } + + // contributed by org.eclipse.xtext.generator.grammarAccess.GrammarAccessFragment + public Class<? extends org.eclipse.xtext.IGrammarAccess> bindIGrammarAccess() { + return org.eclipse.papyrus.uml.textedit.valuespecification.xtext.services.UmlValueSpecificationGrammarAccess.class; + } + + // contributed by org.eclipse.xtext.generator.serializer.SerializerFragment + public Class<? extends org.eclipse.xtext.serializer.sequencer.ISemanticSequencer> bindISemanticSequencer() { + return org.eclipse.papyrus.uml.textedit.valuespecification.xtext.serializer.UmlValueSpecificationSemanticSequencer.class; + } + + // contributed by org.eclipse.xtext.generator.serializer.SerializerFragment + public Class<? extends org.eclipse.xtext.serializer.sequencer.ISyntacticSequencer> bindISyntacticSequencer() { + return org.eclipse.papyrus.uml.textedit.valuespecification.xtext.serializer.UmlValueSpecificationSyntacticSequencer.class; + } + + // contributed by org.eclipse.xtext.generator.serializer.SerializerFragment + public Class<? extends org.eclipse.xtext.serializer.ISerializer> bindISerializer() { + return org.eclipse.xtext.serializer.impl.Serializer.class; + } + + // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment + public Class<? extends org.eclipse.xtext.parser.IParser> bindIParser() { + return org.eclipse.papyrus.uml.textedit.valuespecification.xtext.parser.antlr.UmlValueSpecificationParser.class; + } + + // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment + public Class<? extends org.eclipse.xtext.parser.ITokenToStringConverter> bindITokenToStringConverter() { + return org.eclipse.xtext.parser.antlr.AntlrTokenToStringConverter.class; + } + + // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment + public Class<? extends org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider> bindIAntlrTokenFileProvider() { + return org.eclipse.papyrus.uml.textedit.valuespecification.xtext.parser.antlr.UmlValueSpecificationAntlrTokenFileProvider.class; + } + + // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment + public Class<? extends org.eclipse.xtext.parser.antlr.Lexer> bindLexer() { + return org.eclipse.papyrus.uml.textedit.valuespecification.xtext.parser.antlr.internal.InternalUmlValueSpecificationLexer.class; + } + + // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment + public com.google.inject.Provider<org.eclipse.papyrus.uml.textedit.valuespecification.xtext.parser.antlr.internal.InternalUmlValueSpecificationLexer> provideInternalUmlValueSpecificationLexer() { + return org.eclipse.xtext.parser.antlr.LexerProvider.create(org.eclipse.papyrus.uml.textedit.valuespecification.xtext.parser.antlr.internal.InternalUmlValueSpecificationLexer.class); + } + + // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment + public void configureRuntimeLexer(com.google.inject.Binder binder) { + binder.bind(org.eclipse.xtext.parser.antlr.Lexer.class).annotatedWith(com.google.inject.name.Names.named(org.eclipse.xtext.parser.antlr.LexerBindings.RUNTIME)).to(org.eclipse.papyrus.uml.textedit.valuespecification.xtext.parser.antlr.internal.InternalUmlValueSpecificationLexer.class); + } + + // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment + public Class<? extends org.eclipse.xtext.parser.antlr.ITokenDefProvider> bindITokenDefProvider() { + return org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider.class; + } + + // contributed by org.eclipse.xtext.generator.validation.JavaValidatorFragment + @org.eclipse.xtext.service.SingletonBinding(eager=true) public Class<? extends org.eclipse.papyrus.uml.textedit.valuespecification.xtext.validation.UmlValueSpecificationJavaValidator> bindUmlValueSpecificationJavaValidator() { + return org.eclipse.papyrus.uml.textedit.valuespecification.xtext.validation.UmlValueSpecificationJavaValidator.class; + } + + // contributed by org.eclipse.xtext.generator.scoping.AbstractScopingFragment + public Class<? extends org.eclipse.xtext.scoping.IScopeProvider> bindIScopeProvider() { + return org.eclipse.papyrus.uml.textedit.valuespecification.xtext.scoping.UmlValueSpecificationScopeProvider.class; + } + + // contributed by org.eclipse.xtext.generator.scoping.AbstractScopingFragment + public void configureIScopeProviderDelegate(com.google.inject.Binder binder) { + binder.bind(org.eclipse.xtext.scoping.IScopeProvider.class).annotatedWith(com.google.inject.name.Names.named(org.eclipse.xtext.scoping.impl.AbstractDeclarativeScopeProvider.NAMED_DELEGATE)).to(org.eclipse.xtext.scoping.impl.ImportedNamespaceAwareLocalScopeProvider.class); + } + + // contributed by org.eclipse.xtext.generator.scoping.AbstractScopingFragment + public Class<? extends org.eclipse.xtext.scoping.IGlobalScopeProvider> bindIGlobalScopeProvider() { + return org.eclipse.xtext.scoping.impl.DefaultGlobalScopeProvider.class; + } + + // contributed by org.eclipse.xtext.generator.scoping.AbstractScopingFragment + public void configureIgnoreCaseLinking(com.google.inject.Binder binder) { + binder.bindConstant().annotatedWith(org.eclipse.xtext.scoping.IgnoreCaseLinking.class).to(false); + } + + // contributed by org.eclipse.xtext.generator.exporting.QualifiedNamesFragment + public Class<? extends org.eclipse.xtext.naming.IQualifiedNameProvider> bindIQualifiedNameProvider() { + return org.eclipse.xtext.naming.DefaultDeclarativeQualifiedNameProvider.class; + } + + // contributed by org.eclipse.xtext.generator.builder.BuilderIntegrationFragment + public Class<? extends org.eclipse.xtext.resource.IContainer.Manager> bindIContainer$Manager() { + return org.eclipse.xtext.resource.containers.StateBasedContainerManager.class; + } + + // contributed by org.eclipse.xtext.generator.builder.BuilderIntegrationFragment + public Class<? extends org.eclipse.xtext.resource.containers.IAllContainersState.Provider> bindIAllContainersState$Provider() { + return org.eclipse.xtext.resource.containers.ResourceSetBasedAllContainersStateProvider.class; + } + + // contributed by org.eclipse.xtext.generator.builder.BuilderIntegrationFragment + public void configureIResourceDescriptions(com.google.inject.Binder binder) { + binder.bind(org.eclipse.xtext.resource.IResourceDescriptions.class).to(org.eclipse.xtext.resource.impl.ResourceSetBasedResourceDescriptions.class); + } + + // contributed by org.eclipse.xtext.generator.builder.BuilderIntegrationFragment + public void configureIResourceDescriptionsPersisted(com.google.inject.Binder binder) { + binder.bind(org.eclipse.xtext.resource.IResourceDescriptions.class).annotatedWith(com.google.inject.name.Names.named(org.eclipse.xtext.resource.impl.ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(org.eclipse.xtext.resource.impl.ResourceSetBasedResourceDescriptions.class); + } + + // contributed by org.eclipse.xtext.generator.generator.GeneratorFragment + public Class<? extends org.eclipse.xtext.generator.IGenerator> bindIGenerator() { + return org.eclipse.papyrus.uml.textedit.valuespecification.xtext.generator.UmlValueSpecificationGenerator.class; + } + + // contributed by org.eclipse.xtext.generator.formatting.FormatterFragment + public Class<? extends org.eclipse.xtext.formatting.IFormatter> bindIFormatter() { + return org.eclipse.papyrus.uml.textedit.valuespecification.xtext.formatting.UmlValueSpecificationFormatter.class; + } + +} diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/UmlValueSpecification.ecore b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/UmlValueSpecification.ecore new file mode 100644 index 00000000000..a4a71c61ba6 --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/UmlValueSpecification.ecore @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="umlValueSpecification" nsURI="http://www.eclipse.org/papyrus/uml/textedit/valuespecification/xtext/UmlValueSpecification" + nsPrefix="umlValueSpecification"> + <eClassifiers xsi:type="ecore:EClass" name="AbstractRule"> + <eStructuralFeatures xsi:type="ecore:EReference" name="visibility" eType="#//VisibilityKind" + containment="true"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType platform:/resource/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="value" eType="ecore:EClass platform:/resource/org.eclipse.emf.ecore/model/Ecore.ecore#//EObject" + containment="true"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="instanceSpecification" + eType="ecore:EClass platform:/resource/org.eclipse.uml2.uml/model/UML.ecore#//InstanceSpecification"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="undefined" eType="#//UndefinedRule" + containment="true"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="LiteralBooleanRule"> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType platform:/resource/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="LiteralIntegerOrUnlimitedNaturalRule"> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType platform:/resource/org.eclipse.emf.ecore/model/Ecore.ecore#//EInt"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="LiteralRealRule"> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType platform:/resource/org.eclipse.emf.ecore/model/Ecore.ecore#//EDouble"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="LiteralNullRule"> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType platform:/resource/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="LiteralStringRule"> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType platform:/resource/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="UndefinedRule"> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType platform:/resource/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="VisibilityKind"> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="public" eType="ecore:EDataType platform:/resource/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="private" eType="ecore:EDataType platform:/resource/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="protected" eType="ecore:EDataType platform:/resource/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="package" eType="ecore:EDataType platform:/resource/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/> + </eClassifiers> +</ecore:EPackage> diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/UmlValueSpecification.genmodel b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/UmlValueSpecification.genmodel new file mode 100644 index 00000000000..57073137c64 --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/UmlValueSpecification.genmodel @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?> +<genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" + xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen" + editDirectory="/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.edit/src" + editorDirectory="/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.editor/src" + modelPluginID="org.eclipse.papyrus.uml.textedit.valuespecification.xtext" forceOverwrite="true" + modelName="UmlValueSpecification" updateClasspath="false" rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container" + complianceLevel="5.0" copyrightFields="false" editPluginID="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.edit" + editorPluginID="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.editor" + runtimeVersion="2.10" usedGenPackages="platform:/resource/org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore platform:/resource/org.eclipse.uml2.uml/model/UML.genmodel#//uml"> + <genPackages prefix="UmlValueSpecification" basePackage="org.eclipse.papyrus.uml.textedit.valuespecification.xtext" + disposableProviderFactory="true" ecorePackage="UmlValueSpecification.ecore#/"> + <genClasses ecoreClass="UmlValueSpecification.ecore#//AbstractRule"> + <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference UmlValueSpecification.ecore#//AbstractRule/visibility"/> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute UmlValueSpecification.ecore#//AbstractRule/name"/> + <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference UmlValueSpecification.ecore#//AbstractRule/value"/> + <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference UmlValueSpecification.ecore#//AbstractRule/instanceSpecification"/> + <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference UmlValueSpecification.ecore#//AbstractRule/undefined"/> + </genClasses> + <genClasses ecoreClass="UmlValueSpecification.ecore#//LiteralBooleanRule"> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute UmlValueSpecification.ecore#//LiteralBooleanRule/value"/> + </genClasses> + <genClasses ecoreClass="UmlValueSpecification.ecore#//LiteralIntegerOrUnlimitedNaturalRule"> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute UmlValueSpecification.ecore#//LiteralIntegerOrUnlimitedNaturalRule/value"/> + </genClasses> + <genClasses ecoreClass="UmlValueSpecification.ecore#//LiteralRealRule"> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute UmlValueSpecification.ecore#//LiteralRealRule/value"/> + </genClasses> + <genClasses ecoreClass="UmlValueSpecification.ecore#//LiteralNullRule"> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute UmlValueSpecification.ecore#//LiteralNullRule/value"/> + </genClasses> + <genClasses ecoreClass="UmlValueSpecification.ecore#//LiteralStringRule"> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute UmlValueSpecification.ecore#//LiteralStringRule/value"/> + </genClasses> + <genClasses ecoreClass="UmlValueSpecification.ecore#//UndefinedRule"> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute UmlValueSpecification.ecore#//UndefinedRule/value"/> + </genClasses> + <genClasses ecoreClass="UmlValueSpecification.ecore#//VisibilityKind"> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute UmlValueSpecification.ecore#//VisibilityKind/public"/> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute UmlValueSpecification.ecore#//VisibilityKind/private"/> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute UmlValueSpecification.ecore#//VisibilityKind/protected"/> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute UmlValueSpecification.ecore#//VisibilityKind/package"/> + </genClasses> + </genPackages> +</genmodel:GenModel> diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/UmlValueSpecification.xtextbin b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/UmlValueSpecification.xtextbin Binary files differnew file mode 100644 index 00000000000..0675228f0b1 --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/UmlValueSpecification.xtextbin diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/UmlValueSpecificationStandaloneSetupGenerated.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/UmlValueSpecificationStandaloneSetupGenerated.java new file mode 100644 index 00000000000..30802b057c7 --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/UmlValueSpecificationStandaloneSetupGenerated.java @@ -0,0 +1,45 @@ +/* +* generated by Xtext +*/ +package org.eclipse.papyrus.uml.textedit.valuespecification.xtext; + +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.xtext.ISetup; +import org.eclipse.emf.ecore.resource.Resource; + +import com.google.inject.Guice; +import com.google.inject.Injector; + +/** + * Generated from StandaloneSetup.xpt! + */ +@SuppressWarnings("all") +public class UmlValueSpecificationStandaloneSetupGenerated implements ISetup { + + public Injector createInjectorAndDoEMFRegistration() { + org.eclipse.xtext.common.TerminalsStandaloneSetup.doSetup(); + + Injector injector = createInjector(); + register(injector); + return injector; + } + + public Injector createInjector() { + return Guice.createInjector(new org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecificationRuntimeModule()); + } + + public void register(Injector injector) { + if (!EPackage.Registry.INSTANCE.containsKey("http://www.eclipse.org/papyrus/uml/textedit/valuespecification/xtext/UmlValueSpecification")) { + EPackage.Registry.INSTANCE.put("http://www.eclipse.org/papyrus/uml/textedit/valuespecification/xtext/UmlValueSpecification", org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.UmlValueSpecificationPackage.eINSTANCE); + } + + org.eclipse.xtext.resource.IResourceFactory resourceFactory = injector.getInstance(org.eclipse.xtext.resource.IResourceFactory.class); + org.eclipse.xtext.resource.IResourceServiceProvider serviceProvider = injector.getInstance(org.eclipse.xtext.resource.IResourceServiceProvider.class); + Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("umlvaluespecification", resourceFactory); + org.eclipse.xtext.resource.IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("umlvaluespecification", serviceProvider); + + + + + } +} diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/UmlValueSpecificationAntlrTokenFileProvider.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/UmlValueSpecificationAntlrTokenFileProvider.java new file mode 100644 index 00000000000..db27dc1cf2b --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/UmlValueSpecificationAntlrTokenFileProvider.java @@ -0,0 +1,15 @@ +/* +* generated by Xtext +*/ +package org.eclipse.papyrus.uml.textedit.valuespecification.xtext.parser.antlr; + +import java.io.InputStream; +import org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider; + +public class UmlValueSpecificationAntlrTokenFileProvider implements IAntlrTokenFileProvider { + + public InputStream getAntlrTokenFile() { + ClassLoader classLoader = getClass().getClassLoader(); + return classLoader.getResourceAsStream("org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.tokens"); + } +} diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/UmlValueSpecificationParser.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/UmlValueSpecificationParser.java new file mode 100644 index 00000000000..aa28767222f --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/UmlValueSpecificationParser.java @@ -0,0 +1,39 @@ +/* +* generated by Xtext +*/ +package org.eclipse.papyrus.uml.textedit.valuespecification.xtext.parser.antlr; + +import com.google.inject.Inject; + +import org.eclipse.xtext.parser.antlr.XtextTokenStream; +import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.services.UmlValueSpecificationGrammarAccess; + +public class UmlValueSpecificationParser extends org.eclipse.xtext.parser.antlr.AbstractAntlrParser { + + @Inject + private UmlValueSpecificationGrammarAccess grammarAccess; + + @Override + protected void setInitialHiddenTokens(XtextTokenStream tokenStream) { + tokenStream.setInitialHiddenTokens("RULE_WS", "RULE_ML_COMMENT", "RULE_SL_COMMENT"); + } + + @Override + protected org.eclipse.papyrus.uml.textedit.valuespecification.xtext.parser.antlr.internal.InternalUmlValueSpecificationParser createParser(XtextTokenStream stream) { + return new org.eclipse.papyrus.uml.textedit.valuespecification.xtext.parser.antlr.internal.InternalUmlValueSpecificationParser(stream, getGrammarAccess()); + } + + @Override + protected String getDefaultRuleName() { + return "AbstractRule"; + } + + public UmlValueSpecificationGrammarAccess getGrammarAccess() { + return this.grammarAccess; + } + + public void setGrammarAccess(UmlValueSpecificationGrammarAccess grammarAccess) { + this.grammarAccess = grammarAccess; + } + +} diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g new file mode 100644 index 00000000000..bdeb6e1478b --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g @@ -0,0 +1,581 @@ +/* +* generated by Xtext +*/ +grammar InternalUmlValueSpecification; + +options { + superClass=AbstractInternalAntlrParser; + +} + +@lexer::header { +package org.eclipse.papyrus.uml.textedit.valuespecification.xtext.parser.antlr.internal; + +// Hack: Use our own Lexer superclass by means of import. +// Currently there is no other way to specify the superclass for the lexer. +import org.eclipse.xtext.parser.antlr.Lexer; +} + +@parser::header { +package org.eclipse.papyrus.uml.textedit.valuespecification.xtext.parser.antlr.internal; + +import org.eclipse.xtext.*; +import org.eclipse.xtext.parser.*; +import org.eclipse.xtext.parser.impl.*; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.xtext.parser.antlr.AbstractInternalAntlrParser; +import org.eclipse.xtext.parser.antlr.XtextTokenStream; +import org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens; +import org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken; +import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.services.UmlValueSpecificationGrammarAccess; + +} + +@parser::members { + + private UmlValueSpecificationGrammarAccess grammarAccess; + + public InternalUmlValueSpecificationParser(TokenStream input, UmlValueSpecificationGrammarAccess grammarAccess) { + this(input); + this.grammarAccess = grammarAccess; + registerRules(grammarAccess.getGrammar()); + } + + @Override + protected String getFirstRuleName() { + return "AbstractRule"; + } + + @Override + protected UmlValueSpecificationGrammarAccess getGrammarAccess() { + return grammarAccess; + } +} + +@rulecatch { + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } +} + + + + +// Entry rule entryRuleAbstractRule +entryRuleAbstractRule returns [EObject current=null] + : + { newCompositeNode(grammarAccess.getAbstractRuleRule()); } + iv_ruleAbstractRule=ruleAbstractRule + { $current=$iv_ruleAbstractRule.current; } + EOF +; + +// Rule AbstractRule +ruleAbstractRule returns [EObject current=null] + @init { enterRule(); + } + @after { leaveRule(); }: +((( +( + { + newCompositeNode(grammarAccess.getAbstractRuleAccess().getVisibilityVisibilityKindParserRuleCall_0_0_0()); + } + lv_visibility_0_0=ruleVisibilityKind { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getAbstractRuleRule()); + } + set( + $current, + "visibility", + lv_visibility_0_0, + "VisibilityKind"); + afterParserOrEnumRuleCall(); + } + +) +)?(( +( + lv_name_1_0=RULE_ID + { + newLeafNode(lv_name_1_0, grammarAccess.getAbstractRuleAccess().getNameIDTerminalRuleCall_0_1_0_0()); + } + { + if ($current==null) { + $current = createModelElement(grammarAccess.getAbstractRuleRule()); + } + setWithLastConsumed( + $current, + "name", + lv_name_1_0, + "ID"); + } + +) +) otherlv_2='=' + { + newLeafNode(otherlv_2, grammarAccess.getAbstractRuleAccess().getEqualsSignKeyword_0_1_1()); + } +)?(( +( +( + { + newCompositeNode(grammarAccess.getAbstractRuleAccess().getValueLiteralBooleanRuleParserRuleCall_0_2_0_0_0()); + } + lv_value_3_1=ruleLiteralBooleanRule { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getAbstractRuleRule()); + } + set( + $current, + "value", + lv_value_3_1, + "LiteralBooleanRule"); + afterParserOrEnumRuleCall(); + } + + | { + newCompositeNode(grammarAccess.getAbstractRuleAccess().getValueLiteralIntegerOrUnlimitedNaturalRuleParserRuleCall_0_2_0_0_1()); + } + lv_value_3_2=ruleLiteralIntegerOrUnlimitedNaturalRule { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getAbstractRuleRule()); + } + set( + $current, + "value", + lv_value_3_2, + "LiteralIntegerOrUnlimitedNaturalRule"); + afterParserOrEnumRuleCall(); + } + + | { + newCompositeNode(grammarAccess.getAbstractRuleAccess().getValueLiteralRealRuleParserRuleCall_0_2_0_0_2()); + } + lv_value_3_3=ruleLiteralRealRule { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getAbstractRuleRule()); + } + set( + $current, + "value", + lv_value_3_3, + "LiteralRealRule"); + afterParserOrEnumRuleCall(); + } + + | { + newCompositeNode(grammarAccess.getAbstractRuleAccess().getValueLiteralNullRuleParserRuleCall_0_2_0_0_3()); + } + lv_value_3_4=ruleLiteralNullRule { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getAbstractRuleRule()); + } + set( + $current, + "value", + lv_value_3_4, + "LiteralNullRule"); + afterParserOrEnumRuleCall(); + } + + | { + newCompositeNode(grammarAccess.getAbstractRuleAccess().getValueLiteralStringRuleParserRuleCall_0_2_0_0_4()); + } + lv_value_3_5=ruleLiteralStringRule { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getAbstractRuleRule()); + } + set( + $current, + "value", + lv_value_3_5, + "LiteralStringRule"); + afterParserOrEnumRuleCall(); + } + +) + +) +) + |( +( + { + if ($current==null) { + $current = createModelElement(grammarAccess.getAbstractRuleRule()); + } + } + otherlv_4=RULE_ID + { + newLeafNode(otherlv_4, grammarAccess.getAbstractRuleAccess().getInstanceSpecificationInstanceSpecificationCrossReference_0_2_1_0()); + } + +) +))) + |( +( + { + newCompositeNode(grammarAccess.getAbstractRuleAccess().getUndefinedUndefinedRuleParserRuleCall_1_0()); + } + lv_undefined_5_0=ruleUndefinedRule { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getAbstractRuleRule()); + } + set( + $current, + "undefined", + lv_undefined_5_0, + "UndefinedRule"); + afterParserOrEnumRuleCall(); + } + +) +)) +; + + + + + +// Entry rule entryRuleLiteralBooleanRule +entryRuleLiteralBooleanRule returns [EObject current=null] + : + { newCompositeNode(grammarAccess.getLiteralBooleanRuleRule()); } + iv_ruleLiteralBooleanRule=ruleLiteralBooleanRule + { $current=$iv_ruleLiteralBooleanRule.current; } + EOF +; + +// Rule LiteralBooleanRule +ruleLiteralBooleanRule returns [EObject current=null] + @init { enterRule(); + } + @after { leaveRule(); }: +( +( +( + lv_value_0_1= 'true' + { + newLeafNode(lv_value_0_1, grammarAccess.getLiteralBooleanRuleAccess().getValueTrueKeyword_0_0()); + } + + { + if ($current==null) { + $current = createModelElement(grammarAccess.getLiteralBooleanRuleRule()); + } + setWithLastConsumed($current, "value", lv_value_0_1, null); + } + + | lv_value_0_2= 'false' + { + newLeafNode(lv_value_0_2, grammarAccess.getLiteralBooleanRuleAccess().getValueFalseKeyword_0_1()); + } + + { + if ($current==null) { + $current = createModelElement(grammarAccess.getLiteralBooleanRuleRule()); + } + setWithLastConsumed($current, "value", lv_value_0_2, null); + } + +) + +) +) +; + + + + + +// Entry rule entryRuleLiteralIntegerOrUnlimitedNaturalRule +entryRuleLiteralIntegerOrUnlimitedNaturalRule returns [EObject current=null] + : + { newCompositeNode(grammarAccess.getLiteralIntegerOrUnlimitedNaturalRuleRule()); } + iv_ruleLiteralIntegerOrUnlimitedNaturalRule=ruleLiteralIntegerOrUnlimitedNaturalRule + { $current=$iv_ruleLiteralIntegerOrUnlimitedNaturalRule.current; } + EOF +; + +// Rule LiteralIntegerOrUnlimitedNaturalRule +ruleLiteralIntegerOrUnlimitedNaturalRule returns [EObject current=null] + @init { enterRule(); + } + @after { leaveRule(); }: +( +( + lv_value_0_0=RULE_INT + { + newLeafNode(lv_value_0_0, grammarAccess.getLiteralIntegerOrUnlimitedNaturalRuleAccess().getValueINTTerminalRuleCall_0()); + } + { + if ($current==null) { + $current = createModelElement(grammarAccess.getLiteralIntegerOrUnlimitedNaturalRuleRule()); + } + setWithLastConsumed( + $current, + "value", + lv_value_0_0, + "INT"); + } + +) +) +; + + + + + +// Entry rule entryRuleLiteralRealRule +entryRuleLiteralRealRule returns [EObject current=null] + : + { newCompositeNode(grammarAccess.getLiteralRealRuleRule()); } + iv_ruleLiteralRealRule=ruleLiteralRealRule + { $current=$iv_ruleLiteralRealRule.current; } + EOF +; + +// Rule LiteralRealRule +ruleLiteralRealRule returns [EObject current=null] + @init { enterRule(); + } + @after { leaveRule(); }: +( +( + lv_value_0_0=RULE_DOUBLE + { + newLeafNode(lv_value_0_0, grammarAccess.getLiteralRealRuleAccess().getValueDOUBLETerminalRuleCall_0()); + } + { + if ($current==null) { + $current = createModelElement(grammarAccess.getLiteralRealRuleRule()); + } + setWithLastConsumed( + $current, + "value", + lv_value_0_0, + "DOUBLE"); + } + +) +) +; + + + + + +// Entry rule entryRuleLiteralNullRule +entryRuleLiteralNullRule returns [EObject current=null] + : + { newCompositeNode(grammarAccess.getLiteralNullRuleRule()); } + iv_ruleLiteralNullRule=ruleLiteralNullRule + { $current=$iv_ruleLiteralNullRule.current; } + EOF +; + +// Rule LiteralNullRule +ruleLiteralNullRule returns [EObject current=null] + @init { enterRule(); + } + @after { leaveRule(); }: +( +( + lv_value_0_0= 'null' + { + newLeafNode(lv_value_0_0, grammarAccess.getLiteralNullRuleAccess().getValueNullKeyword_0()); + } + + { + if ($current==null) { + $current = createModelElement(grammarAccess.getLiteralNullRuleRule()); + } + setWithLastConsumed($current, "value", lv_value_0_0, "null"); + } + +) +) +; + + + + + +// Entry rule entryRuleLiteralStringRule +entryRuleLiteralStringRule returns [EObject current=null] + : + { newCompositeNode(grammarAccess.getLiteralStringRuleRule()); } + iv_ruleLiteralStringRule=ruleLiteralStringRule + { $current=$iv_ruleLiteralStringRule.current; } + EOF +; + +// Rule LiteralStringRule +ruleLiteralStringRule returns [EObject current=null] + @init { enterRule(); + } + @after { leaveRule(); }: +( +( + lv_value_0_0=RULE_STRING + { + newLeafNode(lv_value_0_0, grammarAccess.getLiteralStringRuleAccess().getValueSTRINGTerminalRuleCall_0()); + } + { + if ($current==null) { + $current = createModelElement(grammarAccess.getLiteralStringRuleRule()); + } + setWithLastConsumed( + $current, + "value", + lv_value_0_0, + "STRING"); + } + +) +) +; + + + + + +// Entry rule entryRuleUndefinedRule +entryRuleUndefinedRule returns [EObject current=null] + : + { newCompositeNode(grammarAccess.getUndefinedRuleRule()); } + iv_ruleUndefinedRule=ruleUndefinedRule + { $current=$iv_ruleUndefinedRule.current; } + EOF +; + +// Rule UndefinedRule +ruleUndefinedRule returns [EObject current=null] + @init { enterRule(); + } + @after { leaveRule(); }: +( +( + lv_value_0_0= '<Undefined>' + { + newLeafNode(lv_value_0_0, grammarAccess.getUndefinedRuleAccess().getValueUndefinedKeyword_0()); + } + + { + if ($current==null) { + $current = createModelElement(grammarAccess.getUndefinedRuleRule()); + } + setWithLastConsumed($current, "value", lv_value_0_0, "<Undefined>"); + } + +) +) +; + + + + + +// Entry rule entryRuleVisibilityKind +entryRuleVisibilityKind returns [EObject current=null] + : + { newCompositeNode(grammarAccess.getVisibilityKindRule()); } + iv_ruleVisibilityKind=ruleVisibilityKind + { $current=$iv_ruleVisibilityKind.current; } + EOF +; + +// Rule VisibilityKind +ruleVisibilityKind returns [EObject current=null] + @init { enterRule(); + } + @after { leaveRule(); }: +(( +( + lv_public_0_0= '+' + { + newLeafNode(lv_public_0_0, grammarAccess.getVisibilityKindAccess().getPublicPlusSignKeyword_0_0()); + } + + { + if ($current==null) { + $current = createModelElement(grammarAccess.getVisibilityKindRule()); + } + setWithLastConsumed($current, "public", lv_public_0_0, "+"); + } + +) +) + |( +( + lv_private_1_0= '-' + { + newLeafNode(lv_private_1_0, grammarAccess.getVisibilityKindAccess().getPrivateHyphenMinusKeyword_1_0()); + } + + { + if ($current==null) { + $current = createModelElement(grammarAccess.getVisibilityKindRule()); + } + setWithLastConsumed($current, "private", lv_private_1_0, "-"); + } + +) +) + |( +( + lv_protected_2_0= '#' + { + newLeafNode(lv_protected_2_0, grammarAccess.getVisibilityKindAccess().getProtectedNumberSignKeyword_2_0()); + } + + { + if ($current==null) { + $current = createModelElement(grammarAccess.getVisibilityKindRule()); + } + setWithLastConsumed($current, "protected", lv_protected_2_0, "#"); + } + +) +) + |( +( + lv_package_3_0= '~' + { + newLeafNode(lv_package_3_0, grammarAccess.getVisibilityKindAccess().getPackageTildeKeyword_3_0()); + } + + { + if ($current==null) { + $current = createModelElement(grammarAccess.getVisibilityKindRule()); + } + setWithLastConsumed($current, "package", lv_package_3_0, "~"); + } + +) +)) +; + + + + + +RULE_DOUBLE : ('0'..'9')+ '.' ('0'..'9')+; + +RULE_ID : '^'? ('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'_'|'0'..'9')*; + +RULE_INT : ('0'..'9')+; + +RULE_STRING : ('"' ('\\' .|~(('\\'|'"')))* '"'|'\'' ('\\' .|~(('\\'|'\'')))* '\''); + +RULE_ML_COMMENT : '/*' ( options {greedy=false;} : . )*'*/'; + +RULE_SL_COMMENT : '//' ~(('\n'|'\r'))* ('\r'? '\n')?; + +RULE_WS : (' '|'\t'|'\r'|'\n')+; + +RULE_ANY_OTHER : .; + + diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.tokens b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.tokens new file mode 100644 index 00000000000..cc30bba1ee5 --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.tokens @@ -0,0 +1,26 @@ +'#'=19 +'+'=17 +'-'=18 +'<Undefined>'=16 +'='=12 +'false'=14 +'null'=15 +'true'=13 +'~'=20 +RULE_ANY_OTHER=11 +RULE_DOUBLE=6 +RULE_ID=4 +RULE_INT=5 +RULE_ML_COMMENT=8 +RULE_SL_COMMENT=9 +RULE_STRING=7 +RULE_WS=10 +T__12=12 +T__13=13 +T__14=14 +T__15=15 +T__16=16 +T__17=17 +T__18=18 +T__19=19 +T__20=20 diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecificationLexer.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecificationLexer.java new file mode 100644 index 00000000000..427f65fa620 --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecificationLexer.java @@ -0,0 +1,1116 @@ +package org.eclipse.papyrus.uml.textedit.valuespecification.xtext.parser.antlr.internal; + +// Hack: Use our own Lexer superclass by means of import. +// Currently there is no other way to specify the superclass for the lexer. +import org.eclipse.xtext.parser.antlr.Lexer; + + +import org.antlr.runtime.*; +import java.util.Stack; +import java.util.List; +import java.util.ArrayList; + +@SuppressWarnings("all") +public class InternalUmlValueSpecificationLexer extends Lexer { + public static final int T__19=19; + public static final int RULE_ID=4; + public static final int RULE_STRING=7; + public static final int T__16=16; + public static final int T__15=15; + public static final int T__18=18; + public static final int T__17=17; + public static final int T__12=12; + public static final int T__14=14; + public static final int T__13=13; + public static final int RULE_ANY_OTHER=11; + public static final int T__20=20; + public static final int RULE_INT=5; + public static final int RULE_WS=10; + public static final int RULE_SL_COMMENT=9; + public static final int EOF=-1; + public static final int RULE_DOUBLE=6; + public static final int RULE_ML_COMMENT=8; + + // delegates + // delegators + + public InternalUmlValueSpecificationLexer() {;} + public InternalUmlValueSpecificationLexer(CharStream input) { + this(input, new RecognizerSharedState()); + } + public InternalUmlValueSpecificationLexer(CharStream input, RecognizerSharedState state) { + super(input,state); + + } + public String getGrammarFileName() { return "../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g"; } + + // $ANTLR start "T__12" + public final void mT__12() throws RecognitionException { + try { + int _type = T__12; + int _channel = DEFAULT_TOKEN_CHANNEL; + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:11:7: ( '=' ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:11:9: '=' + { + match('='); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__12" + + // $ANTLR start "T__13" + public final void mT__13() throws RecognitionException { + try { + int _type = T__13; + int _channel = DEFAULT_TOKEN_CHANNEL; + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:12:7: ( 'true' ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:12:9: 'true' + { + match("true"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__13" + + // $ANTLR start "T__14" + public final void mT__14() throws RecognitionException { + try { + int _type = T__14; + int _channel = DEFAULT_TOKEN_CHANNEL; + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:13:7: ( 'false' ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:13:9: 'false' + { + match("false"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__14" + + // $ANTLR start "T__15" + public final void mT__15() throws RecognitionException { + try { + int _type = T__15; + int _channel = DEFAULT_TOKEN_CHANNEL; + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:14:7: ( 'null' ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:14:9: 'null' + { + match("null"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__15" + + // $ANTLR start "T__16" + public final void mT__16() throws RecognitionException { + try { + int _type = T__16; + int _channel = DEFAULT_TOKEN_CHANNEL; + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:15:7: ( '<Undefined>' ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:15:9: '<Undefined>' + { + match("<Undefined>"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__16" + + // $ANTLR start "T__17" + public final void mT__17() throws RecognitionException { + try { + int _type = T__17; + int _channel = DEFAULT_TOKEN_CHANNEL; + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:16:7: ( '+' ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:16:9: '+' + { + match('+'); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__17" + + // $ANTLR start "T__18" + public final void mT__18() throws RecognitionException { + try { + int _type = T__18; + int _channel = DEFAULT_TOKEN_CHANNEL; + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:17:7: ( '-' ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:17:9: '-' + { + match('-'); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__18" + + // $ANTLR start "T__19" + public final void mT__19() throws RecognitionException { + try { + int _type = T__19; + int _channel = DEFAULT_TOKEN_CHANNEL; + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:18:7: ( '#' ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:18:9: '#' + { + match('#'); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__19" + + // $ANTLR start "T__20" + public final void mT__20() throws RecognitionException { + try { + int _type = T__20; + int _channel = DEFAULT_TOKEN_CHANNEL; + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:19:7: ( '~' ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:19:9: '~' + { + match('~'); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__20" + + // $ANTLR start "RULE_DOUBLE" + public final void mRULE_DOUBLE() throws RecognitionException { + try { + int _type = RULE_DOUBLE; + int _channel = DEFAULT_TOKEN_CHANNEL; + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:565:13: ( ( '0' .. '9' )+ '.' ( '0' .. '9' )+ ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:565:15: ( '0' .. '9' )+ '.' ( '0' .. '9' )+ + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:565:15: ( '0' .. '9' )+ + int cnt1=0; + loop1: + do { + int alt1=2; + int LA1_0 = input.LA(1); + + if ( ((LA1_0>='0' && LA1_0<='9')) ) { + alt1=1; + } + + + switch (alt1) { + case 1 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:565:16: '0' .. '9' + { + matchRange('0','9'); + + } + break; + + default : + if ( cnt1 >= 1 ) break loop1; + EarlyExitException eee = + new EarlyExitException(1, input); + throw eee; + } + cnt1++; + } while (true); + + match('.'); + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:565:31: ( '0' .. '9' )+ + int cnt2=0; + loop2: + do { + int alt2=2; + int LA2_0 = input.LA(1); + + if ( ((LA2_0>='0' && LA2_0<='9')) ) { + alt2=1; + } + + + switch (alt2) { + case 1 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:565:32: '0' .. '9' + { + matchRange('0','9'); + + } + break; + + default : + if ( cnt2 >= 1 ) break loop2; + EarlyExitException eee = + new EarlyExitException(2, input); + throw eee; + } + cnt2++; + } while (true); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_DOUBLE" + + // $ANTLR start "RULE_ID" + public final void mRULE_ID() throws RecognitionException { + try { + int _type = RULE_ID; + int _channel = DEFAULT_TOKEN_CHANNEL; + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:567:9: ( ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:567:11: ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:567:11: ( '^' )? + int alt3=2; + int LA3_0 = input.LA(1); + + if ( (LA3_0=='^') ) { + alt3=1; + } + switch (alt3) { + case 1 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:567:11: '^' + { + match('^'); + + } + break; + + } + + if ( (input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z') ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:567:40: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* + loop4: + do { + int alt4=2; + int LA4_0 = input.LA(1); + + if ( ((LA4_0>='0' && LA4_0<='9')||(LA4_0>='A' && LA4_0<='Z')||LA4_0=='_'||(LA4_0>='a' && LA4_0<='z')) ) { + alt4=1; + } + + + switch (alt4) { + case 1 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g: + { + if ( (input.LA(1)>='0' && input.LA(1)<='9')||(input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z') ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + + } + break; + + default : + break loop4; + } + } while (true); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_ID" + + // $ANTLR start "RULE_INT" + public final void mRULE_INT() throws RecognitionException { + try { + int _type = RULE_INT; + int _channel = DEFAULT_TOKEN_CHANNEL; + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:569:10: ( ( '0' .. '9' )+ ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:569:12: ( '0' .. '9' )+ + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:569:12: ( '0' .. '9' )+ + int cnt5=0; + loop5: + do { + int alt5=2; + int LA5_0 = input.LA(1); + + if ( ((LA5_0>='0' && LA5_0<='9')) ) { + alt5=1; + } + + + switch (alt5) { + case 1 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:569:13: '0' .. '9' + { + matchRange('0','9'); + + } + break; + + default : + if ( cnt5 >= 1 ) break loop5; + EarlyExitException eee = + new EarlyExitException(5, input); + throw eee; + } + cnt5++; + } while (true); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_INT" + + // $ANTLR start "RULE_STRING" + public final void mRULE_STRING() throws RecognitionException { + try { + int _type = RULE_STRING; + int _channel = DEFAULT_TOKEN_CHANNEL; + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:571:13: ( ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:571:15: ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:571:15: ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' ) + int alt8=2; + int LA8_0 = input.LA(1); + + if ( (LA8_0=='\"') ) { + alt8=1; + } + else if ( (LA8_0=='\'') ) { + alt8=2; + } + else { + NoViableAltException nvae = + new NoViableAltException("", 8, 0, input); + + throw nvae; + } + switch (alt8) { + case 1 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:571:16: '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' + { + match('\"'); + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:571:20: ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* + loop6: + do { + int alt6=3; + int LA6_0 = input.LA(1); + + if ( (LA6_0=='\\') ) { + alt6=1; + } + else if ( ((LA6_0>='\u0000' && LA6_0<='!')||(LA6_0>='#' && LA6_0<='[')||(LA6_0>=']' && LA6_0<='\uFFFF')) ) { + alt6=2; + } + + + switch (alt6) { + case 1 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:571:21: '\\\\' . + { + match('\\'); + matchAny(); + + } + break; + case 2 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:571:28: ~ ( ( '\\\\' | '\"' ) ) + { + if ( (input.LA(1)>='\u0000' && input.LA(1)<='!')||(input.LA(1)>='#' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFF') ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + + } + break; + + default : + break loop6; + } + } while (true); + + match('\"'); + + } + break; + case 2 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:571:48: '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' + { + match('\''); + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:571:53: ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* + loop7: + do { + int alt7=3; + int LA7_0 = input.LA(1); + + if ( (LA7_0=='\\') ) { + alt7=1; + } + else if ( ((LA7_0>='\u0000' && LA7_0<='&')||(LA7_0>='(' && LA7_0<='[')||(LA7_0>=']' && LA7_0<='\uFFFF')) ) { + alt7=2; + } + + + switch (alt7) { + case 1 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:571:54: '\\\\' . + { + match('\\'); + matchAny(); + + } + break; + case 2 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:571:61: ~ ( ( '\\\\' | '\\'' ) ) + { + if ( (input.LA(1)>='\u0000' && input.LA(1)<='&')||(input.LA(1)>='(' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFF') ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + + } + break; + + default : + break loop7; + } + } while (true); + + match('\''); + + } + break; + + } + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_STRING" + + // $ANTLR start "RULE_ML_COMMENT" + public final void mRULE_ML_COMMENT() throws RecognitionException { + try { + int _type = RULE_ML_COMMENT; + int _channel = DEFAULT_TOKEN_CHANNEL; + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:573:17: ( '/*' ( options {greedy=false; } : . )* '*/' ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:573:19: '/*' ( options {greedy=false; } : . )* '*/' + { + match("/*"); + + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:573:24: ( options {greedy=false; } : . )* + loop9: + do { + int alt9=2; + int LA9_0 = input.LA(1); + + if ( (LA9_0=='*') ) { + int LA9_1 = input.LA(2); + + if ( (LA9_1=='/') ) { + alt9=2; + } + else if ( ((LA9_1>='\u0000' && LA9_1<='.')||(LA9_1>='0' && LA9_1<='\uFFFF')) ) { + alt9=1; + } + + + } + else if ( ((LA9_0>='\u0000' && LA9_0<=')')||(LA9_0>='+' && LA9_0<='\uFFFF')) ) { + alt9=1; + } + + + switch (alt9) { + case 1 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:573:52: . + { + matchAny(); + + } + break; + + default : + break loop9; + } + } while (true); + + match("*/"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_ML_COMMENT" + + // $ANTLR start "RULE_SL_COMMENT" + public final void mRULE_SL_COMMENT() throws RecognitionException { + try { + int _type = RULE_SL_COMMENT; + int _channel = DEFAULT_TOKEN_CHANNEL; + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:575:17: ( '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:575:19: '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? + { + match("//"); + + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:575:24: (~ ( ( '\\n' | '\\r' ) ) )* + loop10: + do { + int alt10=2; + int LA10_0 = input.LA(1); + + if ( ((LA10_0>='\u0000' && LA10_0<='\t')||(LA10_0>='\u000B' && LA10_0<='\f')||(LA10_0>='\u000E' && LA10_0<='\uFFFF')) ) { + alt10=1; + } + + + switch (alt10) { + case 1 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:575:24: ~ ( ( '\\n' | '\\r' ) ) + { + if ( (input.LA(1)>='\u0000' && input.LA(1)<='\t')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\uFFFF') ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + + } + break; + + default : + break loop10; + } + } while (true); + + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:575:40: ( ( '\\r' )? '\\n' )? + int alt12=2; + int LA12_0 = input.LA(1); + + if ( (LA12_0=='\n'||LA12_0=='\r') ) { + alt12=1; + } + switch (alt12) { + case 1 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:575:41: ( '\\r' )? '\\n' + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:575:41: ( '\\r' )? + int alt11=2; + int LA11_0 = input.LA(1); + + if ( (LA11_0=='\r') ) { + alt11=1; + } + switch (alt11) { + case 1 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:575:41: '\\r' + { + match('\r'); + + } + break; + + } + + match('\n'); + + } + break; + + } + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_SL_COMMENT" + + // $ANTLR start "RULE_WS" + public final void mRULE_WS() throws RecognitionException { + try { + int _type = RULE_WS; + int _channel = DEFAULT_TOKEN_CHANNEL; + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:577:9: ( ( ' ' | '\\t' | '\\r' | '\\n' )+ ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:577:11: ( ' ' | '\\t' | '\\r' | '\\n' )+ + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:577:11: ( ' ' | '\\t' | '\\r' | '\\n' )+ + int cnt13=0; + loop13: + do { + int alt13=2; + int LA13_0 = input.LA(1); + + if ( ((LA13_0>='\t' && LA13_0<='\n')||LA13_0=='\r'||LA13_0==' ') ) { + alt13=1; + } + + + switch (alt13) { + case 1 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g: + { + if ( (input.LA(1)>='\t' && input.LA(1)<='\n')||input.LA(1)=='\r'||input.LA(1)==' ' ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + + } + break; + + default : + if ( cnt13 >= 1 ) break loop13; + EarlyExitException eee = + new EarlyExitException(13, input); + throw eee; + } + cnt13++; + } while (true); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_WS" + + // $ANTLR start "RULE_ANY_OTHER" + public final void mRULE_ANY_OTHER() throws RecognitionException { + try { + int _type = RULE_ANY_OTHER; + int _channel = DEFAULT_TOKEN_CHANNEL; + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:579:16: ( . ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:579:18: . + { + matchAny(); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_ANY_OTHER" + + public void mTokens() throws RecognitionException { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:1:8: ( T__12 | T__13 | T__14 | T__15 | T__16 | T__17 | T__18 | T__19 | T__20 | RULE_DOUBLE | RULE_ID | RULE_INT | RULE_STRING | RULE_ML_COMMENT | RULE_SL_COMMENT | RULE_WS | RULE_ANY_OTHER ) + int alt14=17; + alt14 = dfa14.predict(input); + switch (alt14) { + case 1 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:1:10: T__12 + { + mT__12(); + + } + break; + case 2 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:1:16: T__13 + { + mT__13(); + + } + break; + case 3 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:1:22: T__14 + { + mT__14(); + + } + break; + case 4 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:1:28: T__15 + { + mT__15(); + + } + break; + case 5 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:1:34: T__16 + { + mT__16(); + + } + break; + case 6 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:1:40: T__17 + { + mT__17(); + + } + break; + case 7 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:1:46: T__18 + { + mT__18(); + + } + break; + case 8 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:1:52: T__19 + { + mT__19(); + + } + break; + case 9 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:1:58: T__20 + { + mT__20(); + + } + break; + case 10 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:1:64: RULE_DOUBLE + { + mRULE_DOUBLE(); + + } + break; + case 11 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:1:76: RULE_ID + { + mRULE_ID(); + + } + break; + case 12 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:1:84: RULE_INT + { + mRULE_INT(); + + } + break; + case 13 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:1:93: RULE_STRING + { + mRULE_STRING(); + + } + break; + case 14 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:1:105: RULE_ML_COMMENT + { + mRULE_ML_COMMENT(); + + } + break; + case 15 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:1:121: RULE_SL_COMMENT + { + mRULE_SL_COMMENT(); + + } + break; + case 16 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:1:137: RULE_WS + { + mRULE_WS(); + + } + break; + case 17 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:1:145: RULE_ANY_OTHER + { + mRULE_ANY_OTHER(); + + } + break; + + } + + } + + + protected DFA14 dfa14 = new DFA14(this); + static final String DFA14_eotS = + "\2\uffff\3\24\1\21\4\uffff\1\34\1\21\1\uffff\3\21\3\uffff\1\24"+ + "\1\uffff\2\24\6\uffff\1\34\5\uffff\3\24\1\51\1\24\1\53\1\uffff\1"+ + "\54\2\uffff"; + static final String DFA14_eofS = + "\55\uffff"; + static final String DFA14_minS = + "\1\0\1\uffff\1\162\1\141\1\165\1\125\4\uffff\1\56\1\101\1\uffff"+ + "\2\0\1\52\3\uffff\1\165\1\uffff\2\154\6\uffff\1\56\5\uffff\1\145"+ + "\1\163\1\154\1\60\1\145\1\60\1\uffff\1\60\2\uffff"; + static final String DFA14_maxS = + "\1\uffff\1\uffff\1\162\1\141\1\165\1\125\4\uffff\1\71\1\172\1\uffff"+ + "\2\uffff\1\57\3\uffff\1\165\1\uffff\2\154\6\uffff\1\71\5\uffff\1"+ + "\145\1\163\1\154\1\172\1\145\1\172\1\uffff\1\172\2\uffff"; + static final String DFA14_acceptS = + "\1\uffff\1\1\4\uffff\1\6\1\7\1\10\1\11\2\uffff\1\13\3\uffff\1\20"+ + "\1\21\1\1\1\uffff\1\13\2\uffff\1\5\1\6\1\7\1\10\1\11\1\14\1\uffff"+ + "\1\12\1\15\1\16\1\17\1\20\6\uffff\1\2\1\uffff\1\4\1\3"; + static final String DFA14_specialS = + "\1\2\14\uffff\1\1\1\0\36\uffff}>"; + static final String[] DFA14_transitionS = { + "\11\21\2\20\2\21\1\20\22\21\1\20\1\21\1\15\1\10\3\21\1\16\3"+ + "\21\1\6\1\21\1\7\1\21\1\17\12\12\2\21\1\5\1\1\3\21\32\14\3\21"+ + "\1\13\1\14\1\21\5\14\1\3\7\14\1\4\5\14\1\2\6\14\3\21\1\11\uff81"+ + "\21", + "", + "\1\23", + "\1\25", + "\1\26", + "\1\27", + "", + "", + "", + "", + "\1\36\1\uffff\12\35", + "\32\24\4\uffff\1\24\1\uffff\32\24", + "", + "\0\37", + "\0\37", + "\1\40\4\uffff\1\41", + "", + "", + "", + "\1\43", + "", + "\1\44", + "\1\45", + "", + "", + "", + "", + "", + "", + "\1\36\1\uffff\12\35", + "", + "", + "", + "", + "", + "\1\46", + "\1\47", + "\1\50", + "\12\24\7\uffff\32\24\4\uffff\1\24\1\uffff\32\24", + "\1\52", + "\12\24\7\uffff\32\24\4\uffff\1\24\1\uffff\32\24", + "", + "\12\24\7\uffff\32\24\4\uffff\1\24\1\uffff\32\24", + "", + "" + }; + + static final short[] DFA14_eot = DFA.unpackEncodedString(DFA14_eotS); + static final short[] DFA14_eof = DFA.unpackEncodedString(DFA14_eofS); + static final char[] DFA14_min = DFA.unpackEncodedStringToUnsignedChars(DFA14_minS); + static final char[] DFA14_max = DFA.unpackEncodedStringToUnsignedChars(DFA14_maxS); + static final short[] DFA14_accept = DFA.unpackEncodedString(DFA14_acceptS); + static final short[] DFA14_special = DFA.unpackEncodedString(DFA14_specialS); + static final short[][] DFA14_transition; + + static { + int numStates = DFA14_transitionS.length; + DFA14_transition = new short[numStates][]; + for (int i=0; i<numStates; i++) { + DFA14_transition[i] = DFA.unpackEncodedString(DFA14_transitionS[i]); + } + } + + class DFA14 extends DFA { + + public DFA14(BaseRecognizer recognizer) { + this.recognizer = recognizer; + this.decisionNumber = 14; + this.eot = DFA14_eot; + this.eof = DFA14_eof; + this.min = DFA14_min; + this.max = DFA14_max; + this.accept = DFA14_accept; + this.special = DFA14_special; + this.transition = DFA14_transition; + } + public String getDescription() { + return "1:1: Tokens : ( T__12 | T__13 | T__14 | T__15 | T__16 | T__17 | T__18 | T__19 | T__20 | RULE_DOUBLE | RULE_ID | RULE_INT | RULE_STRING | RULE_ML_COMMENT | RULE_SL_COMMENT | RULE_WS | RULE_ANY_OTHER );"; + } + public int specialStateTransition(int s, IntStream _input) throws NoViableAltException { + IntStream input = _input; + int _s = s; + switch ( s ) { + case 0 : + int LA14_14 = input.LA(1); + + s = -1; + if ( ((LA14_14>='\u0000' && LA14_14<='\uFFFF')) ) {s = 31;} + + else s = 17; + + if ( s>=0 ) return s; + break; + case 1 : + int LA14_13 = input.LA(1); + + s = -1; + if ( ((LA14_13>='\u0000' && LA14_13<='\uFFFF')) ) {s = 31;} + + else s = 17; + + if ( s>=0 ) return s; + break; + case 2 : + int LA14_0 = input.LA(1); + + s = -1; + if ( (LA14_0=='=') ) {s = 1;} + + else if ( (LA14_0=='t') ) {s = 2;} + + else if ( (LA14_0=='f') ) {s = 3;} + + else if ( (LA14_0=='n') ) {s = 4;} + + else if ( (LA14_0=='<') ) {s = 5;} + + else if ( (LA14_0=='+') ) {s = 6;} + + else if ( (LA14_0=='-') ) {s = 7;} + + else if ( (LA14_0=='#') ) {s = 8;} + + else if ( (LA14_0=='~') ) {s = 9;} + + else if ( ((LA14_0>='0' && LA14_0<='9')) ) {s = 10;} + + else if ( (LA14_0=='^') ) {s = 11;} + + else if ( ((LA14_0>='A' && LA14_0<='Z')||LA14_0=='_'||(LA14_0>='a' && LA14_0<='e')||(LA14_0>='g' && LA14_0<='m')||(LA14_0>='o' && LA14_0<='s')||(LA14_0>='u' && LA14_0<='z')) ) {s = 12;} + + else if ( (LA14_0=='\"') ) {s = 13;} + + else if ( (LA14_0=='\'') ) {s = 14;} + + else if ( (LA14_0=='/') ) {s = 15;} + + else if ( ((LA14_0>='\t' && LA14_0<='\n')||LA14_0=='\r'||LA14_0==' ') ) {s = 16;} + + else if ( ((LA14_0>='\u0000' && LA14_0<='\b')||(LA14_0>='\u000B' && LA14_0<='\f')||(LA14_0>='\u000E' && LA14_0<='\u001F')||LA14_0=='!'||(LA14_0>='$' && LA14_0<='&')||(LA14_0>='(' && LA14_0<='*')||LA14_0==','||LA14_0=='.'||(LA14_0>=':' && LA14_0<=';')||(LA14_0>='>' && LA14_0<='@')||(LA14_0>='[' && LA14_0<=']')||LA14_0=='`'||(LA14_0>='{' && LA14_0<='}')||(LA14_0>='\u007F' && LA14_0<='\uFFFF')) ) {s = 17;} + + if ( s>=0 ) return s; + break; + } + NoViableAltException nvae = + new NoViableAltException(getDescription(), 14, _s, input); + error(nvae); + throw nvae; + } + } + + +}
\ No newline at end of file diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecificationParser.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecificationParser.java new file mode 100644 index 00000000000..dabb8f24df3 --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecificationParser.java @@ -0,0 +1,1397 @@ +package org.eclipse.papyrus.uml.textedit.valuespecification.xtext.parser.antlr.internal; + +import org.eclipse.xtext.*; +import org.eclipse.xtext.parser.*; +import org.eclipse.xtext.parser.impl.*; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.xtext.parser.antlr.AbstractInternalAntlrParser; +import org.eclipse.xtext.parser.antlr.XtextTokenStream; +import org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens; +import org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken; +import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.services.UmlValueSpecificationGrammarAccess; + + + +import org.antlr.runtime.*; +import java.util.Stack; +import java.util.List; +import java.util.ArrayList; + +@SuppressWarnings("all") +public class InternalUmlValueSpecificationParser extends AbstractInternalAntlrParser { + public static final String[] tokenNames = new String[] { + "<invalid>", "<EOR>", "<DOWN>", "<UP>", "RULE_ID", "RULE_INT", "RULE_DOUBLE", "RULE_STRING", "RULE_ML_COMMENT", "RULE_SL_COMMENT", "RULE_WS", "RULE_ANY_OTHER", "'='", "'true'", "'false'", "'null'", "'<Undefined>'", "'+'", "'-'", "'#'", "'~'" + }; + public static final int T__19=19; + public static final int RULE_ID=4; + public static final int RULE_STRING=7; + public static final int T__16=16; + public static final int T__15=15; + public static final int T__18=18; + public static final int T__17=17; + public static final int T__12=12; + public static final int T__14=14; + public static final int T__13=13; + public static final int RULE_ANY_OTHER=11; + public static final int T__20=20; + public static final int RULE_INT=5; + public static final int RULE_WS=10; + public static final int RULE_SL_COMMENT=9; + public static final int EOF=-1; + public static final int RULE_DOUBLE=6; + public static final int RULE_ML_COMMENT=8; + + // delegates + // delegators + + + public InternalUmlValueSpecificationParser(TokenStream input) { + this(input, new RecognizerSharedState()); + } + public InternalUmlValueSpecificationParser(TokenStream input, RecognizerSharedState state) { + super(input, state); + + } + + + public String[] getTokenNames() { return InternalUmlValueSpecificationParser.tokenNames; } + public String getGrammarFileName() { return "../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g"; } + + + + private UmlValueSpecificationGrammarAccess grammarAccess; + + public InternalUmlValueSpecificationParser(TokenStream input, UmlValueSpecificationGrammarAccess grammarAccess) { + this(input); + this.grammarAccess = grammarAccess; + registerRules(grammarAccess.getGrammar()); + } + + @Override + protected String getFirstRuleName() { + return "AbstractRule"; + } + + @Override + protected UmlValueSpecificationGrammarAccess getGrammarAccess() { + return grammarAccess; + } + + + + // $ANTLR start "entryRuleAbstractRule" + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:67:1: entryRuleAbstractRule returns [EObject current=null] : iv_ruleAbstractRule= ruleAbstractRule EOF ; + public final EObject entryRuleAbstractRule() throws RecognitionException { + EObject current = null; + + EObject iv_ruleAbstractRule = null; + + + try { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:68:2: (iv_ruleAbstractRule= ruleAbstractRule EOF ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:69:2: iv_ruleAbstractRule= ruleAbstractRule EOF + { + newCompositeNode(grammarAccess.getAbstractRuleRule()); + pushFollow(FOLLOW_ruleAbstractRule_in_entryRuleAbstractRule75); + iv_ruleAbstractRule=ruleAbstractRule(); + + state._fsp--; + + current =iv_ruleAbstractRule; + match(input,EOF,FOLLOW_EOF_in_entryRuleAbstractRule85); + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleAbstractRule" + + + // $ANTLR start "ruleAbstractRule" + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:76:1: ruleAbstractRule returns [EObject current=null] : ( ( ( (lv_visibility_0_0= ruleVisibilityKind ) )? ( ( (lv_name_1_0= RULE_ID ) ) otherlv_2= '=' )? ( ( ( (lv_value_3_1= ruleLiteralBooleanRule | lv_value_3_2= ruleLiteralIntegerOrUnlimitedNaturalRule | lv_value_3_3= ruleLiteralRealRule | lv_value_3_4= ruleLiteralNullRule | lv_value_3_5= ruleLiteralStringRule ) ) ) | ( (otherlv_4= RULE_ID ) ) ) ) | ( (lv_undefined_5_0= ruleUndefinedRule ) ) ) ; + public final EObject ruleAbstractRule() throws RecognitionException { + EObject current = null; + + Token lv_name_1_0=null; + Token otherlv_2=null; + Token otherlv_4=null; + EObject lv_visibility_0_0 = null; + + EObject lv_value_3_1 = null; + + EObject lv_value_3_2 = null; + + EObject lv_value_3_3 = null; + + EObject lv_value_3_4 = null; + + EObject lv_value_3_5 = null; + + EObject lv_undefined_5_0 = null; + + + enterRule(); + + try { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:79:28: ( ( ( ( (lv_visibility_0_0= ruleVisibilityKind ) )? ( ( (lv_name_1_0= RULE_ID ) ) otherlv_2= '=' )? ( ( ( (lv_value_3_1= ruleLiteralBooleanRule | lv_value_3_2= ruleLiteralIntegerOrUnlimitedNaturalRule | lv_value_3_3= ruleLiteralRealRule | lv_value_3_4= ruleLiteralNullRule | lv_value_3_5= ruleLiteralStringRule ) ) ) | ( (otherlv_4= RULE_ID ) ) ) ) | ( (lv_undefined_5_0= ruleUndefinedRule ) ) ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:80:1: ( ( ( (lv_visibility_0_0= ruleVisibilityKind ) )? ( ( (lv_name_1_0= RULE_ID ) ) otherlv_2= '=' )? ( ( ( (lv_value_3_1= ruleLiteralBooleanRule | lv_value_3_2= ruleLiteralIntegerOrUnlimitedNaturalRule | lv_value_3_3= ruleLiteralRealRule | lv_value_3_4= ruleLiteralNullRule | lv_value_3_5= ruleLiteralStringRule ) ) ) | ( (otherlv_4= RULE_ID ) ) ) ) | ( (lv_undefined_5_0= ruleUndefinedRule ) ) ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:80:1: ( ( ( (lv_visibility_0_0= ruleVisibilityKind ) )? ( ( (lv_name_1_0= RULE_ID ) ) otherlv_2= '=' )? ( ( ( (lv_value_3_1= ruleLiteralBooleanRule | lv_value_3_2= ruleLiteralIntegerOrUnlimitedNaturalRule | lv_value_3_3= ruleLiteralRealRule | lv_value_3_4= ruleLiteralNullRule | lv_value_3_5= ruleLiteralStringRule ) ) ) | ( (otherlv_4= RULE_ID ) ) ) ) | ( (lv_undefined_5_0= ruleUndefinedRule ) ) ) + int alt5=2; + int LA5_0 = input.LA(1); + + if ( ((LA5_0>=RULE_ID && LA5_0<=RULE_STRING)||(LA5_0>=13 && LA5_0<=15)||(LA5_0>=17 && LA5_0<=20)) ) { + alt5=1; + } + else if ( (LA5_0==16) ) { + alt5=2; + } + else { + NoViableAltException nvae = + new NoViableAltException("", 5, 0, input); + + throw nvae; + } + switch (alt5) { + case 1 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:80:2: ( ( (lv_visibility_0_0= ruleVisibilityKind ) )? ( ( (lv_name_1_0= RULE_ID ) ) otherlv_2= '=' )? ( ( ( (lv_value_3_1= ruleLiteralBooleanRule | lv_value_3_2= ruleLiteralIntegerOrUnlimitedNaturalRule | lv_value_3_3= ruleLiteralRealRule | lv_value_3_4= ruleLiteralNullRule | lv_value_3_5= ruleLiteralStringRule ) ) ) | ( (otherlv_4= RULE_ID ) ) ) ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:80:2: ( ( (lv_visibility_0_0= ruleVisibilityKind ) )? ( ( (lv_name_1_0= RULE_ID ) ) otherlv_2= '=' )? ( ( ( (lv_value_3_1= ruleLiteralBooleanRule | lv_value_3_2= ruleLiteralIntegerOrUnlimitedNaturalRule | lv_value_3_3= ruleLiteralRealRule | lv_value_3_4= ruleLiteralNullRule | lv_value_3_5= ruleLiteralStringRule ) ) ) | ( (otherlv_4= RULE_ID ) ) ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:80:3: ( (lv_visibility_0_0= ruleVisibilityKind ) )? ( ( (lv_name_1_0= RULE_ID ) ) otherlv_2= '=' )? ( ( ( (lv_value_3_1= ruleLiteralBooleanRule | lv_value_3_2= ruleLiteralIntegerOrUnlimitedNaturalRule | lv_value_3_3= ruleLiteralRealRule | lv_value_3_4= ruleLiteralNullRule | lv_value_3_5= ruleLiteralStringRule ) ) ) | ( (otherlv_4= RULE_ID ) ) ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:80:3: ( (lv_visibility_0_0= ruleVisibilityKind ) )? + int alt1=2; + int LA1_0 = input.LA(1); + + if ( ((LA1_0>=17 && LA1_0<=20)) ) { + alt1=1; + } + switch (alt1) { + case 1 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:81:1: (lv_visibility_0_0= ruleVisibilityKind ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:81:1: (lv_visibility_0_0= ruleVisibilityKind ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:82:3: lv_visibility_0_0= ruleVisibilityKind + { + + newCompositeNode(grammarAccess.getAbstractRuleAccess().getVisibilityVisibilityKindParserRuleCall_0_0_0()); + + pushFollow(FOLLOW_ruleVisibilityKind_in_ruleAbstractRule132); + lv_visibility_0_0=ruleVisibilityKind(); + + state._fsp--; + + + if (current==null) { + current = createModelElementForParent(grammarAccess.getAbstractRuleRule()); + } + set( + current, + "visibility", + lv_visibility_0_0, + "VisibilityKind"); + afterParserOrEnumRuleCall(); + + + } + + + } + break; + + } + + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:98:3: ( ( (lv_name_1_0= RULE_ID ) ) otherlv_2= '=' )? + int alt2=2; + int LA2_0 = input.LA(1); + + if ( (LA2_0==RULE_ID) ) { + int LA2_1 = input.LA(2); + + if ( (LA2_1==12) ) { + alt2=1; + } + } + switch (alt2) { + case 1 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:98:4: ( (lv_name_1_0= RULE_ID ) ) otherlv_2= '=' + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:98:4: ( (lv_name_1_0= RULE_ID ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:99:1: (lv_name_1_0= RULE_ID ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:99:1: (lv_name_1_0= RULE_ID ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:100:3: lv_name_1_0= RULE_ID + { + lv_name_1_0=(Token)match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleAbstractRule151); + + newLeafNode(lv_name_1_0, grammarAccess.getAbstractRuleAccess().getNameIDTerminalRuleCall_0_1_0_0()); + + + if (current==null) { + current = createModelElement(grammarAccess.getAbstractRuleRule()); + } + setWithLastConsumed( + current, + "name", + lv_name_1_0, + "ID"); + + + } + + + } + + otherlv_2=(Token)match(input,12,FOLLOW_12_in_ruleAbstractRule168); + + newLeafNode(otherlv_2, grammarAccess.getAbstractRuleAccess().getEqualsSignKeyword_0_1_1()); + + + } + break; + + } + + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:120:3: ( ( ( (lv_value_3_1= ruleLiteralBooleanRule | lv_value_3_2= ruleLiteralIntegerOrUnlimitedNaturalRule | lv_value_3_3= ruleLiteralRealRule | lv_value_3_4= ruleLiteralNullRule | lv_value_3_5= ruleLiteralStringRule ) ) ) | ( (otherlv_4= RULE_ID ) ) ) + int alt4=2; + int LA4_0 = input.LA(1); + + if ( ((LA4_0>=RULE_INT && LA4_0<=RULE_STRING)||(LA4_0>=13 && LA4_0<=15)) ) { + alt4=1; + } + else if ( (LA4_0==RULE_ID) ) { + alt4=2; + } + else { + NoViableAltException nvae = + new NoViableAltException("", 4, 0, input); + + throw nvae; + } + switch (alt4) { + case 1 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:120:4: ( ( (lv_value_3_1= ruleLiteralBooleanRule | lv_value_3_2= ruleLiteralIntegerOrUnlimitedNaturalRule | lv_value_3_3= ruleLiteralRealRule | lv_value_3_4= ruleLiteralNullRule | lv_value_3_5= ruleLiteralStringRule ) ) ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:120:4: ( ( (lv_value_3_1= ruleLiteralBooleanRule | lv_value_3_2= ruleLiteralIntegerOrUnlimitedNaturalRule | lv_value_3_3= ruleLiteralRealRule | lv_value_3_4= ruleLiteralNullRule | lv_value_3_5= ruleLiteralStringRule ) ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:121:1: ( (lv_value_3_1= ruleLiteralBooleanRule | lv_value_3_2= ruleLiteralIntegerOrUnlimitedNaturalRule | lv_value_3_3= ruleLiteralRealRule | lv_value_3_4= ruleLiteralNullRule | lv_value_3_5= ruleLiteralStringRule ) ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:121:1: ( (lv_value_3_1= ruleLiteralBooleanRule | lv_value_3_2= ruleLiteralIntegerOrUnlimitedNaturalRule | lv_value_3_3= ruleLiteralRealRule | lv_value_3_4= ruleLiteralNullRule | lv_value_3_5= ruleLiteralStringRule ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:122:1: (lv_value_3_1= ruleLiteralBooleanRule | lv_value_3_2= ruleLiteralIntegerOrUnlimitedNaturalRule | lv_value_3_3= ruleLiteralRealRule | lv_value_3_4= ruleLiteralNullRule | lv_value_3_5= ruleLiteralStringRule ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:122:1: (lv_value_3_1= ruleLiteralBooleanRule | lv_value_3_2= ruleLiteralIntegerOrUnlimitedNaturalRule | lv_value_3_3= ruleLiteralRealRule | lv_value_3_4= ruleLiteralNullRule | lv_value_3_5= ruleLiteralStringRule ) + int alt3=5; + switch ( input.LA(1) ) { + case 13: + case 14: + { + alt3=1; + } + break; + case RULE_INT: + { + alt3=2; + } + break; + case RULE_DOUBLE: + { + alt3=3; + } + break; + case 15: + { + alt3=4; + } + break; + case RULE_STRING: + { + alt3=5; + } + break; + default: + NoViableAltException nvae = + new NoViableAltException("", 3, 0, input); + + throw nvae; + } + + switch (alt3) { + case 1 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:123:3: lv_value_3_1= ruleLiteralBooleanRule + { + + newCompositeNode(grammarAccess.getAbstractRuleAccess().getValueLiteralBooleanRuleParserRuleCall_0_2_0_0_0()); + + pushFollow(FOLLOW_ruleLiteralBooleanRule_in_ruleAbstractRule194); + lv_value_3_1=ruleLiteralBooleanRule(); + + state._fsp--; + + + if (current==null) { + current = createModelElementForParent(grammarAccess.getAbstractRuleRule()); + } + set( + current, + "value", + lv_value_3_1, + "LiteralBooleanRule"); + afterParserOrEnumRuleCall(); + + + } + break; + case 2 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:138:8: lv_value_3_2= ruleLiteralIntegerOrUnlimitedNaturalRule + { + + newCompositeNode(grammarAccess.getAbstractRuleAccess().getValueLiteralIntegerOrUnlimitedNaturalRuleParserRuleCall_0_2_0_0_1()); + + pushFollow(FOLLOW_ruleLiteralIntegerOrUnlimitedNaturalRule_in_ruleAbstractRule213); + lv_value_3_2=ruleLiteralIntegerOrUnlimitedNaturalRule(); + + state._fsp--; + + + if (current==null) { + current = createModelElementForParent(grammarAccess.getAbstractRuleRule()); + } + set( + current, + "value", + lv_value_3_2, + "LiteralIntegerOrUnlimitedNaturalRule"); + afterParserOrEnumRuleCall(); + + + } + break; + case 3 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:153:8: lv_value_3_3= ruleLiteralRealRule + { + + newCompositeNode(grammarAccess.getAbstractRuleAccess().getValueLiteralRealRuleParserRuleCall_0_2_0_0_2()); + + pushFollow(FOLLOW_ruleLiteralRealRule_in_ruleAbstractRule232); + lv_value_3_3=ruleLiteralRealRule(); + + state._fsp--; + + + if (current==null) { + current = createModelElementForParent(grammarAccess.getAbstractRuleRule()); + } + set( + current, + "value", + lv_value_3_3, + "LiteralRealRule"); + afterParserOrEnumRuleCall(); + + + } + break; + case 4 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:168:8: lv_value_3_4= ruleLiteralNullRule + { + + newCompositeNode(grammarAccess.getAbstractRuleAccess().getValueLiteralNullRuleParserRuleCall_0_2_0_0_3()); + + pushFollow(FOLLOW_ruleLiteralNullRule_in_ruleAbstractRule251); + lv_value_3_4=ruleLiteralNullRule(); + + state._fsp--; + + + if (current==null) { + current = createModelElementForParent(grammarAccess.getAbstractRuleRule()); + } + set( + current, + "value", + lv_value_3_4, + "LiteralNullRule"); + afterParserOrEnumRuleCall(); + + + } + break; + case 5 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:183:8: lv_value_3_5= ruleLiteralStringRule + { + + newCompositeNode(grammarAccess.getAbstractRuleAccess().getValueLiteralStringRuleParserRuleCall_0_2_0_0_4()); + + pushFollow(FOLLOW_ruleLiteralStringRule_in_ruleAbstractRule270); + lv_value_3_5=ruleLiteralStringRule(); + + state._fsp--; + + + if (current==null) { + current = createModelElementForParent(grammarAccess.getAbstractRuleRule()); + } + set( + current, + "value", + lv_value_3_5, + "LiteralStringRule"); + afterParserOrEnumRuleCall(); + + + } + break; + + } + + + } + + + } + + + } + break; + case 2 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:202:6: ( (otherlv_4= RULE_ID ) ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:202:6: ( (otherlv_4= RULE_ID ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:203:1: (otherlv_4= RULE_ID ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:203:1: (otherlv_4= RULE_ID ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:204:3: otherlv_4= RULE_ID + { + + if (current==null) { + current = createModelElement(grammarAccess.getAbstractRuleRule()); + } + + otherlv_4=(Token)match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleAbstractRule299); + + newLeafNode(otherlv_4, grammarAccess.getAbstractRuleAccess().getInstanceSpecificationInstanceSpecificationCrossReference_0_2_1_0()); + + + } + + + } + + + } + break; + + } + + + } + + + } + break; + case 2 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:216:6: ( (lv_undefined_5_0= ruleUndefinedRule ) ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:216:6: ( (lv_undefined_5_0= ruleUndefinedRule ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:217:1: (lv_undefined_5_0= ruleUndefinedRule ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:217:1: (lv_undefined_5_0= ruleUndefinedRule ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:218:3: lv_undefined_5_0= ruleUndefinedRule + { + + newCompositeNode(grammarAccess.getAbstractRuleAccess().getUndefinedUndefinedRuleParserRuleCall_1_0()); + + pushFollow(FOLLOW_ruleUndefinedRule_in_ruleAbstractRule328); + lv_undefined_5_0=ruleUndefinedRule(); + + state._fsp--; + + + if (current==null) { + current = createModelElementForParent(grammarAccess.getAbstractRuleRule()); + } + set( + current, + "undefined", + lv_undefined_5_0, + "UndefinedRule"); + afterParserOrEnumRuleCall(); + + + } + + + } + + + } + break; + + } + + + } + + leaveRule(); + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleAbstractRule" + + + // $ANTLR start "entryRuleLiteralBooleanRule" + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:242:1: entryRuleLiteralBooleanRule returns [EObject current=null] : iv_ruleLiteralBooleanRule= ruleLiteralBooleanRule EOF ; + public final EObject entryRuleLiteralBooleanRule() throws RecognitionException { + EObject current = null; + + EObject iv_ruleLiteralBooleanRule = null; + + + try { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:243:2: (iv_ruleLiteralBooleanRule= ruleLiteralBooleanRule EOF ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:244:2: iv_ruleLiteralBooleanRule= ruleLiteralBooleanRule EOF + { + newCompositeNode(grammarAccess.getLiteralBooleanRuleRule()); + pushFollow(FOLLOW_ruleLiteralBooleanRule_in_entryRuleLiteralBooleanRule364); + iv_ruleLiteralBooleanRule=ruleLiteralBooleanRule(); + + state._fsp--; + + current =iv_ruleLiteralBooleanRule; + match(input,EOF,FOLLOW_EOF_in_entryRuleLiteralBooleanRule374); + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleLiteralBooleanRule" + + + // $ANTLR start "ruleLiteralBooleanRule" + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:251:1: ruleLiteralBooleanRule returns [EObject current=null] : ( ( (lv_value_0_1= 'true' | lv_value_0_2= 'false' ) ) ) ; + public final EObject ruleLiteralBooleanRule() throws RecognitionException { + EObject current = null; + + Token lv_value_0_1=null; + Token lv_value_0_2=null; + + enterRule(); + + try { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:254:28: ( ( ( (lv_value_0_1= 'true' | lv_value_0_2= 'false' ) ) ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:255:1: ( ( (lv_value_0_1= 'true' | lv_value_0_2= 'false' ) ) ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:255:1: ( ( (lv_value_0_1= 'true' | lv_value_0_2= 'false' ) ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:256:1: ( (lv_value_0_1= 'true' | lv_value_0_2= 'false' ) ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:256:1: ( (lv_value_0_1= 'true' | lv_value_0_2= 'false' ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:257:1: (lv_value_0_1= 'true' | lv_value_0_2= 'false' ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:257:1: (lv_value_0_1= 'true' | lv_value_0_2= 'false' ) + int alt6=2; + int LA6_0 = input.LA(1); + + if ( (LA6_0==13) ) { + alt6=1; + } + else if ( (LA6_0==14) ) { + alt6=2; + } + else { + NoViableAltException nvae = + new NoViableAltException("", 6, 0, input); + + throw nvae; + } + switch (alt6) { + case 1 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:258:3: lv_value_0_1= 'true' + { + lv_value_0_1=(Token)match(input,13,FOLLOW_13_in_ruleLiteralBooleanRule418); + + newLeafNode(lv_value_0_1, grammarAccess.getLiteralBooleanRuleAccess().getValueTrueKeyword_0_0()); + + + if (current==null) { + current = createModelElement(grammarAccess.getLiteralBooleanRuleRule()); + } + setWithLastConsumed(current, "value", lv_value_0_1, null); + + + } + break; + case 2 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:270:8: lv_value_0_2= 'false' + { + lv_value_0_2=(Token)match(input,14,FOLLOW_14_in_ruleLiteralBooleanRule447); + + newLeafNode(lv_value_0_2, grammarAccess.getLiteralBooleanRuleAccess().getValueFalseKeyword_0_1()); + + + if (current==null) { + current = createModelElement(grammarAccess.getLiteralBooleanRuleRule()); + } + setWithLastConsumed(current, "value", lv_value_0_2, null); + + + } + break; + + } + + + } + + + } + + + } + + leaveRule(); + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleLiteralBooleanRule" + + + // $ANTLR start "entryRuleLiteralIntegerOrUnlimitedNaturalRule" + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:293:1: entryRuleLiteralIntegerOrUnlimitedNaturalRule returns [EObject current=null] : iv_ruleLiteralIntegerOrUnlimitedNaturalRule= ruleLiteralIntegerOrUnlimitedNaturalRule EOF ; + public final EObject entryRuleLiteralIntegerOrUnlimitedNaturalRule() throws RecognitionException { + EObject current = null; + + EObject iv_ruleLiteralIntegerOrUnlimitedNaturalRule = null; + + + try { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:294:2: (iv_ruleLiteralIntegerOrUnlimitedNaturalRule= ruleLiteralIntegerOrUnlimitedNaturalRule EOF ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:295:2: iv_ruleLiteralIntegerOrUnlimitedNaturalRule= ruleLiteralIntegerOrUnlimitedNaturalRule EOF + { + newCompositeNode(grammarAccess.getLiteralIntegerOrUnlimitedNaturalRuleRule()); + pushFollow(FOLLOW_ruleLiteralIntegerOrUnlimitedNaturalRule_in_entryRuleLiteralIntegerOrUnlimitedNaturalRule498); + iv_ruleLiteralIntegerOrUnlimitedNaturalRule=ruleLiteralIntegerOrUnlimitedNaturalRule(); + + state._fsp--; + + current =iv_ruleLiteralIntegerOrUnlimitedNaturalRule; + match(input,EOF,FOLLOW_EOF_in_entryRuleLiteralIntegerOrUnlimitedNaturalRule508); + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleLiteralIntegerOrUnlimitedNaturalRule" + + + // $ANTLR start "ruleLiteralIntegerOrUnlimitedNaturalRule" + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:302:1: ruleLiteralIntegerOrUnlimitedNaturalRule returns [EObject current=null] : ( (lv_value_0_0= RULE_INT ) ) ; + public final EObject ruleLiteralIntegerOrUnlimitedNaturalRule() throws RecognitionException { + EObject current = null; + + Token lv_value_0_0=null; + + enterRule(); + + try { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:305:28: ( ( (lv_value_0_0= RULE_INT ) ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:306:1: ( (lv_value_0_0= RULE_INT ) ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:306:1: ( (lv_value_0_0= RULE_INT ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:307:1: (lv_value_0_0= RULE_INT ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:307:1: (lv_value_0_0= RULE_INT ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:308:3: lv_value_0_0= RULE_INT + { + lv_value_0_0=(Token)match(input,RULE_INT,FOLLOW_RULE_INT_in_ruleLiteralIntegerOrUnlimitedNaturalRule549); + + newLeafNode(lv_value_0_0, grammarAccess.getLiteralIntegerOrUnlimitedNaturalRuleAccess().getValueINTTerminalRuleCall_0()); + + + if (current==null) { + current = createModelElement(grammarAccess.getLiteralIntegerOrUnlimitedNaturalRuleRule()); + } + setWithLastConsumed( + current, + "value", + lv_value_0_0, + "INT"); + + + } + + + } + + + } + + leaveRule(); + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleLiteralIntegerOrUnlimitedNaturalRule" + + + // $ANTLR start "entryRuleLiteralRealRule" + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:332:1: entryRuleLiteralRealRule returns [EObject current=null] : iv_ruleLiteralRealRule= ruleLiteralRealRule EOF ; + public final EObject entryRuleLiteralRealRule() throws RecognitionException { + EObject current = null; + + EObject iv_ruleLiteralRealRule = null; + + + try { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:333:2: (iv_ruleLiteralRealRule= ruleLiteralRealRule EOF ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:334:2: iv_ruleLiteralRealRule= ruleLiteralRealRule EOF + { + newCompositeNode(grammarAccess.getLiteralRealRuleRule()); + pushFollow(FOLLOW_ruleLiteralRealRule_in_entryRuleLiteralRealRule589); + iv_ruleLiteralRealRule=ruleLiteralRealRule(); + + state._fsp--; + + current =iv_ruleLiteralRealRule; + match(input,EOF,FOLLOW_EOF_in_entryRuleLiteralRealRule599); + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleLiteralRealRule" + + + // $ANTLR start "ruleLiteralRealRule" + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:341:1: ruleLiteralRealRule returns [EObject current=null] : ( (lv_value_0_0= RULE_DOUBLE ) ) ; + public final EObject ruleLiteralRealRule() throws RecognitionException { + EObject current = null; + + Token lv_value_0_0=null; + + enterRule(); + + try { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:344:28: ( ( (lv_value_0_0= RULE_DOUBLE ) ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:345:1: ( (lv_value_0_0= RULE_DOUBLE ) ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:345:1: ( (lv_value_0_0= RULE_DOUBLE ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:346:1: (lv_value_0_0= RULE_DOUBLE ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:346:1: (lv_value_0_0= RULE_DOUBLE ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:347:3: lv_value_0_0= RULE_DOUBLE + { + lv_value_0_0=(Token)match(input,RULE_DOUBLE,FOLLOW_RULE_DOUBLE_in_ruleLiteralRealRule640); + + newLeafNode(lv_value_0_0, grammarAccess.getLiteralRealRuleAccess().getValueDOUBLETerminalRuleCall_0()); + + + if (current==null) { + current = createModelElement(grammarAccess.getLiteralRealRuleRule()); + } + setWithLastConsumed( + current, + "value", + lv_value_0_0, + "DOUBLE"); + + + } + + + } + + + } + + leaveRule(); + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleLiteralRealRule" + + + // $ANTLR start "entryRuleLiteralNullRule" + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:371:1: entryRuleLiteralNullRule returns [EObject current=null] : iv_ruleLiteralNullRule= ruleLiteralNullRule EOF ; + public final EObject entryRuleLiteralNullRule() throws RecognitionException { + EObject current = null; + + EObject iv_ruleLiteralNullRule = null; + + + try { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:372:2: (iv_ruleLiteralNullRule= ruleLiteralNullRule EOF ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:373:2: iv_ruleLiteralNullRule= ruleLiteralNullRule EOF + { + newCompositeNode(grammarAccess.getLiteralNullRuleRule()); + pushFollow(FOLLOW_ruleLiteralNullRule_in_entryRuleLiteralNullRule680); + iv_ruleLiteralNullRule=ruleLiteralNullRule(); + + state._fsp--; + + current =iv_ruleLiteralNullRule; + match(input,EOF,FOLLOW_EOF_in_entryRuleLiteralNullRule690); + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleLiteralNullRule" + + + // $ANTLR start "ruleLiteralNullRule" + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:380:1: ruleLiteralNullRule returns [EObject current=null] : ( (lv_value_0_0= 'null' ) ) ; + public final EObject ruleLiteralNullRule() throws RecognitionException { + EObject current = null; + + Token lv_value_0_0=null; + + enterRule(); + + try { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:383:28: ( ( (lv_value_0_0= 'null' ) ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:384:1: ( (lv_value_0_0= 'null' ) ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:384:1: ( (lv_value_0_0= 'null' ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:385:1: (lv_value_0_0= 'null' ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:385:1: (lv_value_0_0= 'null' ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:386:3: lv_value_0_0= 'null' + { + lv_value_0_0=(Token)match(input,15,FOLLOW_15_in_ruleLiteralNullRule732); + + newLeafNode(lv_value_0_0, grammarAccess.getLiteralNullRuleAccess().getValueNullKeyword_0()); + + + if (current==null) { + current = createModelElement(grammarAccess.getLiteralNullRuleRule()); + } + setWithLastConsumed(current, "value", lv_value_0_0, "null"); + + + } + + + } + + + } + + leaveRule(); + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleLiteralNullRule" + + + // $ANTLR start "entryRuleLiteralStringRule" + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:407:1: entryRuleLiteralStringRule returns [EObject current=null] : iv_ruleLiteralStringRule= ruleLiteralStringRule EOF ; + public final EObject entryRuleLiteralStringRule() throws RecognitionException { + EObject current = null; + + EObject iv_ruleLiteralStringRule = null; + + + try { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:408:2: (iv_ruleLiteralStringRule= ruleLiteralStringRule EOF ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:409:2: iv_ruleLiteralStringRule= ruleLiteralStringRule EOF + { + newCompositeNode(grammarAccess.getLiteralStringRuleRule()); + pushFollow(FOLLOW_ruleLiteralStringRule_in_entryRuleLiteralStringRule780); + iv_ruleLiteralStringRule=ruleLiteralStringRule(); + + state._fsp--; + + current =iv_ruleLiteralStringRule; + match(input,EOF,FOLLOW_EOF_in_entryRuleLiteralStringRule790); + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleLiteralStringRule" + + + // $ANTLR start "ruleLiteralStringRule" + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:416:1: ruleLiteralStringRule returns [EObject current=null] : ( (lv_value_0_0= RULE_STRING ) ) ; + public final EObject ruleLiteralStringRule() throws RecognitionException { + EObject current = null; + + Token lv_value_0_0=null; + + enterRule(); + + try { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:419:28: ( ( (lv_value_0_0= RULE_STRING ) ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:420:1: ( (lv_value_0_0= RULE_STRING ) ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:420:1: ( (lv_value_0_0= RULE_STRING ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:421:1: (lv_value_0_0= RULE_STRING ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:421:1: (lv_value_0_0= RULE_STRING ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:422:3: lv_value_0_0= RULE_STRING + { + lv_value_0_0=(Token)match(input,RULE_STRING,FOLLOW_RULE_STRING_in_ruleLiteralStringRule831); + + newLeafNode(lv_value_0_0, grammarAccess.getLiteralStringRuleAccess().getValueSTRINGTerminalRuleCall_0()); + + + if (current==null) { + current = createModelElement(grammarAccess.getLiteralStringRuleRule()); + } + setWithLastConsumed( + current, + "value", + lv_value_0_0, + "STRING"); + + + } + + + } + + + } + + leaveRule(); + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleLiteralStringRule" + + + // $ANTLR start "entryRuleUndefinedRule" + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:446:1: entryRuleUndefinedRule returns [EObject current=null] : iv_ruleUndefinedRule= ruleUndefinedRule EOF ; + public final EObject entryRuleUndefinedRule() throws RecognitionException { + EObject current = null; + + EObject iv_ruleUndefinedRule = null; + + + try { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:447:2: (iv_ruleUndefinedRule= ruleUndefinedRule EOF ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:448:2: iv_ruleUndefinedRule= ruleUndefinedRule EOF + { + newCompositeNode(grammarAccess.getUndefinedRuleRule()); + pushFollow(FOLLOW_ruleUndefinedRule_in_entryRuleUndefinedRule871); + iv_ruleUndefinedRule=ruleUndefinedRule(); + + state._fsp--; + + current =iv_ruleUndefinedRule; + match(input,EOF,FOLLOW_EOF_in_entryRuleUndefinedRule881); + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleUndefinedRule" + + + // $ANTLR start "ruleUndefinedRule" + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:455:1: ruleUndefinedRule returns [EObject current=null] : ( (lv_value_0_0= '<Undefined>' ) ) ; + public final EObject ruleUndefinedRule() throws RecognitionException { + EObject current = null; + + Token lv_value_0_0=null; + + enterRule(); + + try { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:458:28: ( ( (lv_value_0_0= '<Undefined>' ) ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:459:1: ( (lv_value_0_0= '<Undefined>' ) ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:459:1: ( (lv_value_0_0= '<Undefined>' ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:460:1: (lv_value_0_0= '<Undefined>' ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:460:1: (lv_value_0_0= '<Undefined>' ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:461:3: lv_value_0_0= '<Undefined>' + { + lv_value_0_0=(Token)match(input,16,FOLLOW_16_in_ruleUndefinedRule923); + + newLeafNode(lv_value_0_0, grammarAccess.getUndefinedRuleAccess().getValueUndefinedKeyword_0()); + + + if (current==null) { + current = createModelElement(grammarAccess.getUndefinedRuleRule()); + } + setWithLastConsumed(current, "value", lv_value_0_0, "<Undefined>"); + + + } + + + } + + + } + + leaveRule(); + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleUndefinedRule" + + + // $ANTLR start "entryRuleVisibilityKind" + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:482:1: entryRuleVisibilityKind returns [EObject current=null] : iv_ruleVisibilityKind= ruleVisibilityKind EOF ; + public final EObject entryRuleVisibilityKind() throws RecognitionException { + EObject current = null; + + EObject iv_ruleVisibilityKind = null; + + + try { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:483:2: (iv_ruleVisibilityKind= ruleVisibilityKind EOF ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:484:2: iv_ruleVisibilityKind= ruleVisibilityKind EOF + { + newCompositeNode(grammarAccess.getVisibilityKindRule()); + pushFollow(FOLLOW_ruleVisibilityKind_in_entryRuleVisibilityKind971); + iv_ruleVisibilityKind=ruleVisibilityKind(); + + state._fsp--; + + current =iv_ruleVisibilityKind; + match(input,EOF,FOLLOW_EOF_in_entryRuleVisibilityKind981); + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleVisibilityKind" + + + // $ANTLR start "ruleVisibilityKind" + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:491:1: ruleVisibilityKind returns [EObject current=null] : ( ( (lv_public_0_0= '+' ) ) | ( (lv_private_1_0= '-' ) ) | ( (lv_protected_2_0= '#' ) ) | ( (lv_package_3_0= '~' ) ) ) ; + public final EObject ruleVisibilityKind() throws RecognitionException { + EObject current = null; + + Token lv_public_0_0=null; + Token lv_private_1_0=null; + Token lv_protected_2_0=null; + Token lv_package_3_0=null; + + enterRule(); + + try { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:494:28: ( ( ( (lv_public_0_0= '+' ) ) | ( (lv_private_1_0= '-' ) ) | ( (lv_protected_2_0= '#' ) ) | ( (lv_package_3_0= '~' ) ) ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:495:1: ( ( (lv_public_0_0= '+' ) ) | ( (lv_private_1_0= '-' ) ) | ( (lv_protected_2_0= '#' ) ) | ( (lv_package_3_0= '~' ) ) ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:495:1: ( ( (lv_public_0_0= '+' ) ) | ( (lv_private_1_0= '-' ) ) | ( (lv_protected_2_0= '#' ) ) | ( (lv_package_3_0= '~' ) ) ) + int alt7=4; + switch ( input.LA(1) ) { + case 17: + { + alt7=1; + } + break; + case 18: + { + alt7=2; + } + break; + case 19: + { + alt7=3; + } + break; + case 20: + { + alt7=4; + } + break; + default: + NoViableAltException nvae = + new NoViableAltException("", 7, 0, input); + + throw nvae; + } + + switch (alt7) { + case 1 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:495:2: ( (lv_public_0_0= '+' ) ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:495:2: ( (lv_public_0_0= '+' ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:496:1: (lv_public_0_0= '+' ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:496:1: (lv_public_0_0= '+' ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:497:3: lv_public_0_0= '+' + { + lv_public_0_0=(Token)match(input,17,FOLLOW_17_in_ruleVisibilityKind1024); + + newLeafNode(lv_public_0_0, grammarAccess.getVisibilityKindAccess().getPublicPlusSignKeyword_0_0()); + + + if (current==null) { + current = createModelElement(grammarAccess.getVisibilityKindRule()); + } + setWithLastConsumed(current, "public", lv_public_0_0, "+"); + + + } + + + } + + + } + break; + case 2 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:511:6: ( (lv_private_1_0= '-' ) ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:511:6: ( (lv_private_1_0= '-' ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:512:1: (lv_private_1_0= '-' ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:512:1: (lv_private_1_0= '-' ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:513:3: lv_private_1_0= '-' + { + lv_private_1_0=(Token)match(input,18,FOLLOW_18_in_ruleVisibilityKind1061); + + newLeafNode(lv_private_1_0, grammarAccess.getVisibilityKindAccess().getPrivateHyphenMinusKeyword_1_0()); + + + if (current==null) { + current = createModelElement(grammarAccess.getVisibilityKindRule()); + } + setWithLastConsumed(current, "private", lv_private_1_0, "-"); + + + } + + + } + + + } + break; + case 3 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:527:6: ( (lv_protected_2_0= '#' ) ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:527:6: ( (lv_protected_2_0= '#' ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:528:1: (lv_protected_2_0= '#' ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:528:1: (lv_protected_2_0= '#' ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:529:3: lv_protected_2_0= '#' + { + lv_protected_2_0=(Token)match(input,19,FOLLOW_19_in_ruleVisibilityKind1098); + + newLeafNode(lv_protected_2_0, grammarAccess.getVisibilityKindAccess().getProtectedNumberSignKeyword_2_0()); + + + if (current==null) { + current = createModelElement(grammarAccess.getVisibilityKindRule()); + } + setWithLastConsumed(current, "protected", lv_protected_2_0, "#"); + + + } + + + } + + + } + break; + case 4 : + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:543:6: ( (lv_package_3_0= '~' ) ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:543:6: ( (lv_package_3_0= '~' ) ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:544:1: (lv_package_3_0= '~' ) + { + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:544:1: (lv_package_3_0= '~' ) + // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g:545:3: lv_package_3_0= '~' + { + lv_package_3_0=(Token)match(input,20,FOLLOW_20_in_ruleVisibilityKind1135); + + newLeafNode(lv_package_3_0, grammarAccess.getVisibilityKindAccess().getPackageTildeKeyword_3_0()); + + + if (current==null) { + current = createModelElement(grammarAccess.getVisibilityKindRule()); + } + setWithLastConsumed(current, "package", lv_package_3_0, "~"); + + + } + + + } + + + } + break; + + } + + + } + + leaveRule(); + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleVisibilityKind" + + // Delegated rules + + + + + public static final BitSet FOLLOW_ruleAbstractRule_in_entryRuleAbstractRule75 = new BitSet(new long[]{0x0000000000000000L}); + public static final BitSet FOLLOW_EOF_in_entryRuleAbstractRule85 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_ruleVisibilityKind_in_ruleAbstractRule132 = new BitSet(new long[]{0x000000000000E0F0L}); + public static final BitSet FOLLOW_RULE_ID_in_ruleAbstractRule151 = new BitSet(new long[]{0x0000000000001000L}); + public static final BitSet FOLLOW_12_in_ruleAbstractRule168 = new BitSet(new long[]{0x000000000000E0F0L}); + public static final BitSet FOLLOW_ruleLiteralBooleanRule_in_ruleAbstractRule194 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_ruleLiteralIntegerOrUnlimitedNaturalRule_in_ruleAbstractRule213 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_ruleLiteralRealRule_in_ruleAbstractRule232 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_ruleLiteralNullRule_in_ruleAbstractRule251 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_ruleLiteralStringRule_in_ruleAbstractRule270 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_RULE_ID_in_ruleAbstractRule299 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_ruleUndefinedRule_in_ruleAbstractRule328 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_ruleLiteralBooleanRule_in_entryRuleLiteralBooleanRule364 = new BitSet(new long[]{0x0000000000000000L}); + public static final BitSet FOLLOW_EOF_in_entryRuleLiteralBooleanRule374 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_13_in_ruleLiteralBooleanRule418 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_14_in_ruleLiteralBooleanRule447 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_ruleLiteralIntegerOrUnlimitedNaturalRule_in_entryRuleLiteralIntegerOrUnlimitedNaturalRule498 = new BitSet(new long[]{0x0000000000000000L}); + public static final BitSet FOLLOW_EOF_in_entryRuleLiteralIntegerOrUnlimitedNaturalRule508 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_RULE_INT_in_ruleLiteralIntegerOrUnlimitedNaturalRule549 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_ruleLiteralRealRule_in_entryRuleLiteralRealRule589 = new BitSet(new long[]{0x0000000000000000L}); + public static final BitSet FOLLOW_EOF_in_entryRuleLiteralRealRule599 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_RULE_DOUBLE_in_ruleLiteralRealRule640 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_ruleLiteralNullRule_in_entryRuleLiteralNullRule680 = new BitSet(new long[]{0x0000000000000000L}); + public static final BitSet FOLLOW_EOF_in_entryRuleLiteralNullRule690 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_15_in_ruleLiteralNullRule732 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_ruleLiteralStringRule_in_entryRuleLiteralStringRule780 = new BitSet(new long[]{0x0000000000000000L}); + public static final BitSet FOLLOW_EOF_in_entryRuleLiteralStringRule790 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_RULE_STRING_in_ruleLiteralStringRule831 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_ruleUndefinedRule_in_entryRuleUndefinedRule871 = new BitSet(new long[]{0x0000000000000000L}); + public static final BitSet FOLLOW_EOF_in_entryRuleUndefinedRule881 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_16_in_ruleUndefinedRule923 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_ruleVisibilityKind_in_entryRuleVisibilityKind971 = new BitSet(new long[]{0x0000000000000000L}); + public static final BitSet FOLLOW_EOF_in_entryRuleVisibilityKind981 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_17_in_ruleVisibilityKind1024 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_18_in_ruleVisibilityKind1061 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_19_in_ruleVisibilityKind1098 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_20_in_ruleVisibilityKind1135 = new BitSet(new long[]{0x0000000000000002L}); + +}
\ No newline at end of file diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/serializer/UmlValueSpecificationSemanticSequencer.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/serializer/UmlValueSpecificationSemanticSequencer.java new file mode 100644 index 00000000000..7dfcfc8551a --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/serializer/UmlValueSpecificationSemanticSequencer.java @@ -0,0 +1,206 @@ +package org.eclipse.papyrus.uml.textedit.valuespecification.xtext.serializer; + +import com.google.inject.Inject; +import com.google.inject.Provider; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.services.UmlValueSpecificationGrammarAccess; +import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.AbstractRule; +import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralBooleanRule; +import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralIntegerOrUnlimitedNaturalRule; +import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralNullRule; +import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralRealRule; +import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralStringRule; +import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.UmlValueSpecificationPackage; +import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.UndefinedRule; +import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.VisibilityKind; +import org.eclipse.xtext.serializer.acceptor.ISemanticSequenceAcceptor; +import org.eclipse.xtext.serializer.acceptor.SequenceFeeder; +import org.eclipse.xtext.serializer.diagnostic.ISemanticSequencerDiagnosticProvider; +import org.eclipse.xtext.serializer.diagnostic.ISerializationDiagnostic.Acceptor; +import org.eclipse.xtext.serializer.sequencer.AbstractDelegatingSemanticSequencer; +import org.eclipse.xtext.serializer.sequencer.GenericSequencer; +import org.eclipse.xtext.serializer.sequencer.ISemanticNodeProvider.INodesForEObjectProvider; +import org.eclipse.xtext.serializer.sequencer.ISemanticSequencer; +import org.eclipse.xtext.serializer.sequencer.ITransientValueService; +import org.eclipse.xtext.serializer.sequencer.ITransientValueService.ValueTransient; + +@SuppressWarnings("all") +public class UmlValueSpecificationSemanticSequencer extends AbstractDelegatingSemanticSequencer { + + @Inject + private UmlValueSpecificationGrammarAccess grammarAccess; + + public void createSequence(EObject context, EObject semanticObject) { + if(semanticObject.eClass().getEPackage() == UmlValueSpecificationPackage.eINSTANCE) switch(semanticObject.eClass().getClassifierID()) { + case UmlValueSpecificationPackage.ABSTRACT_RULE: + if(context == grammarAccess.getAbstractRuleRule()) { + sequence_AbstractRule(context, (AbstractRule) semanticObject); + return; + } + else break; + case UmlValueSpecificationPackage.LITERAL_BOOLEAN_RULE: + if(context == grammarAccess.getLiteralBooleanRuleRule()) { + sequence_LiteralBooleanRule(context, (LiteralBooleanRule) semanticObject); + return; + } + else break; + case UmlValueSpecificationPackage.LITERAL_INTEGER_OR_UNLIMITED_NATURAL_RULE: + if(context == grammarAccess.getLiteralIntegerOrUnlimitedNaturalRuleRule()) { + sequence_LiteralIntegerOrUnlimitedNaturalRule(context, (LiteralIntegerOrUnlimitedNaturalRule) semanticObject); + return; + } + else break; + case UmlValueSpecificationPackage.LITERAL_NULL_RULE: + if(context == grammarAccess.getLiteralNullRuleRule()) { + sequence_LiteralNullRule(context, (LiteralNullRule) semanticObject); + return; + } + else break; + case UmlValueSpecificationPackage.LITERAL_REAL_RULE: + if(context == grammarAccess.getLiteralRealRuleRule()) { + sequence_LiteralRealRule(context, (LiteralRealRule) semanticObject); + return; + } + else break; + case UmlValueSpecificationPackage.LITERAL_STRING_RULE: + if(context == grammarAccess.getLiteralStringRuleRule()) { + sequence_LiteralStringRule(context, (LiteralStringRule) semanticObject); + return; + } + else break; + case UmlValueSpecificationPackage.UNDEFINED_RULE: + if(context == grammarAccess.getUndefinedRuleRule()) { + sequence_UndefinedRule(context, (UndefinedRule) semanticObject); + return; + } + else break; + case UmlValueSpecificationPackage.VISIBILITY_KIND: + if(context == grammarAccess.getVisibilityKindRule()) { + sequence_VisibilityKind(context, (VisibilityKind) semanticObject); + return; + } + else break; + } + if (errorAcceptor != null) errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context)); + } + + /** + * Constraint: + * ( + * ( + * visibility=VisibilityKind? + * name=ID? + * ( + * value=LiteralBooleanRule | + * value=LiteralIntegerOrUnlimitedNaturalRule | + * value=LiteralRealRule | + * value=LiteralNullRule | + * value=LiteralStringRule | + * instanceSpecification=[InstanceSpecification|ID] + * ) + * ) | + * undefined=UndefinedRule + * ) + */ + protected void sequence_AbstractRule(EObject context, AbstractRule semanticObject) { + genericSequencer.createSequence(context, semanticObject); + } + + + /** + * Constraint: + * (value='true' | value='false') + */ + protected void sequence_LiteralBooleanRule(EObject context, LiteralBooleanRule semanticObject) { + genericSequencer.createSequence(context, semanticObject); + } + + + /** + * Constraint: + * value=INT + */ + protected void sequence_LiteralIntegerOrUnlimitedNaturalRule(EObject context, LiteralIntegerOrUnlimitedNaturalRule semanticObject) { + if(errorAcceptor != null) { + if(transientValues.isValueTransient(semanticObject, UmlValueSpecificationPackage.Literals.LITERAL_INTEGER_OR_UNLIMITED_NATURAL_RULE__VALUE) == ValueTransient.YES) + errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, UmlValueSpecificationPackage.Literals.LITERAL_INTEGER_OR_UNLIMITED_NATURAL_RULE__VALUE)); + } + INodesForEObjectProvider nodes = createNodeProvider(semanticObject); + SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes); + feeder.accept(grammarAccess.getLiteralIntegerOrUnlimitedNaturalRuleAccess().getValueINTTerminalRuleCall_0(), semanticObject.getValue()); + feeder.finish(); + } + + + /** + * Constraint: + * value='null' + */ + protected void sequence_LiteralNullRule(EObject context, LiteralNullRule semanticObject) { + if(errorAcceptor != null) { + if(transientValues.isValueTransient(semanticObject, UmlValueSpecificationPackage.Literals.LITERAL_NULL_RULE__VALUE) == ValueTransient.YES) + errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, UmlValueSpecificationPackage.Literals.LITERAL_NULL_RULE__VALUE)); + } + INodesForEObjectProvider nodes = createNodeProvider(semanticObject); + SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes); + feeder.accept(grammarAccess.getLiteralNullRuleAccess().getValueNullKeyword_0(), semanticObject.getValue()); + feeder.finish(); + } + + + /** + * Constraint: + * value=DOUBLE + */ + protected void sequence_LiteralRealRule(EObject context, LiteralRealRule semanticObject) { + if(errorAcceptor != null) { + if(transientValues.isValueTransient(semanticObject, UmlValueSpecificationPackage.Literals.LITERAL_REAL_RULE__VALUE) == ValueTransient.YES) + errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, UmlValueSpecificationPackage.Literals.LITERAL_REAL_RULE__VALUE)); + } + INodesForEObjectProvider nodes = createNodeProvider(semanticObject); + SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes); + feeder.accept(grammarAccess.getLiteralRealRuleAccess().getValueDOUBLETerminalRuleCall_0(), semanticObject.getValue()); + feeder.finish(); + } + + + /** + * Constraint: + * value=STRING + */ + protected void sequence_LiteralStringRule(EObject context, LiteralStringRule semanticObject) { + if(errorAcceptor != null) { + if(transientValues.isValueTransient(semanticObject, UmlValueSpecificationPackage.Literals.LITERAL_STRING_RULE__VALUE) == ValueTransient.YES) + errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, UmlValueSpecificationPackage.Literals.LITERAL_STRING_RULE__VALUE)); + } + INodesForEObjectProvider nodes = createNodeProvider(semanticObject); + SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes); + feeder.accept(grammarAccess.getLiteralStringRuleAccess().getValueSTRINGTerminalRuleCall_0(), semanticObject.getValue()); + feeder.finish(); + } + + + /** + * Constraint: + * value='<Undefined>' + */ + protected void sequence_UndefinedRule(EObject context, UndefinedRule semanticObject) { + if(errorAcceptor != null) { + if(transientValues.isValueTransient(semanticObject, UmlValueSpecificationPackage.Literals.UNDEFINED_RULE__VALUE) == ValueTransient.YES) + errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, UmlValueSpecificationPackage.Literals.UNDEFINED_RULE__VALUE)); + } + INodesForEObjectProvider nodes = createNodeProvider(semanticObject); + SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes); + feeder.accept(grammarAccess.getUndefinedRuleAccess().getValueUndefinedKeyword_0(), semanticObject.getValue()); + feeder.finish(); + } + + + /** + * Constraint: + * (public='+' | private='-' | protected='#' | package='~') + */ + protected void sequence_VisibilityKind(EObject context, VisibilityKind semanticObject) { + genericSequencer.createSequence(context, semanticObject); + } +} diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/serializer/UmlValueSpecificationSyntacticSequencer.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/serializer/UmlValueSpecificationSyntacticSequencer.java new file mode 100644 index 00000000000..7736f0cbf45 --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/serializer/UmlValueSpecificationSyntacticSequencer.java @@ -0,0 +1,40 @@ +package org.eclipse.papyrus.uml.textedit.valuespecification.xtext.serializer; + +import com.google.inject.Inject; +import java.util.List; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.services.UmlValueSpecificationGrammarAccess; +import org.eclipse.xtext.IGrammarAccess; +import org.eclipse.xtext.RuleCall; +import org.eclipse.xtext.nodemodel.INode; +import org.eclipse.xtext.serializer.analysis.GrammarAlias.AbstractElementAlias; +import org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider.ISynTransition; +import org.eclipse.xtext.serializer.sequencer.AbstractSyntacticSequencer; + +@SuppressWarnings("all") +public class UmlValueSpecificationSyntacticSequencer extends AbstractSyntacticSequencer { + + protected UmlValueSpecificationGrammarAccess grammarAccess; + + @Inject + protected void init(IGrammarAccess access) { + grammarAccess = (UmlValueSpecificationGrammarAccess) access; + } + + @Override + protected String getUnassignedRuleCallToken(EObject semanticObject, RuleCall ruleCall, INode node) { + return ""; + } + + + @Override + protected void emitUnassignedTokens(EObject semanticObject, ISynTransition transition, INode fromNode, INode toNode) { + if (transition.getAmbiguousSyntaxes().isEmpty()) return; + List<INode> transitionNodes = collectNodes(fromNode, toNode); + for (AbstractElementAlias syntax : transition.getAmbiguousSyntaxes()) { + List<INode> syntaxNodes = getNodesFor(transitionNodes, syntax); + acceptNodes(getLastNavigableState(), syntaxNodes); + } + } + +} diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/services/UmlValueSpecificationGrammarAccess.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/services/UmlValueSpecificationGrammarAccess.java new file mode 100644 index 00000000000..d32f8425dc7 --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/services/UmlValueSpecificationGrammarAccess.java @@ -0,0 +1,456 @@ +/* +* generated by Xtext +*/ +package org.eclipse.papyrus.uml.textedit.valuespecification.xtext.services; + +import com.google.inject.Singleton; +import com.google.inject.Inject; + +import java.util.List; + +import org.eclipse.xtext.*; +import org.eclipse.xtext.service.GrammarProvider; +import org.eclipse.xtext.service.AbstractElementFinder.*; + +import org.eclipse.xtext.common.services.TerminalsGrammarAccess; + +@Singleton +public class UmlValueSpecificationGrammarAccess extends AbstractGrammarElementFinder { + + + public class AbstractRuleElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "AbstractRule"); + private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1); + private final Group cGroup_0 = (Group)cAlternatives.eContents().get(0); + private final Assignment cVisibilityAssignment_0_0 = (Assignment)cGroup_0.eContents().get(0); + private final RuleCall cVisibilityVisibilityKindParserRuleCall_0_0_0 = (RuleCall)cVisibilityAssignment_0_0.eContents().get(0); + private final Group cGroup_0_1 = (Group)cGroup_0.eContents().get(1); + private final Assignment cNameAssignment_0_1_0 = (Assignment)cGroup_0_1.eContents().get(0); + private final RuleCall cNameIDTerminalRuleCall_0_1_0_0 = (RuleCall)cNameAssignment_0_1_0.eContents().get(0); + private final Keyword cEqualsSignKeyword_0_1_1 = (Keyword)cGroup_0_1.eContents().get(1); + private final Alternatives cAlternatives_0_2 = (Alternatives)cGroup_0.eContents().get(2); + private final Assignment cValueAssignment_0_2_0 = (Assignment)cAlternatives_0_2.eContents().get(0); + private final Alternatives cValueAlternatives_0_2_0_0 = (Alternatives)cValueAssignment_0_2_0.eContents().get(0); + private final RuleCall cValueLiteralBooleanRuleParserRuleCall_0_2_0_0_0 = (RuleCall)cValueAlternatives_0_2_0_0.eContents().get(0); + private final RuleCall cValueLiteralIntegerOrUnlimitedNaturalRuleParserRuleCall_0_2_0_0_1 = (RuleCall)cValueAlternatives_0_2_0_0.eContents().get(1); + private final RuleCall cValueLiteralRealRuleParserRuleCall_0_2_0_0_2 = (RuleCall)cValueAlternatives_0_2_0_0.eContents().get(2); + private final RuleCall cValueLiteralNullRuleParserRuleCall_0_2_0_0_3 = (RuleCall)cValueAlternatives_0_2_0_0.eContents().get(3); + private final RuleCall cValueLiteralStringRuleParserRuleCall_0_2_0_0_4 = (RuleCall)cValueAlternatives_0_2_0_0.eContents().get(4); + private final Assignment cInstanceSpecificationAssignment_0_2_1 = (Assignment)cAlternatives_0_2.eContents().get(1); + private final CrossReference cInstanceSpecificationInstanceSpecificationCrossReference_0_2_1_0 = (CrossReference)cInstanceSpecificationAssignment_0_2_1.eContents().get(0); + private final RuleCall cInstanceSpecificationInstanceSpecificationIDTerminalRuleCall_0_2_1_0_1 = (RuleCall)cInstanceSpecificationInstanceSpecificationCrossReference_0_2_1_0.eContents().get(1); + private final Assignment cUndefinedAssignment_1 = (Assignment)cAlternatives.eContents().get(1); + private final RuleCall cUndefinedUndefinedRuleParserRuleCall_1_0 = (RuleCall)cUndefinedAssignment_1.eContents().get(0); + + //AbstractRule: + // visibility=VisibilityKind? (name=ID "=")? (value=(LiteralBooleanRule | LiteralIntegerOrUnlimitedNaturalRule | + // LiteralRealRule | LiteralNullRule | LiteralStringRule) | instanceSpecification=[uml::InstanceSpecification]) | + // undefined=UndefinedRule; + public ParserRule getRule() { return rule; } + + //visibility=VisibilityKind? (name=ID "=")? (value=(LiteralBooleanRule | LiteralIntegerOrUnlimitedNaturalRule | + //LiteralRealRule | LiteralNullRule | LiteralStringRule) | instanceSpecification=[uml::InstanceSpecification]) | + //undefined=UndefinedRule + public Alternatives getAlternatives() { return cAlternatives; } + + //visibility=VisibilityKind? (name=ID "=")? (value=(LiteralBooleanRule | LiteralIntegerOrUnlimitedNaturalRule | + //LiteralRealRule | LiteralNullRule | LiteralStringRule) | instanceSpecification=[uml::InstanceSpecification]) + public Group getGroup_0() { return cGroup_0; } + + //visibility=VisibilityKind? + public Assignment getVisibilityAssignment_0_0() { return cVisibilityAssignment_0_0; } + + //VisibilityKind + public RuleCall getVisibilityVisibilityKindParserRuleCall_0_0_0() { return cVisibilityVisibilityKindParserRuleCall_0_0_0; } + + //(name=ID "=")? + public Group getGroup_0_1() { return cGroup_0_1; } + + //name=ID + public Assignment getNameAssignment_0_1_0() { return cNameAssignment_0_1_0; } + + //ID + public RuleCall getNameIDTerminalRuleCall_0_1_0_0() { return cNameIDTerminalRuleCall_0_1_0_0; } + + //"=" + public Keyword getEqualsSignKeyword_0_1_1() { return cEqualsSignKeyword_0_1_1; } + + //value=(LiteralBooleanRule | LiteralIntegerOrUnlimitedNaturalRule | LiteralRealRule | LiteralNullRule | + //LiteralStringRule) | instanceSpecification=[uml::InstanceSpecification] + public Alternatives getAlternatives_0_2() { return cAlternatives_0_2; } + + //value=(LiteralBooleanRule | LiteralIntegerOrUnlimitedNaturalRule | LiteralRealRule | LiteralNullRule | + //LiteralStringRule) + public Assignment getValueAssignment_0_2_0() { return cValueAssignment_0_2_0; } + + //LiteralBooleanRule | LiteralIntegerOrUnlimitedNaturalRule | LiteralRealRule | LiteralNullRule | LiteralStringRule + public Alternatives getValueAlternatives_0_2_0_0() { return cValueAlternatives_0_2_0_0; } + + //LiteralBooleanRule + public RuleCall getValueLiteralBooleanRuleParserRuleCall_0_2_0_0_0() { return cValueLiteralBooleanRuleParserRuleCall_0_2_0_0_0; } + + //LiteralIntegerOrUnlimitedNaturalRule + public RuleCall getValueLiteralIntegerOrUnlimitedNaturalRuleParserRuleCall_0_2_0_0_1() { return cValueLiteralIntegerOrUnlimitedNaturalRuleParserRuleCall_0_2_0_0_1; } + + //LiteralRealRule + public RuleCall getValueLiteralRealRuleParserRuleCall_0_2_0_0_2() { return cValueLiteralRealRuleParserRuleCall_0_2_0_0_2; } + + //LiteralNullRule + public RuleCall getValueLiteralNullRuleParserRuleCall_0_2_0_0_3() { return cValueLiteralNullRuleParserRuleCall_0_2_0_0_3; } + + //LiteralStringRule + public RuleCall getValueLiteralStringRuleParserRuleCall_0_2_0_0_4() { return cValueLiteralStringRuleParserRuleCall_0_2_0_0_4; } + + //instanceSpecification=[uml::InstanceSpecification] + public Assignment getInstanceSpecificationAssignment_0_2_1() { return cInstanceSpecificationAssignment_0_2_1; } + + //[uml::InstanceSpecification] + public CrossReference getInstanceSpecificationInstanceSpecificationCrossReference_0_2_1_0() { return cInstanceSpecificationInstanceSpecificationCrossReference_0_2_1_0; } + + //ID + public RuleCall getInstanceSpecificationInstanceSpecificationIDTerminalRuleCall_0_2_1_0_1() { return cInstanceSpecificationInstanceSpecificationIDTerminalRuleCall_0_2_1_0_1; } + + //undefined=UndefinedRule + public Assignment getUndefinedAssignment_1() { return cUndefinedAssignment_1; } + + //UndefinedRule + public RuleCall getUndefinedUndefinedRuleParserRuleCall_1_0() { return cUndefinedUndefinedRuleParserRuleCall_1_0; } + } + + public class LiteralBooleanRuleElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "LiteralBooleanRule"); + private final Assignment cValueAssignment = (Assignment)rule.eContents().get(1); + private final Alternatives cValueAlternatives_0 = (Alternatives)cValueAssignment.eContents().get(0); + private final Keyword cValueTrueKeyword_0_0 = (Keyword)cValueAlternatives_0.eContents().get(0); + private final Keyword cValueFalseKeyword_0_1 = (Keyword)cValueAlternatives_0.eContents().get(1); + + //LiteralBooleanRule: + // value=("true" | "false"); + public ParserRule getRule() { return rule; } + + //value=("true" | "false") + public Assignment getValueAssignment() { return cValueAssignment; } + + //"true" | "false" + public Alternatives getValueAlternatives_0() { return cValueAlternatives_0; } + + //"true" + public Keyword getValueTrueKeyword_0_0() { return cValueTrueKeyword_0_0; } + + //"false" + public Keyword getValueFalseKeyword_0_1() { return cValueFalseKeyword_0_1; } + } + + public class LiteralIntegerOrUnlimitedNaturalRuleElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "LiteralIntegerOrUnlimitedNaturalRule"); + private final Assignment cValueAssignment = (Assignment)rule.eContents().get(1); + private final RuleCall cValueINTTerminalRuleCall_0 = (RuleCall)cValueAssignment.eContents().get(0); + + //LiteralIntegerOrUnlimitedNaturalRule: + // value=INT; + public ParserRule getRule() { return rule; } + + //value=INT + public Assignment getValueAssignment() { return cValueAssignment; } + + //INT + public RuleCall getValueINTTerminalRuleCall_0() { return cValueINTTerminalRuleCall_0; } + } + + public class LiteralRealRuleElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "LiteralRealRule"); + private final Assignment cValueAssignment = (Assignment)rule.eContents().get(1); + private final RuleCall cValueDOUBLETerminalRuleCall_0 = (RuleCall)cValueAssignment.eContents().get(0); + + //LiteralRealRule: + // value=DOUBLE; + public ParserRule getRule() { return rule; } + + //value=DOUBLE + public Assignment getValueAssignment() { return cValueAssignment; } + + //DOUBLE + public RuleCall getValueDOUBLETerminalRuleCall_0() { return cValueDOUBLETerminalRuleCall_0; } + } + + public class LiteralNullRuleElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "LiteralNullRule"); + private final Assignment cValueAssignment = (Assignment)rule.eContents().get(1); + private final Keyword cValueNullKeyword_0 = (Keyword)cValueAssignment.eContents().get(0); + + //LiteralNullRule: + // value="null"; + public ParserRule getRule() { return rule; } + + //value="null" + public Assignment getValueAssignment() { return cValueAssignment; } + + //"null" + public Keyword getValueNullKeyword_0() { return cValueNullKeyword_0; } + } + + public class LiteralStringRuleElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "LiteralStringRule"); + private final Assignment cValueAssignment = (Assignment)rule.eContents().get(1); + private final RuleCall cValueSTRINGTerminalRuleCall_0 = (RuleCall)cValueAssignment.eContents().get(0); + + //LiteralStringRule: + // value=STRING; + public ParserRule getRule() { return rule; } + + //value=STRING + public Assignment getValueAssignment() { return cValueAssignment; } + + //STRING + public RuleCall getValueSTRINGTerminalRuleCall_0() { return cValueSTRINGTerminalRuleCall_0; } + } + + public class UndefinedRuleElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "UndefinedRule"); + private final Assignment cValueAssignment = (Assignment)rule.eContents().get(1); + private final Keyword cValueUndefinedKeyword_0 = (Keyword)cValueAssignment.eContents().get(0); + + //UndefinedRule: + // value="<Undefined>"; + public ParserRule getRule() { return rule; } + + //value="<Undefined>" + public Assignment getValueAssignment() { return cValueAssignment; } + + //"<Undefined>" + public Keyword getValueUndefinedKeyword_0() { return cValueUndefinedKeyword_0; } + } + + public class VisibilityKindElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "VisibilityKind"); + private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1); + private final Assignment cPublicAssignment_0 = (Assignment)cAlternatives.eContents().get(0); + private final Keyword cPublicPlusSignKeyword_0_0 = (Keyword)cPublicAssignment_0.eContents().get(0); + private final Assignment cPrivateAssignment_1 = (Assignment)cAlternatives.eContents().get(1); + private final Keyword cPrivateHyphenMinusKeyword_1_0 = (Keyword)cPrivateAssignment_1.eContents().get(0); + private final Assignment cProtectedAssignment_2 = (Assignment)cAlternatives.eContents().get(2); + private final Keyword cProtectedNumberSignKeyword_2_0 = (Keyword)cProtectedAssignment_2.eContents().get(0); + private final Assignment cPackageAssignment_3 = (Assignment)cAlternatives.eContents().get(3); + private final Keyword cPackageTildeKeyword_3_0 = (Keyword)cPackageAssignment_3.eContents().get(0); + + //VisibilityKind: + // public="+" | private="-" | protected="#" | package="~"; + public ParserRule getRule() { return rule; } + + //public="+" | private="-" | protected="#" | package="~" + public Alternatives getAlternatives() { return cAlternatives; } + + //public="+" + public Assignment getPublicAssignment_0() { return cPublicAssignment_0; } + + //"+" + public Keyword getPublicPlusSignKeyword_0_0() { return cPublicPlusSignKeyword_0_0; } + + //private="-" + public Assignment getPrivateAssignment_1() { return cPrivateAssignment_1; } + + //"-" + public Keyword getPrivateHyphenMinusKeyword_1_0() { return cPrivateHyphenMinusKeyword_1_0; } + + //protected="#" + public Assignment getProtectedAssignment_2() { return cProtectedAssignment_2; } + + //"#" + public Keyword getProtectedNumberSignKeyword_2_0() { return cProtectedNumberSignKeyword_2_0; } + + //package="~" + public Assignment getPackageAssignment_3() { return cPackageAssignment_3; } + + //"~" + public Keyword getPackageTildeKeyword_3_0() { return cPackageTildeKeyword_3_0; } + } + + + private final AbstractRuleElements pAbstractRule; + private final LiteralBooleanRuleElements pLiteralBooleanRule; + private final LiteralIntegerOrUnlimitedNaturalRuleElements pLiteralIntegerOrUnlimitedNaturalRule; + private final LiteralRealRuleElements pLiteralRealRule; + private final TerminalRule tDOUBLE; + private final LiteralNullRuleElements pLiteralNullRule; + private final LiteralStringRuleElements pLiteralStringRule; + private final UndefinedRuleElements pUndefinedRule; + private final VisibilityKindElements pVisibilityKind; + + private final Grammar grammar; + + private final TerminalsGrammarAccess gaTerminals; + + @Inject + public UmlValueSpecificationGrammarAccess(GrammarProvider grammarProvider, + TerminalsGrammarAccess gaTerminals) { + this.grammar = internalFindGrammar(grammarProvider); + this.gaTerminals = gaTerminals; + this.pAbstractRule = new AbstractRuleElements(); + this.pLiteralBooleanRule = new LiteralBooleanRuleElements(); + this.pLiteralIntegerOrUnlimitedNaturalRule = new LiteralIntegerOrUnlimitedNaturalRuleElements(); + this.pLiteralRealRule = new LiteralRealRuleElements(); + this.tDOUBLE = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "DOUBLE"); + this.pLiteralNullRule = new LiteralNullRuleElements(); + this.pLiteralStringRule = new LiteralStringRuleElements(); + this.pUndefinedRule = new UndefinedRuleElements(); + this.pVisibilityKind = new VisibilityKindElements(); + } + + protected Grammar internalFindGrammar(GrammarProvider grammarProvider) { + Grammar grammar = grammarProvider.getGrammar(this); + while (grammar != null) { + if ("org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification".equals(grammar.getName())) { + return grammar; + } + List<Grammar> grammars = grammar.getUsedGrammars(); + if (!grammars.isEmpty()) { + grammar = grammars.iterator().next(); + } else { + return null; + } + } + return grammar; + } + + + public Grammar getGrammar() { + return grammar; + } + + + public TerminalsGrammarAccess getTerminalsGrammarAccess() { + return gaTerminals; + } + + + //AbstractRule: + // visibility=VisibilityKind? (name=ID "=")? (value=(LiteralBooleanRule | LiteralIntegerOrUnlimitedNaturalRule | + // LiteralRealRule | LiteralNullRule | LiteralStringRule) | instanceSpecification=[uml::InstanceSpecification]) | + // undefined=UndefinedRule; + public AbstractRuleElements getAbstractRuleAccess() { + return pAbstractRule; + } + + public ParserRule getAbstractRuleRule() { + return getAbstractRuleAccess().getRule(); + } + + //LiteralBooleanRule: + // value=("true" | "false"); + public LiteralBooleanRuleElements getLiteralBooleanRuleAccess() { + return pLiteralBooleanRule; + } + + public ParserRule getLiteralBooleanRuleRule() { + return getLiteralBooleanRuleAccess().getRule(); + } + + //LiteralIntegerOrUnlimitedNaturalRule: + // value=INT; + public LiteralIntegerOrUnlimitedNaturalRuleElements getLiteralIntegerOrUnlimitedNaturalRuleAccess() { + return pLiteralIntegerOrUnlimitedNaturalRule; + } + + public ParserRule getLiteralIntegerOrUnlimitedNaturalRuleRule() { + return getLiteralIntegerOrUnlimitedNaturalRuleAccess().getRule(); + } + + //LiteralRealRule: + // value=DOUBLE; + public LiteralRealRuleElements getLiteralRealRuleAccess() { + return pLiteralRealRule; + } + + public ParserRule getLiteralRealRuleRule() { + return getLiteralRealRuleAccess().getRule(); + } + + //terminal DOUBLE returns ecore::EDouble: + // "0".."9"+ "." "0".."9"+; + public TerminalRule getDOUBLERule() { + return tDOUBLE; + } + + //LiteralNullRule: + // value="null"; + public LiteralNullRuleElements getLiteralNullRuleAccess() { + return pLiteralNullRule; + } + + public ParserRule getLiteralNullRuleRule() { + return getLiteralNullRuleAccess().getRule(); + } + + //LiteralStringRule: + // value=STRING; + public LiteralStringRuleElements getLiteralStringRuleAccess() { + return pLiteralStringRule; + } + + public ParserRule getLiteralStringRuleRule() { + return getLiteralStringRuleAccess().getRule(); + } + + //UndefinedRule: + // value="<Undefined>"; + public UndefinedRuleElements getUndefinedRuleAccess() { + return pUndefinedRule; + } + + public ParserRule getUndefinedRuleRule() { + return getUndefinedRuleAccess().getRule(); + } + + //VisibilityKind: + // public="+" | private="-" | protected="#" | package="~"; + public VisibilityKindElements getVisibilityKindAccess() { + return pVisibilityKind; + } + + public ParserRule getVisibilityKindRule() { + return getVisibilityKindAccess().getRule(); + } + + //terminal ID: + // "^"? ("a".."z" | "A".."Z" | "_") ("a".."z" | "A".."Z" | "_" | "0".."9")*; + public TerminalRule getIDRule() { + return gaTerminals.getIDRule(); + } + + //terminal INT returns ecore::EInt: + // "0".."9"+; + public TerminalRule getINTRule() { + return gaTerminals.getINTRule(); + } + + //terminal STRING: + // "\"" ("\\" . / * 'b'|'t'|'n'|'f'|'r'|'u'|'"'|"'"|'\\' * / | !("\\" | "\""))* "\"" | "\'" ("\\" . + // / * 'b'|'t'|'n'|'f'|'r'|'u'|'"'|"'"|'\\' * / | !("\\" | "\'"))* "\'"; + public TerminalRule getSTRINGRule() { + return gaTerminals.getSTRINGRule(); + } + + //terminal ML_COMMENT: + // "/ *"->"* /"; + public TerminalRule getML_COMMENTRule() { + return gaTerminals.getML_COMMENTRule(); + } + + //terminal SL_COMMENT: + // "//" !("\n" | "\r")* ("\r"? "\n")?; + public TerminalRule getSL_COMMENTRule() { + return gaTerminals.getSL_COMMENTRule(); + } + + //terminal WS: + // (" " | "\t" | "\r" | "\n")+; + public TerminalRule getWSRule() { + return gaTerminals.getWSRule(); + } + + //terminal ANY_OTHER: + // .; + public TerminalRule getANY_OTHERRule() { + return gaTerminals.getANY_OTHERRule(); + } +} diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/AbstractRule.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/AbstractRule.java new file mode 100644 index 00000000000..403ac75b5d0 --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/AbstractRule.java @@ -0,0 +1,161 @@ +/** + */ +package org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification; + +import org.eclipse.emf.ecore.EObject; + +import org.eclipse.uml2.uml.InstanceSpecification; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Abstract Rule</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.AbstractRule#getVisibility <em>Visibility</em>}</li> + * <li>{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.AbstractRule#getName <em>Name</em>}</li> + * <li>{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.AbstractRule#getValue <em>Value</em>}</li> + * <li>{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.AbstractRule#getInstanceSpecification <em>Instance Specification</em>}</li> + * <li>{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.AbstractRule#getUndefined <em>Undefined</em>}</li> + * </ul> + * </p> + * + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.UmlValueSpecificationPackage#getAbstractRule() + * @model + * @generated + */ +public interface AbstractRule extends EObject +{ + /** + * Returns the value of the '<em><b>Visibility</b></em>' containment reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Visibility</em>' containment reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Visibility</em>' containment reference. + * @see #setVisibility(VisibilityKind) + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.UmlValueSpecificationPackage#getAbstractRule_Visibility() + * @model containment="true" + * @generated + */ + VisibilityKind getVisibility(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.AbstractRule#getVisibility <em>Visibility</em>}' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Visibility</em>' containment reference. + * @see #getVisibility() + * @generated + */ + void setVisibility(VisibilityKind value); + + /** + * Returns the value of the '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Name</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Name</em>' attribute. + * @see #setName(String) + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.UmlValueSpecificationPackage#getAbstractRule_Name() + * @model + * @generated + */ + String getName(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.AbstractRule#getName <em>Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Name</em>' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + + /** + * Returns the value of the '<em><b>Value</b></em>' containment reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Value</em>' containment reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Value</em>' containment reference. + * @see #setValue(EObject) + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.UmlValueSpecificationPackage#getAbstractRule_Value() + * @model containment="true" + * @generated + */ + EObject getValue(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.AbstractRule#getValue <em>Value</em>}' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Value</em>' containment reference. + * @see #getValue() + * @generated + */ + void setValue(EObject value); + + /** + * Returns the value of the '<em><b>Instance Specification</b></em>' reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Instance Specification</em>' reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Instance Specification</em>' reference. + * @see #setInstanceSpecification(InstanceSpecification) + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.UmlValueSpecificationPackage#getAbstractRule_InstanceSpecification() + * @model + * @generated + */ + InstanceSpecification getInstanceSpecification(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.AbstractRule#getInstanceSpecification <em>Instance Specification</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Instance Specification</em>' reference. + * @see #getInstanceSpecification() + * @generated + */ + void setInstanceSpecification(InstanceSpecification value); + + /** + * Returns the value of the '<em><b>Undefined</b></em>' containment reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Undefined</em>' containment reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Undefined</em>' containment reference. + * @see #setUndefined(UndefinedRule) + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.UmlValueSpecificationPackage#getAbstractRule_Undefined() + * @model containment="true" + * @generated + */ + UndefinedRule getUndefined(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.AbstractRule#getUndefined <em>Undefined</em>}' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Undefined</em>' containment reference. + * @see #getUndefined() + * @generated + */ + void setUndefined(UndefinedRule value); + +} // AbstractRule diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/LiteralBooleanRule.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/LiteralBooleanRule.java new file mode 100644 index 00000000000..66fcd3c80f0 --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/LiteralBooleanRule.java @@ -0,0 +1,51 @@ +/** + */ +package org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification; + +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Literal Boolean Rule</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralBooleanRule#getValue <em>Value</em>}</li> + * </ul> + * </p> + * + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.UmlValueSpecificationPackage#getLiteralBooleanRule() + * @model + * @generated + */ +public interface LiteralBooleanRule extends EObject +{ + /** + * Returns the value of the '<em><b>Value</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Value</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Value</em>' attribute. + * @see #setValue(String) + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.UmlValueSpecificationPackage#getLiteralBooleanRule_Value() + * @model + * @generated + */ + String getValue(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralBooleanRule#getValue <em>Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Value</em>' attribute. + * @see #getValue() + * @generated + */ + void setValue(String value); + +} // LiteralBooleanRule diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/LiteralIntegerOrUnlimitedNaturalRule.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/LiteralIntegerOrUnlimitedNaturalRule.java new file mode 100644 index 00000000000..e1f72ad6125 --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/LiteralIntegerOrUnlimitedNaturalRule.java @@ -0,0 +1,51 @@ +/** + */ +package org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification; + +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Literal Integer Or Unlimited Natural Rule</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralIntegerOrUnlimitedNaturalRule#getValue <em>Value</em>}</li> + * </ul> + * </p> + * + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.UmlValueSpecificationPackage#getLiteralIntegerOrUnlimitedNaturalRule() + * @model + * @generated + */ +public interface LiteralIntegerOrUnlimitedNaturalRule extends EObject +{ + /** + * Returns the value of the '<em><b>Value</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Value</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Value</em>' attribute. + * @see #setValue(int) + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.UmlValueSpecificationPackage#getLiteralIntegerOrUnlimitedNaturalRule_Value() + * @model + * @generated + */ + int getValue(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralIntegerOrUnlimitedNaturalRule#getValue <em>Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Value</em>' attribute. + * @see #getValue() + * @generated + */ + void setValue(int value); + +} // LiteralIntegerOrUnlimitedNaturalRule diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/LiteralNullRule.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/LiteralNullRule.java new file mode 100644 index 00000000000..e5f218aa995 --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/LiteralNullRule.java @@ -0,0 +1,51 @@ +/** + */ +package org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification; + +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Literal Null Rule</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralNullRule#getValue <em>Value</em>}</li> + * </ul> + * </p> + * + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.UmlValueSpecificationPackage#getLiteralNullRule() + * @model + * @generated + */ +public interface LiteralNullRule extends EObject +{ + /** + * Returns the value of the '<em><b>Value</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Value</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Value</em>' attribute. + * @see #setValue(String) + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.UmlValueSpecificationPackage#getLiteralNullRule_Value() + * @model + * @generated + */ + String getValue(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralNullRule#getValue <em>Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Value</em>' attribute. + * @see #getValue() + * @generated + */ + void setValue(String value); + +} // LiteralNullRule diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/LiteralRealRule.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/LiteralRealRule.java new file mode 100644 index 00000000000..384964125f6 --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/LiteralRealRule.java @@ -0,0 +1,51 @@ +/** + */ +package org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification; + +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Literal Real Rule</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralRealRule#getValue <em>Value</em>}</li> + * </ul> + * </p> + * + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.UmlValueSpecificationPackage#getLiteralRealRule() + * @model + * @generated + */ +public interface LiteralRealRule extends EObject +{ + /** + * Returns the value of the '<em><b>Value</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Value</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Value</em>' attribute. + * @see #setValue(double) + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.UmlValueSpecificationPackage#getLiteralRealRule_Value() + * @model + * @generated + */ + double getValue(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralRealRule#getValue <em>Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Value</em>' attribute. + * @see #getValue() + * @generated + */ + void setValue(double value); + +} // LiteralRealRule diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/LiteralStringRule.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/LiteralStringRule.java new file mode 100644 index 00000000000..a7fbf63e614 --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/LiteralStringRule.java @@ -0,0 +1,51 @@ +/** + */ +package org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification; + +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Literal String Rule</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralStringRule#getValue <em>Value</em>}</li> + * </ul> + * </p> + * + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.UmlValueSpecificationPackage#getLiteralStringRule() + * @model + * @generated + */ +public interface LiteralStringRule extends EObject +{ + /** + * Returns the value of the '<em><b>Value</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Value</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Value</em>' attribute. + * @see #setValue(String) + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.UmlValueSpecificationPackage#getLiteralStringRule_Value() + * @model + * @generated + */ + String getValue(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralStringRule#getValue <em>Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Value</em>' attribute. + * @see #getValue() + * @generated + */ + void setValue(String value); + +} // LiteralStringRule diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/UmlValueSpecificationFactory.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/UmlValueSpecificationFactory.java new file mode 100644 index 00000000000..f11f23b78d1 --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/UmlValueSpecificationFactory.java @@ -0,0 +1,106 @@ +/** + */ +package org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification; + +import org.eclipse.emf.ecore.EFactory; + +/** + * <!-- begin-user-doc --> + * The <b>Factory</b> for the model. + * It provides a create method for each non-abstract class of the model. + * <!-- end-user-doc --> + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.UmlValueSpecificationPackage + * @generated + */ +public interface UmlValueSpecificationFactory extends EFactory +{ + /** + * The singleton instance of the factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + UmlValueSpecificationFactory eINSTANCE = org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl.UmlValueSpecificationFactoryImpl.init(); + + /** + * Returns a new object of class '<em>Abstract Rule</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Abstract Rule</em>'. + * @generated + */ + AbstractRule createAbstractRule(); + + /** + * Returns a new object of class '<em>Literal Boolean Rule</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Literal Boolean Rule</em>'. + * @generated + */ + LiteralBooleanRule createLiteralBooleanRule(); + + /** + * Returns a new object of class '<em>Literal Integer Or Unlimited Natural Rule</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Literal Integer Or Unlimited Natural Rule</em>'. + * @generated + */ + LiteralIntegerOrUnlimitedNaturalRule createLiteralIntegerOrUnlimitedNaturalRule(); + + /** + * Returns a new object of class '<em>Literal Real Rule</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Literal Real Rule</em>'. + * @generated + */ + LiteralRealRule createLiteralRealRule(); + + /** + * Returns a new object of class '<em>Literal Null Rule</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Literal Null Rule</em>'. + * @generated + */ + LiteralNullRule createLiteralNullRule(); + + /** + * Returns a new object of class '<em>Literal String Rule</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Literal String Rule</em>'. + * @generated + */ + LiteralStringRule createLiteralStringRule(); + + /** + * Returns a new object of class '<em>Undefined Rule</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Undefined Rule</em>'. + * @generated + */ + UndefinedRule createUndefinedRule(); + + /** + * Returns a new object of class '<em>Visibility Kind</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Visibility Kind</em>'. + * @generated + */ + VisibilityKind createVisibilityKind(); + + /** + * Returns the package supported by this factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the package supported by this factory. + * @generated + */ + UmlValueSpecificationPackage getUmlValueSpecificationPackage(); + +} //UmlValueSpecificationFactory diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/UmlValueSpecificationPackage.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/UmlValueSpecificationPackage.java new file mode 100644 index 00000000000..a18dccee499 --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/UmlValueSpecificationPackage.java @@ -0,0 +1,817 @@ +/** + */ +package org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +/** + * <!-- begin-user-doc --> + * The <b>Package</b> for the model. + * It contains accessors for the meta objects to represent + * <ul> + * <li>each class,</li> + * <li>each feature of each class,</li> + * <li>each enum,</li> + * <li>and each data type</li> + * </ul> + * <!-- end-user-doc --> + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.UmlValueSpecificationFactory + * @model kind="package" + * @generated + */ +public interface UmlValueSpecificationPackage extends EPackage +{ + /** + * The package name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + String eNAME = "umlValueSpecification"; + + /** + * The package namespace URI. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + String eNS_URI = "http://www.eclipse.org/papyrus/uml/textedit/valuespecification/xtext/UmlValueSpecification"; + + /** + * The package namespace name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + String eNS_PREFIX = "umlValueSpecification"; + + /** + * The singleton instance of the package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + UmlValueSpecificationPackage eINSTANCE = org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl.UmlValueSpecificationPackageImpl.init(); + + /** + * The meta object id for the '{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl.AbstractRuleImpl <em>Abstract Rule</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl.AbstractRuleImpl + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl.UmlValueSpecificationPackageImpl#getAbstractRule() + * @generated + */ + int ABSTRACT_RULE = 0; + + /** + * The feature id for the '<em><b>Visibility</b></em>' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ABSTRACT_RULE__VISIBILITY = 0; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ABSTRACT_RULE__NAME = 1; + + /** + * The feature id for the '<em><b>Value</b></em>' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ABSTRACT_RULE__VALUE = 2; + + /** + * The feature id for the '<em><b>Instance Specification</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ABSTRACT_RULE__INSTANCE_SPECIFICATION = 3; + + /** + * The feature id for the '<em><b>Undefined</b></em>' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ABSTRACT_RULE__UNDEFINED = 4; + + /** + * The number of structural features of the '<em>Abstract Rule</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ABSTRACT_RULE_FEATURE_COUNT = 5; + + /** + * The meta object id for the '{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl.LiteralBooleanRuleImpl <em>Literal Boolean Rule</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl.LiteralBooleanRuleImpl + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl.UmlValueSpecificationPackageImpl#getLiteralBooleanRule() + * @generated + */ + int LITERAL_BOOLEAN_RULE = 1; + + /** + * The feature id for the '<em><b>Value</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LITERAL_BOOLEAN_RULE__VALUE = 0; + + /** + * The number of structural features of the '<em>Literal Boolean Rule</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LITERAL_BOOLEAN_RULE_FEATURE_COUNT = 1; + + /** + * The meta object id for the '{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl.LiteralIntegerOrUnlimitedNaturalRuleImpl <em>Literal Integer Or Unlimited Natural Rule</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl.LiteralIntegerOrUnlimitedNaturalRuleImpl + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl.UmlValueSpecificationPackageImpl#getLiteralIntegerOrUnlimitedNaturalRule() + * @generated + */ + int LITERAL_INTEGER_OR_UNLIMITED_NATURAL_RULE = 2; + + /** + * The feature id for the '<em><b>Value</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LITERAL_INTEGER_OR_UNLIMITED_NATURAL_RULE__VALUE = 0; + + /** + * The number of structural features of the '<em>Literal Integer Or Unlimited Natural Rule</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LITERAL_INTEGER_OR_UNLIMITED_NATURAL_RULE_FEATURE_COUNT = 1; + + /** + * The meta object id for the '{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl.LiteralRealRuleImpl <em>Literal Real Rule</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl.LiteralRealRuleImpl + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl.UmlValueSpecificationPackageImpl#getLiteralRealRule() + * @generated + */ + int LITERAL_REAL_RULE = 3; + + /** + * The feature id for the '<em><b>Value</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LITERAL_REAL_RULE__VALUE = 0; + + /** + * The number of structural features of the '<em>Literal Real Rule</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LITERAL_REAL_RULE_FEATURE_COUNT = 1; + + /** + * The meta object id for the '{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl.LiteralNullRuleImpl <em>Literal Null Rule</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl.LiteralNullRuleImpl + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl.UmlValueSpecificationPackageImpl#getLiteralNullRule() + * @generated + */ + int LITERAL_NULL_RULE = 4; + + /** + * The feature id for the '<em><b>Value</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LITERAL_NULL_RULE__VALUE = 0; + + /** + * The number of structural features of the '<em>Literal Null Rule</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LITERAL_NULL_RULE_FEATURE_COUNT = 1; + + /** + * The meta object id for the '{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl.LiteralStringRuleImpl <em>Literal String Rule</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl.LiteralStringRuleImpl + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl.UmlValueSpecificationPackageImpl#getLiteralStringRule() + * @generated + */ + int LITERAL_STRING_RULE = 5; + + /** + * The feature id for the '<em><b>Value</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LITERAL_STRING_RULE__VALUE = 0; + + /** + * The number of structural features of the '<em>Literal String Rule</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LITERAL_STRING_RULE_FEATURE_COUNT = 1; + + /** + * The meta object id for the '{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl.UndefinedRuleImpl <em>Undefined Rule</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl.UndefinedRuleImpl + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl.UmlValueSpecificationPackageImpl#getUndefinedRule() + * @generated + */ + int UNDEFINED_RULE = 6; + + /** + * The feature id for the '<em><b>Value</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int UNDEFINED_RULE__VALUE = 0; + + /** + * The number of structural features of the '<em>Undefined Rule</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int UNDEFINED_RULE_FEATURE_COUNT = 1; + + /** + * The meta object id for the '{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl.VisibilityKindImpl <em>Visibility Kind</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl.VisibilityKindImpl + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl.UmlValueSpecificationPackageImpl#getVisibilityKind() + * @generated + */ + int VISIBILITY_KIND = 7; + + /** + * The feature id for the '<em><b>Public</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VISIBILITY_KIND__PUBLIC = 0; + + /** + * The feature id for the '<em><b>Private</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VISIBILITY_KIND__PRIVATE = 1; + + /** + * The feature id for the '<em><b>Protected</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VISIBILITY_KIND__PROTECTED = 2; + + /** + * The feature id for the '<em><b>Package</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VISIBILITY_KIND__PACKAGE = 3; + + /** + * The number of structural features of the '<em>Visibility Kind</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VISIBILITY_KIND_FEATURE_COUNT = 4; + + + /** + * Returns the meta object for class '{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.AbstractRule <em>Abstract Rule</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Abstract Rule</em>'. + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.AbstractRule + * @generated + */ + EClass getAbstractRule(); + + /** + * Returns the meta object for the containment reference '{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.AbstractRule#getVisibility <em>Visibility</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference '<em>Visibility</em>'. + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.AbstractRule#getVisibility() + * @see #getAbstractRule() + * @generated + */ + EReference getAbstractRule_Visibility(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.AbstractRule#getName <em>Name</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Name</em>'. + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.AbstractRule#getName() + * @see #getAbstractRule() + * @generated + */ + EAttribute getAbstractRule_Name(); + + /** + * Returns the meta object for the containment reference '{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.AbstractRule#getValue <em>Value</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference '<em>Value</em>'. + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.AbstractRule#getValue() + * @see #getAbstractRule() + * @generated + */ + EReference getAbstractRule_Value(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.AbstractRule#getInstanceSpecification <em>Instance Specification</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the reference '<em>Instance Specification</em>'. + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.AbstractRule#getInstanceSpecification() + * @see #getAbstractRule() + * @generated + */ + EReference getAbstractRule_InstanceSpecification(); + + /** + * Returns the meta object for the containment reference '{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.AbstractRule#getUndefined <em>Undefined</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference '<em>Undefined</em>'. + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.AbstractRule#getUndefined() + * @see #getAbstractRule() + * @generated + */ + EReference getAbstractRule_Undefined(); + + /** + * Returns the meta object for class '{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralBooleanRule <em>Literal Boolean Rule</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Literal Boolean Rule</em>'. + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralBooleanRule + * @generated + */ + EClass getLiteralBooleanRule(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralBooleanRule#getValue <em>Value</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Value</em>'. + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralBooleanRule#getValue() + * @see #getLiteralBooleanRule() + * @generated + */ + EAttribute getLiteralBooleanRule_Value(); + + /** + * Returns the meta object for class '{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralIntegerOrUnlimitedNaturalRule <em>Literal Integer Or Unlimited Natural Rule</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Literal Integer Or Unlimited Natural Rule</em>'. + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralIntegerOrUnlimitedNaturalRule + * @generated + */ + EClass getLiteralIntegerOrUnlimitedNaturalRule(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralIntegerOrUnlimitedNaturalRule#getValue <em>Value</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Value</em>'. + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralIntegerOrUnlimitedNaturalRule#getValue() + * @see #getLiteralIntegerOrUnlimitedNaturalRule() + * @generated + */ + EAttribute getLiteralIntegerOrUnlimitedNaturalRule_Value(); + + /** + * Returns the meta object for class '{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralRealRule <em>Literal Real Rule</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Literal Real Rule</em>'. + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralRealRule + * @generated + */ + EClass getLiteralRealRule(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralRealRule#getValue <em>Value</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Value</em>'. + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralRealRule#getValue() + * @see #getLiteralRealRule() + * @generated + */ + EAttribute getLiteralRealRule_Value(); + + /** + * Returns the meta object for class '{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralNullRule <em>Literal Null Rule</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Literal Null Rule</em>'. + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralNullRule + * @generated + */ + EClass getLiteralNullRule(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralNullRule#getValue <em>Value</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Value</em>'. + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralNullRule#getValue() + * @see #getLiteralNullRule() + * @generated + */ + EAttribute getLiteralNullRule_Value(); + + /** + * Returns the meta object for class '{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralStringRule <em>Literal String Rule</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Literal String Rule</em>'. + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralStringRule + * @generated + */ + EClass getLiteralStringRule(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralStringRule#getValue <em>Value</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Value</em>'. + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralStringRule#getValue() + * @see #getLiteralStringRule() + * @generated + */ + EAttribute getLiteralStringRule_Value(); + + /** + * Returns the meta object for class '{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.UndefinedRule <em>Undefined Rule</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Undefined Rule</em>'. + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.UndefinedRule + * @generated + */ + EClass getUndefinedRule(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.UndefinedRule#getValue <em>Value</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Value</em>'. + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.UndefinedRule#getValue() + * @see #getUndefinedRule() + * @generated + */ + EAttribute getUndefinedRule_Value(); + + /** + * Returns the meta object for class '{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.VisibilityKind <em>Visibility Kind</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Visibility Kind</em>'. + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.VisibilityKind + * @generated + */ + EClass getVisibilityKind(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.VisibilityKind#getPublic <em>Public</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Public</em>'. + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.VisibilityKind#getPublic() + * @see #getVisibilityKind() + * @generated + */ + EAttribute getVisibilityKind_Public(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.VisibilityKind#getPrivate <em>Private</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Private</em>'. + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.VisibilityKind#getPrivate() + * @see #getVisibilityKind() + * @generated + */ + EAttribute getVisibilityKind_Private(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.VisibilityKind#getProtected <em>Protected</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Protected</em>'. + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.VisibilityKind#getProtected() + * @see #getVisibilityKind() + * @generated + */ + EAttribute getVisibilityKind_Protected(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.VisibilityKind#getPackage <em>Package</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Package</em>'. + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.VisibilityKind#getPackage() + * @see #getVisibilityKind() + * @generated + */ + EAttribute getVisibilityKind_Package(); + + /** + * Returns the factory that creates the instances of the model. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the factory that creates the instances of the model. + * @generated + */ + UmlValueSpecificationFactory getUmlValueSpecificationFactory(); + + /** + * <!-- begin-user-doc --> + * Defines literals for the meta objects that represent + * <ul> + * <li>each class,</li> + * <li>each feature of each class,</li> + * <li>each enum,</li> + * <li>and each data type</li> + * </ul> + * <!-- end-user-doc --> + * @generated + */ + interface Literals + { + /** + * The meta object literal for the '{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl.AbstractRuleImpl <em>Abstract Rule</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl.AbstractRuleImpl + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl.UmlValueSpecificationPackageImpl#getAbstractRule() + * @generated + */ + EClass ABSTRACT_RULE = eINSTANCE.getAbstractRule(); + + /** + * The meta object literal for the '<em><b>Visibility</b></em>' containment reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference ABSTRACT_RULE__VISIBILITY = eINSTANCE.getAbstractRule_Visibility(); + + /** + * The meta object literal for the '<em><b>Name</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute ABSTRACT_RULE__NAME = eINSTANCE.getAbstractRule_Name(); + + /** + * The meta object literal for the '<em><b>Value</b></em>' containment reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference ABSTRACT_RULE__VALUE = eINSTANCE.getAbstractRule_Value(); + + /** + * The meta object literal for the '<em><b>Instance Specification</b></em>' reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference ABSTRACT_RULE__INSTANCE_SPECIFICATION = eINSTANCE.getAbstractRule_InstanceSpecification(); + + /** + * The meta object literal for the '<em><b>Undefined</b></em>' containment reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference ABSTRACT_RULE__UNDEFINED = eINSTANCE.getAbstractRule_Undefined(); + + /** + * The meta object literal for the '{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl.LiteralBooleanRuleImpl <em>Literal Boolean Rule</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl.LiteralBooleanRuleImpl + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl.UmlValueSpecificationPackageImpl#getLiteralBooleanRule() + * @generated + */ + EClass LITERAL_BOOLEAN_RULE = eINSTANCE.getLiteralBooleanRule(); + + /** + * The meta object literal for the '<em><b>Value</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute LITERAL_BOOLEAN_RULE__VALUE = eINSTANCE.getLiteralBooleanRule_Value(); + + /** + * The meta object literal for the '{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl.LiteralIntegerOrUnlimitedNaturalRuleImpl <em>Literal Integer Or Unlimited Natural Rule</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl.LiteralIntegerOrUnlimitedNaturalRuleImpl + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl.UmlValueSpecificationPackageImpl#getLiteralIntegerOrUnlimitedNaturalRule() + * @generated + */ + EClass LITERAL_INTEGER_OR_UNLIMITED_NATURAL_RULE = eINSTANCE.getLiteralIntegerOrUnlimitedNaturalRule(); + + /** + * The meta object literal for the '<em><b>Value</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute LITERAL_INTEGER_OR_UNLIMITED_NATURAL_RULE__VALUE = eINSTANCE.getLiteralIntegerOrUnlimitedNaturalRule_Value(); + + /** + * The meta object literal for the '{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl.LiteralRealRuleImpl <em>Literal Real Rule</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl.LiteralRealRuleImpl + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl.UmlValueSpecificationPackageImpl#getLiteralRealRule() + * @generated + */ + EClass LITERAL_REAL_RULE = eINSTANCE.getLiteralRealRule(); + + /** + * The meta object literal for the '<em><b>Value</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute LITERAL_REAL_RULE__VALUE = eINSTANCE.getLiteralRealRule_Value(); + + /** + * The meta object literal for the '{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl.LiteralNullRuleImpl <em>Literal Null Rule</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl.LiteralNullRuleImpl + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl.UmlValueSpecificationPackageImpl#getLiteralNullRule() + * @generated + */ + EClass LITERAL_NULL_RULE = eINSTANCE.getLiteralNullRule(); + + /** + * The meta object literal for the '<em><b>Value</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute LITERAL_NULL_RULE__VALUE = eINSTANCE.getLiteralNullRule_Value(); + + /** + * The meta object literal for the '{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl.LiteralStringRuleImpl <em>Literal String Rule</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl.LiteralStringRuleImpl + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl.UmlValueSpecificationPackageImpl#getLiteralStringRule() + * @generated + */ + EClass LITERAL_STRING_RULE = eINSTANCE.getLiteralStringRule(); + + /** + * The meta object literal for the '<em><b>Value</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute LITERAL_STRING_RULE__VALUE = eINSTANCE.getLiteralStringRule_Value(); + + /** + * The meta object literal for the '{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl.UndefinedRuleImpl <em>Undefined Rule</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl.UndefinedRuleImpl + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl.UmlValueSpecificationPackageImpl#getUndefinedRule() + * @generated + */ + EClass UNDEFINED_RULE = eINSTANCE.getUndefinedRule(); + + /** + * The meta object literal for the '<em><b>Value</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute UNDEFINED_RULE__VALUE = eINSTANCE.getUndefinedRule_Value(); + + /** + * The meta object literal for the '{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl.VisibilityKindImpl <em>Visibility Kind</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl.VisibilityKindImpl + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl.UmlValueSpecificationPackageImpl#getVisibilityKind() + * @generated + */ + EClass VISIBILITY_KIND = eINSTANCE.getVisibilityKind(); + + /** + * The meta object literal for the '<em><b>Public</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute VISIBILITY_KIND__PUBLIC = eINSTANCE.getVisibilityKind_Public(); + + /** + * The meta object literal for the '<em><b>Private</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute VISIBILITY_KIND__PRIVATE = eINSTANCE.getVisibilityKind_Private(); + + /** + * The meta object literal for the '<em><b>Protected</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute VISIBILITY_KIND__PROTECTED = eINSTANCE.getVisibilityKind_Protected(); + + /** + * The meta object literal for the '<em><b>Package</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute VISIBILITY_KIND__PACKAGE = eINSTANCE.getVisibilityKind_Package(); + + } + +} //UmlValueSpecificationPackage diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/UndefinedRule.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/UndefinedRule.java new file mode 100644 index 00000000000..0613b310f32 --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/UndefinedRule.java @@ -0,0 +1,51 @@ +/** + */ +package org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification; + +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Undefined Rule</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.UndefinedRule#getValue <em>Value</em>}</li> + * </ul> + * </p> + * + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.UmlValueSpecificationPackage#getUndefinedRule() + * @model + * @generated + */ +public interface UndefinedRule extends EObject +{ + /** + * Returns the value of the '<em><b>Value</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Value</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Value</em>' attribute. + * @see #setValue(String) + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.UmlValueSpecificationPackage#getUndefinedRule_Value() + * @model + * @generated + */ + String getValue(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.UndefinedRule#getValue <em>Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Value</em>' attribute. + * @see #getValue() + * @generated + */ + void setValue(String value); + +} // UndefinedRule diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/VisibilityKind.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/VisibilityKind.java new file mode 100644 index 00000000000..ec20f54f93e --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/VisibilityKind.java @@ -0,0 +1,132 @@ +/** + */ +package org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification; + +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Visibility Kind</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.VisibilityKind#getPublic <em>Public</em>}</li> + * <li>{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.VisibilityKind#getPrivate <em>Private</em>}</li> + * <li>{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.VisibilityKind#getProtected <em>Protected</em>}</li> + * <li>{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.VisibilityKind#getPackage <em>Package</em>}</li> + * </ul> + * </p> + * + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.UmlValueSpecificationPackage#getVisibilityKind() + * @model + * @generated + */ +public interface VisibilityKind extends EObject +{ + /** + * Returns the value of the '<em><b>Public</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Public</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Public</em>' attribute. + * @see #setPublic(String) + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.UmlValueSpecificationPackage#getVisibilityKind_Public() + * @model + * @generated + */ + String getPublic(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.VisibilityKind#getPublic <em>Public</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Public</em>' attribute. + * @see #getPublic() + * @generated + */ + void setPublic(String value); + + /** + * Returns the value of the '<em><b>Private</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Private</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Private</em>' attribute. + * @see #setPrivate(String) + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.UmlValueSpecificationPackage#getVisibilityKind_Private() + * @model + * @generated + */ + String getPrivate(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.VisibilityKind#getPrivate <em>Private</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Private</em>' attribute. + * @see #getPrivate() + * @generated + */ + void setPrivate(String value); + + /** + * Returns the value of the '<em><b>Protected</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Protected</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Protected</em>' attribute. + * @see #setProtected(String) + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.UmlValueSpecificationPackage#getVisibilityKind_Protected() + * @model + * @generated + */ + String getProtected(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.VisibilityKind#getProtected <em>Protected</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Protected</em>' attribute. + * @see #getProtected() + * @generated + */ + void setProtected(String value); + + /** + * Returns the value of the '<em><b>Package</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Package</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Package</em>' attribute. + * @see #setPackage(String) + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.UmlValueSpecificationPackage#getVisibilityKind_Package() + * @model + * @generated + */ + String getPackage(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.VisibilityKind#getPackage <em>Package</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Package</em>' attribute. + * @see #getPackage() + * @generated + */ + void setPackage(String value); + +} // VisibilityKind diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/impl/AbstractRuleImpl.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/impl/AbstractRuleImpl.java new file mode 100644 index 00000000000..43612a21841 --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/impl/AbstractRuleImpl.java @@ -0,0 +1,476 @@ +/** + */ +package org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.AbstractRule; +import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.UmlValueSpecificationPackage; +import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.UndefinedRule; +import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.VisibilityKind; + +import org.eclipse.uml2.uml.InstanceSpecification; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Abstract Rule</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl.AbstractRuleImpl#getVisibility <em>Visibility</em>}</li> + * <li>{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl.AbstractRuleImpl#getName <em>Name</em>}</li> + * <li>{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl.AbstractRuleImpl#getValue <em>Value</em>}</li> + * <li>{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl.AbstractRuleImpl#getInstanceSpecification <em>Instance Specification</em>}</li> + * <li>{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl.AbstractRuleImpl#getUndefined <em>Undefined</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class AbstractRuleImpl extends MinimalEObjectImpl.Container implements AbstractRule +{ + /** + * The cached value of the '{@link #getVisibility() <em>Visibility</em>}' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getVisibility() + * @generated + * @ordered + */ + protected VisibilityKind visibility; + + /** + * The default value of the '{@link #getName() <em>Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getName() <em>Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getName() + * @generated + * @ordered + */ + protected String name = NAME_EDEFAULT; + + /** + * The cached value of the '{@link #getValue() <em>Value</em>}' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getValue() + * @generated + * @ordered + */ + protected EObject value; + + /** + * The cached value of the '{@link #getInstanceSpecification() <em>Instance Specification</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getInstanceSpecification() + * @generated + * @ordered + */ + protected InstanceSpecification instanceSpecification; + + /** + * The cached value of the '{@link #getUndefined() <em>Undefined</em>}' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getUndefined() + * @generated + * @ordered + */ + protected UndefinedRule undefined; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected AbstractRuleImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return UmlValueSpecificationPackage.Literals.ABSTRACT_RULE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public VisibilityKind getVisibility() + { + return visibility; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public NotificationChain basicSetVisibility(VisibilityKind newVisibility, NotificationChain msgs) + { + VisibilityKind oldVisibility = visibility; + visibility = newVisibility; + if (eNotificationRequired()) + { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, UmlValueSpecificationPackage.ABSTRACT_RULE__VISIBILITY, oldVisibility, newVisibility); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setVisibility(VisibilityKind newVisibility) + { + if (newVisibility != visibility) + { + NotificationChain msgs = null; + if (visibility != null) + msgs = ((InternalEObject)visibility).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - UmlValueSpecificationPackage.ABSTRACT_RULE__VISIBILITY, null, msgs); + if (newVisibility != null) + msgs = ((InternalEObject)newVisibility).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - UmlValueSpecificationPackage.ABSTRACT_RULE__VISIBILITY, null, msgs); + msgs = basicSetVisibility(newVisibility, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, UmlValueSpecificationPackage.ABSTRACT_RULE__VISIBILITY, newVisibility, newVisibility)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getName() + { + return name; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setName(String newName) + { + String oldName = name; + name = newName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, UmlValueSpecificationPackage.ABSTRACT_RULE__NAME, oldName, name)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EObject getValue() + { + return value; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public NotificationChain basicSetValue(EObject newValue, NotificationChain msgs) + { + EObject oldValue = value; + value = newValue; + if (eNotificationRequired()) + { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, UmlValueSpecificationPackage.ABSTRACT_RULE__VALUE, oldValue, newValue); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setValue(EObject newValue) + { + if (newValue != value) + { + NotificationChain msgs = null; + if (value != null) + msgs = ((InternalEObject)value).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - UmlValueSpecificationPackage.ABSTRACT_RULE__VALUE, null, msgs); + if (newValue != null) + msgs = ((InternalEObject)newValue).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - UmlValueSpecificationPackage.ABSTRACT_RULE__VALUE, null, msgs); + msgs = basicSetValue(newValue, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, UmlValueSpecificationPackage.ABSTRACT_RULE__VALUE, newValue, newValue)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public InstanceSpecification getInstanceSpecification() + { + if (instanceSpecification != null && instanceSpecification.eIsProxy()) + { + InternalEObject oldInstanceSpecification = (InternalEObject)instanceSpecification; + instanceSpecification = (InstanceSpecification)eResolveProxy(oldInstanceSpecification); + if (instanceSpecification != oldInstanceSpecification) + { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, UmlValueSpecificationPackage.ABSTRACT_RULE__INSTANCE_SPECIFICATION, oldInstanceSpecification, instanceSpecification)); + } + } + return instanceSpecification; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public InstanceSpecification basicGetInstanceSpecification() + { + return instanceSpecification; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setInstanceSpecification(InstanceSpecification newInstanceSpecification) + { + InstanceSpecification oldInstanceSpecification = instanceSpecification; + instanceSpecification = newInstanceSpecification; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, UmlValueSpecificationPackage.ABSTRACT_RULE__INSTANCE_SPECIFICATION, oldInstanceSpecification, instanceSpecification)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public UndefinedRule getUndefined() + { + return undefined; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public NotificationChain basicSetUndefined(UndefinedRule newUndefined, NotificationChain msgs) + { + UndefinedRule oldUndefined = undefined; + undefined = newUndefined; + if (eNotificationRequired()) + { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, UmlValueSpecificationPackage.ABSTRACT_RULE__UNDEFINED, oldUndefined, newUndefined); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setUndefined(UndefinedRule newUndefined) + { + if (newUndefined != undefined) + { + NotificationChain msgs = null; + if (undefined != null) + msgs = ((InternalEObject)undefined).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - UmlValueSpecificationPackage.ABSTRACT_RULE__UNDEFINED, null, msgs); + if (newUndefined != null) + msgs = ((InternalEObject)newUndefined).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - UmlValueSpecificationPackage.ABSTRACT_RULE__UNDEFINED, null, msgs); + msgs = basicSetUndefined(newUndefined, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, UmlValueSpecificationPackage.ABSTRACT_RULE__UNDEFINED, newUndefined, newUndefined)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case UmlValueSpecificationPackage.ABSTRACT_RULE__VISIBILITY: + return basicSetVisibility(null, msgs); + case UmlValueSpecificationPackage.ABSTRACT_RULE__VALUE: + return basicSetValue(null, msgs); + case UmlValueSpecificationPackage.ABSTRACT_RULE__UNDEFINED: + return basicSetUndefined(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case UmlValueSpecificationPackage.ABSTRACT_RULE__VISIBILITY: + return getVisibility(); + case UmlValueSpecificationPackage.ABSTRACT_RULE__NAME: + return getName(); + case UmlValueSpecificationPackage.ABSTRACT_RULE__VALUE: + return getValue(); + case UmlValueSpecificationPackage.ABSTRACT_RULE__INSTANCE_SPECIFICATION: + if (resolve) return getInstanceSpecification(); + return basicGetInstanceSpecification(); + case UmlValueSpecificationPackage.ABSTRACT_RULE__UNDEFINED: + return getUndefined(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case UmlValueSpecificationPackage.ABSTRACT_RULE__VISIBILITY: + setVisibility((VisibilityKind)newValue); + return; + case UmlValueSpecificationPackage.ABSTRACT_RULE__NAME: + setName((String)newValue); + return; + case UmlValueSpecificationPackage.ABSTRACT_RULE__VALUE: + setValue((EObject)newValue); + return; + case UmlValueSpecificationPackage.ABSTRACT_RULE__INSTANCE_SPECIFICATION: + setInstanceSpecification((InstanceSpecification)newValue); + return; + case UmlValueSpecificationPackage.ABSTRACT_RULE__UNDEFINED: + setUndefined((UndefinedRule)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case UmlValueSpecificationPackage.ABSTRACT_RULE__VISIBILITY: + setVisibility((VisibilityKind)null); + return; + case UmlValueSpecificationPackage.ABSTRACT_RULE__NAME: + setName(NAME_EDEFAULT); + return; + case UmlValueSpecificationPackage.ABSTRACT_RULE__VALUE: + setValue((EObject)null); + return; + case UmlValueSpecificationPackage.ABSTRACT_RULE__INSTANCE_SPECIFICATION: + setInstanceSpecification((InstanceSpecification)null); + return; + case UmlValueSpecificationPackage.ABSTRACT_RULE__UNDEFINED: + setUndefined((UndefinedRule)null); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case UmlValueSpecificationPackage.ABSTRACT_RULE__VISIBILITY: + return visibility != null; + case UmlValueSpecificationPackage.ABSTRACT_RULE__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + case UmlValueSpecificationPackage.ABSTRACT_RULE__VALUE: + return value != null; + case UmlValueSpecificationPackage.ABSTRACT_RULE__INSTANCE_SPECIFICATION: + return instanceSpecification != null; + case UmlValueSpecificationPackage.ABSTRACT_RULE__UNDEFINED: + return undefined != null; + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() + { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (name: "); + result.append(name); + result.append(')'); + return result.toString(); + } + +} //AbstractRuleImpl diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/impl/LiteralBooleanRuleImpl.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/impl/LiteralBooleanRuleImpl.java new file mode 100644 index 00000000000..c7a100020a0 --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/impl/LiteralBooleanRuleImpl.java @@ -0,0 +1,177 @@ +/** + */ +package org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralBooleanRule; +import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.UmlValueSpecificationPackage; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Literal Boolean Rule</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl.LiteralBooleanRuleImpl#getValue <em>Value</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class LiteralBooleanRuleImpl extends MinimalEObjectImpl.Container implements LiteralBooleanRule +{ + /** + * The default value of the '{@link #getValue() <em>Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getValue() + * @generated + * @ordered + */ + protected static final String VALUE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getValue() <em>Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getValue() + * @generated + * @ordered + */ + protected String value = VALUE_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected LiteralBooleanRuleImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return UmlValueSpecificationPackage.Literals.LITERAL_BOOLEAN_RULE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getValue() + { + return value; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setValue(String newValue) + { + String oldValue = value; + value = newValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, UmlValueSpecificationPackage.LITERAL_BOOLEAN_RULE__VALUE, oldValue, value)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case UmlValueSpecificationPackage.LITERAL_BOOLEAN_RULE__VALUE: + return getValue(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case UmlValueSpecificationPackage.LITERAL_BOOLEAN_RULE__VALUE: + setValue((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case UmlValueSpecificationPackage.LITERAL_BOOLEAN_RULE__VALUE: + setValue(VALUE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case UmlValueSpecificationPackage.LITERAL_BOOLEAN_RULE__VALUE: + return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value); + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() + { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (value: "); + result.append(value); + result.append(')'); + return result.toString(); + } + +} //LiteralBooleanRuleImpl diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/impl/LiteralIntegerOrUnlimitedNaturalRuleImpl.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/impl/LiteralIntegerOrUnlimitedNaturalRuleImpl.java new file mode 100644 index 00000000000..f53af4abbac --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/impl/LiteralIntegerOrUnlimitedNaturalRuleImpl.java @@ -0,0 +1,177 @@ +/** + */ +package org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralIntegerOrUnlimitedNaturalRule; +import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.UmlValueSpecificationPackage; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Literal Integer Or Unlimited Natural Rule</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl.LiteralIntegerOrUnlimitedNaturalRuleImpl#getValue <em>Value</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class LiteralIntegerOrUnlimitedNaturalRuleImpl extends MinimalEObjectImpl.Container implements LiteralIntegerOrUnlimitedNaturalRule +{ + /** + * The default value of the '{@link #getValue() <em>Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getValue() + * @generated + * @ordered + */ + protected static final int VALUE_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getValue() <em>Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getValue() + * @generated + * @ordered + */ + protected int value = VALUE_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected LiteralIntegerOrUnlimitedNaturalRuleImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return UmlValueSpecificationPackage.Literals.LITERAL_INTEGER_OR_UNLIMITED_NATURAL_RULE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getValue() + { + return value; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setValue(int newValue) + { + int oldValue = value; + value = newValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, UmlValueSpecificationPackage.LITERAL_INTEGER_OR_UNLIMITED_NATURAL_RULE__VALUE, oldValue, value)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case UmlValueSpecificationPackage.LITERAL_INTEGER_OR_UNLIMITED_NATURAL_RULE__VALUE: + return getValue(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case UmlValueSpecificationPackage.LITERAL_INTEGER_OR_UNLIMITED_NATURAL_RULE__VALUE: + setValue((Integer)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case UmlValueSpecificationPackage.LITERAL_INTEGER_OR_UNLIMITED_NATURAL_RULE__VALUE: + setValue(VALUE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case UmlValueSpecificationPackage.LITERAL_INTEGER_OR_UNLIMITED_NATURAL_RULE__VALUE: + return value != VALUE_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() + { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (value: "); + result.append(value); + result.append(')'); + return result.toString(); + } + +} //LiteralIntegerOrUnlimitedNaturalRuleImpl diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/impl/LiteralNullRuleImpl.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/impl/LiteralNullRuleImpl.java new file mode 100644 index 00000000000..b44dd319895 --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/impl/LiteralNullRuleImpl.java @@ -0,0 +1,177 @@ +/** + */ +package org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralNullRule; +import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.UmlValueSpecificationPackage; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Literal Null Rule</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl.LiteralNullRuleImpl#getValue <em>Value</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class LiteralNullRuleImpl extends MinimalEObjectImpl.Container implements LiteralNullRule +{ + /** + * The default value of the '{@link #getValue() <em>Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getValue() + * @generated + * @ordered + */ + protected static final String VALUE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getValue() <em>Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getValue() + * @generated + * @ordered + */ + protected String value = VALUE_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected LiteralNullRuleImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return UmlValueSpecificationPackage.Literals.LITERAL_NULL_RULE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getValue() + { + return value; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setValue(String newValue) + { + String oldValue = value; + value = newValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, UmlValueSpecificationPackage.LITERAL_NULL_RULE__VALUE, oldValue, value)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case UmlValueSpecificationPackage.LITERAL_NULL_RULE__VALUE: + return getValue(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case UmlValueSpecificationPackage.LITERAL_NULL_RULE__VALUE: + setValue((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case UmlValueSpecificationPackage.LITERAL_NULL_RULE__VALUE: + setValue(VALUE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case UmlValueSpecificationPackage.LITERAL_NULL_RULE__VALUE: + return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value); + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() + { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (value: "); + result.append(value); + result.append(')'); + return result.toString(); + } + +} //LiteralNullRuleImpl diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/impl/LiteralRealRuleImpl.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/impl/LiteralRealRuleImpl.java new file mode 100644 index 00000000000..a7300220e15 --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/impl/LiteralRealRuleImpl.java @@ -0,0 +1,177 @@ +/** + */ +package org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralRealRule; +import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.UmlValueSpecificationPackage; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Literal Real Rule</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl.LiteralRealRuleImpl#getValue <em>Value</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class LiteralRealRuleImpl extends MinimalEObjectImpl.Container implements LiteralRealRule +{ + /** + * The default value of the '{@link #getValue() <em>Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getValue() + * @generated + * @ordered + */ + protected static final double VALUE_EDEFAULT = 0.0; + + /** + * The cached value of the '{@link #getValue() <em>Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getValue() + * @generated + * @ordered + */ + protected double value = VALUE_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected LiteralRealRuleImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return UmlValueSpecificationPackage.Literals.LITERAL_REAL_RULE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public double getValue() + { + return value; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setValue(double newValue) + { + double oldValue = value; + value = newValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, UmlValueSpecificationPackage.LITERAL_REAL_RULE__VALUE, oldValue, value)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case UmlValueSpecificationPackage.LITERAL_REAL_RULE__VALUE: + return getValue(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case UmlValueSpecificationPackage.LITERAL_REAL_RULE__VALUE: + setValue((Double)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case UmlValueSpecificationPackage.LITERAL_REAL_RULE__VALUE: + setValue(VALUE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case UmlValueSpecificationPackage.LITERAL_REAL_RULE__VALUE: + return value != VALUE_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() + { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (value: "); + result.append(value); + result.append(')'); + return result.toString(); + } + +} //LiteralRealRuleImpl diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/impl/LiteralStringRuleImpl.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/impl/LiteralStringRuleImpl.java new file mode 100644 index 00000000000..862ba6e6d1a --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/impl/LiteralStringRuleImpl.java @@ -0,0 +1,177 @@ +/** + */ +package org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralStringRule; +import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.UmlValueSpecificationPackage; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Literal String Rule</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl.LiteralStringRuleImpl#getValue <em>Value</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class LiteralStringRuleImpl extends MinimalEObjectImpl.Container implements LiteralStringRule +{ + /** + * The default value of the '{@link #getValue() <em>Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getValue() + * @generated + * @ordered + */ + protected static final String VALUE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getValue() <em>Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getValue() + * @generated + * @ordered + */ + protected String value = VALUE_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected LiteralStringRuleImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return UmlValueSpecificationPackage.Literals.LITERAL_STRING_RULE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getValue() + { + return value; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setValue(String newValue) + { + String oldValue = value; + value = newValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, UmlValueSpecificationPackage.LITERAL_STRING_RULE__VALUE, oldValue, value)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case UmlValueSpecificationPackage.LITERAL_STRING_RULE__VALUE: + return getValue(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case UmlValueSpecificationPackage.LITERAL_STRING_RULE__VALUE: + setValue((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case UmlValueSpecificationPackage.LITERAL_STRING_RULE__VALUE: + setValue(VALUE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case UmlValueSpecificationPackage.LITERAL_STRING_RULE__VALUE: + return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value); + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() + { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (value: "); + result.append(value); + result.append(')'); + return result.toString(); + } + +} //LiteralStringRuleImpl diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/impl/UmlValueSpecificationFactoryImpl.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/impl/UmlValueSpecificationFactoryImpl.java new file mode 100644 index 00000000000..0a04c9c4e32 --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/impl/UmlValueSpecificationFactoryImpl.java @@ -0,0 +1,190 @@ +/** + */ +package org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EFactoryImpl; + +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.*; + +/** + * <!-- begin-user-doc --> + * An implementation of the model <b>Factory</b>. + * <!-- end-user-doc --> + * @generated + */ +public class UmlValueSpecificationFactoryImpl extends EFactoryImpl implements UmlValueSpecificationFactory +{ + /** + * Creates the default factory implementation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public static UmlValueSpecificationFactory init() + { + try + { + UmlValueSpecificationFactory theUmlValueSpecificationFactory = (UmlValueSpecificationFactory)EPackage.Registry.INSTANCE.getEFactory(UmlValueSpecificationPackage.eNS_URI); + if (theUmlValueSpecificationFactory != null) + { + return theUmlValueSpecificationFactory; + } + } + catch (Exception exception) + { + EcorePlugin.INSTANCE.log(exception); + } + return new UmlValueSpecificationFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public UmlValueSpecificationFactoryImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public EObject create(EClass eClass) + { + switch (eClass.getClassifierID()) + { + case UmlValueSpecificationPackage.ABSTRACT_RULE: return createAbstractRule(); + case UmlValueSpecificationPackage.LITERAL_BOOLEAN_RULE: return createLiteralBooleanRule(); + case UmlValueSpecificationPackage.LITERAL_INTEGER_OR_UNLIMITED_NATURAL_RULE: return createLiteralIntegerOrUnlimitedNaturalRule(); + case UmlValueSpecificationPackage.LITERAL_REAL_RULE: return createLiteralRealRule(); + case UmlValueSpecificationPackage.LITERAL_NULL_RULE: return createLiteralNullRule(); + case UmlValueSpecificationPackage.LITERAL_STRING_RULE: return createLiteralStringRule(); + case UmlValueSpecificationPackage.UNDEFINED_RULE: return createUndefinedRule(); + case UmlValueSpecificationPackage.VISIBILITY_KIND: return createVisibilityKind(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public AbstractRule createAbstractRule() + { + AbstractRuleImpl abstractRule = new AbstractRuleImpl(); + return abstractRule; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public LiteralBooleanRule createLiteralBooleanRule() + { + LiteralBooleanRuleImpl literalBooleanRule = new LiteralBooleanRuleImpl(); + return literalBooleanRule; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public LiteralIntegerOrUnlimitedNaturalRule createLiteralIntegerOrUnlimitedNaturalRule() + { + LiteralIntegerOrUnlimitedNaturalRuleImpl literalIntegerOrUnlimitedNaturalRule = new LiteralIntegerOrUnlimitedNaturalRuleImpl(); + return literalIntegerOrUnlimitedNaturalRule; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public LiteralRealRule createLiteralRealRule() + { + LiteralRealRuleImpl literalRealRule = new LiteralRealRuleImpl(); + return literalRealRule; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public LiteralNullRule createLiteralNullRule() + { + LiteralNullRuleImpl literalNullRule = new LiteralNullRuleImpl(); + return literalNullRule; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public LiteralStringRule createLiteralStringRule() + { + LiteralStringRuleImpl literalStringRule = new LiteralStringRuleImpl(); + return literalStringRule; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public UndefinedRule createUndefinedRule() + { + UndefinedRuleImpl undefinedRule = new UndefinedRuleImpl(); + return undefinedRule; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public VisibilityKind createVisibilityKind() + { + VisibilityKindImpl visibilityKind = new VisibilityKindImpl(); + return visibilityKind; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public UmlValueSpecificationPackage getUmlValueSpecificationPackage() + { + return (UmlValueSpecificationPackage)getEPackage(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @deprecated + * @generated + */ + @Deprecated + public static UmlValueSpecificationPackage getPackage() + { + return UmlValueSpecificationPackage.eINSTANCE; + } + +} //UmlValueSpecificationFactoryImpl diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/impl/UmlValueSpecificationPackageImpl.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/impl/UmlValueSpecificationPackageImpl.java new file mode 100644 index 00000000000..9a37bb5ee0a --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/impl/UmlValueSpecificationPackageImpl.java @@ -0,0 +1,518 @@ +/** + */ +package org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.EcorePackage; + +import org.eclipse.emf.ecore.impl.EPackageImpl; + +import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.AbstractRule; +import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralBooleanRule; +import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralIntegerOrUnlimitedNaturalRule; +import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralNullRule; +import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralRealRule; +import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralStringRule; +import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.UmlValueSpecificationFactory; +import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.UmlValueSpecificationPackage; +import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.UndefinedRule; +import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.VisibilityKind; + +import org.eclipse.uml2.uml.UMLPackage; + +/** + * <!-- begin-user-doc --> + * An implementation of the model <b>Package</b>. + * <!-- end-user-doc --> + * @generated + */ +public class UmlValueSpecificationPackageImpl extends EPackageImpl implements UmlValueSpecificationPackage +{ + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass abstractRuleEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass literalBooleanRuleEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass literalIntegerOrUnlimitedNaturalRuleEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass literalRealRuleEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass literalNullRuleEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass literalStringRuleEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass undefinedRuleEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass visibilityKindEClass = null; + + /** + * Creates an instance of the model <b>Package</b>, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + * <p>Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.UmlValueSpecificationPackage#eNS_URI + * @see #init() + * @generated + */ + private UmlValueSpecificationPackageImpl() + { + super(eNS_URI, UmlValueSpecificationFactory.eINSTANCE); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends. + * + * <p>This method is used to initialize {@link UmlValueSpecificationPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static UmlValueSpecificationPackage init() + { + if (isInited) return (UmlValueSpecificationPackage)EPackage.Registry.INSTANCE.getEPackage(UmlValueSpecificationPackage.eNS_URI); + + // Obtain or create and register package + UmlValueSpecificationPackageImpl theUmlValueSpecificationPackage = (UmlValueSpecificationPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof UmlValueSpecificationPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new UmlValueSpecificationPackageImpl()); + + isInited = true; + + // Initialize simple dependencies + UMLPackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theUmlValueSpecificationPackage.createPackageContents(); + + // Initialize created meta-data + theUmlValueSpecificationPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theUmlValueSpecificationPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(UmlValueSpecificationPackage.eNS_URI, theUmlValueSpecificationPackage); + return theUmlValueSpecificationPackage; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getAbstractRule() + { + return abstractRuleEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getAbstractRule_Visibility() + { + return (EReference)abstractRuleEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getAbstractRule_Name() + { + return (EAttribute)abstractRuleEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getAbstractRule_Value() + { + return (EReference)abstractRuleEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getAbstractRule_InstanceSpecification() + { + return (EReference)abstractRuleEClass.getEStructuralFeatures().get(3); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getAbstractRule_Undefined() + { + return (EReference)abstractRuleEClass.getEStructuralFeatures().get(4); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getLiteralBooleanRule() + { + return literalBooleanRuleEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getLiteralBooleanRule_Value() + { + return (EAttribute)literalBooleanRuleEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getLiteralIntegerOrUnlimitedNaturalRule() + { + return literalIntegerOrUnlimitedNaturalRuleEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getLiteralIntegerOrUnlimitedNaturalRule_Value() + { + return (EAttribute)literalIntegerOrUnlimitedNaturalRuleEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getLiteralRealRule() + { + return literalRealRuleEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getLiteralRealRule_Value() + { + return (EAttribute)literalRealRuleEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getLiteralNullRule() + { + return literalNullRuleEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getLiteralNullRule_Value() + { + return (EAttribute)literalNullRuleEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getLiteralStringRule() + { + return literalStringRuleEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getLiteralStringRule_Value() + { + return (EAttribute)literalStringRuleEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getUndefinedRule() + { + return undefinedRuleEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getUndefinedRule_Value() + { + return (EAttribute)undefinedRuleEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getVisibilityKind() + { + return visibilityKindEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getVisibilityKind_Public() + { + return (EAttribute)visibilityKindEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getVisibilityKind_Private() + { + return (EAttribute)visibilityKindEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getVisibilityKind_Protected() + { + return (EAttribute)visibilityKindEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getVisibilityKind_Package() + { + return (EAttribute)visibilityKindEClass.getEStructuralFeatures().get(3); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public UmlValueSpecificationFactory getUmlValueSpecificationFactory() + { + return (UmlValueSpecificationFactory)getEFactoryInstance(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void createPackageContents() + { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + abstractRuleEClass = createEClass(ABSTRACT_RULE); + createEReference(abstractRuleEClass, ABSTRACT_RULE__VISIBILITY); + createEAttribute(abstractRuleEClass, ABSTRACT_RULE__NAME); + createEReference(abstractRuleEClass, ABSTRACT_RULE__VALUE); + createEReference(abstractRuleEClass, ABSTRACT_RULE__INSTANCE_SPECIFICATION); + createEReference(abstractRuleEClass, ABSTRACT_RULE__UNDEFINED); + + literalBooleanRuleEClass = createEClass(LITERAL_BOOLEAN_RULE); + createEAttribute(literalBooleanRuleEClass, LITERAL_BOOLEAN_RULE__VALUE); + + literalIntegerOrUnlimitedNaturalRuleEClass = createEClass(LITERAL_INTEGER_OR_UNLIMITED_NATURAL_RULE); + createEAttribute(literalIntegerOrUnlimitedNaturalRuleEClass, LITERAL_INTEGER_OR_UNLIMITED_NATURAL_RULE__VALUE); + + literalRealRuleEClass = createEClass(LITERAL_REAL_RULE); + createEAttribute(literalRealRuleEClass, LITERAL_REAL_RULE__VALUE); + + literalNullRuleEClass = createEClass(LITERAL_NULL_RULE); + createEAttribute(literalNullRuleEClass, LITERAL_NULL_RULE__VALUE); + + literalStringRuleEClass = createEClass(LITERAL_STRING_RULE); + createEAttribute(literalStringRuleEClass, LITERAL_STRING_RULE__VALUE); + + undefinedRuleEClass = createEClass(UNDEFINED_RULE); + createEAttribute(undefinedRuleEClass, UNDEFINED_RULE__VALUE); + + visibilityKindEClass = createEClass(VISIBILITY_KIND); + createEAttribute(visibilityKindEClass, VISIBILITY_KIND__PUBLIC); + createEAttribute(visibilityKindEClass, VISIBILITY_KIND__PRIVATE); + createEAttribute(visibilityKindEClass, VISIBILITY_KIND__PROTECTED); + createEAttribute(visibilityKindEClass, VISIBILITY_KIND__PACKAGE); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void initializePackageContents() + { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI); + UMLPackage theUMLPackage = (UMLPackage)EPackage.Registry.INSTANCE.getEPackage(UMLPackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + + // Initialize classes and features; add operations and parameters + initEClass(abstractRuleEClass, AbstractRule.class, "AbstractRule", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getAbstractRule_Visibility(), this.getVisibilityKind(), null, "visibility", null, 0, 1, AbstractRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getAbstractRule_Name(), theEcorePackage.getEString(), "name", null, 0, 1, AbstractRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getAbstractRule_Value(), theEcorePackage.getEObject(), null, "value", null, 0, 1, AbstractRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getAbstractRule_InstanceSpecification(), theUMLPackage.getInstanceSpecification(), null, "instanceSpecification", null, 0, 1, AbstractRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getAbstractRule_Undefined(), this.getUndefinedRule(), null, "undefined", null, 0, 1, AbstractRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(literalBooleanRuleEClass, LiteralBooleanRule.class, "LiteralBooleanRule", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getLiteralBooleanRule_Value(), theEcorePackage.getEString(), "value", null, 0, 1, LiteralBooleanRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(literalIntegerOrUnlimitedNaturalRuleEClass, LiteralIntegerOrUnlimitedNaturalRule.class, "LiteralIntegerOrUnlimitedNaturalRule", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getLiteralIntegerOrUnlimitedNaturalRule_Value(), theEcorePackage.getEInt(), "value", null, 0, 1, LiteralIntegerOrUnlimitedNaturalRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(literalRealRuleEClass, LiteralRealRule.class, "LiteralRealRule", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getLiteralRealRule_Value(), theEcorePackage.getEDouble(), "value", null, 0, 1, LiteralRealRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(literalNullRuleEClass, LiteralNullRule.class, "LiteralNullRule", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getLiteralNullRule_Value(), theEcorePackage.getEString(), "value", null, 0, 1, LiteralNullRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(literalStringRuleEClass, LiteralStringRule.class, "LiteralStringRule", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getLiteralStringRule_Value(), theEcorePackage.getEString(), "value", null, 0, 1, LiteralStringRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(undefinedRuleEClass, UndefinedRule.class, "UndefinedRule", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getUndefinedRule_Value(), theEcorePackage.getEString(), "value", null, 0, 1, UndefinedRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(visibilityKindEClass, VisibilityKind.class, "VisibilityKind", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getVisibilityKind_Public(), theEcorePackage.getEString(), "public", null, 0, 1, VisibilityKind.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getVisibilityKind_Private(), theEcorePackage.getEString(), "private", null, 0, 1, VisibilityKind.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getVisibilityKind_Protected(), theEcorePackage.getEString(), "protected", null, 0, 1, VisibilityKind.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getVisibilityKind_Package(), theEcorePackage.getEString(), "package", null, 0, 1, VisibilityKind.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + // Create resource + createResource(eNS_URI); + } + +} //UmlValueSpecificationPackageImpl diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/impl/UndefinedRuleImpl.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/impl/UndefinedRuleImpl.java new file mode 100644 index 00000000000..79070f838a1 --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/impl/UndefinedRuleImpl.java @@ -0,0 +1,177 @@ +/** + */ +package org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.UmlValueSpecificationPackage; +import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.UndefinedRule; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Undefined Rule</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl.UndefinedRuleImpl#getValue <em>Value</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class UndefinedRuleImpl extends MinimalEObjectImpl.Container implements UndefinedRule +{ + /** + * The default value of the '{@link #getValue() <em>Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getValue() + * @generated + * @ordered + */ + protected static final String VALUE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getValue() <em>Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getValue() + * @generated + * @ordered + */ + protected String value = VALUE_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected UndefinedRuleImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return UmlValueSpecificationPackage.Literals.UNDEFINED_RULE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getValue() + { + return value; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setValue(String newValue) + { + String oldValue = value; + value = newValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, UmlValueSpecificationPackage.UNDEFINED_RULE__VALUE, oldValue, value)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case UmlValueSpecificationPackage.UNDEFINED_RULE__VALUE: + return getValue(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case UmlValueSpecificationPackage.UNDEFINED_RULE__VALUE: + setValue((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case UmlValueSpecificationPackage.UNDEFINED_RULE__VALUE: + setValue(VALUE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case UmlValueSpecificationPackage.UNDEFINED_RULE__VALUE: + return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value); + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() + { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (value: "); + result.append(value); + result.append(')'); + return result.toString(); + } + +} //UndefinedRuleImpl diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/impl/VisibilityKindImpl.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/impl/VisibilityKindImpl.java new file mode 100644 index 00000000000..9408dd0e8f7 --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/impl/VisibilityKindImpl.java @@ -0,0 +1,345 @@ +/** + */ +package org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.UmlValueSpecificationPackage; +import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.VisibilityKind; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Visibility Kind</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl.VisibilityKindImpl#getPublic <em>Public</em>}</li> + * <li>{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl.VisibilityKindImpl#getPrivate <em>Private</em>}</li> + * <li>{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl.VisibilityKindImpl#getProtected <em>Protected</em>}</li> + * <li>{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.impl.VisibilityKindImpl#getPackage <em>Package</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class VisibilityKindImpl extends MinimalEObjectImpl.Container implements VisibilityKind +{ + /** + * The default value of the '{@link #getPublic() <em>Public</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getPublic() + * @generated + * @ordered + */ + protected static final String PUBLIC_EDEFAULT = null; + + /** + * The cached value of the '{@link #getPublic() <em>Public</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getPublic() + * @generated + * @ordered + */ + protected String public_ = PUBLIC_EDEFAULT; + + /** + * The default value of the '{@link #getPrivate() <em>Private</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getPrivate() + * @generated + * @ordered + */ + protected static final String PRIVATE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getPrivate() <em>Private</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getPrivate() + * @generated + * @ordered + */ + protected String private_ = PRIVATE_EDEFAULT; + + /** + * The default value of the '{@link #getProtected() <em>Protected</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getProtected() + * @generated + * @ordered + */ + protected static final String PROTECTED_EDEFAULT = null; + + /** + * The cached value of the '{@link #getProtected() <em>Protected</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getProtected() + * @generated + * @ordered + */ + protected String protected_ = PROTECTED_EDEFAULT; + + /** + * The default value of the '{@link #getPackage() <em>Package</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getPackage() + * @generated + * @ordered + */ + protected static final String PACKAGE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getPackage() <em>Package</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getPackage() + * @generated + * @ordered + */ + protected String package_ = PACKAGE_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected VisibilityKindImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return UmlValueSpecificationPackage.Literals.VISIBILITY_KIND; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getPublic() + { + return public_; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setPublic(String newPublic) + { + String oldPublic = public_; + public_ = newPublic; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, UmlValueSpecificationPackage.VISIBILITY_KIND__PUBLIC, oldPublic, public_)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getPrivate() + { + return private_; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setPrivate(String newPrivate) + { + String oldPrivate = private_; + private_ = newPrivate; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, UmlValueSpecificationPackage.VISIBILITY_KIND__PRIVATE, oldPrivate, private_)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getProtected() + { + return protected_; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setProtected(String newProtected) + { + String oldProtected = protected_; + protected_ = newProtected; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, UmlValueSpecificationPackage.VISIBILITY_KIND__PROTECTED, oldProtected, protected_)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getPackage() + { + return package_; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setPackage(String newPackage) + { + String oldPackage = package_; + package_ = newPackage; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, UmlValueSpecificationPackage.VISIBILITY_KIND__PACKAGE, oldPackage, package_)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case UmlValueSpecificationPackage.VISIBILITY_KIND__PUBLIC: + return getPublic(); + case UmlValueSpecificationPackage.VISIBILITY_KIND__PRIVATE: + return getPrivate(); + case UmlValueSpecificationPackage.VISIBILITY_KIND__PROTECTED: + return getProtected(); + case UmlValueSpecificationPackage.VISIBILITY_KIND__PACKAGE: + return getPackage(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case UmlValueSpecificationPackage.VISIBILITY_KIND__PUBLIC: + setPublic((String)newValue); + return; + case UmlValueSpecificationPackage.VISIBILITY_KIND__PRIVATE: + setPrivate((String)newValue); + return; + case UmlValueSpecificationPackage.VISIBILITY_KIND__PROTECTED: + setProtected((String)newValue); + return; + case UmlValueSpecificationPackage.VISIBILITY_KIND__PACKAGE: + setPackage((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case UmlValueSpecificationPackage.VISIBILITY_KIND__PUBLIC: + setPublic(PUBLIC_EDEFAULT); + return; + case UmlValueSpecificationPackage.VISIBILITY_KIND__PRIVATE: + setPrivate(PRIVATE_EDEFAULT); + return; + case UmlValueSpecificationPackage.VISIBILITY_KIND__PROTECTED: + setProtected(PROTECTED_EDEFAULT); + return; + case UmlValueSpecificationPackage.VISIBILITY_KIND__PACKAGE: + setPackage(PACKAGE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case UmlValueSpecificationPackage.VISIBILITY_KIND__PUBLIC: + return PUBLIC_EDEFAULT == null ? public_ != null : !PUBLIC_EDEFAULT.equals(public_); + case UmlValueSpecificationPackage.VISIBILITY_KIND__PRIVATE: + return PRIVATE_EDEFAULT == null ? private_ != null : !PRIVATE_EDEFAULT.equals(private_); + case UmlValueSpecificationPackage.VISIBILITY_KIND__PROTECTED: + return PROTECTED_EDEFAULT == null ? protected_ != null : !PROTECTED_EDEFAULT.equals(protected_); + case UmlValueSpecificationPackage.VISIBILITY_KIND__PACKAGE: + return PACKAGE_EDEFAULT == null ? package_ != null : !PACKAGE_EDEFAULT.equals(package_); + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() + { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (public: "); + result.append(public_); + result.append(", private: "); + result.append(private_); + result.append(", protected: "); + result.append(protected_); + result.append(", package: "); + result.append(package_); + result.append(')'); + return result.toString(); + } + +} //VisibilityKindImpl diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/util/UmlValueSpecificationAdapterFactory.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/util/UmlValueSpecificationAdapterFactory.java new file mode 100644 index 00000000000..a8a1c689cbe --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/util/UmlValueSpecificationAdapterFactory.java @@ -0,0 +1,272 @@ +/** + */ +package org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.util; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; + +import org.eclipse.emf.ecore.EObject; + +import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.*; + +/** + * <!-- begin-user-doc --> + * The <b>Adapter Factory</b> for the model. + * It provides an adapter <code>createXXX</code> method for each class of the model. + * <!-- end-user-doc --> + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.UmlValueSpecificationPackage + * @generated + */ +public class UmlValueSpecificationAdapterFactory extends AdapterFactoryImpl +{ + /** + * The cached model package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected static UmlValueSpecificationPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public UmlValueSpecificationAdapterFactory() + { + if (modelPackage == null) + { + modelPackage = UmlValueSpecificationPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * <!-- begin-user-doc --> + * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model. + * <!-- end-user-doc --> + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) + { + if (object == modelPackage) + { + return true; + } + if (object instanceof EObject) + { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the <code>createXXX</code> methods. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected UmlValueSpecificationSwitch<Adapter> modelSwitch = + new UmlValueSpecificationSwitch<Adapter>() + { + @Override + public Adapter caseAbstractRule(AbstractRule object) + { + return createAbstractRuleAdapter(); + } + @Override + public Adapter caseLiteralBooleanRule(LiteralBooleanRule object) + { + return createLiteralBooleanRuleAdapter(); + } + @Override + public Adapter caseLiteralIntegerOrUnlimitedNaturalRule(LiteralIntegerOrUnlimitedNaturalRule object) + { + return createLiteralIntegerOrUnlimitedNaturalRuleAdapter(); + } + @Override + public Adapter caseLiteralRealRule(LiteralRealRule object) + { + return createLiteralRealRuleAdapter(); + } + @Override + public Adapter caseLiteralNullRule(LiteralNullRule object) + { + return createLiteralNullRuleAdapter(); + } + @Override + public Adapter caseLiteralStringRule(LiteralStringRule object) + { + return createLiteralStringRuleAdapter(); + } + @Override + public Adapter caseUndefinedRule(UndefinedRule object) + { + return createUndefinedRuleAdapter(); + } + @Override + public Adapter caseVisibilityKind(VisibilityKind object) + { + return createVisibilityKindAdapter(); + } + @Override + public Adapter defaultCase(EObject object) + { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the <code>target</code>. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param target the object to adapt. + * @return the adapter for the <code>target</code>. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) + { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.AbstractRule <em>Abstract Rule</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.AbstractRule + * @generated + */ + public Adapter createAbstractRuleAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralBooleanRule <em>Literal Boolean Rule</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralBooleanRule + * @generated + */ + public Adapter createLiteralBooleanRuleAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralIntegerOrUnlimitedNaturalRule <em>Literal Integer Or Unlimited Natural Rule</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralIntegerOrUnlimitedNaturalRule + * @generated + */ + public Adapter createLiteralIntegerOrUnlimitedNaturalRuleAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralRealRule <em>Literal Real Rule</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralRealRule + * @generated + */ + public Adapter createLiteralRealRuleAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralNullRule <em>Literal Null Rule</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralNullRule + * @generated + */ + public Adapter createLiteralNullRuleAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralStringRule <em>Literal String Rule</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralStringRule + * @generated + */ + public Adapter createLiteralStringRuleAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.UndefinedRule <em>Undefined Rule</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.UndefinedRule + * @generated + */ + public Adapter createUndefinedRuleAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.VisibilityKind <em>Visibility Kind</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.VisibilityKind + * @generated + */ + public Adapter createVisibilityKindAdapter() + { + return null; + } + + /** + * Creates a new adapter for the default case. + * <!-- begin-user-doc --> + * This default implementation returns null. + * <!-- end-user-doc --> + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() + { + return null; + } + +} //UmlValueSpecificationAdapterFactory diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/util/UmlValueSpecificationSwitch.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/util/UmlValueSpecificationSwitch.java new file mode 100644 index 00000000000..61807d4b4d6 --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/util/UmlValueSpecificationSwitch.java @@ -0,0 +1,280 @@ +/** + */ +package org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.util; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.*; + +/** + * <!-- begin-user-doc --> + * The <b>Switch</b> for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the <code>caseXXX</code> method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * <!-- end-user-doc --> + * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.UmlValueSpecificationPackage + * @generated + */ +public class UmlValueSpecificationSwitch<T> extends Switch<T> +{ + /** + * The cached model package + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected static UmlValueSpecificationPackage modelPackage; + + /** + * Creates an instance of the switch. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public UmlValueSpecificationSwitch() + { + if (modelPackage == null) + { + modelPackage = UmlValueSpecificationPackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @parameter ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) + { + return ePackage == modelPackage; + } + + /** + * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the first non-null result returned by a <code>caseXXX</code> call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) + { + switch (classifierID) + { + case UmlValueSpecificationPackage.ABSTRACT_RULE: + { + AbstractRule abstractRule = (AbstractRule)theEObject; + T result = caseAbstractRule(abstractRule); + if (result == null) result = defaultCase(theEObject); + return result; + } + case UmlValueSpecificationPackage.LITERAL_BOOLEAN_RULE: + { + LiteralBooleanRule literalBooleanRule = (LiteralBooleanRule)theEObject; + T result = caseLiteralBooleanRule(literalBooleanRule); + if (result == null) result = defaultCase(theEObject); + return result; + } + case UmlValueSpecificationPackage.LITERAL_INTEGER_OR_UNLIMITED_NATURAL_RULE: + { + LiteralIntegerOrUnlimitedNaturalRule literalIntegerOrUnlimitedNaturalRule = (LiteralIntegerOrUnlimitedNaturalRule)theEObject; + T result = caseLiteralIntegerOrUnlimitedNaturalRule(literalIntegerOrUnlimitedNaturalRule); + if (result == null) result = defaultCase(theEObject); + return result; + } + case UmlValueSpecificationPackage.LITERAL_REAL_RULE: + { + LiteralRealRule literalRealRule = (LiteralRealRule)theEObject; + T result = caseLiteralRealRule(literalRealRule); + if (result == null) result = defaultCase(theEObject); + return result; + } + case UmlValueSpecificationPackage.LITERAL_NULL_RULE: + { + LiteralNullRule literalNullRule = (LiteralNullRule)theEObject; + T result = caseLiteralNullRule(literalNullRule); + if (result == null) result = defaultCase(theEObject); + return result; + } + case UmlValueSpecificationPackage.LITERAL_STRING_RULE: + { + LiteralStringRule literalStringRule = (LiteralStringRule)theEObject; + T result = caseLiteralStringRule(literalStringRule); + if (result == null) result = defaultCase(theEObject); + return result; + } + case UmlValueSpecificationPackage.UNDEFINED_RULE: + { + UndefinedRule undefinedRule = (UndefinedRule)theEObject; + T result = caseUndefinedRule(undefinedRule); + if (result == null) result = defaultCase(theEObject); + return result; + } + case UmlValueSpecificationPackage.VISIBILITY_KIND: + { + VisibilityKind visibilityKind = (VisibilityKind)theEObject; + T result = caseVisibilityKind(visibilityKind); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Abstract Rule</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Abstract Rule</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseAbstractRule(AbstractRule object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Literal Boolean Rule</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Literal Boolean Rule</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseLiteralBooleanRule(LiteralBooleanRule object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Literal Integer Or Unlimited Natural Rule</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Literal Integer Or Unlimited Natural Rule</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseLiteralIntegerOrUnlimitedNaturalRule(LiteralIntegerOrUnlimitedNaturalRule object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Literal Real Rule</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Literal Real Rule</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseLiteralRealRule(LiteralRealRule object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Literal Null Rule</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Literal Null Rule</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseLiteralNullRule(LiteralNullRule object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Literal String Rule</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Literal String Rule</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseLiteralStringRule(LiteralStringRule object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Undefined Rule</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Undefined Rule</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseUndefinedRule(UndefinedRule object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Visibility Kind</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Visibility Kind</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseVisibilityKind(VisibilityKind object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>EObject</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>EObject</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) + { + return null; + } + +} //UmlValueSpecificationSwitch diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/validation/AbstractUmlValueSpecificationJavaValidator.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/validation/AbstractUmlValueSpecificationJavaValidator.java new file mode 100644 index 00000000000..e2e96314dfb --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/validation/AbstractUmlValueSpecificationJavaValidator.java @@ -0,0 +1,22 @@ +/* +* generated by Xtext +*/ +package org.eclipse.papyrus.uml.textedit.valuespecification.xtext.validation; + +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.xtext.validation.ComposedChecks; + +@ComposedChecks(validators= {org.eclipse.xtext.validation.ImportUriValidator.class, org.eclipse.xtext.validation.NamesAreUniqueValidator.class}) +public class AbstractUmlValueSpecificationJavaValidator extends org.eclipse.xtext.validation.AbstractDeclarativeValidator { + + @Override + protected List<EPackage> getEPackages() { + List<EPackage> result = new ArrayList<EPackage>(); + result.add(org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.UmlValueSpecificationPackage.eINSTANCE); + return result; + } + +} diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/GenerateUmlValueSpecification.mwe2 b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/GenerateUmlValueSpecification.mwe2 new file mode 100644 index 00000000000..bbf75c50563 --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/GenerateUmlValueSpecification.mwe2 @@ -0,0 +1,187 @@ +module org.eclipse.papyrus.uml.textedit.valuespecification.xtext.GenerateUmlValueSpecification + +import org.eclipse.emf.mwe.utils.* +import org.eclipse.xtext.generator.* +import org.eclipse.xtext.ui.generator.* + +var grammarURI = "classpath:/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/UmlValueSpecification.xtext" +var file.extensions = "umlvaluespecification" +var projectName = "org.eclipse.papyrus.uml.textedit.valuespecification.xtext" +var runtimeProject = "../${projectName}" + + + +Workflow { + bean = StandaloneSetup { + scanClassPath = true + platformUri = "${runtimeProject}/.." + + //load EMF ECORE + uriMap = { + from = "platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore" + to = "platform:/resource/org.eclipse.emf.ecore/model/Ecore.ecore" + } + + uriMap = { from = "platform:/plugin/org.eclipse.emf.codegen.ecore/model/GenModel.genmodel" + to = "platform:/resource/org.eclipse.emf.codegen.ecore/model/GenModel.genmodel" + } + uriMap = { + from = "platform:/plugin/org.eclipse.emf.ecore/model/Ecore.genmodel" + to = "platform:/resource/org.eclipse.emf.ecore/model/Ecore.genmodel" + } + registerGeneratedEPackage = "org.eclipse.emf.ecore.EcorePackage" + registerGeneratedEPackage = "org.eclipse.emf.codegen.ecore.genmodel.GenModelPackage" + registerGenModelFile = "platform:/resource/org.eclipse.emf.ecore/model/Ecore.genmodel" + registerGenModelFile = "platform:/resource/org.eclipse.emf.codegen.ecore/model/GenModel.genmodel" + + //load UML + + uriMap = { + from = "platform:/plugin/org.eclipse.uml2.types/model/Types.genmodel" + to = "platform:/resource/org.eclipse.uml2.types/model/Types.genmodel" + } + uriMap = { + from = "platform:/plugin/org.eclipse.uml2.uml/model/UML.genmodel" + to = "platform:/resource/org.eclipse.uml2.uml/model/UML.genmodel" + } + + uriMap = { + from = "platform:/plugin/org.eclipse.uml2.codegen.ecore/model/GenModel.genmodel" + to = "platform:/resource/org.eclipse.uml2.codegen.ecore/model/GenModel.genmodel" + } + + uriMap = { + from = "platform:/plugin/org.eclipse.uml2.codegen.ecore/model/GenModel.ecore" + to = "platform:/resource/org.eclipse.uml2.codegen.ecore/model/GenModel.ecore" + } + uriMap = { + from = "platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore" + to = "platform:/resource/org.eclipse.uml2.uml/model/UML.ecore" + } + + uriMap = { + from = "platform:/plugin/org.eclipse.uml2.types/model/Types.ecore" + to = "platform:/resource/org.eclipse.uml2.types/model/Types.ecore" + } + registerGeneratedEPackage = "org.eclipse.uml2.types.TypesPackage" + registerGeneratedEPackage = "org.eclipse.uml2.uml.UMLPackage" + registerGeneratedEPackage = "org.eclipse.uml2.codegen.ecore.genmodel.GenModelPackage" + + registerGenModelFile = "platform:/resource/org.eclipse.uml2.types/model/Types.genmodel" + registerGenModelFile = "platform:/resource/org.eclipse.uml2.uml/model/UML.genmodel" + registerGenModelFile = "platform:/resource/org.eclipse.uml2.codegen.ecore/model/GenModel.genmodel" + } + + component = DirectoryCleaner { + directory = "${runtimeProject}/src-gen" + } + + component = DirectoryCleaner { + directory = "${runtimeProject}.ui/src-gen" + } + + component = Generator { + pathRtProject = runtimeProject + pathUiProject = "${runtimeProject}.ui" + projectNameRt = projectName + projectNameUi = "${projectName}.ui" + + language = { + uri = grammarURI + fileExtensions = file.extensions + + // generates Java API for the generated EPackages + fragment = ecore.EcoreGeneratorFragment {} + // Java API to access grammar elements (required by several other fragments) + fragment = grammarAccess.GrammarAccessFragment {} + + + // the serialization component + //fragment = parseTreeConstructor.ParseTreeConstructorFragment {} + + // Serializer 2.0 + fragment = serializer.SerializerFragment { + generateStub = false + } + + + // a custom ResourceFactory for use with EMF + fragment = resourceFactory.ResourceFactoryFragment { + fileExtensions = file.extensions + } + + // the following fragment tries to use the Antlr Generator fragment which can be installed via update manager from http://download.itemis.com/updates/ + //fragment = AntlrDelegatingFragment {} + // The antlr parser generator fragment. + fragment = parser.antlr.XtextAntlrGeneratorFragment { + // options = { + // backtrack = true + // } + } + + /* + If you don't want to use the Antlr fragment for some reason, remove the antlr fragment and uncomment the packrat parser fragment below. + fragment = parser.PackratParserFragment {} + */ + + // check-based API for validation + /* + fragment = validation.CheckFragment {} + */ + + // java-based API for validation + fragment = validation.JavaValidatorFragment { + composedCheck = "org.eclipse.xtext.validation.ImportUriValidator" + composedCheck = "org.eclipse.xtext.validation.NamesAreUniqueValidator" + inheritImplementation=false + } + + // scoping and exporting API + + //fragment = scoping.ImportURIScopingFragment {} + //fragment = exporting.SimpleNamesFragment {} + + + // scoping and exporting API + //It is very important to add it if not you will + //have a mistake during the execution about qualifiedName. + fragment = scoping.ImportNamespacesScopingFragment {} + fragment = exporting.QualifiedNamesFragment {} + fragment = builder.BuilderIntegrationFragment {} + + // generator API + fragment = generator.GeneratorFragment { + generateMwe = false + generateJavaMain = false + } + + // formatter API + fragment = formatting.FormatterFragment {} + + // labeling API + fragment = labeling.LabelProviderFragment {} + + // outline API + fragment = outline.OutlineTreeProviderFragment {} + fragment = outline.QuickOutlineFragment {} + + // quickfix API + fragment = quickfix.QuickfixProviderFragment {} + + // java-based API for content assistance + fragment = contentAssist.JavaBasedContentAssistFragment {} + + // generates a more lightweight Antlr parser and lexer tailored for content assist + fragment = parser.antlr.XtextAntlrUiGeneratorFragment {} + + // project wizard (optional) + /* + fragment = projectWizard.SimpleProjectWizardFragment { + generatorProjectName = "${projectName}.generator" + modelFileExtension = file.extensions + } + */ + + } + } +} diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/UmlValueSpecification.xtext b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/UmlValueSpecification.xtext new file mode 100644 index 00000000000..5d6ef4846a0 --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/UmlValueSpecification.xtext @@ -0,0 +1,64 @@ +/***************************************************************************** + * Copyright (c) 2015 CEA LIST and others. + * + * 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: + * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation + * + *****************************************************************************/ +grammar org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification with org.eclipse.xtext.common.Terminals + +import "http://www.eclipse.org/uml2/5.0.0/UML" as uml +import "http://www.eclipse.org/emf/2002/Ecore" as ecore + + +generate umlValueSpecification "http://www.eclipse.org/papyrus/uml/textedit/valuespecification/xtext/UmlValueSpecification" + +AbstractRule: + ((visibility = VisibilityKind)? + (name=ID '=')? + (value=(LiteralBooleanRule | + LiteralIntegerOrUnlimitedNaturalRule | + LiteralRealRule | + LiteralNullRule | + LiteralStringRule) | + instanceSpecification=[uml::InstanceSpecification]) | + undefined=UndefinedRule) +; + +LiteralBooleanRule: + value=('true'|'false') +; + +LiteralIntegerOrUnlimitedNaturalRule: + value=INT +; + +LiteralRealRule: + value=DOUBLE +; + +terminal DOUBLE returns ecore::EDouble: ('0'..'9')+"."('0'..'9')+; + +LiteralNullRule: + value='null' +; + + +LiteralStringRule: + value=STRING +; + +UndefinedRule: + value='<Undefined>' +; + +VisibilityKind: + public = '+' + | private = '-' + | protected = '#' + | package = '~' ;
\ No newline at end of file diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/UmlValueSpecificationRuntimeModule.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/UmlValueSpecificationRuntimeModule.java new file mode 100644 index 00000000000..638f988964e --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/UmlValueSpecificationRuntimeModule.java @@ -0,0 +1,20 @@ +/***************************************************************************** + * Copyright (c) 2015 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: + * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.textedit.valuespecification.xtext; + +/** + * Use this class to register components to be used at runtime / without the Equinox extension registry. + */ +public class UmlValueSpecificationRuntimeModule extends org.eclipse.papyrus.uml.textedit.valuespecification.xtext.AbstractUmlValueSpecificationRuntimeModule { + +} diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/UmlValueSpecificationStandaloneSetup.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/UmlValueSpecificationStandaloneSetup.java new file mode 100644 index 00000000000..8082045f992 --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/UmlValueSpecificationStandaloneSetup.java @@ -0,0 +1,25 @@ +/***************************************************************************** + * Copyright (c) 2015 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: + * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.textedit.valuespecification.xtext; + + +/** + * Initialization support for running Xtext languages + * without equinox extension registry + */ +public class UmlValueSpecificationStandaloneSetup extends UmlValueSpecificationStandaloneSetupGenerated { + + public static void doSetup() { + new UmlValueSpecificationStandaloneSetup().createInjectorAndDoEMFRegistration(); + } +} diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/formatting/UmlValueSpecificationFormatter.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/formatting/UmlValueSpecificationFormatter.java new file mode 100644 index 00000000000..5751cc28634 --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/formatting/UmlValueSpecificationFormatter.java @@ -0,0 +1,38 @@ +/***************************************************************************** + * Copyright (c) 2015 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: + * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.textedit.valuespecification.xtext.formatting; + +import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.services.UmlValueSpecificationGrammarAccess; +import org.eclipse.xtext.formatting.impl.AbstractDeclarativeFormatter; +import org.eclipse.xtext.formatting.impl.FormattingConfig; + +import com.google.inject.Inject; + +/** + * This class contains custom formatting description. + * + * see : http://www.eclipse.org/Xtext/documentation/latest/xtext.html#formatting + * on how and when to use it + * + * Also see {@link org.eclipse.xtext.xtext.XtextFormattingTokenSerializer} as an example + */ +public class UmlValueSpecificationFormatter extends AbstractDeclarativeFormatter { + + @Inject + private UmlValueSpecificationGrammarAccess grammarAccess; + + @Override + protected void configureFormatting(final FormattingConfig c) { + org.eclipse.papyrus.uml.textedit.valuespecification.xtext.services.UmlValueSpecificationGrammarAccess f = (org.eclipse.papyrus.uml.textedit.valuespecification.xtext.services.UmlValueSpecificationGrammarAccess) getGrammarAccess(); + } +} diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/generator/Main.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/generator/Main.java new file mode 100644 index 00000000000..98a29c34d87 --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/generator/Main.java @@ -0,0 +1,90 @@ +/***************************************************************************** + * Copyright (c) 2015 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: + * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.textedit.valuespecification.xtext.generator; + +import java.util.List; + +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.ResourceSet; +import org.eclipse.xtext.generator.IGenerator; +import org.eclipse.xtext.generator.JavaIoFileSystemAccess; +import org.eclipse.xtext.util.CancelIndicator; +import org.eclipse.xtext.validation.CheckMode; +import org.eclipse.xtext.validation.IResourceValidator; +import org.eclipse.xtext.validation.Issue; + +import com.google.inject.Inject; +import com.google.inject.Injector; +import com.google.inject.Provider; + +/** + * The main class of the xtext grammar. + */ +public class Main { + + /** + * The main method. + * + * @param args + * The arguments. + */ + public static void main(final String[] args) { + if (args.length == 0) { + System.err.println("Aborting: no path to EMF resource provided!"); + return; + } + Injector injector = new org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecificationStandaloneSetupGenerated().createInjectorAndDoEMFRegistration(); + Main main = injector.getInstance(Main.class); + main.runGenerator(args[0]); + } + + @Inject + private Provider<ResourceSet> resourceSetProvider; + + @Inject + private IResourceValidator validator; + + @Inject + private IGenerator generator; + + @Inject + private JavaIoFileSystemAccess fileAccess; + + /** + * This allow to run the generator. + * + * @param string + * The URI as string. + */ + protected void runGenerator(final String string) { + // load the resource + ResourceSet set = resourceSetProvider.get(); + Resource resource = set.getResource(URI.createURI(string), true); + + // validate the resource + List<Issue> list = validator.validate(resource, CheckMode.ALL, CancelIndicator.NullImpl); + if (!list.isEmpty()) { + for (Issue issue : list) { + System.err.println(issue); + } + return; + } + + // configure and start the generator + fileAccess.setOutputPath("src-gen/"); + generator.doGenerate(resource, fileAccess); + + System.out.println("Code generation finished."); + } +} diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/generator/UmlValueSpecificationGenerator.xtend b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/generator/UmlValueSpecificationGenerator.xtend new file mode 100644 index 00000000000..9c3c2ca937a --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/generator/UmlValueSpecificationGenerator.xtend @@ -0,0 +1,24 @@ +/* + * generated by Xtext + */ +package org.eclipse.papyrus.uml.textedit.valuespecification.xtext.generator + +import org.eclipse.emf.ecore.resource.Resource +import org.eclipse.xtext.generator.IGenerator +import org.eclipse.xtext.generator.IFileSystemAccess + +/** + * Generates code from your model files on save. + * + * see http://www.eclipse.org/Xtext/documentation.html#TutorialCodeGeneration + */ +class UmlValueSpecificationGenerator implements IGenerator { + + override void doGenerate(Resource resource, IFileSystemAccess fsa) { +// fsa.generateFile('greetings.txt', 'People to greet: ' + +// resource.allContents +// .filter(typeof(Greeting)) +// .map[name] +// .join(', ')) + } +} diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/generator/UmlValueSpecificationGeneratorMWE.mwe2 b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/generator/UmlValueSpecificationGeneratorMWE.mwe2 new file mode 100644 index 00000000000..7d75325709b --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/generator/UmlValueSpecificationGeneratorMWE.mwe2 @@ -0,0 +1,31 @@ +module org.eclipse.papyrus.uml.textedit.valuespecification.xtext.generator.UmlValueSpecificationGeneratorMWE + +import org.eclipse.emf.mwe.utils.* + +var targetDir +var modelPath + +Workflow { + + component = org.eclipse.xtext.mwe.Reader { + // lookup all resources on the classpath + // useJavaClassPath = true + + // or define search scope explicitly + path = modelPath + + // this class will be generated by the xtext generator + register = org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecificationStandaloneSetup {} + loadResource = { + slot = "model" + } + } + + component = org.eclipse.xtext.generator.GeneratorComponent { + register = org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecificationStandaloneSetup {} + slot = 'model' + outlet = { + path = targetDir + } + } +} diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/scoping/UmlValueSpecificationScopeProvider.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/scoping/UmlValueSpecificationScopeProvider.java new file mode 100644 index 00000000000..9a543f60870 --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/scoping/UmlValueSpecificationScopeProvider.java @@ -0,0 +1,55 @@ +/***************************************************************************** + * Copyright (c) 2015 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: + * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.textedit.valuespecification.xtext.scoping; + +import java.util.Collection; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.papyrus.infra.emf.utils.EMFHelper; +import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.AbstractRule; +import org.eclipse.papyrus.uml.xtext.integration.core.ContextElementUtil; +import org.eclipse.uml2.uml.InstanceSpecification; +import org.eclipse.xtext.resource.IEObjectDescription; +import org.eclipse.xtext.scoping.IScope; +import org.eclipse.xtext.scoping.Scopes; +import org.eclipse.xtext.scoping.impl.SimpleScope; + + +/** + * This class contains custom scoping description. + * + * see : http://www.eclipse.org/Xtext/documentation/latest/xtext.html#scoping on + * how and when to use it + * + */ +public class UmlValueSpecificationScopeProvider extends org.eclipse.xtext.scoping.impl.AbstractDeclarativeScopeProvider { + + /** + * This allow to define the scope for the instance specification of the abstract rule. + * + * @param ctx + * The abstract rule context. + * @param ref + * The reference. + * @return The scope representing the instance specification in the model. + */ + public IScope scope_AbstractRule_instanceSpecification(final AbstractRule ctx, final EReference ref) { + EObject contextElement = ContextElementUtil.getContextElement(ctx.eResource()); + + Collection<InstanceSpecification> instanceSpecification = EMFHelper.allInstances(contextElement.eResource(), InstanceSpecification.class); + + final Iterable<IEObjectDescription> visibleClassifiers = Scopes.scopedElementsFor(instanceSpecification); + return new SimpleScope(visibleClassifiers); + } +} diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/validation/UmlValueSpecificationJavaValidator.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/validation/UmlValueSpecificationJavaValidator.java new file mode 100644 index 00000000000..ab350324b21 --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/validation/UmlValueSpecificationJavaValidator.java @@ -0,0 +1,30 @@ +/***************************************************************************** + * Copyright (c) 2015 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: + * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.textedit.valuespecification.xtext.validation; + + +/** + * Custom validation rules. + * + * see http://www.eclipse.org/Xtext/documentation.html#validation + */ +public class UmlValueSpecificationJavaValidator extends org.eclipse.papyrus.uml.textedit.valuespecification.xtext.validation.AbstractUmlValueSpecificationJavaValidator { + + /** + * Constructor. + */ + public UmlValueSpecificationJavaValidator() { + super(); + } + +} diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/xtend-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/generator/.gitignore b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/xtend-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/generator/.gitignore new file mode 100644 index 00000000000..0a1ab0b0cb8 --- /dev/null +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/xtend-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/generator/.gitignore @@ -0,0 +1 @@ +/UmlValueSpecificationGenerator.java diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/META-INF/MANIFEST.MF b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/META-INF/MANIFEST.MF index 77f15bdfb2f..d38633bd1e6 100644 --- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/META-INF/MANIFEST.MF +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/META-INF/MANIFEST.MF @@ -1,25 +1,25 @@ -Manifest-Version: 1.0
-Export-Package: org.eclipse.papyrus.uml.tools.utils
-Require-Bundle: org.eclipse.uml2.uml,
- org.eclipse.jface;bundle-version="3.4.1",
- org.eclipse.emf.transaction;bundle-version="1.2.1",
- org.eclipse.gmf.runtime.emf.type.core;bundle-version="1.4.0",
- org.eclipse.papyrus.infra.emf;bundle-version="1.1.0",
- org.eclipse.gmf.runtime.notation;bundle-version="1.5.0",
- org.eclipse.papyrus.infra.core;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.core.log;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.services.labelprovider;bundle-version="1.1.0",
- org.eclipse.ui.workbench;bundle-version="3.105.0",
- org.eclipse.papyrus.infra.tools;bundle-version="1.1.0",
- com.google.guava;bundle-version="11.0.0"
-Bundle-Vendor: %pluginProvider
-Bundle-ActivationPolicy: lazy
-Bundle-Version: 1.1.0.qualifier
-Bundle-Localization: plugin
-Bundle-Name: %pluginName
-Bundle-Activator: org.eclipse.papyrus.uml.tools.utils.Activator
-Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.papyrus.uml.tools.utils;singleton:=tr
- ue
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-
+Manifest-Version: 1.0 +Export-Package: org.eclipse.papyrus.uml.tools.utils +Require-Bundle: org.eclipse.uml2.uml, + org.eclipse.jface;bundle-version="3.4.1", + org.eclipse.emf.transaction;bundle-version="1.2.1", + org.eclipse.gmf.runtime.emf.type.core;bundle-version="1.4.0", + org.eclipse.papyrus.infra.emf;bundle-version="1.1.0", + org.eclipse.gmf.runtime.notation;bundle-version="1.5.0", + org.eclipse.papyrus.infra.core;bundle-version="1.1.0", + org.eclipse.papyrus.infra.core.log;bundle-version="1.1.0", + org.eclipse.papyrus.infra.services.labelprovider;bundle-version="1.1.0", + org.eclipse.ui.workbench;bundle-version="3.105.0", + org.eclipse.papyrus.infra.tools;bundle-version="1.1.0", + com.google.guava;bundle-version="11.0.0" +Bundle-Vendor: %pluginProvider +Bundle-ActivationPolicy: lazy +Bundle-Version: 1.1.0.qualifier +Bundle-Localization: plugin +Bundle-Name: %pluginName +Bundle-Activator: org.eclipse.papyrus.uml.tools.utils.Activator +Bundle-ManifestVersion: 2 +Bundle-SymbolicName: org.eclipse.papyrus.uml.tools.utils;singleton:=tr + ue +Bundle-RequiredExecutionEnvironment: J2SE-1.5 + diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/NameResolutionHelper.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/NameResolutionHelper.java index eb74eebbe5c..d42c44d4ce9 100644 --- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/NameResolutionHelper.java +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/NameResolutionHelper.java @@ -16,42 +16,124 @@ package org.eclipse.papyrus.uml.tools.utils; import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; +import java.util.Map.Entry; import java.util.Set; +import org.eclipse.core.runtime.Assert; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.papyrus.infra.widgets.util.INameResolutionHelper; +import org.eclipse.uml2.uml.Element; import org.eclipse.uml2.uml.Model; import org.eclipse.uml2.uml.NamedElement; import org.eclipse.uml2.uml.Namespace; +import org.eclipse.uml2.uml.UMLPackage; import org.eclipse.uml2.uml.resource.UMLResource; +/** + * + * This class allows to find named element from this name or its (partially) qualified name + * + */ +public class NameResolutionHelper implements INameResolutionHelper { -public class NameResolutionHelper { - + /** + * the scope used to look for the elements + */ protected Namespace scope; + /** + * the filter + */ protected EClass filter; + /** + * This map links the name and the named element + */ protected Map<String, List<NamedElement>> allNames; + /** + * the empty string + */ + private static final String EMPTY_STRING = ""; //$NON-NLS-N1 + + /** + * + * Constructor. + * + * @param element + * an element of the model + * @param filter + * the filter + */ + public NameResolutionHelper(Element element, EClass filter) { + Namespace space = null; + if (element instanceof Namespace) { + space = (Namespace) element; + + } else if (element instanceof NamedElement) { + space = ((NamedElement) element).getNamespace(); + } else { + space = element.getNearestPackage(); + } + init(space, filter); + } + + + /** + * + * Constructor. + * + * @param element + * an element of the model + * @param filter + * the filter + */ public NameResolutionHelper(Namespace scope, EClass filter) { + init(scope, filter); + } + + /** + * + * @param scope + * @param filter + */ + protected void init(Namespace scope, EClass filter) { + Assert.isNotNull(scope); + if (filter == null) { + filter = UMLPackage.eINSTANCE.getNamedElement(); + } this.scope = scope; this.filter = filter; } + /** + * + * @param name + * a name + * @return + * all named element matching this name + * + * @deprecated you should use {@link #getElementsByName(String)} + */ + @Deprecated public List<NamedElement> getNamedElements(String name) { - if (this.allNames == null) { - this.allNames = new HashMap<String, List<NamedElement>>(); - this.computeAllNames(); + List<NamedElement> returnedValues = new ArrayList<NamedElement>(); + List<Object> obj = getElementsByName(name); + for (Object current : obj) { + if (current instanceof NamedElement) { + returnedValues.add((NamedElement) current); + } } - List<NamedElement> namedElements = this.allNames.get(name); - return namedElements != null ? namedElements : new ArrayList<NamedElement>(); + return returnedValues; } /** @@ -60,14 +142,14 @@ public class NameResolutionHelper { protected void computeAllNames() { // compute names directly available in the scope - computeNames("", scope, true); + computeNames(EMPTY_STRING, scope, true); // compute names related to enclosing namepaces of scope Namespace enclosingNamespace = scope.getNamespace(); - String prefix = ""; + String prefix = EMPTY_STRING; while (enclosingNamespace != null) { // prefix += enclosingNamespace.getName() + NamedElementUtil.QUALIFIED_NAME_SEPARATOR; - prefix = ""; + prefix = EMPTY_STRING; computeNames(prefix, enclosingNamespace, false); enclosingNamespace = enclosingNamespace.getNamespace(); } @@ -77,16 +159,8 @@ public class NameResolutionHelper { if (model == null) { model = scope; } - if (filter != null) { - if (filter.isSuperTypeOf(model.eClass())) { - List<NamedElement> l = this.allNames.get(model.getName()); - if (l == null) { // i.e. no names have already been resolved in enclosed namespaces - l = new ArrayList<NamedElement>(); - l.add(model); - this.allNames.put(model.getName(), l); - } - } - } else { + + if (filter.isSuperTypeOf(model.eClass())) { List<NamedElement> l = this.allNames.get(model.getName()); if (l == null) { // i.e. no names have already been resolved in enclosed namespaces l = new ArrayList<NamedElement>(); @@ -94,7 +168,9 @@ public class NameResolutionHelper { this.allNames.put(model.getName(), l); } } - computeNames(model.getName() + NamedElementUtil.QUALIFIED_NAME_SEPARATOR, model, false); + StringBuilder builder = new StringBuilder(model.getName()); + builder.append(NamedElementUtil.QUALIFIED_NAME_SEPARATOR); + computeNames(builder.toString(), model, false); // Build names corresponding to other available UML resources in the workspace List<Resource> resources = new ArrayList<Resource>(scope.eResource().getResourceSet().getResources());// we duplicate the resource to avoid concurrent modification @@ -109,16 +185,8 @@ public class NameResolutionHelper { } } if (root != null) { - if (filter != null) { - if (filter.isSuperTypeOf(root.eClass())) { - List<NamedElement> l = this.allNames.get(root.getName()); - if (l == null) { // i.e. no names have already been resolved in enclosed namespaces - l = new ArrayList<NamedElement>(); - l.add(root); - this.allNames.put(root.getName(), l); - } - } - } else { + + if (filter.isSuperTypeOf(root.eClass())) { List<NamedElement> l = this.allNames.get(root.getName()); if (l == null) { // i.e. no names have already been resolved in enclosed namespaces l = new ArrayList<NamedElement>(); @@ -126,7 +194,9 @@ public class NameResolutionHelper { this.allNames.put(root.getName(), l); } } - computeNames(root.getName() + NamedElementUtil.QUALIFIED_NAME_SEPARATOR, root, false); + StringBuilder builder2 = new StringBuilder(root.getName()); + builder2.append(NamedElementUtil.QUALIFIED_NAME_SEPARATOR); + computeNames(builder2.toString(), root, false); } } } @@ -161,16 +231,96 @@ public class NameResolutionHelper { // iterates other names given to the current member in the context of this scope for (String memberName : memberNames) { // Checks if the name must be considered or not - if (!preExistingKeys.contains(prefix + memberName)) { - List<NamedElement> l = this.getNamedElements(prefix + memberName); - l.add(member); - this.allNames.put(prefix + memberName, l); + if (!preExistingKeys.contains(prefix + memberName) || !this.allNames.get(prefix + memberName).contains(member)) { + // the second part of the previous if is to be able to found model::Class1 in this kind of model with scope==Property and filter : UML::Class + // model + // Class1 + // Property1 + // Class1 + // Class2 + + + if (filter.isSuperTypeOf(member.eClass())) { + List<NamedElement> l = this.getNamedElements(prefix + memberName); + l.add(member); + this.allNames.put(prefix + memberName, l); + } } if (member instanceof Namespace && !alreadyComputedNamespace.contains(member)) { // avoid loop on imported packages // Recursive call on the current member - computeNames(prefix + memberName + NamedElementUtil.QUALIFIED_NAME_SEPARATOR, (Namespace) member, false, alreadyComputedNamespace); + StringBuilder newPrefix = new StringBuilder(prefix); + newPrefix.append(memberName); + newPrefix.append(NamedElementUtil.QUALIFIED_NAME_SEPARATOR); + computeNames(newPrefix.toString(), (Namespace) member, false, alreadyComputedNamespace); } } } } + + /** + * @param namedElement + * @return + * the shortest qualified to use for the element + */ + public List<String> getShortestQualifiedNames(NamedElement namedElement) { + return NameResolutionUtils.getShortestQualifiedNames(namedElement, this.scope); + } + + /** + * @see org.eclipse.papyrus.infra.widgets.util.INameResolutionHelper#getMatchingElements(java.lang.String) + * + * @param aString + * @return + */ + public List<Object> getMatchingElements(String aString) { + if (this.allNames == null) { + this.allNames = new HashMap<String, List<NamedElement>>(); + this.computeAllNames(); + } + + Collection<Object> elements = new HashSet<Object>(); + + for (Entry<String, List<NamedElement>> current : this.allNames.entrySet()) { + if (aString == null || aString.isEmpty() || current.getKey().startsWith(aString)) { + elements.addAll(current.getValue()); + } + } + // to avoid to found the same element several time + return new ArrayList<Object>(elements); + } + + + /** + * @see org.eclipse.papyrus.infra.widgets.util.INameResolutionHelper#getElementsByName(java.lang.String) + * + * @param aString + * @return + */ + public List<Object> getElementsByName(String aString) { + if (this.allNames == null) { + this.allNames = new HashMap<String, List<NamedElement>>(); + this.computeAllNames(); + } + List<NamedElement> namedElements = this.allNames.get(aString); + List<Object> returnedValues = null; + if (namedElements != null && namedElements.size() > 0) { + + returnedValues = new ArrayList<Object>(namedElements); + } + return returnedValues != null ? returnedValues : Collections.emptyList(); + } + + + /** + * @see org.eclipse.papyrus.infra.widgets.util.INameResolutionHelper#getShortestQualifiedNames(java.lang.Object) + * + * @param element + * @return + */ + public List<String> getShortestQualifiedNames(Object element) { + if (element instanceof NamedElement) { + return getShortestQualifiedNames((NamedElement) element); + } + return null; + } } diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/util/ReferenceContentAssistProcessor.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/util/ReferenceContentAssistProcessor.java new file mode 100644 index 00000000000..11b9b4e016a --- /dev/null +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/util/ReferenceContentAssistProcessor.java @@ -0,0 +1,250 @@ +/***************************************************************************** + * Copyright (c) 2015 CEA LIST and others. + * + * 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: + * CEA LIST - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.uml.tools.util; + +import java.util.Iterator; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; + +import org.eclipse.jface.text.BadLocationException; +import org.eclipse.jface.text.IDocument; +import org.eclipse.jface.text.ITextViewer; +import org.eclipse.jface.text.contentassist.CompletionProposal; +import org.eclipse.jface.text.contentassist.ContextInformationValidator; +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; +import org.eclipse.papyrus.infra.widgets.util.DoNothingCompletionProposal; +import org.eclipse.papyrus.infra.widgets.util.IPapyrusConverter; + +/** + * @author VL222926 + * + */ +public class ReferenceContentAssistProcessor implements IContentAssistProcessor { + /** + * the maximum of elements to display in the completion + */ + private int MAX_ELEMENTS_TO_DISPLAY = 15; + + /** + * add this string to the suggestions when there are more than {@link #MAX_ELEMENTS_TO_DISPLAY} + */ + public static final String MORE_ELEMENTS = IPapyrusConverter.MORE_ELEMENTS; //$NON-NLS-1$ + + + private String lastError = null; + + private IContextInformationValidator contextInfoValidator; + + private IPapyrusConverter parser; + + private boolean isMany; + + /** + * + * Constructor. + * + * @param parser + */ + public ReferenceContentAssistProcessor(IPapyrusConverter parser, boolean isMany) { + this.parser = parser; + this.isMany = isMany; + contextInfoValidator = new ContextInformationValidator(this); + } + + /** + * + * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#computeCompletionProposals(org.eclipse.jface.text.ITextViewer, int) + * + * @param textViewer + * @param documentOffset + * @return + */ + public ICompletionProposal[] computeCompletionProposals(ITextViewer textViewer, int documentOffset) { + IDocument document = textViewer.getDocument(); + int currOffset = documentOffset - 1; + String currentStr = textViewer.getTextWidget().getText(); + Map<List<Integer>, String> parse = this.parser.getSubStringsWithTheirPositions(currentStr); + + String stringToComplete = null; + for (Entry<List<Integer>, String> current : parse.entrySet()) { + int start = current.getKey().get(0); + int end = current.getKey().get(1); + if (currOffset >= start && currOffset < end) { + stringToComplete = current.getValue(); + break; + } + } + if (stringToComplete == null) { + stringToComplete = IPapyrusConverter.EMPTY_STRING; + } + + try { + + String currWord = IPapyrusConverter.EMPTY_STRING; + char currChar; + while (currOffset > 0 && !Character.isWhitespace(currChar = document.getChar(currOffset))) { + currWord = currChar + currWord; + currOffset--; + } + + currWord = textViewer.getTextWidget().getText(); + List<String> suggestions = suggest(stringToComplete); + ICompletionProposal[] proposals = null; + if (suggestions.size() > 0) { + proposals = buildProposals(suggestions, stringToComplete, documentOffset - stringToComplete.length()); + // proposals = buildProposals(suggestions, currWord, 0); + lastError = null; + } else { + lastError = "There is no suggestion for you."; //$NON-NLS-1$ + } + return proposals; + } catch (BadLocationException e) { + org.eclipse.papyrus.infra.widgets.Activator.log.error(e); + lastError = e.getMessage(); + return null; + } + } + + /** + * + * @param word + * the string typed by the user + * @return + * the available suggestion for this string and fill {@link #map} + */ + public List<String> suggest(String word) { + List<String> suggestions = new LinkedList<String>(); + if (word == null || word.length() == 0) { + suggestions.addAll(buildSuggest(word)); + } else { + List<String> val = this.parser.splitFullStringToSubElementString(word); + if (val.size() == 1) { + suggestions.addAll(buildSuggest(val.get(0))); + } else { + // we assume than we provide always for the last string + String subWord = val.get(val.size() - 1); + suggestions.addAll(buildSuggest(subWord)); + } + // if(isMany){ + // suggestions.add(IPapyrusConverter.STRING_SEPARATOR); + // } + } + return suggestions; + } + + /** + * + * @param word + * a word + * @return + * the list of suggestions for the string word, + <code>null</code> suggestion + {@link #MORE_ELEMENTS} if required + */ + protected List<String> buildSuggest(String word) { + List<String> suggestions = new LinkedList<String>(); + boolean isEmpty = word == null || word.length() == 0; + if (!isEmpty) { + boolean escapedName = word.startsWith(IPapyrusConverter.STRING_DELIMITER); + if (escapedName) { + word = word.substring(1); + } + + List<?> elements = parser.getMatchingElements(word);// OK + for (int i = 0; i < elements.size() && i < MAX_ELEMENTS_TO_DISPLAY; i++) { + Object current = elements.get(i); + String name = parser.canonicalToDisplayValue(current, 0); + if (escapedName && !name.contains(IPapyrusConverter.STRING_SEPARATOR)) { + continue; + } + suggestions.add(name); + } + if (elements.size() > MAX_ELEMENTS_TO_DISPLAY) { + suggestions.add(0, MORE_ELEMENTS); + } + } else { + suggestions.add(0, MORE_ELEMENTS); + } + suggestions.add(0, IPapyrusConverter.NULL_VALUE); + return suggestions; + } + + /** + * + * @param suggestions + * the list of suggestions + * @param replacedWord + * the word to replace + * @param offset + * the offset + * @return + * an array with the completion proposal + */ + private ICompletionProposal[] buildProposals(List<String> suggestions, String replacedWord, int offset) { + ICompletionProposal[] proposals = new ICompletionProposal[suggestions.size()]; + int index = 0; + for (Iterator<String> i = suggestions.iterator(); i.hasNext();) { + String currSuggestion = (String) i.next(); + if (MORE_ELEMENTS.equals(currSuggestion)) { + // we do nothing + proposals[index] = new DoNothingCompletionProposal(IPapyrusConverter.EMPTY_STRING, 0, replacedWord.length() + offset, currSuggestion.length(), null, currSuggestion, null, null); + } else if (IPapyrusConverter.NULL_VALUE.equals(currSuggestion)) { + // we will replace the full string + proposals[index] = new CompletionProposal(currSuggestion, 0, replacedWord.length() + offset, currSuggestion.length()); + } else if (IPapyrusConverter.STRING_SEPARATOR.equals(currSuggestion)) { + StringBuilder builder = new StringBuilder(); + builder.append(replacedWord); + builder.append(currSuggestion); + proposals[index] = new CompletionProposal(builder.toString(), offset, replacedWord.length(), builder.length(), null, currSuggestion, null, null); + } + else { + String replacementString = parser.displayToEditValue(currSuggestion); + proposals[index] = new CompletionProposal(replacementString, offset, replacedWord.length(), replacementString.length(), null, currSuggestion, null, null); + } + index++; + } + return proposals; + } + + public IContextInformation[] computeContextInformation(ITextViewer textViewer, int documentOffset) { + return null; + } + + /** + * + * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getCompletionProposalAutoActivationCharacters() + * + * @return + */ + public char[] getCompletionProposalAutoActivationCharacters() { + // we always wait for the user to explicitly trigger completion + return null; + } + + public char[] getContextInformationAutoActivationCharacters() { + // we have no context information + return null; + } + + public String getErrorMessage() { + return lastError; + } + + public IContextInformationValidator getContextInformationValidator() { + return contextInfoValidator; + } +}
\ No newline at end of file diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/util/UMLReferenceConverter.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/util/UMLReferenceConverter.java new file mode 100644 index 00000000000..e6b72d9f457 --- /dev/null +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/util/UMLReferenceConverter.java @@ -0,0 +1,457 @@ +/***************************************************************************** + * Copyright (c) 2015 CEA LIST and others. + * + * 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: + * CEA LIST - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.uml.tools.util; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Comparator; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.TreeMap; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import org.eclipse.core.runtime.Assert; +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.jface.text.contentassist.IContentAssistProcessor; +import org.eclipse.papyrus.infra.widgets.Activator; +import org.eclipse.papyrus.infra.widgets.util.INameResolutionHelper; +import org.eclipse.papyrus.infra.widgets.util.IPapyrusConverter; +import org.eclipse.uml2.uml.NamedElement; + +/** + * @author Vincent Lorenzo + * + */ +public class UMLReferenceConverter implements IPapyrusConverter { + + /** + * the helper used to find UML NamedElement using their name + */ + protected INameResolutionHelper sharedResolutionHelper; + + /** + * boolean indicating if the edited property is many or not + */ + protected final boolean isMany; + + public static final String ERROR_MESSAGE_NO_ELEMENT_FOUND = "No element have been found to match your string";//$NON-NLS-1$; + + public static final String ERROR_MESSAGE_SOME_ELEMENTS_NOT_FOUND = "Some elements have not been found to match your string";//$NON-NLS-1$; + + /** + * Constructor. + * + * @param helper + * the name resolution helper to use + * @param isMultiValued + * <code>true</code> if the edited property is multi valued + */ + public UMLReferenceConverter(INameResolutionHelper nameResolutionHelper, boolean isMultiValued) { + this.sharedResolutionHelper = nameResolutionHelper; + this.isMany = isMultiValued; + } + + /** + * + * @see org.eclipse.papyrus.infra.widgets.util.IPapyrusConverter#getCompletionProcessor(org.eclipse.core.runtime.IAdaptable) + * + * @param element + * @return + */ + public IContentAssistProcessor getCompletionProcessor(IAdaptable element) { + return new ReferenceContentAssistProcessor(this, isMany); + } + + +/** + * This method takes a string as parameter. This string can contains the name (qualified name) of several elements, separated by {@link IPapyrusConverter#STRING_SEPARATOR}. if the name of an element contains {@link IPapyrusParser#STRING_SEPARATOR, the name will be delimited by IPapyrusParser#STRING_DELIMITER + * + * This method return a map with the name of the subelement as keys. The values are the start and the end position of the key in the string parameter. + * @param listOfValueAsString + * the full String write in the StyledText + * @return + * a map with the name of the elements as key and the start and the end index of the name in the typed text + */ + public final Map<List<Integer>, String> getSubStringsWithTheirPositions(String listOfValueAsString) { + final Pattern pattern = Pattern.compile(FIND_PART_NAME_REGEX); + final Matcher matcher = pattern.matcher(listOfValueAsString); + final TreeMap<List<Integer>, String> path = new TreeMap<List<Integer>, String>(new TwoIntegerListTupleComparator()); + while (matcher.find()) { + String current = matcher.group(); + List<Integer> indexes = new ArrayList<Integer>(); + int start = matcher.start(); + int end = matcher.end(); + if (current.startsWith(STRING_DELIMITER) && current.endsWith(STRING_DELIMITER)) { + current = current.substring(1, current.length() - 1); + } else { + if (start - 1 >= 0) { + // we chack than the user does not have type something starting with the delimiter, without typing a comma after it + String substring = listOfValueAsString.substring(start - 1, start); + if (STRING_DELIMITER.equals(substring)) { + if (!current.contains(STRING_SEPARATOR)) { + start = start - 1; + current = listOfValueAsString.substring(start, end); + } + } + } + } + indexes.add(start); + indexes.add(end); + path.put(indexes, current); + } + return path; + } + + /** + * + * @param multiValuedString + * @return + * the list of named element represented by this string + */ + private List<NamedElement> getNamedElementFromString(String multiValuedString) { + List<NamedElement> elements = new ArrayList<NamedElement>(); + Collection<String> names = splitFullStringToSubElementString(multiValuedString); + for (String string2 : names) { + List<?> values = sharedResolutionHelper.getElementsByName(string2); + if (values.size() > 0) { + Assert.isTrue(values.size() == 1); + elements.add((NamedElement) values.get(0)); + } + } + return elements; + } + + /** + * + * @see org.eclipse.papyrus.infra.widgets.util.IPapyrusConverter#splitFullStringToSubElementString(java.lang.String) + * + * @param multiValueAsString + * @return + */ + public List<String> splitFullStringToSubElementString(String multiValueAsString) { + TreeMap<List<Integer>, String> res = (TreeMap<List<Integer>, String>) getSubStringsWithTheirPositions(multiValueAsString); + List<String> values = new ArrayList<String>(res.values()); + return values; + // final Pattern pattern = Pattern.compile(FIND_PART_NAME_REGEX); + // final Matcher matcher = pattern.matcher(multiValueAsString); + // final List<String> subString = new ArrayList<String>(); + // while (matcher.find()) { + // String current = matcher.group(); + // if (current.startsWith(STRING_DELIMITER) && current.endsWith(STRING_DELIMITER)) { + // current = current.substring(1, current.length() - 1); + // } + // subString.add(current); + // } + // return subString; + } + + + /** + * + * @param namedElement + * @return + * the name of the named element, starting and ending with {@link #STRING_DELIMITER} if its name contains {@link #STRING_DELIMITER} + */ + protected String getElementNameWithDelimiterIfRequired(NamedElement namedElement) { + StringBuffer builder = new StringBuffer(); + List<String> names = sharedResolutionHelper.getShortestQualifiedNames(namedElement); + String name = names.get(0); + if (name.contains(STRING_SEPARATOR)) { + builder.append(STRING_DELIMITER); + builder.append(name); + builder.append(STRING_DELIMITER); + } else { + builder.append(name); + } + return builder.toString(); + } + + /** + * @see org.eclipse.papyrus.infra.widgets.util.IPapyrusConverter#getEditStringFromPrintString(java.lang.String) + * + * @param printString + * @return + */ + public String getEditStringFromPrintString(String printString) { + if (printString.contains(STRING_SEPARATOR)) { + StringBuilder builder = new StringBuilder(); + builder.append(STRING_DELIMITER); + builder.append(printString); + builder.append(STRING_DELIMITER); + return builder.toString(); + } + return printString; + } + + /** + * @see org.eclipse.papyrus.infra.widgets.util.IPapyrusConverter#getUsedNameResolutionHelper() + * + * @return + */ + public INameResolutionHelper getUsedNameResolutionHelper() { + return this.sharedResolutionHelper; + } + + /** + * + * @param aString + * a string + * @return + * all elements whose the name starts with this string, or all found element if the string is <code>null</code> or empty + */ + public List<?> getMatchingElements(final String aString) { + String lookedForString = null; + if (aString.startsWith(STRING_DELIMITER) && aString.endsWith(STRING_DELIMITER)) { + lookedForString = aString.substring(1, aString.length() - 2); + } else { + lookedForString = aString; + } + return this.sharedResolutionHelper.getMatchingElements(lookedForString); + } + + /** + * + * @param aString + * a string + * @return + * all elements which have the wanted string as (qualified) name + */ + public List<?> getElementsByName(final String aString) { + return this.sharedResolutionHelper.getElementsByName(aString); + } + + + /** + * @param namedElement + * @return + * the shortest qualified to use for the element + */ + public List<String> getShortestQualifiedNames(Object element) { + return this.sharedResolutionHelper.getShortestQualifiedNames(element); + } + + /** + * @see org.eclipse.papyrus.infra.widgets.util.IPapyrusConverter#canonicalToDisplayValue(java.lang.Object, int) + * + * @param object + * @return + */ + public String canonicalToDisplayValue(Object object, int flag) { + if (object == null || EMPTY_STRING.equals(object)) { + return EMPTY_STRING; + } + + if (object instanceof Collection<?>) { + // if (canonicalValue instanceof Collection<?>) { + if (((Collection<?>) object).isEmpty()) { + return EMPTY_STRING; + } + + StringBuilder builder = new StringBuilder(); + Collection<?> coll = (Collection<?>) object; + Iterator<?> iter = coll.iterator(); + while (iter.hasNext()) { + Object tmp = iter.next(); + Assert.isTrue(tmp instanceof NamedElement); + List<String> names = getShortestQualifiedNames(tmp); + if (names.size() > 0) { + builder.append(names.get(0)); + } + if (iter.hasNext()) { + builder.append(STRING_SEPARATOR); + } + } + return builder.toString(); + } else if (object instanceof EObject) { + EObject eobject = (EObject) object; + Assert.isTrue(eobject instanceof NamedElement); + List<String> names = getShortestQualifiedNames(eobject); + if (names.size() > 0) { + return names.get(0); + } + + } + return EMPTY_STRING; + } + + /** + * @see org.eclipse.papyrus.infra.widgets.util.IPapyrusConverter#displayToCanonicalValue(java.lang.String) + * + * @param string + * @return + */ + public Object displayToCanonicalValue(String string, int flag) { + if (EMPTY_STRING.equals(string) || NULL_VALUE.equals(string)) { + return null; + } + Assert.isTrue(string instanceof String); + List<NamedElement> elements = getNamedElementFromString((String) string); + if (elements.size() == 0) { + return null; + } + if (!isMany && elements.size() >= 1) { + return elements.get(0); + } + return elements; + } + + /** + * @see org.eclipse.papyrus.infra.widgets.util.IPapyrusConverter#canonicalToEditValue(java.lang.Object) + * + * @param object + * @return + */ + public String canonicalToEditValue(Object object, int flag) { + if (object == null || EMPTY_STRING.equals(object)) { + return EMPTY_STRING; + } + + if (object instanceof Collection<?>) { + // if (canonicalValue instanceof Collection<?>) { + if (((Collection<?>) object).isEmpty()) { + return EMPTY_STRING; + } + + StringBuilder builder = new StringBuilder(); + Collection<?> coll = (Collection<?>) object; + Iterator<?> iter = coll.iterator(); + while (iter.hasNext()) { + Object tmp = iter.next(); + Assert.isTrue(tmp instanceof NamedElement); + builder.append(getElementNameWithDelimiterIfRequired((NamedElement) tmp)); + if (iter.hasNext()) { + builder.append(STRING_SEPARATOR); + } + } + return builder.toString(); + } else if (object instanceof EObject) { + EObject eobject = (EObject) object; + Assert.isTrue(eobject instanceof NamedElement); + return getElementNameWithDelimiterIfRequired((NamedElement) eobject); + } + return EMPTY_STRING; + } + + /** + * @see org.eclipse.papyrus.infra.widgets.util.IPapyrusConverter#editToCanonicalValue(java.lang.Object) + * + * @param object + * @return + */ + public Object editToCanonicalValue(String editValue, int flag) { + if (EMPTY_STRING.equals(editValue) || NULL_VALUE.equals(editValue)) { + return null; + } + Assert.isTrue(editValue instanceof String); + List<NamedElement> elements = getNamedElementFromString((String) editValue); + if (elements.size() == 0) { + return null; + } + if (!isMany && elements.size() >= 1) { + return elements.get(0); + } + return elements; + } + + /** + * @see org.eclipse.papyrus.infra.widgets.util.IPapyrusConverter#editToDisplayValue(java.lang.String) + * + * @param singleString + * @return + */ + public String editToDisplayValue(String singleString) { + if (singleString.startsWith(STRING_DELIMITER) && singleString.endsWith(STRING_DELIMITER)) { + return singleString.substring(1, singleString.length() - 1); + } + return singleString; + } + + /** + * @see org.eclipse.papyrus.infra.widgets.util.IPapyrusConverter#displayToEditValue(java.lang.String) + * + * @param singleString + * @return + */ + public String displayToEditValue(String singleString) { + if (singleString.contains(STRING_SEPARATOR)) { + StringBuilder builder = new StringBuilder(); + builder.append(STRING_DELIMITER); + builder.append(singleString); + builder.append(STRING_DELIMITER); + return builder.toString(); + } + return singleString; + } + + /** + * @see org.eclipse.papyrus.infra.widgets.util.IPapyrusConverter#isValidEditString(java.lang.String) + * + * @param aString + * @return + */ + public IStatus isValidEditString(String aString) { + if (aString == null || EMPTY_STRING.equals(aString) || NULL_VALUE.equals(aString)) { + return org.eclipse.core.runtime.Status.OK_STATUS; + } + Object result = editToCanonicalValue(aString, 0); + List<String> split = splitFullStringToSubElementString(aString); + if (result == null || (result instanceof Collection<?> && ((Collection<?>) result).isEmpty())) { + return new org.eclipse.core.runtime.Status(IStatus.ERROR, Activator.PLUGIN_ID, ERROR_MESSAGE_NO_ELEMENT_FOUND); + } + if (result instanceof Collection<?> && (((Collection<?>) result).size() < split.size())) { + return new org.eclipse.core.runtime.Status(IStatus.ERROR, Activator.PLUGIN_ID, ERROR_MESSAGE_SOME_ELEMENTS_NOT_FOUND); + } + return org.eclipse.core.runtime.Status.OK_STATUS; + } + + + /** + * + * @author VL222926 + * This class allows to sort the map containing the start and end index of the substrings. We need it to be able to provide completion for the correct sub string + */ + private static final class TwoIntegerListTupleComparator implements Comparator<List<Integer>> { + + + /** + * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object) + * + * @param o1 + * @param o2 + * @return + */ + public int compare(List<Integer> o1, List<Integer> o2) { + Assert.isTrue(o1.size() == 2); + Assert.isTrue(o2.size() == 2); + if (o1.equals(o2)) { + return 0; + } + if (o1.get(0) > o2.get(0)) { + Assert.isTrue(o1.get(1) > o2.get(1)); + return 1; + } + if (o1.get(0) < o2.get(0)) { + Assert.isTrue(o1.get(1) < o2.get(1)); + return -1; + } + throw new UnsupportedOperationException("should no be possible"); //$NON-NLS-1$ + + } + + } +} diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties/model/Environment.xmi b/plugins/views/properties/org.eclipse.papyrus.views.properties/model/Environment.xmi index 6bf05b56904..f5ac3e19391 100644 --- a/plugins/views/properties/org.eclipse.papyrus.views.properties/model/Environment.xmi +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties/model/Environment.xmi @@ -1,56 +1,230 @@ <?xml version="1.0" encoding="ASCII"?> -<environment:Environment xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:environment="http://www.eclipse.org/papyrus/properties/environment/0.9"> - <constraintTypes label="EMF Instance Of (Deprecated)" constraintClass="org.eclipse.papyrus.infra.constraints.constraints.EMFInstanceOfConstraint"/> - <constraintTypes label="True Constraint (Deprecated)" constraintClass="org.eclipse.papyrus.infra.constraints.constraints.TrueConstraint"/> - <constraintTypes label="EMF Query (Deprecated)" constraintClass="org.eclipse.papyrus.infra.constraints.constraints.EMFQueryConstraint"/> - <constraintTypes label="Java Instance Of (Deprecated)" constraintClass="org.eclipse.papyrus.infra.constraints.constraints.JavaInstanceOf"/> - <constraintTypes label="Java Query (Deprecated)" constraintClass="org.eclipse.papyrus.infra.constraints.constraints.JavaQueryConstraint"/> - <modelElementFactories name="EMF Factory" factoryClass="org.eclipse.papyrus.views.properties.modelelement.EMFModelElementFactory"/> - <modelElementFactories name="Annotation Factory" factoryClass="org.eclipse.papyrus.views.properties.modelelement.AnnotationModelElementFactory"/> - <modelElementFactories name="Basic preferences Factory" factoryClass="org.eclipse.papyrus.views.properties.modelelement.PreferencesModelElementFactory"/> - <widgetTypes label="Label" widgetClass="Label"/> - <widgetTypes label="Text" widgetClass="Text"/> - <widgetTypes label="Button" widgetClass="Button"/> - <propertyEditorTypes label="StringEditor" widgetClass="StringEditor" namespace="//@namespaces.3"/> - <propertyEditorTypes label="StringMultiline" widgetClass="StringMultiline" namespace="//@namespaces.3"/> - <propertyEditorTypes label="StringLabel (Read-only)" widgetClass="StringLabel" namespace="//@namespaces.3"/> - <propertyEditorTypes label="StringCombo" widgetClass="StringCombo" namespace="//@namespaces.3"/> - <propertyEditorTypes label="FileSelector" widgetClass="StringFileSelector" namespace="//@namespaces.3"/> - <propertyEditorTypes label="BooleanCombo" widgetClass="BooleanCombo" namespace="//@namespaces.3" type="Boolean"/> - <propertyEditorTypes label="BooleanCheckbox" widgetClass="BooleanCheckbox" namespace="//@namespaces.3" type="Boolean"/> - <propertyEditorTypes label="BooleanRadio" widgetClass="BooleanRadio" namespace="//@namespaces.3" type="Boolean"/> - <propertyEditorTypes label="BooleanToggle" widgetClass="BooleanToggle" namespace="//@namespaces.3" type="Boolean"/> - <propertyEditorTypes label="IntegerEditor" widgetClass="IntegerEditor" namespace="//@namespaces.3" type="Integer"/> - <propertyEditorTypes label="IntegerSpinner" widgetClass="IntegerSpinner" namespace="//@namespaces.3" type="Integer"/> - <propertyEditorTypes label="EnumCombo" widgetClass="EnumCombo" namespace="//@namespaces.3" type="Enumeration"/> - <propertyEditorTypes label="EnumRadio (No preview)" widgetClass="EnumRadio" namespace="//@namespaces.3" type="Enumeration"/> - <propertyEditorTypes label="ReferenceCombo" widgetClass="ReferenceCombo" namespace="//@namespaces.3" type="Reference"/> - <propertyEditorTypes label="ReferenceDialog" widgetClass="ReferenceDialog" namespace="//@namespaces.3" type="Reference"/> - <propertyEditorTypes label="ViewEditor" widgetClass="ViewEditor" namespace="//@namespaces.3" type="Reference" multiplicity="-1"/> - <propertyEditorTypes label="ReferenceLabel (Read-only)" widgetClass="ReferenceLabel" namespace="//@namespaces.3" type="Reference"/> - <propertyEditorTypes label="MultiReference" widgetClass="MultiReference" namespace="//@namespaces.3" type="Reference" multiplicity="-1"/> - <propertyEditorTypes label="MultiReferenceWithPropertyView" widgetClass="MultiReferencePropertyEditorWithPropertyView" namespace="//@namespaces.3" type="Reference" multiplicity="-1"/> - <propertyEditorTypes label="MultiString" widgetClass="MultiString" namespace="//@namespaces.3" multiplicity="-1"/> - <propertyEditorTypes label="MultipleFileEditor" widgetClass="MultiStringFile" namespace="//@namespaces.3" multiplicity="-1"/> - <propertyEditorTypes label="MultiInteger" widgetClass="MultiInteger" namespace="//@namespaces.3" type="Integer" multiplicity="-1"/> - <propertyEditorTypes label="InvalidWidget" widgetClass="InvalidWidget" namespace="//@namespaces.3"/> - <propertyEditorTypes label="StringMultiline with References" widgetClass="StringMultilineWithReferences" namespace="//@namespaces.3"/> - <propertyEditorTypes label="FloatEditor" widgetClass="FloatEditor" namespace="//@namespaces.3"/> - <propertyEditorTypes label="DoubleEditor" widgetClass="DoubleEditor" namespace="//@namespaces.3"/> - <propertyEditorTypes label="UnlimitedNaturalEditor" widgetClass="UnlimitedNaturalEditor" namespace="//@namespaces.3"/> - <propertyEditorTypes label="Browse Path Button" widgetClass="BrowseFilePropertyEditor" namespace="//@namespaces.3"/> - <compositeWidgetTypes label="Composite" widgetClass="Composite"/> - <compositeWidgetTypes label="Group" widgetClass="Group"/> - <layoutTypes label="GridLayout" widgetClass="GridLayout"/> - <layoutTypes label="FillLayout" widgetClass="FillLayout"/> - <layoutTypes label="RowLayout" widgetClass="RowLayout"/> - <layoutTypes label="PropertiesLayout" widgetClass="PropertiesLayout" namespace="//@namespaces.4"/> - <namespaces prefix="" name="" value="http://www.eclipse.org/xwt/presentation"/> - <namespaces prefix="" name="x" value="http://www.eclipse.org/xwt"/> - <namespaces name="j" value="java.lang"/> - <namespaces name="ppe" value="org.eclipse.papyrus.views.properties.widgets"/> - <namespaces name="ppel" value="org.eclipse.papyrus.views.properties.widgets.layout"/> - <namespaces name="ppec" value="org.eclipse.papyrus.views.properties.creation"/> - <miscClasses label="EMF object factory" class="EcorePropertyEditorFactory" namespace="//@namespaces.5"/> - <miscClasses label="Property view Edition factory" class="PropertyEditorFactory" namespace="//@namespaces.5"/> +<environment:Environment + xmi:version="2.0" + xmlns:xmi="http://www.omg.org/XMI" + xmlns:environment="http://www.eclipse.org/papyrus/properties/environment/0.9"> + <constraintTypes + label="EMF Instance Of (Deprecated)" + constraintClass="org.eclipse.papyrus.infra.constraints.constraints.EMFInstanceOfConstraint"/> + <constraintTypes + label="True Constraint (Deprecated)" + constraintClass="org.eclipse.papyrus.infra.constraints.constraints.TrueConstraint"/> + <constraintTypes + label="EMF Query (Deprecated)" + constraintClass="org.eclipse.papyrus.infra.constraints.constraints.EMFQueryConstraint"/> + <constraintTypes + label="Java Instance Of (Deprecated)" + constraintClass="org.eclipse.papyrus.infra.constraints.constraints.JavaInstanceOf"/> + <constraintTypes + label="Java Query (Deprecated)" + constraintClass="org.eclipse.papyrus.infra.constraints.constraints.JavaQueryConstraint"/> + <modelElementFactories + name="EMF Factory" + factoryClass="org.eclipse.papyrus.views.properties.modelelement.EMFModelElementFactory"/> + <modelElementFactories + name="Annotation Factory" + factoryClass="org.eclipse.papyrus.views.properties.modelelement.AnnotationModelElementFactory"/> + <modelElementFactories + name="Basic preferences Factory" + factoryClass="org.eclipse.papyrus.views.properties.modelelement.PreferencesModelElementFactory"/> + <widgetTypes + label="Label" + widgetClass="Label"/> + <widgetTypes + label="Text" + widgetClass="Text"/> + <widgetTypes + label="Button" + widgetClass="Button"/> + <propertyEditorTypes + label="StringEditor" + widgetClass="StringEditor" + namespace="//@namespaces.3"/> + <propertyEditorTypes + label="StringMultiline" + widgetClass="StringMultiline" + namespace="//@namespaces.3"/> + <propertyEditorTypes + label="StringLabel (Read-only)" + widgetClass="StringLabel" + namespace="//@namespaces.3"/> + <propertyEditorTypes + label="StringCombo" + widgetClass="StringCombo" + namespace="//@namespaces.3"/> + <propertyEditorTypes + label="FileSelector" + widgetClass="StringFileSelector" + namespace="//@namespaces.3"/> + <propertyEditorTypes + label="BooleanCombo" + widgetClass="BooleanCombo" + namespace="//@namespaces.3" + type="Boolean"/> + <propertyEditorTypes + label="BooleanCheckbox" + widgetClass="BooleanCheckbox" + namespace="//@namespaces.3" + type="Boolean"/> + <propertyEditorTypes + label="BooleanRadio" + widgetClass="BooleanRadio" + namespace="//@namespaces.3" + type="Boolean"/> + <propertyEditorTypes + label="BooleanToggle" + widgetClass="BooleanToggle" + namespace="//@namespaces.3" + type="Boolean"/> + <propertyEditorTypes + label="IntegerEditor" + widgetClass="IntegerEditor" + namespace="//@namespaces.3" + type="Integer"/> + <propertyEditorTypes + label="IntegerSpinner" + widgetClass="IntegerSpinner" + namespace="//@namespaces.3" + type="Integer"/> + <propertyEditorTypes + label="EnumCombo" + widgetClass="EnumCombo" + namespace="//@namespaces.3" + type="Enumeration"/> + <propertyEditorTypes + label="EnumRadio (No preview)" + widgetClass="EnumRadio" + namespace="//@namespaces.3" + type="Enumeration"/> + <propertyEditorTypes + label="ReferenceCombo" + widgetClass="ReferenceCombo" + namespace="//@namespaces.3" + type="Reference"/> + <propertyEditorTypes + label="ReferenceDialog" + widgetClass="ReferenceDialog" + namespace="//@namespaces.3" + type="Reference"/> + <propertyEditorTypes + label="ViewEditor" + widgetClass="ViewEditor" + namespace="//@namespaces.3" + type="Reference" + multiplicity="-1"/> + <propertyEditorTypes + label="ReferenceLabel (Read-only)" + widgetClass="ReferenceLabel" + namespace="//@namespaces.3" + type="Reference"/> + <propertyEditorTypes + label="MultiReference" + widgetClass="MultiReference" + namespace="//@namespaces.3" + type="Reference" + multiplicity="-1"/> + <propertyEditorTypes + label="MultiReferenceWithPropertyView" + widgetClass="MultiReferencePropertyEditorWithPropertyView" + namespace="//@namespaces.3" + type="Reference" + multiplicity="-1"/> + <propertyEditorTypes + label="MultiString" + widgetClass="MultiString" + namespace="//@namespaces.3" + multiplicity="-1"/> + <propertyEditorTypes + label="MultipleFileEditor" + widgetClass="MultiStringFile" + namespace="//@namespaces.3" + multiplicity="-1"/> + <propertyEditorTypes + label="MultiInteger" + widgetClass="MultiInteger" + namespace="//@namespaces.3" + type="Integer" + multiplicity="-1"/> + <propertyEditorTypes + label="InvalidWidget" + widgetClass="InvalidWidget" + namespace="//@namespaces.3"/> + <propertyEditorTypes + label="StringMultiline with References" + widgetClass="StringMultilineWithReferences" + namespace="//@namespaces.3"/> + <propertyEditorTypes + label="FloatEditor" + widgetClass="FloatEditor" + namespace="//@namespaces.3"/> + <propertyEditorTypes + label="DoubleEditor" + widgetClass="DoubleEditor" + namespace="//@namespaces.3"/> + <propertyEditorTypes + label="UnlimitedNaturalEditor" + widgetClass="UnlimitedNaturalEditor" + namespace="//@namespaces.3"/> + <propertyEditorTypes + label="Browse Path Button" + widgetClass="BrowseFilePropertyEditor" + namespace="//@namespaces.3"/> + <propertyEditorTypes + label="CompletionStyledTextMultiReference" + widgetClass="CompletionStyledTextMultiReference" + namespace="//@namespaces.3" + type="Reference" + multiplicity="-1"/> + <propertyEditorTypes + label="CompletionStyledTextReferenceDialog" + widgetClass="CompletionStyledTextReferenceDialog" + namespace="//@namespaces.3" + type="Reference"/> + <compositeWidgetTypes + label="Composite" + widgetClass="Composite"/> + <compositeWidgetTypes + label="Group" + widgetClass="Group"/> + <layoutTypes + label="GridLayout" + widgetClass="GridLayout"/> + <layoutTypes + label="FillLayout" + widgetClass="FillLayout"/> + <layoutTypes + label="RowLayout" + widgetClass="RowLayout"/> + <layoutTypes + label="PropertiesLayout" + widgetClass="PropertiesLayout" + namespace="//@namespaces.4"/> + <namespaces + prefix="" + name="" + value="http://www.eclipse.org/xwt/presentation"/> + <namespaces + prefix="" + name="x" + value="http://www.eclipse.org/xwt"/> + <namespaces + name="j" + value="java.lang"/> + <namespaces + name="ppe" + value="org.eclipse.papyrus.views.properties.widgets"/> + <namespaces + name="ppel" + value="org.eclipse.papyrus.views.properties.widgets.layout"/> + <namespaces + name="ppec" + value="org.eclipse.papyrus.views.properties.creation"/> + <miscClasses + label="EMF object factory" + class="EcorePropertyEditorFactory" + namespace="//@namespaces.5"/> + <miscClasses + label="Property view Edition factory" + class="PropertyEditorFactory" + namespace="//@namespaces.5"/> </environment:Environment> diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/modelelement/AbstractModelElement.java b/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/modelelement/AbstractModelElement.java index 41f554ce516..60d12d69043 100644 --- a/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/modelelement/AbstractModelElement.java +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/modelelement/AbstractModelElement.java @@ -30,6 +30,8 @@ import org.eclipse.papyrus.infra.tools.databinding.ReferenceCountedObservable; import org.eclipse.papyrus.infra.widgets.creation.ReferenceValueFactory;
import org.eclipse.papyrus.infra.widgets.providers.EmptyContentProvider;
import org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider;
+import org.eclipse.papyrus.infra.widgets.util.INameResolutionHelper;
+import org.eclipse.papyrus.infra.widgets.util.IPapyrusConverter;
import org.eclipse.papyrus.views.properties.creation.PropertyEditorFactory;
/**
@@ -208,5 +210,26 @@ public abstract class AbstractModelElement implements ModelElement, IDataSourceL return observableDisposeListener;
}
+
+
+ /**
+ * @see org.eclipse.papyrus.views.properties.modelelement.ModelElement#getNameResolutionHelper(java.lang.String)
+ *
+ * @param propertyPath
+ * @return
+ */
+ public INameResolutionHelper getNameResolutionHelper(String propertyPath) {
+ return null;
+ }
+ /**
+ *
+ * @see org.eclipse.papyrus.views.properties.modelelement.ModelElement#getPapyrusConverter(java.lang.String)
+ *
+ * @param propertyPath
+ * @return
+ */
+ public IPapyrusConverter getPapyrusConverter(String propertyPath) {
+ return null;
+ }
}
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/modelelement/DataSource.java b/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/modelelement/DataSource.java index 1178da2e99c..9983cc43f2e 100644 --- a/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/modelelement/DataSource.java +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/modelelement/DataSource.java @@ -33,6 +33,8 @@ import org.eclipse.papyrus.infra.widgets.creation.ReferenceValueFactory; import org.eclipse.papyrus.infra.widgets.providers.EmptyContentProvider;
import org.eclipse.papyrus.infra.widgets.providers.EncapsulatedContentProvider;
import org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider;
+import org.eclipse.papyrus.infra.widgets.util.INameResolutionHelper;
+import org.eclipse.papyrus.infra.widgets.util.IPapyrusConverter;
import org.eclipse.papyrus.views.properties.Activator;
import org.eclipse.papyrus.views.properties.contexts.View;
import org.eclipse.swt.graphics.Image;
@@ -526,4 +528,32 @@ public class DataSource implements IChangeListener { }
return element.getValidator(getLocalPropertyPath(propertyPath));
}
+
+ /**
+ * return the NameResolutionHelper to use for completion
+ *
+ * @param propertyPath
+ * @return
+ */
+ public INameResolutionHelper getNameResolutionHelper(String propertyPath) {
+ ModelElement element = getModelElement(propertyPath);
+ if (element == null) {
+ return null;
+ }
+ return element.getNameResolutionHelper(getLocalPropertyPath(propertyPath));
+ }
+
+ /**
+ * return the Papyrus Converter to convert the object to edit or display string and to find the object from a string
+ *
+ * @param propertyPath
+ * @return
+ */
+ public IPapyrusConverter getPapyrusConverter(String propertyPath){
+ ModelElement element = getModelElement(propertyPath);
+ if (element == null) {
+ return null;
+ }
+ return element.getPapyrusConverter(getLocalPropertyPath(propertyPath));
+ }
}
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/modelelement/ModelElement.java b/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/modelelement/ModelElement.java index 3e59d8b33b1..31fd95aa484 100644 --- a/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/modelelement/ModelElement.java +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/modelelement/ModelElement.java @@ -18,6 +18,8 @@ import org.eclipse.jface.viewers.ILabelProvider; import org.eclipse.papyrus.infra.widgets.creation.ReferenceValueFactory;
import org.eclipse.papyrus.infra.widgets.providers.EmptyContentProvider;
import org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider;
+import org.eclipse.papyrus.infra.widgets.util.INameResolutionHelper;
+import org.eclipse.papyrus.infra.widgets.util.IPapyrusConverter;
/**
* An interface representing Model Elements. A ModelElement is associated to a
@@ -167,4 +169,20 @@ public interface ModelElement { * @return
*/
public IValidator getValidator(String propertyPath);
+
+ /**
+ * return the INameResolutionHelper to use for completion
+ *
+ * @param propertyPath
+ * @return
+ */
+ public INameResolutionHelper getNameResolutionHelper(String propertyPath);
+
+ /**
+ * return the Papyrus Converter to convert the object to edit or display string and to find the object from a string
+ *
+ * @param localPropertyPath
+ * @return
+ */
+ public IPapyrusConverter getPapyrusConverter(String localPropertyPath);
}
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/widgets/CompletionStyledTextMultiReference.java b/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/widgets/CompletionStyledTextMultiReference.java new file mode 100644 index 00000000000..551bff86f56 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/widgets/CompletionStyledTextMultiReference.java @@ -0,0 +1,65 @@ +/***************************************************************************** + * 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ +package org.eclipse.papyrus.views.properties.widgets; + +import org.eclipse.papyrus.infra.widgets.editors.CompletionStyledTextMultipleReferenceEditor; +import org.eclipse.papyrus.infra.widgets.editors.MultipleReferenceEditor; +import org.eclipse.papyrus.infra.widgets.util.ISetPapyrusConverter; +import org.eclipse.swt.widgets.Composite; + +/** + * A PropertyEditor for editing multiple references in a List + * + * @see org.eclipse.papyrus.widgets.editors.BooleanCheckbox + * + * @author Camille Letavernier + */ +public class CompletionStyledTextMultiReference extends MultiReference { + + /** + * + * Constructor. + * + * @param parent + * @param style + */ + public CompletionStyledTextMultiReference(Composite parent, int style) { + super(parent, style); + } + + + /** + * @see org.eclipse.papyrus.views.properties.widgets.MultiReference#createMultipleReferenceEditor(org.eclipse.swt.widgets.Composite, int) + * + * @param parent + * @param style + * @return + */ + @Override + protected MultipleReferenceEditor createMultipleReferenceEditor(Composite parent, int style) { + return new CompletionStyledTextMultipleReferenceEditor(parent, style); + } + + /** + * @see org.eclipse.papyrus.views.properties.widgets.MultiReference#doBinding() + * + */ + @Override + protected void doBinding() { + if (editor instanceof ISetPapyrusConverter) { + ((ISetPapyrusConverter) editor).setPapyrusConverter(input.getPapyrusConverter(propertyPath)); + } + super.doBinding(); + } + + +} diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/widgets/CompletionStyledTextReferenceDialog.java b/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/widgets/CompletionStyledTextReferenceDialog.java new file mode 100644 index 00000000000..df68b066231 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/widgets/CompletionStyledTextReferenceDialog.java @@ -0,0 +1,109 @@ +/***************************************************************************** + * Copyright (c) 2015 CEA LIST and others. + * + * 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: + * CEA LIST - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.views.properties.widgets; + +import org.eclipse.papyrus.infra.widgets.creation.ReferenceValueFactory; +import org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider; +import org.eclipse.papyrus.infra.widgets.util.IPapyrusConverter; +import org.eclipse.swt.widgets.Composite; + +/** + * @author VL222926 + * + */ +public class CompletionStyledTextReferenceDialog extends AbstractPropertyEditor { + + /** + * The ReferenceDialog widget + */ + protected org.eclipse.papyrus.infra.widgets.editors.CompletionStyledTextReferenceDialog editor; + + /** + * The ValueFactory used to create or edit Objects directly from + * this editor + */ + protected ReferenceValueFactory factory; + + /** + * Constructor. + * + * @param parent + * The composite in which the widget will be displayed + * @param style + * The style for the widget + */ + public CompletionStyledTextReferenceDialog(Composite parent, int style) { + editor = createReferenceDialog(parent, style); + setEditor(editor); + } + + /** + * Creates the reference dialog. + * + * @param parent + * The composite in which the widget will be displayed + * @param style + * The style for the widget + * @return the reference dialog. + */ + protected org.eclipse.papyrus.infra.widgets.editors.CompletionStyledTextReferenceDialog createReferenceDialog(Composite parent, int style) { + return new org.eclipse.papyrus.infra.widgets.editors.CompletionStyledTextReferenceDialog(parent, style); + } + + /** + * + * @see org.eclipse.papyrus.views.properties.widgets.AbstractPropertyEditor#doBinding() + * + */ + @Override + protected void doBinding() { + + IStaticContentProvider provider = input.getContentProvider(propertyPath); + editor.setLabelProvider(input.getLabelProvider(propertyPath)); + editor.setContentProvider(provider); + editor.setDirectCreation(input.getDirectCreation(propertyPath)); + editor.setMandatory(input.isMandatory(propertyPath)); + if (factory == null) { // Use the default factory from the DataSource + editor.setValueFactory(input.getValueFactory(propertyPath)); + } else { // Use the factory explicitly specified + editor.setValueFactory(factory); + } + IPapyrusConverter parser = input.getPapyrusConverter(propertyPath); + if (parser != null) { + editor.setPapyrusConverter(parser); + + } + super.doBinding(); + } + + /** + * Sets the ValueFactory used to create or edit Objects directly from + * this editor + * + * @param factory + */ + public void setFactory(ReferenceValueFactory factory) { + this.factory = factory; + editor.setValueFactory(factory); + } + + /** + * @return The ValueFactory used to create or edit Objects directly from + * this editor + */ + public ReferenceValueFactory getFactory() { + return factory; + } + +} |