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/DeploymentSpecAsClassifierNameEditPart.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/DeploymentSpecAsClassifierNameEditPart.java138
1 files changed, 61 insertions, 77 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src-gen/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DeploymentSpecAsClassifierNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src-gen/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DeploymentSpecAsClassifierNameEditPart.java
index bab0bc318d6..b396c86376f 100644..100755
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src-gen/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DeploymentSpecAsClassifierNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src-gen/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DeploymentSpecAsClassifierNameEditPart.java
@@ -1,11 +1,11 @@
/**
* 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
*/
@@ -41,7 +41,6 @@ import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
import org.eclipse.gmf.runtime.notation.FontStyle;
import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.gmf.tooling.runtime.edit.policies.DefaultNodeLabelDragPolicy;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
import org.eclipse.jface.viewers.ICellEditorValidator;
@@ -61,6 +60,7 @@ import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditP
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.parsers.ParserUtil;
+import org.eclipse.papyrus.infra.gmfdiag.tooling.runtime.edit.policies.DefaultNodeLabelDragPolicy;
import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
@@ -109,14 +109,12 @@ public class DeploymentSpecAsClassifierNameEditPart extends PapyrusCompartmentEd
/**
* 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;
@@ -131,7 +129,6 @@ public class DeploymentSpecAsClassifierNameEditPart extends PapyrusCompartmentEd
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
@@ -205,7 +202,6 @@ public class DeploymentSpecAsClassifierNameEditPart extends PapyrusCompartmentEd
/**
* @generated
*/
- @Override
protected List<?> getModelChildren() {
return Collections.EMPTY_LIST;
}
@@ -213,7 +209,6 @@ public class DeploymentSpecAsClassifierNameEditPart extends PapyrusCompartmentEd
/**
* @generated
*/
- @Override
public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
@@ -221,7 +216,6 @@ public class DeploymentSpecAsClassifierNameEditPart extends PapyrusCompartmentEd
/**
* @generated
*/
- @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -247,8 +241,7 @@ public class DeploymentSpecAsClassifierNameEditPart extends PapyrusCompartmentEd
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) {
@@ -260,7 +253,6 @@ public class DeploymentSpecAsClassifierNameEditPart extends PapyrusCompartmentEd
/**
* @generated
*/
- @Override
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
@@ -276,13 +268,11 @@ public class DeploymentSpecAsClassifierNameEditPart extends PapyrusCompartmentEd
/**
* @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());
}
@@ -296,7 +286,6 @@ public class DeploymentSpecAsClassifierNameEditPart extends PapyrusCompartmentEd
/**
* @generated
*/
- @Override
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
@@ -306,12 +295,16 @@ public class DeploymentSpecAsClassifierNameEditPart extends PapyrusCompartmentEd
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(), DeploymentSpecAsClassifierNameEditPart.this), (String) value));
+ setResult(
+ parser.isValidEditString(
+ ParserUtil.getParserAdapter(getParserElement(),
+ DeploymentSpecAsClassifierNameEditPart.this),
+ (String) value));
}
});
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
@@ -329,7 +322,6 @@ public class DeploymentSpecAsClassifierNameEditPart extends PapyrusCompartmentEd
/**
* @generated
*/
- @Override
public IContentAssistProcessor getCompletionProcessor() {
if (getParserElement() == null || getParser() == null) {
return null;
@@ -340,7 +332,6 @@ public class DeploymentSpecAsClassifierNameEditPart extends PapyrusCompartmentEd
/**
* @generated
*/
- @Override
public ParserOptions getParserOptions() {
return ParserOptions.NONE;
}
@@ -348,10 +339,10 @@ public class DeploymentSpecAsClassifierNameEditPart extends PapyrusCompartmentEd
/**
* @generated
*/
- @Override
public IParser getParser() {
if (parser == null) {
- parser = ParserUtil.getParser(UMLElementTypes.DeploymentSpecification_Shape_CCN, getParserElement(), this, VISUAL_ID);
+ parser = ParserUtil.getParser(UMLElementTypes.DeploymentSpecification_Shape_CCN, getParserElement(), this,
+ VISUAL_ID);
}
return parser;
}
@@ -411,7 +402,6 @@ public class DeploymentSpecAsClassifierNameEditPart extends PapyrusCompartmentEd
/**
* @generated
*/
- @Override
protected void performDirectEditRequest(Request request) {
final Request theRequest = request;
@@ -439,13 +429,18 @@ public class DeploymentSpecAsClassifierNameEditPart extends PapyrusCompartmentEd
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;
}
@@ -457,7 +452,8 @@ public class DeploymentSpecAsClassifierNameEditPart extends PapyrusCompartmentEd
@Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
+ configuration.postEditAction(resolveSemanticElement(),
+ ((ILabelEditorDialog) finalDialog).getValue());
}
};
@@ -483,9 +479,10 @@ public class DeploymentSpecAsClassifierNameEditPart extends PapyrusCompartmentEd
@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();
@@ -501,7 +498,6 @@ public class DeploymentSpecAsClassifierNameEditPart extends PapyrusCompartmentEd
/**
* @generated
*/
- @Override
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -543,8 +539,7 @@ public class DeploymentSpecAsClassifierNameEditPart extends PapyrusCompartmentEd
* @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());
}
@@ -561,8 +556,7 @@ public class DeploymentSpecAsClassifierNameEditPart extends PapyrusCompartmentEd
* @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());
}
@@ -571,15 +565,11 @@ public class DeploymentSpecAsClassifierNameEditPart extends PapyrusCompartmentEd
/**
* @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);
}
}
@@ -587,7 +577,6 @@ public class DeploymentSpecAsClassifierNameEditPart extends PapyrusCompartmentEd
/**
* @generated
*/
- @Override
protected void setFontColor(Color color) {
getFigure().setForegroundColor(color);
}
@@ -595,7 +584,6 @@ public class DeploymentSpecAsClassifierNameEditPart extends PapyrusCompartmentEd
/**
* @generated
*/
- @Override
protected void addSemanticListeners() {
if (getParser() instanceof ISemanticParser) {
EObject element = resolveSemanticElement();
@@ -611,7 +599,6 @@ public class DeploymentSpecAsClassifierNameEditPart extends PapyrusCompartmentEd
/**
* @generated
*/
- @Override
protected void removeSemanticListeners() {
if (parserElements != null) {
for (int i = 0; i < parserElements.size(); i++) {
@@ -625,7 +612,6 @@ public class DeploymentSpecAsClassifierNameEditPart extends PapyrusCompartmentEd
/**
* @generated
*/
- @Override
protected AccessibleEditPart getAccessibleEditPart() {
if (accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@@ -648,7 +634,7 @@ public class DeploymentSpecAsClassifierNameEditPart extends PapyrusCompartmentEd
/**
* 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
*/
@@ -667,7 +653,7 @@ public class DeploymentSpecAsClassifierNameEditPart extends PapyrusCompartmentEd
/**
* Checks if an extended editor is present.
- *
+ *
* @return <code>true</code> if an extended editor is present.
* @generated
*/
@@ -680,7 +666,7 @@ public class DeploymentSpecAsClassifierNameEditPart extends PapyrusCompartmentEd
/**
* Checks if a default direct edition is available
- *
+ *
* @return <code>true</code> if a default direct edition is available
* @generated
*/
@@ -690,42 +676,43 @@ public class DeploymentSpecAsClassifierNameEditPart extends PapyrusCompartmentEd
/**
* 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 {
@@ -734,11 +721,13 @@ public class DeploymentSpecAsClassifierNameEditPart extends PapyrusCompartmentEd
@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 {
@@ -755,7 +744,6 @@ public class DeploymentSpecAsClassifierNameEditPart extends PapyrusCompartmentEd
/**
* @generated
*/
- @Override
protected void addNotationalListeners() {
super.addNotationalListeners();
addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
@@ -764,7 +752,6 @@ public class DeploymentSpecAsClassifierNameEditPart extends PapyrusCompartmentEd
/**
* @generated
*/
- @Override
protected void removeNotationalListeners() {
super.removeNotationalListeners();
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
@@ -773,7 +760,6 @@ public class DeploymentSpecAsClassifierNameEditPart extends PapyrusCompartmentEd
/**
* @generated
*/
- @Override
protected void handleNotificationEvent(Notification event) {
refreshLabel();
Object feature = event.getFeature();
@@ -784,10 +770,10 @@ public class DeploymentSpecAsClassifierNameEditPart extends PapyrusCompartmentEd
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())) {
@@ -810,7 +796,6 @@ public class DeploymentSpecAsClassifierNameEditPart extends PapyrusCompartmentEd
/**
* @generated
*/
- @Override
protected IFigure createFigure() {
// Parent should assign one using setLabel() method
return null;
@@ -824,7 +809,6 @@ public class DeploymentSpecAsClassifierNameEditPart extends PapyrusCompartmentEd
/**
* @generated
*/
- @Override
public void activate() {
super.activate();
addOwnerElementListeners();
@@ -841,7 +825,6 @@ public class DeploymentSpecAsClassifierNameEditPart extends PapyrusCompartmentEd
/**
* @generated
*/
- @Override
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
@@ -855,4 +838,5 @@ public class DeploymentSpecAsClassifierNameEditPart extends PapyrusCompartmentEd
removeListenerFilter(ADD_PARENT_MODEL);
}
+
}

Back to the top