Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src-gen/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DependencyAppliedStereotypeEditPart.java')
-rwxr-xr-x[-rw-r--r--]plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src-gen/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DependencyAppliedStereotypeEditPart.java149
1 files changed, 68 insertions, 81 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src-gen/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DependencyAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src-gen/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DependencyAppliedStereotypeEditPart.java
index 9176328e27b..2cf2a370ece 100644..100755
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src-gen/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DependencyAppliedStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src-gen/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DependencyAppliedStereotypeEditPart.java
@@ -1,13 +1,13 @@
/**
* Copyright (c) 2014 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:
- * CEA LIST - Initial API and implementation
+ *
+ * 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.diagram.deployment.edit.parts;
@@ -112,22 +112,23 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* direct edition mode (default, undefined, registered editor, etc.)
- *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
/**
* configuration from a registered edit dialog
- *
* @generated
*/
protected IDirectEditorConfiguration configuration;
+
/**
* @generated
*/
static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyAppliedStereotypeEditPart.VISUAL_ID), new Point(0, 60));
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(
+ org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyAppliedStereotypeEditPart.VISUAL_ID),
+ new Point(0, 60));
}
/**
@@ -138,7 +139,7 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart
}
/**
- * @generated
+ * @generated Papyrus Generation
*/
@Override
protected void createDefaultEditPolicies() {
@@ -151,7 +152,6 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
- @Override
public int getKeyPoint() {
return ConnectionLocator.MIDDLE;
}
@@ -222,7 +222,6 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -230,7 +229,6 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -238,7 +236,6 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -264,8 +261,7 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart
String text = null;
EObject parserElement = getParserElement();
if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- ParserUtil.getParserAdapter(getParserElement(), this),
+ text = getParser().getPrintString(ParserUtil.getParserAdapter(getParserElement(), this),
getParserOptions().intValue());
}
if (text == null || text.length() == 0) {
@@ -277,7 +273,6 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
@@ -293,13 +288,11 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
- @Override
public String getEditText() {
if (getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
- return getParser().getEditString(
- ParserUtil.getParserAdapter(getParserElement(), this),
+ return getParser().getEditString(ParserUtil.getParserAdapter(getParserElement(), this),
getParserOptions().intValue());
}
@@ -313,7 +306,6 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@@ -323,12 +315,16 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart
final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid = (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
+ IParserEditStatus valid = (IParserEditStatus) getEditingDomain()
+ .runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
@Override
public void run() {
- setResult(parser.isValidEditString(ParserUtil.getParserAdapter(getParserElement(), DependencyAppliedStereotypeEditPart.this), (String) value));
+ setResult(
+ parser.isValidEditString(
+ ParserUtil.getParserAdapter(getParserElement(),
+ DependencyAppliedStereotypeEditPart.this),
+ (String) value));
}
});
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
@@ -346,7 +342,6 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
if (getParserElement() == null || getParser() == null) {
return null;
@@ -357,7 +352,6 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -365,7 +359,6 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
- @Override
public IParser getParser() {
if (parser == null) {
parser = ParserUtil.getParser(UMLElementTypes.Dependency_Edge, getParserElement(), this, VISUAL_ID);
@@ -428,7 +421,6 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
final Request theRequest = request;
@@ -456,13 +448,18 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart
initializeDirectEditManager(theRequest);
return;
} else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration)
+ .createPopupEditorHelper(this);
helper.showEditor();
return;
} else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(),
+ configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
+ dialog = new ExtendedDirectEditionDialog(
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(),
+ configuration.getTextToEdit(resolveSemanticElement()), configuration);
} else {
return;
}
@@ -474,7 +471,8 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
+ configuration.postEditAction(resolveSemanticElement(),
+ ((ILabelEditorDialog) finalDialog).getValue());
}
};
@@ -500,9 +498,10 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart
@Override
public void run() {
if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if (request.getExtendedData()
+ .get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character) request.getExtendedData()
+ .get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
} else {
performDirectEdit();
@@ -518,7 +517,6 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -554,8 +552,7 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart
* @generated
*/
protected void refreshUnderline() {
- FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
}
@@ -572,8 +569,7 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart
* @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
@@ -582,15 +578,11 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
- @Override
protected void refreshFont() {
- FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(),
+ (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -598,7 +590,6 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -606,7 +597,6 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
if (getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
@@ -622,7 +612,6 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
if (parserElements != null) {
for (int i = 0; i < parserElements.size(); i++) {
@@ -636,7 +625,6 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
if (accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@@ -659,7 +647,7 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* Returns the kind of associated editor for direct edition.
- *
+ *
* @return an <code>int</code> corresponding to the kind of direct editor, @see org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition
* @generated
*/
@@ -678,7 +666,7 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* Checks if an extended editor is present.
- *
+ *
* @return <code>true</code> if an extended editor is present.
* @generated
*/
@@ -691,7 +679,7 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -701,42 +689,43 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* Initializes the extended editor configuration
- *
* @generated
*/
protected void initExtendedEditorConfiguration() {
if (configuration == null) {
- final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
+ IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(),
+ this);
} else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement(), this);
+ configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE,
+ resolveSemanticElement(), this);
}
}
}
/**
* Updates the preference configuration
- *
* @generated
*/
protected void updateExtendedEditorConfiguration() {
String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
+ if (languagePreferred != null && !languagePreferred.equals("")
+ && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(),
+ this);
} else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
}
/**
- * Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
- * @generated
- */
+ * Performs the direct edit usually used by GMF editors.
+ * @param theRequest the direct edit request that starts the direct edit system
+ * @generated
+ */
protected void performDefaultDirectEditorEdit(final Request theRequest) {
// initialize the direct edit manager
try {
@@ -745,11 +734,13 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart
@Override
public void run() {
if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ if (theRequest.getExtendedData()
+ .get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character) theRequest.getExtendedData()
+ .get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ } else if ((theRequest instanceof DirectEditRequest)
+ && (getEditText().equals(getLabelText()))) {
DirectEditRequest editRequest = (DirectEditRequest) theRequest;
performDirectEdit(editRequest.getLocation());
} else {
@@ -766,7 +757,6 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
@@ -776,10 +766,10 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart
refreshUnderline();
} else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature)
+ || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature)
+ || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature)
+ || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
@@ -803,7 +793,6 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -812,7 +801,6 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
- @Override
public String getLabelRole() {
return "Stereotype";//$NON-NLS-1$
}
@@ -820,7 +808,6 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
- @Override
public String getIconPathRole() {
return "";//$NON-NLS-1$
}

Back to the top