Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src-gen/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeElementImportEditPart.java')
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src-gen/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeElementImportEditPart.java140
1 files changed, 54 insertions, 86 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src-gen/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeElementImportEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src-gen/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeElementImportEditPart.java
index e8a21e871c7..0afbfb3ba5c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src-gen/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeElementImportEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src-gen/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeElementImportEditPart.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.clazz.edit.parts;
@@ -82,8 +82,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class AppliedStereotypeElementImportEditPart extends PapyrusLabelEditPart
- implements ITextAwareEditPart, IControlParserForDirectEdit, ILabelRoleProvider {
+public class AppliedStereotypeElementImportEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit, ILabelRoleProvider {
/**
* @generated
@@ -123,14 +122,13 @@ public class AppliedStereotypeElementImportEditPart extends PapyrusLabelEditPart
* @generated
*/
protected IDirectEditorConfiguration configuration;
+
+
/**
* @generated
*/
static {
- registerSnapBackPosition(
- UMLVisualIDRegistry.getType(
- org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AppliedStereotypeElementImportEditPart.VISUAL_ID),
- new Point(0, 60));
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AppliedStereotypeElementImportEditPart.VISUAL_ID), new Point(0, 60));
}
/**
@@ -154,11 +152,11 @@ public class AppliedStereotypeElementImportEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
- @Override
public int getKeyPoint() {
return ConnectionLocator.MIDDLE;
}
+
/**
* @generated
*/
@@ -225,7 +223,6 @@ public class AppliedStereotypeElementImportEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -233,7 +230,6 @@ public class AppliedStereotypeElementImportEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -241,7 +237,6 @@ public class AppliedStereotypeElementImportEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -267,7 +262,8 @@ public class AppliedStereotypeElementImportEditPart 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) {
@@ -279,7 +275,6 @@ public class AppliedStereotypeElementImportEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
@@ -295,12 +290,12 @@ public class AppliedStereotypeElementImportEditPart 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());
}
@@ -314,7 +309,6 @@ public class AppliedStereotypeElementImportEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@@ -324,16 +318,12 @@ public class AppliedStereotypeElementImportEditPart 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(),
- AppliedStereotypeElementImportEditPart.this),
- (String) value));
+ setResult(parser.isValidEditString(ParserUtil.getParserAdapter(getParserElement(), AppliedStereotypeElementImportEditPart.this), (String) value));
}
});
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
@@ -351,7 +341,6 @@ public class AppliedStereotypeElementImportEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
if (getParserElement() == null || getParser() == null) {
return null;
@@ -362,7 +351,6 @@ public class AppliedStereotypeElementImportEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -370,7 +358,6 @@ public class AppliedStereotypeElementImportEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
- @Override
public IParser getParser() {
if (parser == null) {
parser = ParserUtil.getParser(UMLElementTypes.ElementImport_Edge, getParserElement(), this, VISUAL_ID);
@@ -433,7 +420,6 @@ public class AppliedStereotypeElementImportEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
final Request theRequest = request;
@@ -461,18 +447,13 @@ public class AppliedStereotypeElementImportEditPart 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;
}
@@ -484,8 +465,7 @@ public class AppliedStereotypeElementImportEditPart extends PapyrusLabelEditPart
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(),
- ((ILabelEditorDialog) finalDialog).getValue());
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
}
};
@@ -511,10 +491,9 @@ public class AppliedStereotypeElementImportEditPart 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();
@@ -530,7 +509,6 @@ public class AppliedStereotypeElementImportEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -566,7 +544,8 @@ public class AppliedStereotypeElementImportEditPart 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());
}
@@ -583,7 +562,8 @@ public class AppliedStereotypeElementImportEditPart 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());
}
@@ -592,12 +572,14 @@ public class AppliedStereotypeElementImportEditPart 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);
}
}
@@ -605,7 +587,6 @@ public class AppliedStereotypeElementImportEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -613,7 +594,6 @@ public class AppliedStereotypeElementImportEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
if (getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
@@ -629,7 +609,6 @@ public class AppliedStereotypeElementImportEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
if (parserElements != null) {
for (int i = 0; i < parserElements.size(); i++) {
@@ -643,7 +622,6 @@ public class AppliedStereotypeElementImportEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
if (accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@@ -666,7 +644,7 @@ public class AppliedStereotypeElementImportEditPart 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
*/
@@ -677,7 +655,7 @@ public class AppliedStereotypeElementImportEditPart extends PapyrusLabelEditPart
/**
* Checks if an extended editor is present.
- *
+ *
* @return <code>true</code> if an extended editor is present.
* @generated
*/
@@ -690,7 +668,7 @@ public class AppliedStereotypeElementImportEditPart extends PapyrusLabelEditPart
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -705,14 +683,11 @@ public class AppliedStereotypeElementImportEditPart extends PapyrusLabelEditPart
*/
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);
}
}
}
@@ -725,10 +700,8 @@ public class AppliedStereotypeElementImportEditPart extends PapyrusLabelEditPart
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;
}
@@ -749,13 +722,11 @@ public class AppliedStereotypeElementImportEditPart 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 {
@@ -769,10 +740,10 @@ public class AppliedStereotypeElementImportEditPart extends PapyrusLabelEditPart
}
}
+
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
@@ -782,10 +753,10 @@ public class AppliedStereotypeElementImportEditPart 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())) {
@@ -809,7 +780,6 @@ public class AppliedStereotypeElementImportEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -818,7 +788,6 @@ public class AppliedStereotypeElementImportEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
- @Override
public String getLabelRole() {
return "Stereotype";//$NON-NLS-1$
}
@@ -826,7 +795,6 @@ public class AppliedStereotypeElementImportEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
- @Override
public String getIconPathRole() {
return "platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Stereotype.gif";//$NON-NLS-1$
}

Back to the top