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/ArtifactFloatingLabelEditPartCN.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/ArtifactFloatingLabelEditPartCN.java145
1 files changed, 66 insertions, 79 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src-gen/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ArtifactFloatingLabelEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src-gen/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ArtifactFloatingLabelEditPartCN.java
index 361081bdab0..340137a5d44 100644..100755
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src-gen/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ArtifactFloatingLabelEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src-gen/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ArtifactFloatingLabelEditPartCN.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;
@@ -113,22 +113,23 @@ public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* 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.ArtifactFloatingLabelEditPartCN.VISUAL_ID), new Point(0, 0));
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(
+ org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactFloatingLabelEditPartCN.VISUAL_ID),
+ new Point(0, 0));
}
/**
@@ -141,7 +142,6 @@ public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
@@ -152,7 +152,6 @@ public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IBorderItemLocator getBorderItemLocator() {
IFigure parentFigure = getFigure().getParent();
if (parentFigure != null && parentFigure.getLayoutManager() != null) {
@@ -165,7 +164,6 @@ public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public void refreshBounds() {
int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
@@ -240,7 +238,6 @@ public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -248,7 +245,6 @@ public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -281,8 +277,7 @@ public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
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) {
@@ -294,7 +289,6 @@ public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
@@ -310,13 +304,11 @@ public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @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());
}
@@ -330,7 +322,6 @@ public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@@ -340,12 +331,14 @@ public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
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(), ArtifactFloatingLabelEditPartCN.this), (String) value));
+ setResult(
+ parser.isValidEditString(ParserUtil.getParserAdapter(getParserElement(),
+ ArtifactFloatingLabelEditPartCN.this), (String) value));
}
});
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
@@ -363,7 +356,6 @@ public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
if (getParserElement() == null || getParser() == null) {
return null;
@@ -374,7 +366,6 @@ public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -382,7 +373,6 @@ public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
public IParser getParser() {
if (parser == null) {
parser = ParserUtil.getParser(UMLElementTypes.Artifact_Shape_CCN, getParserElement(), this, VISUAL_ID);
@@ -445,7 +435,6 @@ public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
final Request theRequest = request;
@@ -473,13 +462,18 @@ public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
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;
}
@@ -491,7 +485,8 @@ public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
+ configuration.postEditAction(resolveSemanticElement(),
+ ((ILabelEditorDialog) finalDialog).getValue());
}
};
@@ -517,9 +512,10 @@ public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
@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();
@@ -535,7 +531,6 @@ public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -571,8 +566,7 @@ public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
* @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());
}
@@ -589,8 +583,7 @@ public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
* @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());
}
@@ -599,15 +592,11 @@ public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @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);
}
}
@@ -615,7 +604,6 @@ public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -623,7 +611,6 @@ public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
if (getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
@@ -639,7 +626,6 @@ public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
if (parserElements != null) {
for (int i = 0; i < parserElements.size(); i++) {
@@ -653,7 +639,6 @@ public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
if (accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@@ -676,7 +661,7 @@ public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* 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
*/
@@ -695,7 +680,7 @@ public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* Checks if an extended editor is present.
- *
+ *
* @return <code>true</code> if an extended editor is present.
* @generated
*/
@@ -708,7 +693,7 @@ public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -718,42 +703,43 @@ public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* 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 {
@@ -762,11 +748,13 @@ public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
@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 {
@@ -783,7 +771,6 @@ public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
Object feature = event.getFeature();
if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
@@ -793,10 +780,10 @@ public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
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())) {
@@ -819,7 +806,6 @@ public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
@@ -832,4 +818,5 @@ public class ArtifactFloatingLabelEditPartCN extends FloatingLabelEditPart
protected IFigure createFigurePrim() {
return new PapyrusWrappingLabel();
}
+
}

Back to the top