diff options
author | Vincent Lorenzo | 2017-08-11 14:28:26 +0000 |
---|---|---|
committer | vincent lorenzo | 2017-08-29 07:21:33 +0000 |
commit | e59272b334aecb676b10a62f42981ae695fd1cb6 (patch) | |
tree | 84f18727636a7d66f43eeb57e1c8017912e28ae6 | |
parent | 971da24c58429f1c624e02a2bc5854197a5b9828 (diff) | |
download | org.eclipse.papyrus-e59272b334aecb676b10a62f42981ae695fd1cb6.tar.gz org.eclipse.papyrus-e59272b334aecb676b10a62f42981ae695fd1cb6.tar.xz org.eclipse.papyrus-e59272b334aecb676b10a62f42981ae695fd1cb6.zip |
Bug 520818: [CommunicationDiagram] CommunicationDiagram must be regenerated to get code generation changes from bug 520733
Bug 520882: [DiaGen] contribution to "org.eclipse.gmf.runtime.emf.type.core.elementTypeBindings" must be removed.
- remove contribution in the plugin.xml, as expected by the bug 520882
Signed-off-by: Vincent Lorenzo <vincent.lorenzo@cea.fr>
53 files changed, 1027 insertions, 1148 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/plugin.xml b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/plugin.xml index 4842c0b8c07..0a75673c088 100755 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/plugin.xml +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/plugin.xml @@ -58,7 +58,6 @@ <super type="org.eclipse.gmf.runtime.common.ui.services.marker"/>
<persistent value="true"/>
</extension>
-
<extension point="org.eclipse.ui.preferencePages" id="prefpages">
<?gmfgen generated="true"?>
@@ -82,64 +81,54 @@ </extension>
<extension point="org.eclipse.gmf.runtime.diagram.core.viewProviders" id="view-provider">
- <?gmfgen generated="true"?>
- <viewProvider class="org.eclipse.papyrus.uml.diagram.communication.providers.UMLViewProvider">
- <Priority name="Lowest"/>
- <context viewClass="org.eclipse.gmf.runtime.notation.Diagram" semanticHints="PapyrusUMLCommunicationDiagram"/>
- <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="Interaction_Shape,Lifeline_Shape,Constraint_Shape,Comment_Shape,TimeObservation_Shape,DurationObservation_Shape"/>
+ <?gmfgen generated="true"?>
+ <viewProvider class="org.eclipse.papyrus.uml.diagram.communication.providers.UMLViewProvider">
+ <Priority name="Lowest"/>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Diagram" semanticHints="PapyrusUMLCommunicationDiagram"/>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="Interaction_Shape,Lifeline_Shape,Constraint_Shape,Comment_Shape,TimeObservation_Shape,DurationObservation_Shape"/>
<context viewClass="org.eclipse.gmf.runtime.notation.Edge" semanticHints="Path_Edge,Comment_AnnotatedElementEdge,Constraint_ConstrainedElementEdge,DurationObservation_EventEdge,TimeObservation_EventEdge"/>
- </viewProvider>
- </extension>
+ </viewProvider>
+ </extension>
<extension point="org.eclipse.gmf.runtime.diagram.ui.editpartProviders" id="ep-provider">
- <?gmfgen generated="true"?>
- <editpartProvider class="org.eclipse.papyrus.uml.diagram.communication.providers.UMLEditPartProvider">
- <Priority name="Lowest"/>
- <object class="org.eclipse.gmf.runtime.notation.Diagram" id="generated-diagram">
- <method name="getType()" value="PapyrusUMLCommunicationDiagram"/>
- </object>
- <object class="org.eclipse.gmf.runtime.notation.Node" id="generated-nodes">
- <method name="getType()" value="Interaction_Shape,Lifeline_Shape,Constraint_Shape,Comment_Shape,TimeObservation_Shape,DurationObservation_Shape"/>
- </object>
- <object class="org.eclipse.gmf.runtime.notation.Edge" id="generated-links">
- <method name="getType()" value="Path_Edge,Comment_AnnotatedElementEdge,Constraint_ConstrainedElementEdge,DurationObservation_EventEdge,TimeObservation_EventEdge"/>
- </object>
- <object class="org.eclipse.gmf.runtime.notation.Node" id="generated-labels">
- <method name="getType()" value="Interaction_NameLabel,Interaction_FloatingNameLabel,Lifeline_NameLabel,Lifeline_FloatingNameLabel,Constraint_NameLabel,Constraint_BodyLabel,Comment_BodyLabel,TimeObservation_NameLabel,TimeObservation_StereotypeLabel,DurationObservation_NameLabel,DurationObservation_StereotypeLabel"/>
- </object>
- <object class="org.eclipse.gmf.runtime.notation.Node" id="generated-compartments">
- <method name="getType()" value="Interaction_SubfragmentCompartment"/>
- </object>
- <context views="generated-diagram,generated-nodes,generated-links,generated-labels,generated-compartments"/>
- </editpartProvider>
- </extension>
+ <?gmfgen generated="true"?>
+ <editpartProvider class="org.eclipse.papyrus.uml.diagram.communication.providers.UMLEditPartProvider">
+ <Priority name="Lowest"/>
+ <object class="org.eclipse.gmf.runtime.notation.Diagram" id="generated-diagram">
+ <method name="getType()" value="PapyrusUMLCommunicationDiagram"/>
+ </object>
+ <object class="org.eclipse.gmf.runtime.notation.Node" id="generated-nodes">
+ <method name="getType()" value="Interaction_Shape,Lifeline_Shape,Constraint_Shape,Comment_Shape,TimeObservation_Shape,DurationObservation_Shape"/>
+ </object>
+ <object class="org.eclipse.gmf.runtime.notation.Edge" id="generated-links">
+ <method name="getType()" value="Path_Edge,Comment_AnnotatedElementEdge,Constraint_ConstrainedElementEdge,DurationObservation_EventEdge,TimeObservation_EventEdge"/>
+ </object>
+ <object class="org.eclipse.gmf.runtime.notation.Node" id="generated-labels">
+ <method name="getType()" value="Interaction_NameLabel,Interaction_FloatingNameLabel,Lifeline_NameLabel,Lifeline_FloatingNameLabel,Constraint_NameLabel,Constraint_BodyLabel,Comment_BodyLabel,TimeObservation_NameLabel,TimeObservation_StereotypeLabel,DurationObservation_NameLabel,DurationObservation_StereotypeLabel"/>
+ </object>
+ <object class="org.eclipse.gmf.runtime.notation.Node" id="generated-compartments">
+ <method name="getType()" value="Interaction_SubfragmentCompartment"/>
+ </object>
+ <context views="generated-diagram,generated-nodes,generated-links,generated-labels,generated-compartments"/>
+ </editpartProvider>
+ </extension>
<extension point="org.eclipse.gmf.runtime.common.ui.services.iconProviders" id="icon-provider">
- <?gmfgen generated="true"?>
- <IconProvider class="org.eclipse.papyrus.uml.diagram.communication.providers.UMLIconProvider">
- <Priority name="Lowest"/>
- </IconProvider>
- </extension>
+ <?gmfgen generated="true"?>
+ <IconProvider class="org.eclipse.papyrus.uml.diagram.communication.providers.UMLIconProvider">
+ <Priority name="Lowest"/>
+ </IconProvider>
+ </extension>
<extension point="org.eclipse.gmf.runtime.common.ui.services.parserProviders" id="parser-provider">
- <?gmfgen generated="true"?>
- <ParserProvider class="org.eclipse.papyrus.uml.diagram.communication.providers.UMLParserProvider">
- <Priority name="Lowest"/>
- </ParserProvider>
- </extension>
- - <extension point="org.eclipse.gmf.runtime.emf.type.core.elementTypeBindings" id="element-types-bindings">
- <?gmfgen generated="true"?>
- <clientContext id="org.eclipse.papyrus.uml.diagram.communication.TypeContext">
- <enablement>
- <test
- property="org.eclipse.gmf.runtime.emf.core.editingDomain"
- value="org.eclipse.papyrus.uml.diagram.communication.EditingDomain"/>
- </enablement>
- </clientContext>
- </extension>
+ <?gmfgen generated="true"?>
+ <ParserProvider class="org.eclipse.papyrus.uml.diagram.communication.providers.UMLParserProvider">
+ <Priority name="Lowest"/>
+ </ParserProvider>
+ </extension>
+ <extension point="org.eclipse.core.expressions.propertyTesters" id="navigator-proptest.isURIEditorInput">
<?gmfgen generated="true"?>
@@ -383,12 +372,12 @@ </diagramReconciler> </extension> <extension point="org.eclipse.papyrus.infra.gmfdiag.common.visualTypeProviders">
- <?gmfgen generated="true"?>
- <visualTypeProvider
- class="org.eclipse.papyrus.uml.diagram.communication.providers.UMLVisualTypeProvider"
- diagramType="PapyrusUMLCommunicationDiagram">
- </visualTypeProvider>
- </extension>
+ <?gmfgen generated="true"?>
+ <visualTypeProvider
+ class="org.eclipse.papyrus.uml.diagram.communication.providers.UMLVisualTypeProvider"
+ diagramType="PapyrusUMLCommunicationDiagram">
+ </visualTypeProvider>
+ </extension>
</plugin> diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/AppliedStereotypeMessageEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/AppliedStereotypeMessageEditPart.java index 719c13cb4a3..68f816b304e 100755 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/AppliedStereotypeMessageEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/AppliedStereotypeMessageEditPart.java @@ -125,9 +125,7 @@ public class AppliedStereotypeMessageEditPart extends PapyrusLabelEditPart * @generated
*/
static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(
- org.eclipse.papyrus.uml.diagram.communication.edit.parts.AppliedStereotypeMessageEditPart.VISUAL_ID),
- new Point(1, -53));
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.communication.edit.parts.AppliedStereotypeMessageEditPart.VISUAL_ID), new Point(1, -53));
}
/**
@@ -260,7 +258,8 @@ public class AppliedStereotypeMessageEditPart 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) {
@@ -291,7 +290,8 @@ public class AppliedStereotypeMessageEditPart extends PapyrusLabelEditPart 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,16 +314,12 @@ public class AppliedStereotypeMessageEditPart 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(),
- AppliedStereotypeMessageEditPart.this),
- (String) value));
+ setResult(parser.isValidEditString(ParserUtil.getParserAdapter(getParserElement(), AppliedStereotypeMessageEditPart.this), (String) value));
}
});
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
@@ -447,18 +443,13 @@ public class AppliedStereotypeMessageEditPart 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;
}
@@ -470,8 +461,7 @@ public class AppliedStereotypeMessageEditPart extends PapyrusLabelEditPart @Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(),
- ((ILabelEditorDialog) finalDialog).getValue());
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
}
};
@@ -497,10 +487,9 @@ public class AppliedStereotypeMessageEditPart 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();
@@ -534,8 +523,14 @@ public class AppliedStereotypeMessageEditPart extends PapyrusLabelEditPart maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
if (maskLabelPolicy == null) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ } else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
@@ -551,7 +546,8 @@ public class AppliedStereotypeMessageEditPart 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());
}
@@ -568,7 +564,8 @@ public class AppliedStereotypeMessageEditPart 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());
}
@@ -578,10 +575,13 @@ public class AppliedStereotypeMessageEditPart extends PapyrusLabelEditPart * @generated
*/
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);
}
}
@@ -692,14 +692,11 @@ public class AppliedStereotypeMessageEditPart 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);
}
}
}
@@ -711,10 +708,8 @@ public class AppliedStereotypeMessageEditPart 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;
}
@@ -733,13 +728,11 @@ public class AppliedStereotypeMessageEditPart 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 {
@@ -765,10 +758,10 @@ public class AppliedStereotypeMessageEditPart 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())) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/CommentBodyEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/CommentBodyEditPartCN.java index c7c82f20331..840f187a768 100755 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/CommentBodyEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/CommentBodyEditPartCN.java @@ -241,7 +241,8 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart 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) {
@@ -272,7 +273,8 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart 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());
}
@@ -295,13 +297,12 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart 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(), CommentBodyEditPartCN.this), (String) value));
+ setResult(parser.isValidEditString(ParserUtil.getParserAdapter(getParserElement(), CommentBodyEditPartCN.this), (String) value));
}
});
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
@@ -425,18 +426,13 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart 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;
}
@@ -448,8 +444,7 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart @Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(),
- ((ILabelEditorDialog) finalDialog).getValue());
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
}
};
@@ -475,10 +470,9 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart @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 +529,8 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart * @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());
}
@@ -552,7 +547,8 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart * @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());
}
@@ -562,10 +558,13 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart * @generated
*/
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);
}
}
@@ -676,14 +675,11 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart */
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);
}
}
}
@@ -695,10 +691,8 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart 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;
}
@@ -717,13 +711,11 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart @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,10 +758,10 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart 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())) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/CommentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/CommentEditPartCN.java index d8f19d9214f..65b7f115839 100755 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/CommentEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/CommentEditPartCN.java @@ -76,9 +76,9 @@ public class CommentEditPartCN extends AbstractCommentEditPart { installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY,
- new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ installEditPolicy(EditPolicyRoles.OPEN_ROLE,
+ new OpenDiagramEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusReflowableShapeEditPolicy());
// XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
// removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
@@ -145,6 +145,7 @@ public class CommentEditPartCN extends AbstractCommentEditPart { return true;
}
+
return false;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/ConstraintBodyEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/ConstraintBodyEditPartCN.java index e0a83b17bad..3cac77b5349 100755 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/ConstraintBodyEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/ConstraintBodyEditPartCN.java @@ -241,7 +241,8 @@ public class ConstraintBodyEditPartCN extends PapyrusCompartmentEditPart 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) {
@@ -272,7 +273,8 @@ public class ConstraintBodyEditPartCN extends PapyrusCompartmentEditPart 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());
}
@@ -295,13 +297,12 @@ public class ConstraintBodyEditPartCN extends PapyrusCompartmentEditPart 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(), ConstraintBodyEditPartCN.this), (String) value));
+ setResult(parser.isValidEditString(ParserUtil.getParserAdapter(getParserElement(), ConstraintBodyEditPartCN.this), (String) value));
}
});
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
@@ -425,18 +426,13 @@ public class ConstraintBodyEditPartCN extends PapyrusCompartmentEditPart 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;
}
@@ -448,8 +444,7 @@ public class ConstraintBodyEditPartCN extends PapyrusCompartmentEditPart @Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(),
- ((ILabelEditorDialog) finalDialog).getValue());
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
}
};
@@ -475,10 +470,9 @@ public class ConstraintBodyEditPartCN extends PapyrusCompartmentEditPart @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 +529,8 @@ public class ConstraintBodyEditPartCN extends PapyrusCompartmentEditPart * @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());
}
@@ -552,7 +547,8 @@ public class ConstraintBodyEditPartCN extends PapyrusCompartmentEditPart * @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());
}
@@ -562,10 +558,13 @@ public class ConstraintBodyEditPartCN extends PapyrusCompartmentEditPart * @generated
*/
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);
}
}
@@ -676,14 +675,11 @@ public class ConstraintBodyEditPartCN extends PapyrusCompartmentEditPart */
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);
}
}
}
@@ -695,10 +691,8 @@ public class ConstraintBodyEditPartCN extends PapyrusCompartmentEditPart 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;
}
@@ -717,13 +711,11 @@ public class ConstraintBodyEditPartCN extends PapyrusCompartmentEditPart @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,10 +758,10 @@ public class ConstraintBodyEditPartCN extends PapyrusCompartmentEditPart 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())) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/ConstraintEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/ConstraintEditPartCN.java index 54460a3e8a1..e073d658cc3 100755 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/ConstraintEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/ConstraintEditPartCN.java @@ -141,6 +141,7 @@ public class ConstraintEditPartCN extends AbstractConstraintEditPart { return true;
}
+
return false;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/ConstraintNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/ConstraintNameEditPartCN.java index a5dd8dbe15f..a4a6e206de0 100755 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/ConstraintNameEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/ConstraintNameEditPartCN.java @@ -245,7 +245,8 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart 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) {
@@ -276,7 +277,8 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart 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());
}
@@ -299,13 +301,12 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart 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(), ConstraintNameEditPartCN.this), (String) value));
+ setResult(parser.isValidEditString(ParserUtil.getParserAdapter(getParserElement(), ConstraintNameEditPartCN.this), (String) value));
}
});
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
@@ -429,18 +430,13 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart 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;
}
@@ -452,8 +448,7 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart @Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(),
- ((ILabelEditorDialog) finalDialog).getValue());
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
}
};
@@ -479,10 +474,9 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart @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();
@@ -539,7 +533,8 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart * @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());
}
@@ -556,7 +551,8 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart * @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());
}
@@ -566,10 +562,13 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart * @generated
*/
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);
}
}
@@ -680,14 +679,11 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart */
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);
}
}
}
@@ -699,10 +695,8 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart 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;
}
@@ -721,13 +715,11 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart @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 {
@@ -770,10 +762,10 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart 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())) {
@@ -790,8 +782,7 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart }
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON
- .equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/DurationObservationEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/DurationObservationEditPartCN.java index 0f52f94a100..5d485e5db9d 100755 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/DurationObservationEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/DurationObservationEditPartCN.java @@ -87,8 +87,7 @@ public class DurationObservationEditPartCN extends RoundedCompartmentEditPart { installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY,
- new AppliedStereotypeIconlDisplayEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeIconlDisplayEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
// XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
@@ -152,7 +151,8 @@ public class DurationObservationEditPartCN extends RoundedCompartmentEditPart { if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) {
Object notifier = event.getNotifier();
List<?> modelChildren = ((View) getModel()).getChildren();
- if (false == notifier instanceof Edge && false == notifier instanceof BasicCompartment) {
+ if (false == notifier instanceof Edge
+ && false == notifier instanceof BasicCompartment) {
if (modelChildren.contains(event.getNotifier())) {
return;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/DurationObservationLabelEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/DurationObservationLabelEditPartCN.java index 091d8735f7f..c3e015f838b 100755 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/DurationObservationLabelEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/DurationObservationLabelEditPartCN.java @@ -127,9 +127,7 @@ public class DurationObservationLabelEditPartCN extends FloatingLabelEditPart * @generated
*/
static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(
- org.eclipse.papyrus.uml.diagram.communication.edit.parts.DurationObservationLabelEditPartCN.VISUAL_ID),
- new Point(0, 0));
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.communication.edit.parts.DurationObservationLabelEditPartCN.VISUAL_ID), new Point(0, 0));
}
/**
@@ -277,7 +275,8 @@ public class DurationObservationLabelEditPartCN 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) {
@@ -308,7 +307,8 @@ public class DurationObservationLabelEditPartCN extends FloatingLabelEditPart 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());
}
@@ -331,16 +331,12 @@ public class DurationObservationLabelEditPartCN 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(),
- DurationObservationLabelEditPartCN.this),
- (String) value));
+ setResult(parser.isValidEditString(ParserUtil.getParserAdapter(getParserElement(), DurationObservationLabelEditPartCN.this), (String) value));
}
});
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
@@ -377,8 +373,7 @@ public class DurationObservationLabelEditPartCN extends FloatingLabelEditPart */
public IParser getParser() {
if (parser == null) {
- parser = ParserUtil.getParser(UMLElementTypes.DurationObservation_Shape, getParserElement(), this,
- VISUAL_ID);
+ parser = ParserUtil.getParser(UMLElementTypes.DurationObservation_Shape, getParserElement(), this, VISUAL_ID);
}
return parser;
}
@@ -465,18 +460,13 @@ public class DurationObservationLabelEditPartCN 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;
}
@@ -488,8 +478,7 @@ public class DurationObservationLabelEditPartCN extends FloatingLabelEditPart @Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(),
- ((ILabelEditorDialog) finalDialog).getValue());
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
}
};
@@ -515,10 +504,9 @@ public class DurationObservationLabelEditPartCN 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();
@@ -552,8 +540,14 @@ public class DurationObservationLabelEditPartCN extends FloatingLabelEditPart maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
if (maskLabelPolicy == null) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ } else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
@@ -569,7 +563,8 @@ public class DurationObservationLabelEditPartCN 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());
}
@@ -586,7 +581,8 @@ public class DurationObservationLabelEditPartCN 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());
}
@@ -596,10 +592,13 @@ public class DurationObservationLabelEditPartCN extends FloatingLabelEditPart * @generated
*/
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);
}
}
@@ -710,14 +709,11 @@ public class DurationObservationLabelEditPartCN extends FloatingLabelEditPart */
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);
}
}
}
@@ -729,10 +725,8 @@ public class DurationObservationLabelEditPartCN extends FloatingLabelEditPart 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;
}
@@ -751,13 +745,11 @@ public class DurationObservationLabelEditPartCN 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,10 +775,10 @@ public class DurationObservationLabelEditPartCN 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())) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/DurationObservationStereotypeLabelEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/DurationObservationStereotypeLabelEditPartCN.java index 049421e7831..c38f9a04189 100755 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/DurationObservationStereotypeLabelEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/DurationObservationStereotypeLabelEditPartCN.java @@ -129,9 +129,7 @@ public class DurationObservationStereotypeLabelEditPartCN extends PapyrusLabelEd * @generated
*/
static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(
- org.eclipse.papyrus.uml.diagram.communication.edit.parts.DurationObservationStereotypeLabelEditPartCN.VISUAL_ID),
- new Point(0, 0));
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.communication.edit.parts.DurationObservationStereotypeLabelEditPartCN.VISUAL_ID), new Point(0, 0));
}
/**
@@ -148,8 +146,7 @@ public class DurationObservationStereotypeLabelEditPartCN extends PapyrusLabelEd super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY,
- new AppliedStereotypeExternalNodeEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeExternalNodeEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
}
@@ -281,7 +278,8 @@ public class DurationObservationStereotypeLabelEditPartCN extends PapyrusLabelEd 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) {
@@ -312,7 +310,8 @@ public class DurationObservationStereotypeLabelEditPartCN extends PapyrusLabelEd 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());
}
@@ -335,15 +334,12 @@ public class DurationObservationStereotypeLabelEditPartCN extends PapyrusLabelEd 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(),
- DurationObservationStereotypeLabelEditPartCN.this),
- (String) value));
+ setResult(parser.isValidEditString(ParserUtil.getParserAdapter(getParserElement(), DurationObservationStereotypeLabelEditPartCN.this), (String) value));
}
});
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
@@ -380,8 +376,7 @@ public class DurationObservationStereotypeLabelEditPartCN extends PapyrusLabelEd */
public IParser getParser() {
if (parser == null) {
- parser = ParserUtil.getParser(UMLElementTypes.DurationObservation_Shape, getParserElement(), this,
- VISUAL_ID);
+ parser = ParserUtil.getParser(UMLElementTypes.DurationObservation_Shape, getParserElement(), this, VISUAL_ID);
}
return parser;
}
@@ -468,18 +463,13 @@ public class DurationObservationStereotypeLabelEditPartCN extends PapyrusLabelEd 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,8 +481,7 @@ public class DurationObservationStereotypeLabelEditPartCN extends PapyrusLabelEd @Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(),
- ((ILabelEditorDialog) finalDialog).getValue());
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
}
};
@@ -518,10 +507,9 @@ public class DurationObservationStereotypeLabelEditPartCN extends PapyrusLabelEd @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();
@@ -555,8 +543,14 @@ public class DurationObservationStereotypeLabelEditPartCN extends PapyrusLabelEd maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
if (maskLabelPolicy == null) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ } else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
@@ -572,7 +566,8 @@ public class DurationObservationStereotypeLabelEditPartCN extends PapyrusLabelEd * @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,7 +584,8 @@ public class DurationObservationStereotypeLabelEditPartCN extends PapyrusLabelEd * @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,10 +595,13 @@ public class DurationObservationStereotypeLabelEditPartCN extends PapyrusLabelEd * @generated
*/
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);
}
}
@@ -713,14 +712,11 @@ public class DurationObservationStereotypeLabelEditPartCN extends PapyrusLabelEd */
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);
}
}
}
@@ -732,10 +728,8 @@ public class DurationObservationStereotypeLabelEditPartCN extends PapyrusLabelEd 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;
}
@@ -754,13 +748,11 @@ public class DurationObservationStereotypeLabelEditPartCN extends PapyrusLabelEd @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 {
@@ -786,10 +778,10 @@ public class DurationObservationStereotypeLabelEditPartCN extends PapyrusLabelEd 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())) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/InteractionCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/InteractionCompartmentEditPart.java index 3623ec6d088..20496ba9a27 100755 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/InteractionCompartmentEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/InteractionCompartmentEditPart.java @@ -128,7 +128,10 @@ public class InteractionCompartmentEditPart extends LinkLFShapeCompartmentEditPa int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
Point loc = new Point(x, y);
- ((GraphicalEditPart) getParent()).setLayoutConstraint(this, getFigure(), new Rectangle(loc, size));
+ ((GraphicalEditPart) getParent()).setLayoutConstraint(
+ this,
+ getFigure(),
+ new Rectangle(loc, size));
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/InteractionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/InteractionEditPart.java index d2cb032ae64..6ced10db75e 100755 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/InteractionEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/InteractionEditPart.java @@ -92,10 +92,8 @@ public class InteractionEditPart extends RoundedCompartmentEditPart { installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CommunicationGraphicalNodeEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY,
- new AppliedStereotypeNodeLabelDisplayEditPolicy());
- installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY,
- new ShowHideCompartmentEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
// XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
// removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
@@ -157,7 +155,8 @@ public class InteractionEditPart extends RoundedCompartmentEditPart { if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) {
Object notifier = event.getNotifier();
List<?> modelChildren = ((View) getModel()).getChildren();
- if (false == notifier instanceof Edge && false == notifier instanceof BasicCompartment) {
+ if (false == notifier instanceof Edge
+ && false == notifier instanceof BasicCompartment) {
if (modelChildren.contains(event.getNotifier())) {
return;
}
@@ -191,6 +190,7 @@ public class InteractionEditPart extends RoundedCompartmentEditPart { return true;
}
+
if (childEditPart instanceof InteractionCompartmentEditPart) {
IFigure pane = getPrimaryShape().getCompartmentFigure();
setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/InteractionFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/InteractionFloatingLabelEditPart.java index e2cbe925755..8994b37fe20 100755 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/InteractionFloatingLabelEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/InteractionFloatingLabelEditPart.java @@ -127,9 +127,7 @@ public class InteractionFloatingLabelEditPart extends FloatingLabelEditPart * @generated
*/
static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(
- org.eclipse.papyrus.uml.diagram.communication.edit.parts.InteractionFloatingLabelEditPart.VISUAL_ID),
- new Point(0, 0));
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.communication.edit.parts.InteractionFloatingLabelEditPart.VISUAL_ID), new Point(0, 0));
}
/**
@@ -277,7 +275,8 @@ public class InteractionFloatingLabelEditPart 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) {
@@ -308,7 +307,8 @@ public class InteractionFloatingLabelEditPart extends FloatingLabelEditPart 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());
}
@@ -331,16 +331,12 @@ public class InteractionFloatingLabelEditPart 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(),
- InteractionFloatingLabelEditPart.this),
- (String) value));
+ setResult(parser.isValidEditString(ParserUtil.getParserAdapter(getParserElement(), InteractionFloatingLabelEditPart.this), (String) value));
}
});
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
@@ -464,18 +460,13 @@ public class InteractionFloatingLabelEditPart 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;
}
@@ -487,8 +478,7 @@ public class InteractionFloatingLabelEditPart extends FloatingLabelEditPart @Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(),
- ((ILabelEditorDialog) finalDialog).getValue());
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
}
};
@@ -514,10 +504,9 @@ public class InteractionFloatingLabelEditPart 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();
@@ -551,8 +540,14 @@ public class InteractionFloatingLabelEditPart extends FloatingLabelEditPart maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
if (maskLabelPolicy == null) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ } else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
@@ -568,7 +563,8 @@ public class InteractionFloatingLabelEditPart 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());
}
@@ -585,7 +581,8 @@ public class InteractionFloatingLabelEditPart 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());
}
@@ -595,10 +592,13 @@ public class InteractionFloatingLabelEditPart extends FloatingLabelEditPart * @generated
*/
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);
}
}
@@ -709,14 +709,11 @@ public class InteractionFloatingLabelEditPart extends FloatingLabelEditPart */
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);
}
}
}
@@ -728,10 +725,8 @@ public class InteractionFloatingLabelEditPart extends FloatingLabelEditPart 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;
}
@@ -750,13 +745,11 @@ public class InteractionFloatingLabelEditPart 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 {
@@ -782,10 +775,10 @@ public class InteractionFloatingLabelEditPart 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())) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/InteractionNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/InteractionNameEditPart.java index 743c9927e40..74b31957639 100755 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/InteractionNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/InteractionNameEditPart.java @@ -245,7 +245,8 @@ public class InteractionNameEditPart extends PapyrusCompartmentEditPart 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) {
@@ -276,7 +277,8 @@ public class InteractionNameEditPart extends PapyrusCompartmentEditPart 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());
}
@@ -299,13 +301,12 @@ public class InteractionNameEditPart extends PapyrusCompartmentEditPart 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(), InteractionNameEditPart.this), (String) value));
+ setResult(parser.isValidEditString(ParserUtil.getParserAdapter(getParserElement(), InteractionNameEditPart.this), (String) value));
}
});
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
@@ -429,18 +430,13 @@ public class InteractionNameEditPart extends PapyrusCompartmentEditPart 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;
}
@@ -452,8 +448,7 @@ public class InteractionNameEditPart extends PapyrusCompartmentEditPart @Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(),
- ((ILabelEditorDialog) finalDialog).getValue());
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
}
};
@@ -479,10 +474,9 @@ public class InteractionNameEditPart extends PapyrusCompartmentEditPart @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();
@@ -539,7 +533,8 @@ public class InteractionNameEditPart extends PapyrusCompartmentEditPart * @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());
}
@@ -556,7 +551,8 @@ public class InteractionNameEditPart extends PapyrusCompartmentEditPart * @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());
}
@@ -566,10 +562,13 @@ public class InteractionNameEditPart extends PapyrusCompartmentEditPart * @generated
*/
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);
}
}
@@ -680,14 +679,11 @@ public class InteractionNameEditPart extends PapyrusCompartmentEditPart */
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);
}
}
}
@@ -699,10 +695,8 @@ public class InteractionNameEditPart extends PapyrusCompartmentEditPart 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;
}
@@ -721,13 +715,11 @@ public class InteractionNameEditPart extends PapyrusCompartmentEditPart @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 {
@@ -770,10 +762,10 @@ public class InteractionNameEditPart extends PapyrusCompartmentEditPart 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())) {
@@ -790,8 +782,7 @@ public class InteractionNameEditPart extends PapyrusCompartmentEditPart }
}
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON
- .equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/LifelineEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/LifelineEditPartCN.java index 2821c2f96b3..b42c21d4c49 100755 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/LifelineEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/LifelineEditPartCN.java @@ -90,8 +90,7 @@ public class LifelineEditPartCN extends RoundedCompartmentEditPart { installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CommunicationGraphicalNodeEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY,
- new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
// XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
@@ -154,7 +153,8 @@ public class LifelineEditPartCN extends RoundedCompartmentEditPart { if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) {
Object notifier = event.getNotifier();
List<?> modelChildren = ((View) getModel()).getChildren();
- if (false == notifier instanceof Edge && false == notifier instanceof BasicCompartment) {
+ if (false == notifier instanceof Edge
+ && false == notifier instanceof BasicCompartment) {
if (modelChildren.contains(event.getNotifier())) {
return;
}
@@ -188,6 +188,7 @@ public class LifelineEditPartCN extends RoundedCompartmentEditPart { return true;
}
+
return false;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/LifelineFloatingLabelEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/LifelineFloatingLabelEditPartCN.java index fd5f78aa4f4..b5abc1fa41f 100755 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/LifelineFloatingLabelEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/LifelineFloatingLabelEditPartCN.java @@ -127,9 +127,7 @@ public class LifelineFloatingLabelEditPartCN extends FloatingLabelEditPart * @generated
*/
static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(
- org.eclipse.papyrus.uml.diagram.communication.edit.parts.LifelineFloatingLabelEditPartCN.VISUAL_ID),
- new Point(0, 0));
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.communication.edit.parts.LifelineFloatingLabelEditPartCN.VISUAL_ID), new Point(0, 0));
}
/**
@@ -277,7 +275,8 @@ public class LifelineFloatingLabelEditPartCN 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) {
@@ -308,7 +307,8 @@ public class LifelineFloatingLabelEditPartCN extends FloatingLabelEditPart 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());
}
@@ -331,14 +331,12 @@ public class LifelineFloatingLabelEditPartCN 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(),
- LifelineFloatingLabelEditPartCN.this), (String) value));
+ setResult(parser.isValidEditString(ParserUtil.getParserAdapter(getParserElement(), LifelineFloatingLabelEditPartCN.this), (String) value));
}
});
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
@@ -462,18 +460,13 @@ public class LifelineFloatingLabelEditPartCN 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;
}
@@ -485,8 +478,7 @@ public class LifelineFloatingLabelEditPartCN extends FloatingLabelEditPart @Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(),
- ((ILabelEditorDialog) finalDialog).getValue());
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
}
};
@@ -512,10 +504,9 @@ public class LifelineFloatingLabelEditPartCN 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();
@@ -549,8 +540,14 @@ public class LifelineFloatingLabelEditPartCN extends FloatingLabelEditPart maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
if (maskLabelPolicy == null) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ } else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
@@ -566,7 +563,8 @@ public class LifelineFloatingLabelEditPartCN 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());
}
@@ -583,7 +581,8 @@ public class LifelineFloatingLabelEditPartCN 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());
}
@@ -593,10 +592,13 @@ public class LifelineFloatingLabelEditPartCN extends FloatingLabelEditPart * @generated
*/
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);
}
}
@@ -707,14 +709,11 @@ public class LifelineFloatingLabelEditPartCN extends FloatingLabelEditPart */
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);
}
}
}
@@ -726,10 +725,8 @@ public class LifelineFloatingLabelEditPartCN extends FloatingLabelEditPart 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;
}
@@ -748,13 +745,11 @@ public class LifelineFloatingLabelEditPartCN 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 {
@@ -780,10 +775,10 @@ public class LifelineFloatingLabelEditPartCN 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())) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/LifelineNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/LifelineNameEditPart.java index d477bd41150..381d12cb065 100755 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/LifelineNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/LifelineNameEditPart.java @@ -241,7 +241,8 @@ public class LifelineNameEditPart extends PapyrusCompartmentEditPart 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) {
@@ -272,7 +273,8 @@ public class LifelineNameEditPart extends PapyrusCompartmentEditPart 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());
}
@@ -295,13 +297,12 @@ public class LifelineNameEditPart extends PapyrusCompartmentEditPart 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(), LifelineNameEditPart.this), (String) value));
+ setResult(parser.isValidEditString(ParserUtil.getParserAdapter(getParserElement(), LifelineNameEditPart.this), (String) value));
}
});
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
@@ -425,18 +426,13 @@ public class LifelineNameEditPart extends PapyrusCompartmentEditPart 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;
}
@@ -448,8 +444,7 @@ public class LifelineNameEditPart extends PapyrusCompartmentEditPart @Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(),
- ((ILabelEditorDialog) finalDialog).getValue());
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
}
};
@@ -475,10 +470,9 @@ public class LifelineNameEditPart extends PapyrusCompartmentEditPart @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 +529,8 @@ public class LifelineNameEditPart extends PapyrusCompartmentEditPart * @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());
}
@@ -552,7 +547,8 @@ public class LifelineNameEditPart extends PapyrusCompartmentEditPart * @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());
}
@@ -562,10 +558,13 @@ public class LifelineNameEditPart extends PapyrusCompartmentEditPart * @generated
*/
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);
}
}
@@ -676,14 +675,11 @@ public class LifelineNameEditPart extends PapyrusCompartmentEditPart */
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);
}
}
}
@@ -695,10 +691,8 @@ public class LifelineNameEditPart extends PapyrusCompartmentEditPart 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;
}
@@ -717,13 +711,11 @@ public class LifelineNameEditPart extends PapyrusCompartmentEditPart @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,10 +758,10 @@ public class LifelineNameEditPart extends PapyrusCompartmentEditPart 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())) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/MessageEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/MessageEditPart.java index 8322d72e37e..64fae2b4239 100755 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/MessageEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/MessageEditPart.java @@ -45,8 +45,7 @@ public class MessageEditPart extends ConnectionEditPart implements ITreeBranchEd protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY,
- new AppliedStereotypeLinkLabelDisplayEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeLinkLabelDisplayEditPolicy());
}
/**
@@ -54,10 +53,12 @@ public class MessageEditPart extends ConnectionEditPart implements ITreeBranchEd */
protected boolean addFixedChild(EditPart childEditPart) {
if (childEditPart instanceof MessageNameEditPart) {
- ((MessageNameEditPart) childEditPart).setLabel(getPrimaryShape().getFigureMessageCreateLabelFigure());
+ ((MessageNameEditPart) childEditPart).setLabel(
+ getPrimaryShape().getFigureMessageCreateLabelFigure());
}
if (childEditPart instanceof AppliedStereotypeMessageEditPart) {
- ((AppliedStereotypeMessageEditPart) childEditPart).setLabel(getPrimaryShape().getAppliedStereotypeLabel());
+ ((AppliedStereotypeMessageEditPart) childEditPart).setLabel(
+ getPrimaryShape().getAppliedStereotypeLabel());
}
return false;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/MessageNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/MessageNameEditPart.java index 5064efd97b3..5bc7c805cdf 100755 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/MessageNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/MessageNameEditPart.java @@ -130,10 +130,7 @@ public class MessageNameEditPart extends PapyrusLabelEditPart * @generated
*/
static {
- registerSnapBackPosition(
- UMLVisualIDRegistry.getType(
- org.eclipse.papyrus.uml.diagram.communication.edit.parts.MessageNameEditPart.VISUAL_ID),
- new Point(1, -23));
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.communication.edit.parts.MessageNameEditPart.VISUAL_ID), new Point(1, -23));
}
/**
@@ -267,7 +264,8 @@ public class MessageNameEditPart 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) {
@@ -298,7 +296,8 @@ public class MessageNameEditPart extends PapyrusLabelEditPart 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());
}
@@ -321,13 +320,12 @@ public class MessageNameEditPart 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(), MessageNameEditPart.this), (String) value));
+ setResult(parser.isValidEditString(ParserUtil.getParserAdapter(getParserElement(), MessageNameEditPart.this), (String) value));
}
});
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
@@ -451,18 +449,13 @@ public class MessageNameEditPart 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,8 +467,7 @@ public class MessageNameEditPart extends PapyrusLabelEditPart @Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(),
- ((ILabelEditorDialog) finalDialog).getValue());
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
}
};
@@ -501,10 +493,9 @@ public class MessageNameEditPart 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();
@@ -538,8 +529,14 @@ public class MessageNameEditPart extends PapyrusLabelEditPart maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
if (maskLabelPolicy == null) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ } else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
@@ -555,7 +552,8 @@ public class MessageNameEditPart 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,7 +570,8 @@ public class MessageNameEditPart 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,10 +581,13 @@ public class MessageNameEditPart extends PapyrusLabelEditPart * @generated
*/
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);
}
}
@@ -696,14 +698,11 @@ public class MessageNameEditPart 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);
}
}
}
@@ -715,10 +714,8 @@ public class MessageNameEditPart 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;
}
@@ -737,13 +734,11 @@ public class MessageNameEditPart 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 +764,10 @@ public class MessageNameEditPart 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())) {
@@ -790,8 +785,7 @@ public class MessageNameEditPart extends PapyrusLabelEditPart }
}
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON
- .equals(((EAnnotation) event.getNewValue()).getSource())) {
+ if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
refreshLabel();
}
super.handleNotificationEvent(event);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/TimeObservationEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/TimeObservationEditPartCN.java index 1f4634963bf..cd29a601438 100755 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/TimeObservationEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/TimeObservationEditPartCN.java @@ -87,8 +87,7 @@ public class TimeObservationEditPartCN extends RoundedCompartmentEditPart { installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY,
- new AppliedStereotypeIconlDisplayEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeIconlDisplayEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
// XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
@@ -152,7 +151,8 @@ public class TimeObservationEditPartCN extends RoundedCompartmentEditPart { if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) {
Object notifier = event.getNotifier();
List<?> modelChildren = ((View) getModel()).getChildren();
- if (false == notifier instanceof Edge && false == notifier instanceof BasicCompartment) {
+ if (false == notifier instanceof Edge
+ && false == notifier instanceof BasicCompartment) {
if (modelChildren.contains(event.getNotifier())) {
return;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/TimeObservationNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/TimeObservationNameEditPartCN.java index 80a3598fc78..4f739c8ef7d 100755 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/TimeObservationNameEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/TimeObservationNameEditPartCN.java @@ -127,9 +127,7 @@ public class TimeObservationNameEditPartCN extends FloatingLabelEditPart * @generated
*/
static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(
- org.eclipse.papyrus.uml.diagram.communication.edit.parts.TimeObservationNameEditPartCN.VISUAL_ID),
- new Point(0, 0));
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.communication.edit.parts.TimeObservationNameEditPartCN.VISUAL_ID), new Point(0, 0));
}
/**
@@ -277,7 +275,8 @@ public class TimeObservationNameEditPartCN 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) {
@@ -308,7 +307,8 @@ public class TimeObservationNameEditPartCN extends FloatingLabelEditPart 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());
}
@@ -331,14 +331,12 @@ public class TimeObservationNameEditPartCN 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(),
- TimeObservationNameEditPartCN.this), (String) value));
+ setResult(parser.isValidEditString(ParserUtil.getParserAdapter(getParserElement(), TimeObservationNameEditPartCN.this), (String) value));
}
});
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
@@ -462,18 +460,13 @@ public class TimeObservationNameEditPartCN 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;
}
@@ -485,8 +478,7 @@ public class TimeObservationNameEditPartCN extends FloatingLabelEditPart @Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(),
- ((ILabelEditorDialog) finalDialog).getValue());
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
}
};
@@ -512,10 +504,9 @@ public class TimeObservationNameEditPartCN 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();
@@ -549,8 +540,14 @@ public class TimeObservationNameEditPartCN extends FloatingLabelEditPart maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
if (maskLabelPolicy == null) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ } else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
@@ -566,7 +563,8 @@ public class TimeObservationNameEditPartCN 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());
}
@@ -583,7 +581,8 @@ public class TimeObservationNameEditPartCN 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());
}
@@ -593,10 +592,13 @@ public class TimeObservationNameEditPartCN extends FloatingLabelEditPart * @generated
*/
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);
}
}
@@ -707,14 +709,11 @@ public class TimeObservationNameEditPartCN extends FloatingLabelEditPart */
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);
}
}
}
@@ -726,10 +725,8 @@ public class TimeObservationNameEditPartCN extends FloatingLabelEditPart 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;
}
@@ -748,13 +745,11 @@ public class TimeObservationNameEditPartCN 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 {
@@ -780,10 +775,10 @@ public class TimeObservationNameEditPartCN 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())) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/TimeObservationStereotypeLabelEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/TimeObservationStereotypeLabelEditPartCN.java index 5d06343e4bc..b39e989b021 100755 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/TimeObservationStereotypeLabelEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/TimeObservationStereotypeLabelEditPartCN.java @@ -129,9 +129,7 @@ public class TimeObservationStereotypeLabelEditPartCN extends PapyrusLabelEditPa * @generated
*/
static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(
- org.eclipse.papyrus.uml.diagram.communication.edit.parts.TimeObservationStereotypeLabelEditPartCN.VISUAL_ID),
- new Point(0, 0));
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.communication.edit.parts.TimeObservationStereotypeLabelEditPartCN.VISUAL_ID), new Point(0, 0));
}
/**
@@ -148,8 +146,7 @@ public class TimeObservationStereotypeLabelEditPartCN extends PapyrusLabelEditPa super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY,
- new AppliedStereotypeExternalNodeEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeExternalNodeEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
}
@@ -281,7 +278,8 @@ public class TimeObservationStereotypeLabelEditPartCN extends PapyrusLabelEditPa 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) {
@@ -312,7 +310,8 @@ public class TimeObservationStereotypeLabelEditPartCN extends PapyrusLabelEditPa 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());
}
@@ -335,15 +334,12 @@ public class TimeObservationStereotypeLabelEditPartCN extends PapyrusLabelEditPa 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(),
- TimeObservationStereotypeLabelEditPartCN.this),
- (String) value));
+ setResult(parser.isValidEditString(ParserUtil.getParserAdapter(getParserElement(), TimeObservationStereotypeLabelEditPartCN.this), (String) value));
}
});
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
@@ -467,18 +463,13 @@ public class TimeObservationStereotypeLabelEditPartCN extends PapyrusLabelEditPa 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;
}
@@ -490,8 +481,7 @@ public class TimeObservationStereotypeLabelEditPartCN extends PapyrusLabelEditPa @Override
protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(),
- ((ILabelEditorDialog) finalDialog).getValue());
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
}
};
@@ -517,10 +507,9 @@ public class TimeObservationStereotypeLabelEditPartCN extends PapyrusLabelEditPa @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();
@@ -554,8 +543,14 @@ public class TimeObservationStereotypeLabelEditPartCN extends PapyrusLabelEditPa maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
}
if (maskLabelPolicy == null) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ } else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
@@ -571,7 +566,8 @@ public class TimeObservationStereotypeLabelEditPartCN extends PapyrusLabelEditPa * @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());
}
@@ -588,7 +584,8 @@ public class TimeObservationStereotypeLabelEditPartCN extends PapyrusLabelEditPa * @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());
}
@@ -598,10 +595,13 @@ public class TimeObservationStereotypeLabelEditPartCN extends PapyrusLabelEditPa * @generated
*/
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);
}
}
@@ -712,14 +712,11 @@ public class TimeObservationStereotypeLabelEditPartCN extends PapyrusLabelEditPa */
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);
}
}
}
@@ -731,10 +728,8 @@ public class TimeObservationStereotypeLabelEditPartCN extends PapyrusLabelEditPa 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;
}
@@ -753,13 +748,11 @@ public class TimeObservationStereotypeLabelEditPartCN extends PapyrusLabelEditPa @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 {
@@ -785,10 +778,10 @@ public class TimeObservationStereotypeLabelEditPartCN extends PapyrusLabelEditPa 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())) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/UMLEditPartFactory.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/UMLEditPartFactory.java index 57b7e7fa546..43c41c4d45a 100755 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/UMLEditPartFactory.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/parts/UMLEditPartFactory.java @@ -104,15 +104,19 @@ public class UMLEditPartFactory implements EditPartFactory { case AppliedStereotypeMessageEditPart.VISUAL_ID:
return new AppliedStereotypeMessageEditPart(view);
+
case CommentAnnotatedElementEditPart.VISUAL_ID:
return new CommentAnnotatedElementEditPart(view);
+
case ConstraintConstrainedElementEditPart.VISUAL_ID:
return new ConstraintConstrainedElementEditPart(view);
+
case ConnectorDurationObservationEditPart.VISUAL_ID:
return new ConnectorDurationObservationEditPart(view);
+
case ConnectorTimeObservationEditPart.VISUAL_ID:
return new ConnectorTimeObservationEditPart(view);
@@ -134,7 +138,8 @@ public class UMLEditPartFactory implements EditPartFactory { */
public static CellEditorLocator getTextCellEditorLocator(ITextAwareEditPart source) {
if (source.getFigure() instanceof IMultilineEditableFigure) {
- return new MultilineCellEditorLocator((IMultilineEditableFigure) source.getFigure());
+ return new MultilineCellEditorLocator(
+ (IMultilineEditableFigure) source.getFigure());
} else {
return CellEditorLocatorAccess.INSTANCE.getTextCellEditorLocator(source);
@@ -175,7 +180,8 @@ public class UMLEditPartFactory implements EditPartFactory { rect.y = getMultilineEditableFigure().getEditionLocation().y;
getMultilineEditableFigure().translateToAbsolute(rect);
if (getMultilineEditableFigure().getText().length() > 0) {
- rect.setSize(new Dimension(text.computeSize(rect.width, SWT.DEFAULT)));
+ rect.setSize(new Dimension(text.computeSize(rect.width,
+ SWT.DEFAULT)));
}
if (!rect.equals(new Rectangle(text.getBounds()))) {
text.setBounds(rect.x, rect.y, rect.width, rect.height);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/policies/OpenDiagramEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/policies/OpenDiagramEditPolicy.java index 2b46b61e632..46b9c74bdd4 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/policies/OpenDiagramEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/policies/OpenDiagramEditPolicy.java @@ -138,11 +138,9 @@ public class OpenDiagramEditPolicy extends OpenEditPolicy { }
try {
new WorkspaceModifyOperation() {
- protected void execute(IProgressMonitor monitor)
- throws CoreException, InvocationTargetException, InterruptedException {
+ protected void execute(IProgressMonitor monitor) throws CoreException, InvocationTargetException, InterruptedException {
try {
- for (Iterator<?> it = diagramFacet.eResource().getResourceSet().getResources()
- .iterator(); it.hasNext();) {
+ for (Iterator<?> it = diagramFacet.eResource().getResourceSet().getResources().iterator(); it.hasNext();) {
Resource nextResource = (Resource) it.next();
if (nextResource.isLoaded() && !getEditingDomain().isReadOnly(nextResource)) {
nextResource.save(UMLDiagramEditorUtil.getSaveOptions());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/policies/UMLBaseItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/policies/UMLBaseItemSemanticEditPolicy.java index 0f3f3ac3517..98bb1bc6179 100755 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/policies/UMLBaseItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/policies/UMLBaseItemSemanticEditPolicy.java @@ -150,9 +150,7 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy { */
private Command getEditHelperCommand(IEditCommandRequest request, Command editPolicyCommand) {
if (editPolicyCommand != null) {
- ICommand command = editPolicyCommand instanceof ICommandProxy
- ? ((ICommandProxy) editPolicyCommand).getICommand()
- : new CommandProxy(editPolicyCommand);
+ ICommand command = editPolicyCommand instanceof ICommandProxy ? ((ICommandProxy) editPolicyCommand).getICommand() : new CommandProxy(editPolicyCommand);
request.setParameter(GeneratedEditHelperBase.EDIT_POLICY_COMMAND, command);
}
IElementType requestContextElementType = getContextElementType(request);
@@ -330,8 +328,7 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy { assert view.getEAnnotation("Shortcut") == null; //$NON-NLS-1$
for (Iterator<?> it = view.getDiagram().getChildren().iterator(); it.hasNext();) {
View nextView = (View) it.next();
- if (nextView.getEAnnotation("Shortcut") == null || !nextView.isSetElement() //$NON-NLS-1$
- || nextView.getElement() != view.getElement()) {
+ if (nextView.getEAnnotation("Shortcut") == null || !nextView.isSetElement() || nextView.getElement() != view.getElement()) { //$NON-NLS-1$
continue;
}
cmd.add(new DeleteCommand(getEditingDomain(), nextView));
@@ -364,7 +361,8 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy { * @generated
*/
public boolean canCreatePath_Edge(Interaction container, Element source, Element target) {
- return canExistPath_Edge(container, null, source, target);
+ return canExistPath_Edge(
+ container, null, source, target);
}
/**
@@ -372,12 +370,14 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy { */
public boolean canCreateComment_AnnotatedElementEdge(Comment source, Element target) {
if (source != null) {
- if (source.getAnnotatedElements().contains(target)) {
+ if (source.getAnnotatedElements()
+ .contains(target)) {
return false;
}
}
- return canExistComment_AnnotatedElementEdge(source, target);
+ return canExistComment_AnnotatedElementEdge(
+ source, target);
}
/**
@@ -385,12 +385,14 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy { */
public boolean canCreateConstraint_ConstrainedElementEdge(Constraint source, Element target) {
if (source != null) {
- if (source.getConstrainedElements().contains(target)) {
+ if (source.getConstrainedElements()
+ .contains(target)) {
return false;
}
}
- return canExistConstraint_ConstrainedElementEdge(source, target);
+ return canExistConstraint_ConstrainedElementEdge(
+ source, target);
}
/**
@@ -398,12 +400,17 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy { */
public boolean canCreateDurationObservation_EventEdge(DurationObservation source, NamedElement target) {
if (source != null) {
- if (source.getEvents().size() >= 2 || source.getEvents().contains(target)) {
+ if (source.getEvents()
+ .size() >= 2
+ ||
+ source.getEvents()
+ .contains(target)) {
return false;
}
}
- return canExistDurationObservation_EventEdge(source, target);
+ return canExistDurationObservation_EventEdge(
+ source, target);
}
/**
@@ -416,7 +423,8 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy { }
}
- return canExistTimeObservation_EventEdge(source, target);
+ return canExistTimeObservation_EventEdge(
+ source, target);
}
/**
@@ -427,10 +435,8 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy { if (source == null) {
return true;
} else {
- Map<String, EClassifier> env = Collections.<String, EClassifier>singletonMap("oppositeEnd", //$NON-NLS-1$
- UMLPackage.eINSTANCE.getElement());
- Object sourceVal = UMLOCLFactory.getExpression(3, UMLPackage.eINSTANCE.getElement(), env)
- .evaluate(source, Collections.singletonMap("oppositeEnd", target)); //$NON-NLS-1$
+ Map<String, EClassifier> env = Collections.<String, EClassifier> singletonMap("oppositeEnd", UMLPackage.eINSTANCE.getElement()); //$NON-NLS-1$
+ Object sourceVal = UMLOCLFactory.getExpression(3, UMLPackage.eINSTANCE.getElement(), env).evaluate(source, Collections.singletonMap("oppositeEnd", target)); //$NON-NLS-1$
if (false == sourceVal instanceof Boolean || !((Boolean) sourceVal).booleanValue()) {
return false;
} // else fall-through
@@ -438,10 +444,8 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy { if (target == null) {
return true;
} else {
- Map<String, EClassifier> env = Collections.<String, EClassifier>singletonMap("oppositeEnd", //$NON-NLS-1$
- UMLPackage.eINSTANCE.getElement());
- Object targetVal = UMLOCLFactory.getExpression(3, UMLPackage.eINSTANCE.getElement(), env)
- .evaluate(target, Collections.singletonMap("oppositeEnd", source)); //$NON-NLS-1$
+ Map<String, EClassifier> env = Collections.<String, EClassifier> singletonMap("oppositeEnd", UMLPackage.eINSTANCE.getElement()); //$NON-NLS-1$
+ Object targetVal = UMLOCLFactory.getExpression(3, UMLPackage.eINSTANCE.getElement(), env).evaluate(target, Collections.singletonMap("oppositeEnd", source)); //$NON-NLS-1$
if (false == targetVal instanceof Boolean || !((Boolean) targetVal).booleanValue()) {
return false;
} // else fall-through
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/expressions/UMLAbstractExpression.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/expressions/UMLAbstractExpression.java index e94659f5efd..fc138e8747e 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/expressions/UMLAbstractExpression.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/expressions/UMLAbstractExpression.java @@ -42,8 +42,7 @@ public abstract class UMLAbstractExpression { String pluginID = UMLDiagramEditorPlugin.ID;
this.status = new Status(severity, pluginID, -1, (message != null) ? message : "", throwable); //$NON-NLS-1$
if (!this.status.isOK()) {
- UMLDiagramEditorPlugin.getInstance().logError("Expression problem:" + message + "body:" + body(), //$NON-NLS-1$//$NON-NLS-2$
- throwable);
+ UMLDiagramEditorPlugin.getInstance().logError("Expression problem:" + message + "body:" + body(), throwable); //$NON-NLS-1$ //$NON-NLS-2$
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/expressions/UMLOCLFactory.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/expressions/UMLOCLFactory.java index 3ce4d2925cc..972bb5f1d64 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/expressions/UMLOCLFactory.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/expressions/UMLOCLFactory.java @@ -88,8 +88,7 @@ public class UMLOCLFactory { throw new IllegalArgumentException();
}
if (cached.expressions[index] == null) {
- cached.expressions[index] = getExpression(cached.expressionBodies[index], context,
- environment == null ? Collections.<String, EClassifier>emptyMap() : environment);
+ cached.expressions[index] = getExpression(cached.expressionBodies[index], context, environment == null ? Collections.<String, EClassifier> emptyMap() : environment);
}
return cached.expressions[index];
}
@@ -108,7 +107,7 @@ public class UMLOCLFactory { * @generated
*/
public static UMLAbstractExpression getExpression(String body, EClassifier context) {
- return getExpression(body, context, Collections.<String, EClassifier>emptyMap());
+ return getExpression(body, context, Collections.<String, EClassifier> emptyMap());
}
/**
@@ -169,11 +168,9 @@ public class UMLOCLFactory { /**
* @generated
*/
- private static void initCustomEnv(Environment<?, EClassifier, ?, ?, ?, EParameter, ?, ?, ?, ?, ?, ?> ecoreEnv,
- Map<String, EClassifier> environment) {
+ private static void initCustomEnv(Environment<?, EClassifier, ?, ?, ?, EParameter, ?, ?, ?, ?, ?, ?> ecoreEnv, Map<String, EClassifier> environment) {
// Use EObject as implicit root class for any object, to allow eContainer() and other EObject operations from OCL expressions
- ParsingOptions.setOption(ecoreEnv, ParsingOptions.implicitRootClass(ecoreEnv),
- EcorePackage.eINSTANCE.getEObject());
+ ParsingOptions.setOption(ecoreEnv, ParsingOptions.implicitRootClass(ecoreEnv), EcorePackage.eINSTANCE.getEObject());
for (String varName : environment.keySet()) {
EClassifier varType = environment.get(varName);
ecoreEnv.addElement(varName, createVar(ecoreEnv, varName, varType), false);
@@ -183,8 +180,7 @@ public class UMLOCLFactory { /**
* @generated
*/
- private static Variable createVar(Environment<?, EClassifier, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?> ecoreEnv,
- String name, EClassifier type) {
+ private static Variable createVar(Environment<?, EClassifier, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?> ecoreEnv, String name, EClassifier type) {
Variable var = EcoreFactory.eINSTANCE.createVariable();
var.setName(name);
var.setType(ecoreEnv.getUMLReflection().getOCLType(type));
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/navigator/UMLDomainNavigatorContentProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/navigator/UMLDomainNavigatorContentProvider.java index 1d22a1c7335..bd5e418aa14 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/navigator/UMLDomainNavigatorContentProvider.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/navigator/UMLDomainNavigatorContentProvider.java @@ -71,8 +71,7 @@ public class UMLDomainNavigatorContentProvider implements ICommonContentProvider * @generated
*/
public UMLDomainNavigatorContentProvider() {
- myAdapterFctoryContentProvier = new AdapterFactoryContentProvider(
- UMLDiagramEditorPlugin.getInstance().getItemProvidersAdapterFactory());
+ myAdapterFctoryContentProvier = new AdapterFactoryContentProvider(UMLDiagramEditorPlugin.getInstance().getItemProvidersAdapterFactory());
TransactionalEditingDomain editingDomain = WorkspaceEditingDomainFactory.INSTANCE.createEditingDomain();
myEditingDomain = (AdapterFactoryEditingDomain) editingDomain;
@SuppressWarnings("serial")
@@ -106,8 +105,7 @@ public class UMLDomainNavigatorContentProvider implements ICommonContentProvider @Override
public boolean handleResourceChanged(final Resource resource) {
- for (Iterator<Resource> it = myEditingDomain.getResourceSet().getResources().iterator(); it
- .hasNext();) {
+ for (Iterator<Resource> it = myEditingDomain.getResourceSet().getResources().iterator(); it.hasNext();) {
Resource nextResource = it.next();
nextResource.unload();
}
@@ -119,8 +117,7 @@ public class UMLDomainNavigatorContentProvider implements ICommonContentProvider @Override
public boolean handleResourceDeleted(Resource resource) {
- for (Iterator<Resource> it = myEditingDomain.getResourceSet().getResources().iterator(); it
- .hasNext();) {
+ for (Iterator<Resource> it = myEditingDomain.getResourceSet().getResources().iterator(); it.hasNext();) {
Resource nextResource = it.next();
nextResource.unload();
}
@@ -132,8 +129,7 @@ public class UMLDomainNavigatorContentProvider implements ICommonContentProvider @Override
public boolean handleResourceMoved(Resource resource, final URI newURI) {
- for (Iterator<Resource> it = myEditingDomain.getResourceSet().getResources().iterator(); it
- .hasNext();) {
+ for (Iterator<Resource> it = myEditingDomain.getResourceSet().getResources().iterator(); it.hasNext();) {
Resource nextResource = it.next();
nextResource.unload();
}
@@ -224,9 +220,7 @@ public class UMLDomainNavigatorContentProvider implements ICommonContentProvider }
if (parentElement instanceof UMLDomainNavigatorItem) {
- return wrapEObjects(
- myAdapterFctoryContentProvier.getChildren(((UMLDomainNavigatorItem) parentElement).getEObject()),
- parentElement);
+ return wrapEObjects(myAdapterFctoryContentProvier.getChildren(((UMLDomainNavigatorItem) parentElement).getEObject()), parentElement);
}
return EMPTY_ARRAY;
}
@@ -238,8 +232,7 @@ public class UMLDomainNavigatorContentProvider implements ICommonContentProvider Collection<UMLDomainNavigatorItem> result = new ArrayList<UMLDomainNavigatorItem>();
for (int i = 0; i < objects.length; i++) {
if (objects[i] instanceof EObject) {
- result.add(
- new UMLDomainNavigatorItem((EObject) objects[i], parentElement, myAdapterFctoryContentProvier));
+ result.add(new UMLDomainNavigatorItem((EObject) objects[i], parentElement, myAdapterFctoryContentProvier));
}
}
return result.toArray();
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/navigator/UMLDomainNavigatorItem.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/navigator/UMLDomainNavigatorItem.java index a521c7518e0..d71008cd86a 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/navigator/UMLDomainNavigatorItem.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/navigator/UMLDomainNavigatorItem.java @@ -107,10 +107,7 @@ public class UMLDomainNavigatorItem extends PlatformObject { */
public boolean equals(Object obj) {
if (obj instanceof org.eclipse.papyrus.uml.diagram.communication.navigator.UMLDomainNavigatorItem) {
- return EcoreUtil.getURI(getEObject())
- .equals(EcoreUtil.getURI(
- ((org.eclipse.papyrus.uml.diagram.communication.navigator.UMLDomainNavigatorItem) obj)
- .getEObject()));
+ return EcoreUtil.getURI(getEObject()).equals(EcoreUtil.getURI(((org.eclipse.papyrus.uml.diagram.communication.navigator.UMLDomainNavigatorItem) obj).getEObject()));
}
return super.equals(obj);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/navigator/UMLDomainNavigatorLabelProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/navigator/UMLDomainNavigatorLabelProvider.java index bdfb4911d86..6f7fa5b84df 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/navigator/UMLDomainNavigatorLabelProvider.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/navigator/UMLDomainNavigatorLabelProvider.java @@ -27,8 +27,7 @@ public class UMLDomainNavigatorLabelProvider implements ICommonLabelProvider { /**
* @generated
*/
- private AdapterFactoryLabelProvider myAdapterFactoryLabelProvider = new AdapterFactoryLabelProvider(
- UMLDiagramEditorPlugin.getInstance().getItemProvidersAdapterFactory());
+ private AdapterFactoryLabelProvider myAdapterFactoryLabelProvider = new AdapterFactoryLabelProvider(UMLDiagramEditorPlugin.getInstance().getItemProvidersAdapterFactory());
/**
* @generated
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/navigator/UMLNavigatorContentProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/navigator/UMLNavigatorContentProvider.java index d8b477902eb..cc86d54f0da 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/navigator/UMLNavigatorContentProvider.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/navigator/UMLNavigatorContentProvider.java @@ -101,8 +101,7 @@ public class UMLNavigatorContentProvider implements ICommonContentProvider { @Override
public boolean handleResourceChanged(final Resource resource) {
- for (Iterator<Resource> it = myEditingDomain.getResourceSet().getResources().iterator(); it
- .hasNext();) {
+ for (Iterator<Resource> it = myEditingDomain.getResourceSet().getResources().iterator(); it.hasNext();) {
Resource nextResource = it.next();
nextResource.unload();
}
@@ -114,8 +113,7 @@ public class UMLNavigatorContentProvider implements ICommonContentProvider { @Override
public boolean handleResourceDeleted(Resource resource) {
- for (Iterator<Resource> it = myEditingDomain.getResourceSet().getResources().iterator(); it
- .hasNext();) {
+ for (Iterator<Resource> it = myEditingDomain.getResourceSet().getResources().iterator(); it.hasNext();) {
Resource nextResource = it.next();
nextResource.unload();
}
@@ -127,8 +125,7 @@ public class UMLNavigatorContentProvider implements ICommonContentProvider { @Override
public boolean handleResourceMoved(Resource resource, final URI newURI) {
- for (Iterator<Resource> it = myEditingDomain.getResourceSet().getResources().iterator(); it
- .hasNext();) {
+ for (Iterator<Resource> it = myEditingDomain.getResourceSet().getResources().iterator(); it.hasNext();) {
Resource nextResource = it.next();
nextResource.unload();
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/navigator/UMLNavigatorItem.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/navigator/UMLNavigatorItem.java index 8ed655208af..7b813513f00 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/navigator/UMLNavigatorItem.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/navigator/UMLNavigatorItem.java @@ -33,10 +33,8 @@ public class UMLNavigatorItem extends UMLAbstractNavigatorItem { @Override
@SuppressWarnings("rawtypes")
public Object getAdapter(Object adaptableObject, Class adapterType) {
- if (adaptableObject instanceof org.eclipse.papyrus.uml.diagram.communication.navigator.UMLNavigatorItem
- && (adapterType == View.class || adapterType == EObject.class)) {
- return ((org.eclipse.papyrus.uml.diagram.communication.navigator.UMLNavigatorItem) adaptableObject)
- .getView();
+ if (adaptableObject instanceof org.eclipse.papyrus.uml.diagram.communication.navigator.UMLNavigatorItem && (adapterType == View.class || adapterType == EObject.class)) {
+ return ((org.eclipse.papyrus.uml.diagram.communication.navigator.UMLNavigatorItem) adaptableObject).getView();
}
return null;
}
@@ -87,8 +85,7 @@ public class UMLNavigatorItem extends UMLAbstractNavigatorItem { */
public boolean equals(Object obj) {
if (obj instanceof org.eclipse.papyrus.uml.diagram.communication.navigator.UMLNavigatorItem) {
- return EcoreUtil.getURI(getView()).equals(EcoreUtil.getURI(
- ((org.eclipse.papyrus.uml.diagram.communication.navigator.UMLNavigatorItem) obj).getView()));
+ return EcoreUtil.getURI(getView()).equals(EcoreUtil.getURI(((org.eclipse.papyrus.uml.diagram.communication.navigator.UMLNavigatorItem) obj).getView()));
}
return super.equals(obj);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/navigator/UMLNavigatorLabelProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/navigator/UMLNavigatorLabelProvider.java index 2994b229aeb..0008b88ee0d 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/navigator/UMLNavigatorLabelProvider.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/navigator/UMLNavigatorLabelProvider.java @@ -37,10 +37,8 @@ public class UMLNavigatorLabelProvider extends LabelProvider implements ICommonL * @generated
*/
static {
- UMLDiagramEditorPlugin.getInstance().getImageRegistry().put("Navigator?UnknownElement", //$NON-NLS-1$
- ImageDescriptor.getMissingImageDescriptor());
- UMLDiagramEditorPlugin.getInstance().getImageRegistry().put("Navigator?ImageNotFound", //$NON-NLS-1$
- ImageDescriptor.getMissingImageDescriptor());
+ UMLDiagramEditorPlugin.getInstance().getImageRegistry().put("Navigator?UnknownElement", ImageDescriptor.getMissingImageDescriptor()); //$NON-NLS-1$
+ UMLDiagramEditorPlugin.getInstance().getImageRegistry().put("Navigator?ImageNotFound", ImageDescriptor.getMissingImageDescriptor()); //$NON-NLS-1$
}
/**
@@ -72,6 +70,7 @@ public class UMLNavigatorLabelProvider extends LabelProvider implements ICommonL return getImage(navigatorItem.getView());
}
+
return super.getImage(element);
}
@@ -117,6 +116,7 @@ public class UMLNavigatorLabelProvider extends LabelProvider implements ICommonL return getText(navigatorItem.getView());
}
+
return super.getText(element);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/parsers/MessageFormatParser.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/parsers/MessageFormatParser.java index 33af21530de..57832e16a76 100755 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/parsers/MessageFormatParser.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/parsers/MessageFormatParser.java @@ -128,8 +128,7 @@ public class MessageFormatParser extends AbstractElementTypeBasedAttributeParser */
protected MessageFormat getEditorProcessor() {
if (editorProcessor == null) {
- editorProcessor = new MessageFormat(
- getEditorPattern() == null ? getDefaultEditablePattern() : getEditorPattern());
+ editorProcessor = new MessageFormat(getEditorPattern() == null ? getDefaultEditablePattern() : getEditorPattern());
}
return editorProcessor;
}
@@ -166,8 +165,7 @@ public class MessageFormatParser extends AbstractElementTypeBasedAttributeParser */
protected MessageFormat getEditProcessor() {
if (editProcessor == null) {
- editProcessor = new MessageFormat(
- getEditPattern() == null ? getDefaultEditablePattern() : getEditPattern());
+ editProcessor = new MessageFormat(getEditPattern() == null ? getDefaultEditablePattern() : getEditPattern());
}
return editProcessor;
}
@@ -177,8 +175,7 @@ public class MessageFormatParser extends AbstractElementTypeBasedAttributeParser */
public String getEditString(IAdaptable adapter, int flags) {
EObject element = (EObject) adapter.getAdapter(EObject.class);
- return getEditorProcessor().format(getEditableValues(element), new StringBuffer(), new FieldPosition(0))
- .toString();
+ return getEditorProcessor().format(getEditableValues(element), new StringBuffer(), new FieldPosition(0)).toString();
}
/**
@@ -188,8 +185,12 @@ public class MessageFormatParser extends AbstractElementTypeBasedAttributeParser ParsePosition pos = new ParsePosition(0);
Object[] values = getEditProcessor().parse(editString, pos);
if (values == null) {
- return new ParserEditStatus(UMLDiagramEditorPlugin.ID, IParserEditStatus.UNEDITABLE,
- NLS.bind(Messages.MessageFormatParser_InvalidInputError, new Integer(pos.getErrorIndex())));
+ return new ParserEditStatus(
+ UMLDiagramEditorPlugin.ID,
+ IParserEditStatus.UNEDITABLE,
+ NLS.bind(
+ Messages.MessageFormatParser_InvalidInputError,
+ new Integer(pos.getErrorIndex())));
}
return validateNewValues(values);
}
@@ -222,12 +223,10 @@ public class MessageFormatParser extends AbstractElementTypeBasedAttributeParser // If the feature to edit is the name, check that this is not really the internationalization to edit and not the name
if (feature.equals(UMLPackage.eINSTANCE.getNamedElement_Name())) {
- if (InternationalizationPreferencesUtils.getInternationalizationPreference(element)
- && null != UMLLabelInternationalization.getInstance().getLabelWithoutUML((NamedElement) element)) {
+ if (InternationalizationPreferencesUtils.getInternationalizationPreference(element) && null != UMLLabelInternationalization.getInstance().getLabelWithoutUML((NamedElement) element)) {
final ModelSet modelSet = (ModelSet) element.eResource().getResourceSet();
if (null != modelSet) {
- result = new EMFtoGMFCommandWrapper(UMLLabelInternationalization.getInstance().getSetLabelCommand(
- modelSet.getTransactionalEditingDomain(), (NamedElement) element, (String) value, null));
+ result = new EMFtoGMFCommandWrapper(UMLLabelInternationalization.getInstance().getSetLabelCommand(modelSet.getTransactionalEditingDomain(), (NamedElement) element, (String) value, null));
}
}
}
@@ -245,8 +244,7 @@ public class MessageFormatParser extends AbstractElementTypeBasedAttributeParser Object result = null;
if (element instanceof NamedElement && feature.equals(UMLPackage.eINSTANCE.getNamedElement_Name())) {
- if (InternationalizationPreferencesUtils.getInternationalizationPreference(element)
- && null != UMLLabelInternationalization.getInstance().getLabelWithoutUML((NamedElement) element)) {
+ if (InternationalizationPreferencesUtils.getInternationalizationPreference(element) && null != UMLLabelInternationalization.getInstance().getLabelWithoutUML((NamedElement) element)) {
result = UMLLabelInternationalization.getInstance().getLabelWithoutUML((NamedElement) element);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/part/DiagramEditorContextMenuProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/part/DiagramEditorContextMenuProvider.java index a50e0e51c02..20cb0aa7ad9 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/part/DiagramEditorContextMenuProvider.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/part/DiagramEditorContextMenuProvider.java @@ -44,13 +44,13 @@ public class DiagramEditorContextMenuProvider extends DiagramContextMenuProvider public void buildContextMenu(final IMenuManager menu) {
getViewer().flush();
try {
- TransactionUtil.getEditingDomain((EObject) getViewer().getContents().getModel())
- .runExclusive(new Runnable() {
+ TransactionUtil.getEditingDomain(
+ (EObject) getViewer().getContents().getModel()).runExclusive(new Runnable() {
@Override
public void run() {
- ContributionItemService.getInstance()
- .contributeToPopupMenu(DiagramEditorContextMenuProvider.this, part);
+ ContributionItemService.getInstance().contributeToPopupMenu(
+ DiagramEditorContextMenuProvider.this, part);
menu.remove(ActionIds.ACTION_DELETE_FROM_MODEL);
}
});
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/part/UMLCreationWizard.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/part/UMLCreationWizard.java index 817534551cc..a20aeaaeb2b 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/part/UMLCreationWizard.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/part/UMLCreationWizard.java @@ -102,8 +102,8 @@ public class UMLCreationWizard extends Wizard implements INewWizard { this.workbench = workbench;
this.selection = selection;
setWindowTitle(Messages.UMLCreationWizardTitle);
- setDefaultPageImageDescriptor(
- UMLDiagramEditorPlugin.getBundledImageDescriptor("icons/wizban/NewUMLWizard.gif")); //$NON-NLS-1$
+ setDefaultPageImageDescriptor(UMLDiagramEditorPlugin.getBundledImageDescriptor(
+ "icons/wizban/NewUMLWizard.gif")); //$NON-NLS-1$
setNeedsProgressMonitor(true);
}
@@ -111,21 +111,22 @@ public class UMLCreationWizard extends Wizard implements INewWizard { * @generated
*/
public void addPages() {
- diagramModelFilePage = new UMLCreationWizardPage("DiagramModelFile", getSelection(), //$NON-NLS-1$
- "PapyrusUMLCommunication_diagram"); //$NON-NLS-1$
+ diagramModelFilePage = new UMLCreationWizardPage(
+ "DiagramModelFile", getSelection(), "PapyrusUMLCommunication_diagram"); //$NON-NLS-1$ //$NON-NLS-2$
diagramModelFilePage.setTitle(Messages.UMLCreationWizard_DiagramModelFilePageTitle);
diagramModelFilePage.setDescription(Messages.UMLCreationWizard_DiagramModelFilePageDescription);
addPage(diagramModelFilePage);
- domainModelFilePage = new UMLCreationWizardPage("DomainModelFile", getSelection(), "PapyrusUMLCommunication") { //$NON-NLS-1$ //$NON-NLS-2$
+ domainModelFilePage = new UMLCreationWizardPage(
+ "DomainModelFile", getSelection(), "PapyrusUMLCommunication") { //$NON-NLS-1$ //$NON-NLS-2$
@Override
public void setVisible(boolean visible) {
if (visible) {
String fileName = diagramModelFilePage.getFileName();
fileName = fileName.substring(0, fileName.length() - ".PapyrusUMLCommunication_diagram".length()); //$NON-NLS-1$
- setFileName(UMLDiagramEditorUtil.getUniqueFileName(getContainerFullPath(), fileName,
- "PapyrusUMLCommunication")); //$NON-NLS-1$
+ setFileName(UMLDiagramEditorUtil.getUniqueFileName(
+ getContainerFullPath(), fileName, "PapyrusUMLCommunication")); //$NON-NLS-1$
}
super.setVisible(visible);
}
@@ -142,15 +143,17 @@ public class UMLCreationWizard extends Wizard implements INewWizard { IRunnableWithProgress op = new WorkspaceModifyOperation(null) {
@Override
- protected void execute(IProgressMonitor monitor) throws CoreException, InterruptedException {
+ protected void execute(IProgressMonitor monitor)
+ throws CoreException, InterruptedException {
diagram = UMLDiagramEditorUtil.createDiagram(diagramModelFilePage.getURI(),
- domainModelFilePage.getURI(), monitor);
+ domainModelFilePage.getURI(),
+ monitor);
if (isOpenNewlyCreatedDiagramEditor() && diagram != null) {
try {
UMLDiagramEditorUtil.openDiagram(diagram);
} catch (PartInitException e) {
- ErrorDialog.openError(getContainer().getShell(), Messages.UMLCreationWizardOpenEditorError,
- null, e.getStatus());
+ ErrorDialog.openError(getContainer().getShell(),
+ Messages.UMLCreationWizardOpenEditorError, null, e.getStatus());
}
}
}
@@ -161,10 +164,12 @@ public class UMLCreationWizard extends Wizard implements INewWizard { return false;
} catch (InvocationTargetException e) {
if (e.getTargetException() instanceof CoreException) {
- ErrorDialog.openError(getContainer().getShell(), Messages.UMLCreationWizardCreationError, null,
+ ErrorDialog.openError(getContainer().getShell(),
+ Messages.UMLCreationWizardCreationError, null,
((CoreException) e.getTargetException()).getStatus());
} else {
- UMLDiagramEditorPlugin.getInstance().logError("Error creating diagram", e.getTargetException()); //$NON-NLS-1$
+ UMLDiagramEditorPlugin.getInstance().logError(
+ "Error creating diagram", e.getTargetException()); //$NON-NLS-1$
}
return false;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/part/UMLCreationWizardPage.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/part/UMLCreationWizardPage.java index 92cc1467fa5..b3aceff7b9e 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/part/UMLCreationWizardPage.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/part/UMLCreationWizardPage.java @@ -73,7 +73,8 @@ public class UMLCreationWizardPage extends WizardNewFileCreationPage { */
public void createControl(Composite parent) {
super.createControl(parent);
- setFileName(UMLDiagramEditorUtil.getUniqueFileName(getContainerFullPath(), getFileName(), getExtension()));
+ setFileName(UMLDiagramEditorUtil.getUniqueFileName(
+ getContainerFullPath(), getFileName(), getExtension()));
setPageComplete(validatePage());
}
@@ -86,7 +87,8 @@ public class UMLCreationWizardPage extends WizardNewFileCreationPage { }
String extension = getExtension();
if (extension != null && !getFilePath().toString().endsWith("." + extension)) {
- setErrorMessage(NLS.bind(Messages.UMLCreationWizardPageExtensionError, extension));
+ setErrorMessage(NLS.bind(
+ Messages.UMLCreationWizardPageExtensionError, extension));
return false;
}
return true;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/part/UMLDiagramEditor.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/part/UMLDiagramEditor.java index 5b61654e81a..8176848c18a 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/part/UMLDiagramEditor.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/part/UMLDiagramEditor.java @@ -244,8 +244,7 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh */
protected void configureGraphicalViewer() {
super.configureGraphicalViewer();
- DiagramEditorContextMenuProvider provider = new DiagramEditorContextMenuProvider(this,
- getDiagramGraphicalViewer());
+ DiagramEditorContextMenuProvider provider = new DiagramEditorContextMenuProvider(this, getDiagramGraphicalViewer());
getDiagramGraphicalViewer().setContextMenu(provider);
getSite().registerContextMenu(ActionIds.DIAGRAM_EDITOR_CONTEXT_MENU, provider, getDiagramGraphicalViewer());
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/part/UMLDiagramEditorPlugin.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/part/UMLDiagramEditorPlugin.java index 31199e45692..4ca1203194c 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/part/UMLDiagramEditorPlugin.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/part/UMLDiagramEditorPlugin.java @@ -123,8 +123,7 @@ public class UMLDiagramEditorPlugin extends AbstractUIPlugin { * @generated
*/
public IPreferenceStore getPreferenceStore() {
- IPreferenceStore store = org.eclipse.papyrus.infra.gmfdiag.preferences.Activator.getDefault()
- .getPreferenceStore();
+ IPreferenceStore store = org.eclipse.papyrus.infra.gmfdiag.preferences.Activator.getDefault().getPreferenceStore();
return store;
}
@@ -139,9 +138,11 @@ public class UMLDiagramEditorPlugin extends AbstractUIPlugin { * @generated
*/
public ImageDescriptor getItemImageDescriptor(Object item) {
- IItemLabelProvider labelProvider = (IItemLabelProvider) adapterFactory.adapt(item, IItemLabelProvider.class);
+ IItemLabelProvider labelProvider = (IItemLabelProvider) adapterFactory.adapt(
+ item, IItemLabelProvider.class);
if (labelProvider != null) {
- return ExtendedImageRegistry.getInstance().getImageDescriptor(labelProvider.getImage(item));
+ return ExtendedImageRegistry.getInstance().getImageDescriptor(
+ labelProvider.getImage(item));
}
return null;
}
@@ -170,8 +171,8 @@ public class UMLDiagramEditorPlugin extends AbstractUIPlugin { public static ImageDescriptor findImageDescriptor(String path) {
final IPath p = new Path(path);
if (p.isAbsolute() && p.segmentCount() > 1) {
- return AbstractUIPlugin.imageDescriptorFromPlugin(p.segment(0),
- p.removeFirstSegments(1).makeAbsolute().toString());
+ return AbstractUIPlugin.imageDescriptorFromPlugin(
+ p.segment(0), p.removeFirstSegments(1).makeAbsolute().toString());
} else {
return getBundledImageDescriptor(p.makeAbsolute().toString());
}
@@ -200,7 +201,8 @@ public class UMLDiagramEditorPlugin extends AbstractUIPlugin { * @generated
*/
public static String getString(String key) {
- return Platform.getResourceString(getInstance().getBundle(), "%" + key); //$NON-NLS-1$
+ return Platform.getResourceString(
+ getInstance().getBundle(), "%" + key); //$NON-NLS-1$
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/part/UMLDiagramEditorUtil.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/part/UMLDiagramEditorUtil.java index 243a2c61586..0d6f1d8232f 100755 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/part/UMLDiagramEditorUtil.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/part/UMLDiagramEditorUtil.java @@ -142,16 +142,15 @@ public class UMLDiagramEditorUtil { final Resource diagramResource = editingDomain.getResourceSet().createResource(diagramURI);
final Resource modelResource = editingDomain.getResourceSet().createResource(modelURI);
final String diagramName = diagramURI.lastSegment();
- AbstractTransactionalCommand command = new AbstractTransactionalCommand(editingDomain,
- Messages.UMLDiagramEditorUtil_CreateDiagramCommandLabel, Collections.EMPTY_LIST) {
+ AbstractTransactionalCommand command = new AbstractTransactionalCommand(editingDomain, Messages.UMLDiagramEditorUtil_CreateDiagramCommandLabel, Collections.EMPTY_LIST) {
@Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info)
- throws ExecutionException {
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Package model = createInitialModel();
attachModelToResource(model, modelResource);
- Diagram diagram = ViewService.createDiagram(model, ModelEditPart.MODEL_ID,
- UMLDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT);
+ Diagram diagram = ViewService.createDiagram(
+ model,
+ ModelEditPart.MODEL_ID, UMLDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT);
if (diagram != null) {
diagramResource.getContents().add(diagram);
diagram.setName(diagramName);
@@ -159,10 +158,8 @@ public class UMLDiagramEditorUtil { }
try {
- modelResource.save(
- org.eclipse.papyrus.uml.diagram.communication.part.UMLDiagramEditorUtil.getSaveOptions());
- diagramResource.save(
- org.eclipse.papyrus.uml.diagram.communication.part.UMLDiagramEditorUtil.getSaveOptions());
+ modelResource.save(org.eclipse.papyrus.uml.diagram.communication.part.UMLDiagramEditorUtil.getSaveOptions());
+ diagramResource.save(org.eclipse.papyrus.uml.diagram.communication.part.UMLDiagramEditorUtil.getSaveOptions());
} catch (IOException e) {
UMLDiagramEditorPlugin.getInstance().logError("Unable to store model and diagram resources", e); //$NON-NLS-1$
@@ -171,8 +168,7 @@ public class UMLDiagramEditorUtil { }
};
try {
- OperationHistoryFactory.getOperationHistory().execute(command, new SubProgressMonitor(progressMonitor, 1),
- null);
+ OperationHistoryFactory.getOperationHistory().execute(command, new SubProgressMonitor(progressMonitor, 1), null);
} catch (ExecutionException e) {
UMLDiagramEditorPlugin.getInstance().logError("Unable to create model and diagram", e); //$NON-NLS-1$
}
@@ -182,21 +178,21 @@ public class UMLDiagramEditorUtil { }
/**
- * Create a new instance of domain element associated with canvas.
- * <!-- begin-user-doc -->
+ * Create a new instance of domain element associated with canvas.
+ * <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @generated
- */
+ * @generated
+ */
private static Package createInitialModel() {
return UMLFactory.eINSTANCE.createPackage();
}
/**
- * Store model element in the resource.
- * <!-- begin-user-doc -->
+ * Store model element in the resource.
+ * <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @generated
- */
+ * @generated
+ */
private static void attachModelToResource(Package model, Resource resource) {
resource.getContents().add(model);
}
@@ -216,8 +212,7 @@ public class UMLDiagramEditorUtil { }
if (!editParts.isEmpty()) {
- diagramPart.getDiagramGraphicalViewer()
- .reveal(firstPrimary != null ? firstPrimary : (EditPart) editParts.get(0));
+ diagramPart.getDiagramGraphicalViewer().reveal(firstPrimary != null ? firstPrimary : (EditPart) editParts.get(0));
}
}
@@ -343,8 +338,7 @@ public class UMLDiagramEditorUtil { return true;
}
- if (parentView.isSetElement() && !element2ViewMap.containsKey(parentView.getElement())
- && elements.contains(parentView.getElement())) {
+ if (parentView.isSetElement() && !element2ViewMap.containsKey(parentView.getElement()) && elements.contains(parentView.getElement())) {
element2ViewMap.put(parentView.getElement(), parentView);
if (elements.size() == element2ViewMap.size()) {
return true;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/part/UMLDiagramUpdater.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/part/UMLDiagramUpdater.java index 24b19079ba6..7e84e804c1b 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/part/UMLDiagramUpdater.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/part/UMLDiagramUpdater.java @@ -92,7 +92,8 @@ public class UMLDiagramUpdater implements DiagramUpdater { }
Package modelElement = (Package) view.getElement();
LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getPackagedElements().iterator(); it.hasNext();) {
+ for (Iterator<?> it = modelElement.getPackagedElements()
+ .iterator(); it.hasNext();) {
PackageableElement childElement = (PackageableElement) it.next();
String visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
if (InteractionEditPart.VISUAL_ID.equals(visualID)) {
@@ -267,13 +268,11 @@ public class UMLDiagramUpdater implements DiagramUpdater { */
public List<UMLLinkDescriptor> getInteraction_Shape_IncomingLinks(View view) {
Interaction modelElement = (Interaction) view.getElement();
- CrossReferenceAdapter crossReferencer = CrossReferenceAdapter
- .getCrossReferenceAdapter(view.eResource().getResourceSet());
+ CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
result.addAll(getIncomingTypeModelFacetLinks_Path_Edge(modelElement, crossReferencer));
result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElementEdge(modelElement, crossReferencer));
- result.addAll(
- getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement, crossReferencer));
result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_EventEdge(modelElement, crossReferencer));
result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_EventEdge(modelElement, crossReferencer));
return result;
@@ -284,13 +283,11 @@ public class UMLDiagramUpdater implements DiagramUpdater { */
public List<UMLLinkDescriptor> getLifeline_Shape_IncomingLinks(View view) {
Lifeline modelElement = (Lifeline) view.getElement();
- CrossReferenceAdapter crossReferencer = CrossReferenceAdapter
- .getCrossReferenceAdapter(view.eResource().getResourceSet());
+ CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
result.addAll(getIncomingTypeModelFacetLinks_Path_Edge(modelElement, crossReferencer));
result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElementEdge(modelElement, crossReferencer));
- result.addAll(
- getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement, crossReferencer));
result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_EventEdge(modelElement, crossReferencer));
result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_EventEdge(modelElement, crossReferencer));
return result;
@@ -301,13 +298,11 @@ public class UMLDiagramUpdater implements DiagramUpdater { */
public List<UMLLinkDescriptor> getConstraint_Shape_IncomingLinks(View view) {
Constraint modelElement = (Constraint) view.getElement();
- CrossReferenceAdapter crossReferencer = CrossReferenceAdapter
- .getCrossReferenceAdapter(view.eResource().getResourceSet());
+ CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
result.addAll(getIncomingTypeModelFacetLinks_Path_Edge(modelElement, crossReferencer));
result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElementEdge(modelElement, crossReferencer));
- result.addAll(
- getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement, crossReferencer));
result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_EventEdge(modelElement, crossReferencer));
result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_EventEdge(modelElement, crossReferencer));
return result;
@@ -318,13 +313,11 @@ public class UMLDiagramUpdater implements DiagramUpdater { */
public List<UMLLinkDescriptor> getComment_Shape_IncomingLinks(View view) {
Comment modelElement = (Comment) view.getElement();
- CrossReferenceAdapter crossReferencer = CrossReferenceAdapter
- .getCrossReferenceAdapter(view.eResource().getResourceSet());
+ CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
result.addAll(getIncomingTypeModelFacetLinks_Path_Edge(modelElement, crossReferencer));
result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElementEdge(modelElement, crossReferencer));
- result.addAll(
- getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement, crossReferencer));
return result;
}
@@ -333,13 +326,11 @@ public class UMLDiagramUpdater implements DiagramUpdater { */
public List<UMLLinkDescriptor> getTimeObservation_Shape_IncomingLinks(View view) {
TimeObservation modelElement = (TimeObservation) view.getElement();
- CrossReferenceAdapter crossReferencer = CrossReferenceAdapter
- .getCrossReferenceAdapter(view.eResource().getResourceSet());
+ CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
result.addAll(getIncomingTypeModelFacetLinks_Path_Edge(modelElement, crossReferencer));
result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElementEdge(modelElement, crossReferencer));
- result.addAll(
- getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement, crossReferencer));
result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_EventEdge(modelElement, crossReferencer));
result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_EventEdge(modelElement, crossReferencer));
return result;
@@ -350,13 +341,11 @@ public class UMLDiagramUpdater implements DiagramUpdater { */
public List<UMLLinkDescriptor> getDurationObservation_Shape_IncomingLinks(View view) {
DurationObservation modelElement = (DurationObservation) view.getElement();
- CrossReferenceAdapter crossReferencer = CrossReferenceAdapter
- .getCrossReferenceAdapter(view.eResource().getResourceSet());
+ CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
result.addAll(getIncomingTypeModelFacetLinks_Path_Edge(modelElement, crossReferencer));
result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElementEdge(modelElement, crossReferencer));
- result.addAll(
- getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement, crossReferencer));
result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_EventEdge(modelElement, crossReferencer));
result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_EventEdge(modelElement, crossReferencer));
return result;
@@ -367,13 +356,11 @@ public class UMLDiagramUpdater implements DiagramUpdater { */
public List<UMLLinkDescriptor> getPath_Edge_IncomingLinks(View view) {
Message modelElement = (Message) view.getElement();
- CrossReferenceAdapter crossReferencer = CrossReferenceAdapter
- .getCrossReferenceAdapter(view.eResource().getResourceSet());
+ CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
result.addAll(getIncomingTypeModelFacetLinks_Path_Edge(modelElement, crossReferencer));
result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElementEdge(modelElement, crossReferencer));
- result.addAll(
- getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement, crossReferencer));
result.addAll(getIncomingFeatureModelFacetLinks_DurationObservation_EventEdge(modelElement, crossReferencer));
result.addAll(getIncomingFeatureModelFacetLinks_TimeObservation_EventEdge(modelElement, crossReferencer));
return result;
@@ -458,7 +445,8 @@ public class UMLDiagramUpdater implements DiagramUpdater { */
protected Collection<UMLLinkDescriptor> getContainedTypeModelFacetLinks_Path_Edge(Interaction container) {
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- for (Iterator<?> links = container.getMessages().iterator(); links.hasNext();) {
+ for (Iterator<?> links = container.getMessages()
+ .iterator(); links.hasNext();) {
EObject linkObject = (EObject) links.next();
if (false == linkObject instanceof Message) {
continue;
@@ -487,8 +475,7 @@ public class UMLDiagramUpdater implements DiagramUpdater { LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
Collection<EStructuralFeature.Setting> settings = crossReferencer.getInverseReferences(target);
for (EStructuralFeature.Setting setting : settings) {
- if (setting.getEStructuralFeature() != UMLPackage.eINSTANCE.getElement_OwnedElement()
- || false == setting.getEObject() instanceof Message) {
+ if (setting.getEStructuralFeature() != UMLPackage.eINSTANCE.getElement_OwnedElement() || false == setting.getEObject() instanceof Message) {
continue;
}
Message link = (Message) setting.getEObject();
@@ -510,8 +497,7 @@ public class UMLDiagramUpdater implements DiagramUpdater { Collection<EStructuralFeature.Setting> settings = crossReferencer.getInverseReferences(target);
for (EStructuralFeature.Setting setting : settings) {
if (setting.getEStructuralFeature() == UMLPackage.eINSTANCE.getComment_AnnotatedElement()) {
- result.add(new UMLLinkDescriptor(setting.getEObject(), target,
- UMLElementTypes.Comment_AnnotatedElementEdge, CommentAnnotatedElementEditPart.VISUAL_ID));
+ result.add(new UMLLinkDescriptor(setting.getEObject(), target, UMLElementTypes.Comment_AnnotatedElementEdge, CommentAnnotatedElementEditPart.VISUAL_ID));
}
}
return result;
@@ -526,9 +512,7 @@ public class UMLDiagramUpdater implements DiagramUpdater { Collection<EStructuralFeature.Setting> settings = crossReferencer.getInverseReferences(target);
for (EStructuralFeature.Setting setting : settings) {
if (setting.getEStructuralFeature() == UMLPackage.eINSTANCE.getConstraint_ConstrainedElement()) {
- result.add(new UMLLinkDescriptor(setting.getEObject(), target,
- UMLElementTypes.Constraint_ConstrainedElementEdge,
- ConstraintConstrainedElementEditPart.VISUAL_ID));
+ result.add(new UMLLinkDescriptor(setting.getEObject(), target, UMLElementTypes.Constraint_ConstrainedElementEdge, ConstraintConstrainedElementEditPart.VISUAL_ID));
}
}
return result;
@@ -543,8 +527,7 @@ public class UMLDiagramUpdater implements DiagramUpdater { Collection<EStructuralFeature.Setting> settings = crossReferencer.getInverseReferences(target);
for (EStructuralFeature.Setting setting : settings) {
if (setting.getEStructuralFeature() == UMLPackage.eINSTANCE.getDurationObservation_Event()) {
- result.add(new UMLLinkDescriptor(setting.getEObject(), target,
- UMLElementTypes.DurationObservation_EventEdge, ConnectorDurationObservationEditPart.VISUAL_ID));
+ result.add(new UMLLinkDescriptor(setting.getEObject(), target, UMLElementTypes.DurationObservation_EventEdge, ConnectorDurationObservationEditPart.VISUAL_ID));
}
}
return result;
@@ -559,8 +542,7 @@ public class UMLDiagramUpdater implements DiagramUpdater { Collection<EStructuralFeature.Setting> settings = crossReferencer.getInverseReferences(target);
for (EStructuralFeature.Setting setting : settings) {
if (setting.getEStructuralFeature() == UMLPackage.eINSTANCE.getTimeObservation_Event()) {
- result.add(new UMLLinkDescriptor(setting.getEObject(), target,
- UMLElementTypes.TimeObservation_EventEdge, ConnectorTimeObservationEditPart.VISUAL_ID));
+ result.add(new UMLLinkDescriptor(setting.getEObject(), target, UMLElementTypes.TimeObservation_EventEdge, ConnectorTimeObservationEditPart.VISUAL_ID));
}
}
return result;
@@ -583,7 +565,8 @@ public class UMLDiagramUpdater implements DiagramUpdater { return Collections.emptyList();
}
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- for (Iterator<?> links = container.getMessages().iterator(); links.hasNext();) {
+ for (Iterator<?> links = container.getMessages()
+ .iterator(); links.hasNext();) {
EObject linkObject = (EObject) links.next();
if (false == linkObject instanceof Message) {
continue;
@@ -613,10 +596,10 @@ public class UMLDiagramUpdater implements DiagramUpdater { protected Collection<UMLLinkDescriptor> getOutgoingFeatureModelFacetLinks_Comment_AnnotatedElementEdge(
Comment source) {
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- for (Iterator<?> destinations = source.getAnnotatedElements().iterator(); destinations.hasNext();) {
+ for (Iterator<?> destinations = source.getAnnotatedElements()
+ .iterator(); destinations.hasNext();) {
Element destination = (Element) destinations.next();
- result.add(new UMLLinkDescriptor(source, destination, UMLElementTypes.Comment_AnnotatedElementEdge,
- CommentAnnotatedElementEditPart.VISUAL_ID));
+ result.add(new UMLLinkDescriptor(source, destination, UMLElementTypes.Comment_AnnotatedElementEdge, CommentAnnotatedElementEditPart.VISUAL_ID));
}
return result;
}
@@ -627,10 +610,10 @@ public class UMLDiagramUpdater implements DiagramUpdater { protected Collection<UMLLinkDescriptor> getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(
Constraint source) {
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- for (Iterator<?> destinations = source.getConstrainedElements().iterator(); destinations.hasNext();) {
+ for (Iterator<?> destinations = source.getConstrainedElements()
+ .iterator(); destinations.hasNext();) {
Element destination = (Element) destinations.next();
- result.add(new UMLLinkDescriptor(source, destination, UMLElementTypes.Constraint_ConstrainedElementEdge,
- ConstraintConstrainedElementEditPart.VISUAL_ID));
+ result.add(new UMLLinkDescriptor(source, destination, UMLElementTypes.Constraint_ConstrainedElementEdge, ConstraintConstrainedElementEditPart.VISUAL_ID));
}
return result;
}
@@ -641,10 +624,10 @@ public class UMLDiagramUpdater implements DiagramUpdater { protected Collection<UMLLinkDescriptor> getOutgoingFeatureModelFacetLinks_DurationObservation_EventEdge(
DurationObservation source) {
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- for (Iterator<?> destinations = source.getEvents().iterator(); destinations.hasNext();) {
+ for (Iterator<?> destinations = source.getEvents()
+ .iterator(); destinations.hasNext();) {
NamedElement destination = (NamedElement) destinations.next();
- result.add(new UMLLinkDescriptor(source, destination, UMLElementTypes.DurationObservation_EventEdge,
- ConnectorDurationObservationEditPart.VISUAL_ID));
+ result.add(new UMLLinkDescriptor(source, destination, UMLElementTypes.DurationObservation_EventEdge, ConnectorDurationObservationEditPart.VISUAL_ID));
}
return result;
}
@@ -659,8 +642,7 @@ public class UMLDiagramUpdater implements DiagramUpdater { if (destination == null) {
return result;
}
- result.add(new UMLLinkDescriptor(source, destination, UMLElementTypes.TimeObservation_EventEdge,
- ConnectorTimeObservationEditPart.VISUAL_ID));
+ result.add(new UMLLinkDescriptor(source, destination, UMLElementTypes.TimeObservation_EventEdge, ConnectorTimeObservationEditPart.VISUAL_ID));
return result;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/part/UMLDocumentProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/part/UMLDocumentProvider.java index 91f763cfba6..f7a69b967dc 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/part/UMLDocumentProvider.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/part/UMLDocumentProvider.java @@ -76,9 +76,9 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi protected ElementInfo createElementInfo(Object element) throws CoreException {
if (false == element instanceof FileEditorInput && false == element instanceof URIEditorInput) {
throw new CoreException(new Status(IStatus.ERROR, UMLDiagramEditorPlugin.ID, 0,
- NLS.bind(Messages.UMLDocumentProvider_IncorrectInputError,
- new Object[] { element, "org.eclipse.ui.part.FileEditorInput", //$NON-NLS-1$
- "org.eclipse.emf.common.ui.URIEditorInput" }), //$NON-NLS-1$
+ NLS.bind(
+ Messages.UMLDocumentProvider_IncorrectInputError,
+ new Object[] { element, "org.eclipse.ui.part.FileEditorInput", "org.eclipse.emf.common.ui.URIEditorInput" }), //$NON-NLS-1$ //$NON-NLS-2$
null));
}
IEditorInput editorInput = (IEditorInput) element;
@@ -96,9 +96,9 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi protected IDocument createDocument(Object element) throws CoreException {
if (false == element instanceof FileEditorInput && false == element instanceof URIEditorInput) {
throw new CoreException(new Status(IStatus.ERROR, UMLDiagramEditorPlugin.ID, 0,
- NLS.bind(Messages.UMLDocumentProvider_IncorrectInputError,
- new Object[] { element, "org.eclipse.ui.part.FileEditorInput", //$NON-NLS-1$
- "org.eclipse.emf.common.ui.URIEditorInput" }), //$NON-NLS-1$
+ NLS.bind(
+ Messages.UMLDocumentProvider_IncorrectInputError,
+ new Object[] { element, "org.eclipse.ui.part.FileEditorInput", "org.eclipse.emf.common.ui.URIEditorInput" }), //$NON-NLS-1$ //$NON-NLS-2$
null));
}
IDocument document = createEmptyDocument();
@@ -154,9 +154,7 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi private TransactionalEditingDomain createEditingDomain() {
TransactionalEditingDomain editingDomain = DiagramEditingDomainFactory.getInstance().createEditingDomain();
editingDomain.setID("org.eclipse.papyrus.uml.diagram.communication.EditingDomain"); //$NON-NLS-1$
- final NotificationFilter diagramResourceModifiedFilter = NotificationFilter
- .createNotifierFilter(editingDomain.getResourceSet())
- .and(NotificationFilter.createEventTypeFilter(Notification.ADD))
+ final NotificationFilter diagramResourceModifiedFilter = NotificationFilter.createNotifierFilter(editingDomain.getResourceSet()).and(NotificationFilter.createEventTypeFilter(Notification.ADD))
.and(NotificationFilter.createFeatureFilter(ResourceSet.class, ResourceSet.RESOURCE_SET__RESOURCES));
editingDomain.getResourceSet().eAdapters().add(new Adapter() {
@@ -251,9 +249,9 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi }
} else {
throw new CoreException(new Status(IStatus.ERROR, UMLDiagramEditorPlugin.ID, 0,
- NLS.bind(Messages.UMLDocumentProvider_IncorrectInputError,
- new Object[] { element, "org.eclipse.ui.part.FileEditorInput", //$NON-NLS-1$
- "org.eclipse.emf.common.ui.URIEditorInput" }), //$NON-NLS-1$
+ NLS.bind(
+ Messages.UMLDocumentProvider_IncorrectInputError,
+ new Object[] { element, "org.eclipse.ui.part.FileEditorInput", "org.eclipse.emf.common.ui.URIEditorInput" }), //$NON-NLS-1$ //$NON-NLS-2$
null));
}
}
@@ -316,8 +314,7 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi files2Validate.add(file);
}
}
- ResourcesPlugin.getWorkspace().validateEdit(files2Validate.toArray(new IFile[files2Validate.size()]),
- computationContext);
+ ResourcesPlugin.getWorkspace().validateEdit(files2Validate.toArray(new IFile[files2Validate.size()]), computationContext);
}
super.doValidateState(element, computationContext);
@@ -480,8 +477,7 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi files.add(file);
}
}
- return ResourcesPlugin.getWorkspace().getRuleFactory()
- .validateEditRule(files.toArray(new IFile[files.size()]));
+ return ResourcesPlugin.getWorkspace().getRuleFactory().validateEditRule(files.toArray(new IFile[files.size()]));
}
return null;
}
@@ -531,26 +527,26 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi ResourceSetInfo info = getResourceSetInfo(element);
if (info != null) {
if (!overwrite && !info.isSynchronized()) {
- throw new CoreException(
- new Status(IStatus.ERROR, UMLDiagramEditorPlugin.ID, IResourceStatus.OUT_OF_SYNC_LOCAL,
- Messages.UMLDocumentProvider_UnsynchronizedFileSaveError, null));
+ throw new CoreException(new Status(IStatus.ERROR, UMLDiagramEditorPlugin.ID,
+ IResourceStatus.OUT_OF_SYNC_LOCAL,
+ Messages.UMLDocumentProvider_UnsynchronizedFileSaveError,
+ null));
}
info.stopResourceListening();
fireElementStateChanging(element);
try {
- monitor.beginTask(Messages.UMLDocumentProvider_SaveDiagramTask,
- info.getResourceSet().getResources().size() + 1); //"Saving diagram"
+ monitor.beginTask(Messages.UMLDocumentProvider_SaveDiagramTask, info.getResourceSet().getResources().size() + 1); //"Saving diagram"
for (Iterator<Resource> it = info.getLoadedResourcesIterator(); it.hasNext();) {
Resource nextResource = it.next();
- monitor.setTaskName(
- NLS.bind(Messages.UMLDocumentProvider_SaveNextResourceTask, nextResource.getURI()));
+ monitor.setTaskName(NLS.bind(
+ Messages.UMLDocumentProvider_SaveNextResourceTask,
+ nextResource.getURI()));
if (nextResource.isLoaded() && !info.getEditingDomain().isReadOnly(nextResource)) {
try {
nextResource.save(UMLDiagramEditorUtil.getSaveOptions());
} catch (IOException e) {
fireElementStateChangeFailed(element);
- throw new CoreException(new Status(IStatus.ERROR, UMLDiagramEditorPlugin.ID,
- EditorStatusCodes.RESOURCE_FAILURE, e.getLocalizedMessage(), null));
+ throw new CoreException(new Status(IStatus.ERROR, UMLDiagramEditorPlugin.ID, EditorStatusCodes.RESOURCE_FAILURE, e.getLocalizedMessage(), null));
}
}
monitor.worked(1);
@@ -575,28 +571,23 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi } else {
fireElementStateChangeFailed(element);
throw new CoreException(new Status(IStatus.ERROR, UMLDiagramEditorPlugin.ID, 0,
- NLS.bind(Messages.UMLDocumentProvider_IncorrectInputError,
- new Object[] { element, "org.eclipse.ui.part.FileEditorInput", //$NON-NLS-1$
- "org.eclipse.emf.common.ui.URIEditorInput" }), //$NON-NLS-1$
+ NLS.bind(
+ Messages.UMLDocumentProvider_IncorrectInputError,
+ new Object[] { element, "org.eclipse.ui.part.FileEditorInput", "org.eclipse.emf.common.ui.URIEditorInput" }), //$NON-NLS-1$ //$NON-NLS-2$
null));
}
if (false == document instanceof IDiagramDocument) {
fireElementStateChangeFailed(element);
throw new CoreException(new Status(IStatus.ERROR, UMLDiagramEditorPlugin.ID, 0,
- "Incorrect document used: " + document //$NON-NLS-1$
- + " instead of org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDiagramDocument", //$NON-NLS-1$
- null));
+ "Incorrect document used: " + document + " instead of org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDiagramDocument", null)); //$NON-NLS-1$ //$NON-NLS-2$
}
IDiagramDocument diagramDocument = (IDiagramDocument) document;
- final Resource newResource = diagramDocument.getEditingDomain().getResourceSet()
- .createResource(newResoruceURI);
+ final Resource newResource = diagramDocument.getEditingDomain().getResourceSet().createResource(newResoruceURI);
final Diagram diagramCopy = EcoreUtil.copy(diagramDocument.getDiagram());
try {
- new AbstractTransactionalCommand(diagramDocument.getEditingDomain(),
- NLS.bind(Messages.UMLDocumentProvider_SaveAsOperation, diagramCopy.getName()), affectedFiles) {
+ new AbstractTransactionalCommand(diagramDocument.getEditingDomain(), NLS.bind(Messages.UMLDocumentProvider_SaveAsOperation, diagramCopy.getName()), affectedFiles) {
@Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info)
- throws ExecutionException {
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
newResource.getContents().add(diagramCopy);
return CommandResult.newOKCommandResult();
}
@@ -604,12 +595,10 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi newResource.save(UMLDiagramEditorUtil.getSaveOptions());
} catch (ExecutionException e) {
fireElementStateChangeFailed(element);
- throw new CoreException(
- new Status(IStatus.ERROR, UMLDiagramEditorPlugin.ID, 0, e.getLocalizedMessage(), null));
+ throw new CoreException(new Status(IStatus.ERROR, UMLDiagramEditorPlugin.ID, 0, e.getLocalizedMessage(), null));
} catch (IOException e) {
fireElementStateChangeFailed(element);
- throw new CoreException(
- new Status(IStatus.ERROR, UMLDiagramEditorPlugin.ID, 0, e.getLocalizedMessage(), null));
+ throw new CoreException(new Status(IStatus.ERROR, UMLDiagramEditorPlugin.ID, 0, e.getLocalizedMessage(), null));
}
newResource.unload();
}
@@ -624,8 +613,7 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi try {
file.refreshLocal(IResource.DEPTH_INFINITE, monitor);
} catch (CoreException ex) {
- UMLDiagramEditorPlugin.getInstance().logError(Messages.UMLDocumentProvider_handleElementContentChanged,
- ex);
+ UMLDiagramEditorPlugin.getInstance().logError(Messages.UMLDocumentProvider_handleElementContentChanged, ex);
// Error message to log was initially taken from org.eclipse.gmf.runtime.diagram.ui.resources.editor.ide.internal.l10n.EditorMessages.FileDocumentProvider_handleElementContentChanged
}
}
@@ -651,8 +639,7 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi */
protected void handleElementMoved(IEditorInput input, URI uri) {
if (input instanceof FileEditorInput) {
- IFile newFile = ResourcesPlugin.getWorkspace().getRoot()
- .getFile(new Path(URI.decode(uri.path())).removeFirstSegments(1));
+ IFile newFile = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(URI.decode(uri.path())).removeFirstSegments(1));
fireElementMoved(input, newFile == null ? null : new FileEditorInput(newFile));
return;
}
@@ -976,9 +963,7 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi */
public ResourceSetModificationListener(ResourceSetInfo info) {
myInfo = info;
- myModifiedFilter = NotificationFilter.createEventTypeFilter(Notification.SET)
- .or(NotificationFilter.createEventTypeFilter(Notification.UNSET))
- .and(NotificationFilter.createFeatureFilter(Resource.class, Resource.RESOURCE__IS_MODIFIED));
+ myModifiedFilter = NotificationFilter.createEventTypeFilter(Notification.SET).or(NotificationFilter.createEventTypeFilter(Notification.UNSET)).and(NotificationFilter.createFeatureFilter(Resource.class, Resource.RESOURCE__IS_MODIFIED));
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/part/UMLInitDiagramFileAction.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/part/UMLInitDiagramFileAction.java index 7e08bac7d16..2bd6926621c 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/part/UMLInitDiagramFileAction.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/part/UMLInitDiagramFileAction.java @@ -84,15 +84,19 @@ public class UMLInitDiagramFileAction implements IObjectActionDelegate { Resource resource = resourceSet.getResource(domainModelURI, true);
diagramRoot = resource.getContents().get(0);
} catch (WrappedException ex) {
- UMLDiagramEditorPlugin.getInstance().logError("Unable to load resource: " + domainModelURI, ex); //$NON-NLS-1$
+ UMLDiagramEditorPlugin.getInstance().logError(
+ "Unable to load resource: " + domainModelURI, ex); //$NON-NLS-1$
}
if (diagramRoot == null) {
- MessageDialog.openError(getShell(), Messages.InitDiagramFile_ResourceErrorDialogTitle,
+ MessageDialog.openError(getShell(),
+ Messages.InitDiagramFile_ResourceErrorDialogTitle,
Messages.InitDiagramFile_ResourceErrorDialogMessage);
return;
}
Wizard wizard = new UMLNewDiagramFileWizard(domainModelURI, diagramRoot, editingDomain);
- wizard.setWindowTitle(NLS.bind(Messages.InitDiagramFile_WizardTitle, ModelEditPart.MODEL_ID));
+ wizard.setWindowTitle(NLS.bind(
+ Messages.InitDiagramFile_WizardTitle,
+ ModelEditPart.MODEL_ID));
UMLDiagramEditorUtil.runWizard(getShell(), wizard, "InitDiagramFile"); //$NON-NLS-1$
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/part/UMLNewDiagramFileWizard.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/part/UMLNewDiagramFileWizard.java index 55fef42a60d..8dcf8a8545c 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/part/UMLNewDiagramFileWizard.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/part/UMLNewDiagramFileWizard.java @@ -68,11 +68,11 @@ public class UMLNewDiagramFileWizard extends Wizard { assert diagramRoot != null : "Doagram root element must be specified"; //$NON-NLS-1$
assert editingDomain != null : "Editing domain must be specified"; //$NON-NLS-1$
- myFileCreationPage = new WizardNewFileCreationPage(Messages.UMLNewDiagramFileWizard_CreationPageName,
- StructuredSelection.EMPTY);
+ myFileCreationPage = new WizardNewFileCreationPage(Messages.UMLNewDiagramFileWizard_CreationPageName, StructuredSelection.EMPTY);
myFileCreationPage.setTitle(Messages.UMLNewDiagramFileWizard_CreationPageTitle);
- myFileCreationPage.setDescription(
- NLS.bind(Messages.UMLNewDiagramFileWizard_CreationPageDescription, ModelEditPart.MODEL_ID));
+ myFileCreationPage.setDescription(NLS.bind(
+ Messages.UMLNewDiagramFileWizard_CreationPageDescription,
+ ModelEditPart.MODEL_ID));
IPath filePath;
String fileName = URI.decode(domainModelURI.trimFileExtension().lastSegment());
if (domainModelURI.isPlatformResource()) {
@@ -84,11 +84,10 @@ public class UMLNewDiagramFileWizard extends Wizard { throw new IllegalArgumentException("Unsupported URI: " + domainModelURI); //$NON-NLS-1$
}
myFileCreationPage.setContainerFullPath(filePath);
- myFileCreationPage.setFileName(
- UMLDiagramEditorUtil.getUniqueFileName(filePath, fileName, "PapyrusUMLCommunication_diagram")); //$NON-NLS-1$
+ myFileCreationPage.setFileName(UMLDiagramEditorUtil.getUniqueFileName(
+ filePath, fileName, "PapyrusUMLCommunication_diagram")); //$NON-NLS-1$
- diagramRootElementSelectionPage = new DiagramRootElementSelectionPage(
- Messages.UMLNewDiagramFileWizard_RootSelectionPageName);
+ diagramRootElementSelectionPage = new DiagramRootElementSelectionPage(Messages.UMLNewDiagramFileWizard_RootSelectionPageName);
diagramRootElementSelectionPage.setTitle(Messages.UMLNewDiagramFileWizard_RootSelectionPageTitle);
diagramRootElementSelectionPage.setDescription(Messages.UMLNewDiagramFileWizard_RootSelectionPageDescription);
diagramRootElementSelectionPage.setModelElement(diagramRoot);
@@ -115,33 +114,39 @@ public class UMLNewDiagramFileWizard extends Wizard { URI diagramModelURI = URI.createPlatformResourceURI(diagramFile.getFullPath().toString(), true);
ResourceSet resourceSet = myEditingDomain.getResourceSet();
final Resource diagramResource = resourceSet.createResource(diagramModelURI);
- AbstractTransactionalCommand command = new AbstractTransactionalCommand(myEditingDomain,
- Messages.UMLNewDiagramFileWizard_InitDiagramCommand, affectedFiles) {
+ AbstractTransactionalCommand command = new AbstractTransactionalCommand(
+ myEditingDomain, Messages.UMLNewDiagramFileWizard_InitDiagramCommand, affectedFiles) {
@Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info)
+ protected CommandResult doExecuteWithResult(
+ IProgressMonitor monitor, IAdaptable info)
throws ExecutionException {
- String diagramVID = UMLVisualIDRegistry
- .getDiagramVisualID(diagramRootElementSelectionPage.getModelElement());
+ String diagramVID = UMLVisualIDRegistry.getDiagramVisualID(diagramRootElementSelectionPage.getModelElement());
if (diagramVID.equals(ModelEditPart.VISUAL_ID)) {
- return CommandResult.newErrorCommandResult(Messages.UMLNewDiagramFileWizard_IncorrectRootError);
+ return CommandResult.newErrorCommandResult(
+ Messages.UMLNewDiagramFileWizard_IncorrectRootError);
}
- Diagram diagram = ViewService.createDiagram(diagramRootElementSelectionPage.getModelElement(),
- ModelEditPart.MODEL_ID, UMLDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT);
+ Diagram diagram = ViewService.createDiagram(
+ diagramRootElementSelectionPage.getModelElement(), ModelEditPart.MODEL_ID,
+ UMLDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT);
diagramResource.getContents().add(diagram);
return CommandResult.newOKCommandResult();
}
};
try {
- OperationHistoryFactory.getOperationHistory().execute(command, new NullProgressMonitor(), null);
+ OperationHistoryFactory.getOperationHistory().execute(
+ command, new NullProgressMonitor(), null);
diagramResource.save(UMLDiagramEditorUtil.getSaveOptions());
UMLDiagramEditorUtil.openDiagram(diagramResource);
} catch (ExecutionException e) {
- UMLDiagramEditorPlugin.getInstance().logError("Unable to create model and diagram", e); //$NON-NLS-1$
+ UMLDiagramEditorPlugin.getInstance().logError(
+ "Unable to create model and diagram", e); //$NON-NLS-1$
} catch (IOException ex) {
- UMLDiagramEditorPlugin.getInstance().logError("Save operation failed for: " + diagramModelURI, ex); //$NON-NLS-1$
+ UMLDiagramEditorPlugin.getInstance().logError(
+ "Save operation failed for: " + diagramModelURI, ex); //$NON-NLS-1$
} catch (PartInitException ex) {
- UMLDiagramEditorPlugin.getInstance().logError("Unable to open editor", ex); //$NON-NLS-1$
+ UMLDiagramEditorPlugin.getInstance().logError(
+ "Unable to open editor", ex); //$NON-NLS-1$
}
return true;
}
@@ -173,8 +178,9 @@ public class UMLNewDiagramFileWizard extends Wizard { setErrorMessage(Messages.UMLNewDiagramFileWizard_RootSelectionPageNoSelectionMessage);
return false;
}
- boolean result = ViewService.getInstance()
- .provides(new CreateDiagramViewOperation(new EObjectAdapter(getModelElement()),
+ boolean result = ViewService.getInstance().provides(
+ new CreateDiagramViewOperation(
+ new EObjectAdapter(getModelElement()),
ModelEditPart.MODEL_ID, UMLDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT));
setErrorMessage(result ? null : Messages.UMLNewDiagramFileWizard_RootSelectionPageInvalidSelectionMessage);
return result;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/part/UMLVisualIDRegistry.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/part/UMLVisualIDRegistry.java index b5ffd052db6..709c66a990b 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/part/UMLVisualIDRegistry.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/part/UMLVisualIDRegistry.java @@ -117,15 +117,13 @@ public class UMLVisualIDRegistry { if (domainElement == null) {
return "";
}
- String containerModelID = org.eclipse.papyrus.uml.diagram.communication.part.UMLVisualIDRegistry
- .getModelID(containerView);
+ String containerModelID = org.eclipse.papyrus.uml.diagram.communication.part.UMLVisualIDRegistry.getModelID(containerView);
if (!ModelEditPart.MODEL_ID.equals(containerModelID)) {
return "";
}
String containerVisualID;
if (ModelEditPart.MODEL_ID.equals(containerModelID)) {
- containerVisualID = org.eclipse.papyrus.uml.diagram.communication.part.UMLVisualIDRegistry
- .getVisualID(containerView);
+ containerVisualID = org.eclipse.papyrus.uml.diagram.communication.part.UMLVisualIDRegistry.getVisualID(containerView);
} else {
if (containerView instanceof Diagram) {
containerVisualID = ModelEditPart.VISUAL_ID;
@@ -166,15 +164,13 @@ public class UMLVisualIDRegistry { * @generated
*/
public static boolean canCreateNode(View containerView, String nodeVisualID) {
- String containerModelID = org.eclipse.papyrus.uml.diagram.communication.part.UMLVisualIDRegistry
- .getModelID(containerView);
+ String containerModelID = org.eclipse.papyrus.uml.diagram.communication.part.UMLVisualIDRegistry.getModelID(containerView);
if (!ModelEditPart.MODEL_ID.equals(containerModelID)) {
return false;
}
String containerVisualID;
if (ModelEditPart.MODEL_ID.equals(containerModelID)) {
- containerVisualID = org.eclipse.papyrus.uml.diagram.communication.part.UMLVisualIDRegistry
- .getVisualID(containerView);
+ containerVisualID = org.eclipse.papyrus.uml.diagram.communication.part.UMLVisualIDRegistry.getVisualID(containerView);
} else {
if (containerView instanceof Diagram) {
containerVisualID = ModelEditPart.VISUAL_ID;
@@ -274,8 +270,7 @@ public class UMLVisualIDRegistry { if (domainElement == null) {
return "";
}
- if (UMLPackage.eINSTANCE.getMessage().isSuperTypeOf(domainElement.eClass())
- && isPath_Edge((Message) domainElement)) {
+ if (UMLPackage.eINSTANCE.getMessage().isSuperTypeOf(domainElement.eClass()) && isPath_Edge((Message) domainElement)) {
return MessageEditPart.VISUAL_ID;
}
return "";
@@ -368,8 +363,7 @@ public class UMLVisualIDRegistry { */
@Override
public String getNodeVisualID(View containerView, EObject domainElement) {
- return org.eclipse.papyrus.uml.diagram.communication.part.UMLVisualIDRegistry.getNodeVisualID(containerView,
- domainElement);
+ return org.eclipse.papyrus.uml.diagram.communication.part.UMLVisualIDRegistry.getNodeVisualID(containerView, domainElement);
}
/**
@@ -377,8 +371,7 @@ public class UMLVisualIDRegistry { */
@Override
public boolean checkNodeVisualID(View containerView, EObject domainElement, String candidate) {
- return org.eclipse.papyrus.uml.diagram.communication.part.UMLVisualIDRegistry
- .checkNodeVisualID(containerView, domainElement, candidate);
+ return org.eclipse.papyrus.uml.diagram.communication.part.UMLVisualIDRegistry.checkNodeVisualID(containerView, domainElement, candidate);
}
/**
@@ -386,8 +379,7 @@ public class UMLVisualIDRegistry { */
@Override
public boolean isCompartmentVisualID(String visualID) {
- return org.eclipse.papyrus.uml.diagram.communication.part.UMLVisualIDRegistry
- .isCompartmentVisualID(visualID);
+ return org.eclipse.papyrus.uml.diagram.communication.part.UMLVisualIDRegistry.isCompartmentVisualID(visualID);
}
/**
@@ -395,8 +387,7 @@ public class UMLVisualIDRegistry { */
@Override
public boolean isSemanticLeafVisualID(String visualID) {
- return org.eclipse.papyrus.uml.diagram.communication.part.UMLVisualIDRegistry
- .isSemanticLeafVisualID(visualID);
+ return org.eclipse.papyrus.uml.diagram.communication.part.UMLVisualIDRegistry.isSemanticLeafVisualID(visualID);
}
};
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/part/ValidateAction.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/part/ValidateAction.java index 08a74715fd5..1ba1d8a9e5c 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/part/ValidateAction.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/part/ValidateAction.java @@ -75,13 +75,16 @@ public class ValidateAction extends Action { if (workbenchPart instanceof IDiagramWorkbenchPart) {
final IDiagramWorkbenchPart part = (IDiagramWorkbenchPart) workbenchPart;
try {
- new WorkspaceModifyDelegatingOperation(new IRunnableWithProgress() {
+ new WorkspaceModifyDelegatingOperation(
+ new IRunnableWithProgress() {
- @Override
- public void run(IProgressMonitor monitor) throws InterruptedException, InvocationTargetException {
- runValidation(part.getDiagramEditPart(), part.getDiagram());
- }
- }).run(new NullProgressMonitor());
+ @Override
+ public void run(IProgressMonitor monitor)
+ throws InterruptedException, InvocationTargetException {
+ runValidation(part.getDiagramEditPart(), part.getDiagram());
+ }
+ })
+ .run(new NullProgressMonitor());
} catch (Exception e) {
UMLDiagramEditorPlugin.getInstance().logError("Validation action failed", e); //$NON-NLS-1$
}
@@ -94,8 +97,8 @@ public class ValidateAction extends Action { public static void runValidation(View view) {
try {
if (UMLDiagramEditorUtil.openDiagram(view.eResource())) {
- IEditorPart editorPart = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage()
- .getActiveEditor();
+ IEditorPart editorPart = PlatformUI.getWorkbench()
+ .getActiveWorkbenchWindow().getActivePage().getActiveEditor();
if (editorPart instanceof IDiagramWorkbenchPart) {
runValidation(((IDiagramWorkbenchPart) editorPart).getDiagramEditPart(), view);
} else {
@@ -103,7 +106,8 @@ public class ValidateAction extends Action { }
}
} catch (Exception e) {
- UMLDiagramEditorPlugin.getInstance().logError("Validation action failed", e); //$NON-NLS-1$
+ UMLDiagramEditorPlugin.getInstance().logError(
+ "Validation action failed", e); //$NON-NLS-1$
}
}
@@ -116,8 +120,8 @@ public class ValidateAction extends Action { shell = new Shell();
}
- DiagramEditPart diagramEditPart = OffscreenEditPartFactory.getInstance()
- .createDiagramEditPart(view.getDiagram(), shell);
+ DiagramEditPart diagramEditPart = OffscreenEditPartFactory.getInstance().createDiagramEditPart(
+ view.getDiagram(), shell);
runValidation(diagramEditPart, view);
}
@@ -163,8 +167,8 @@ public class ValidateAction extends Action { }
Diagnostic diagnostic = runEMFValidator(view);
createMarkers(target, diagnostic, diagramEditPart);
- IBatchValidator validator = (IBatchValidator) ModelValidationService.getInstance()
- .newValidator(EvaluationMode.BATCH);
+ IBatchValidator validator = (IBatchValidator) ModelValidationService.getInstance().newValidator(
+ EvaluationMode.BATCH);
validator.setIncludeLiveConstraints(true);
if (view.isSetElement() && view.getElement() != null) {
IStatus status = validator.validate(view.getElement());
@@ -186,10 +190,11 @@ public class ValidateAction extends Action { collectTargetElements(rootStatus, new HashSet<EObject>(), allStatuses));
for (Iterator it = allStatuses.iterator(); it.hasNext();) {
IConstraintStatus nextStatus = (IConstraintStatus) it.next();
- View view = UMLDiagramEditorUtil.findView(diagramEditPart, nextStatus.getTarget(), element2ViewMap);
+ View view = UMLDiagramEditorUtil.findView(
+ diagramEditPart, nextStatus.getTarget(), element2ViewMap);
addMarker(diagramEditPart.getViewer(), target, view.eResource().getURIFragment(view),
- EMFCoreUtil.getQualifiedName(nextStatus.getTarget(), true), nextStatus.getMessage(),
- nextStatus.getSeverity());
+ EMFCoreUtil.getQualifiedName(nextStatus.getTarget(), true),
+ nextStatus.getMessage(), nextStatus.getSeverity());
}
}
@@ -210,10 +215,11 @@ public class ValidateAction extends Action { List<?> data = nextDiagnostic.getData();
if (data != null && !data.isEmpty() && data.get(0) instanceof EObject) {
EObject element = (EObject) data.get(0);
- View view = UMLDiagramEditorUtil.findView(diagramEditPart, element, element2ViewMap);
+ View view = UMLDiagramEditorUtil.findView(
+ diagramEditPart, element, element2ViewMap);
addMarker(diagramEditPart.getViewer(), target, view.eResource().getURIFragment(view),
- EMFCoreUtil.getQualifiedName(element, true), nextDiagnostic.getMessage(),
- diagnosticToStatusSeverity(nextDiagnostic.getSeverity()));
+ EMFCoreUtil.getQualifiedName(element, true),
+ nextDiagnostic.getMessage(), diagnosticToStatusSeverity(nextDiagnostic.getSeverity()));
}
}
}
@@ -221,12 +227,12 @@ public class ValidateAction extends Action { /**
* @generated
*/
- private static void addMarker(EditPartViewer viewer, IFile target, String elementId, String location,
- String message, int statusSeverity) {
+ private static void addMarker(EditPartViewer viewer, IFile target, String elementId, String location, String message, int statusSeverity) {
if (target == null) {
return;
}
- UMLMarkerNavigationProvider.addMarker(target, elementId, location, message, statusSeverity);
+ UMLMarkerNavigationProvider.addMarker(
+ target, elementId, location, message, statusSeverity);
}
/**
@@ -239,7 +245,8 @@ public class ValidateAction extends Action { return IStatus.INFO;
} else if (diagnosticSeverity == Diagnostic.WARNING) {
return IStatus.WARNING;
- } else if (diagnosticSeverity == Diagnostic.ERROR || diagnosticSeverity == Diagnostic.CANCEL) {
+ } else if (diagnosticSeverity == Diagnostic.ERROR
+ || diagnosticSeverity == Diagnostic.CANCEL) {
return IStatus.ERROR;
}
return IStatus.INFO;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/providers/ElementInitializers.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/providers/ElementInitializers.java index 67bcc0b4956..722ea00e798 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/providers/ElementInitializers.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/providers/ElementInitializers.java @@ -42,7 +42,8 @@ public class ElementInitializers { try {
Object value_0 = name_Interaction_Shape(instance);
if (value_0 != null) {
- instance.setName((String) value_0);
+ instance.setName(
+ (String) value_0);
}
} catch (RuntimeException e) {
UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
@@ -56,7 +57,8 @@ public class ElementInitializers { try {
Object value_0 = name_Lifeline_Shape(instance);
if (value_0 != null) {
- instance.setName((String) value_0);
+ instance.setName(
+ (String) value_0);
}
} catch (RuntimeException e) {
UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
@@ -70,11 +72,13 @@ public class ElementInitializers { try {
Object value_0 = name_Constraint_Shape(instance);
if (value_0 != null) {
- instance.setName((String) value_0);
+ instance.setName(
+ (String) value_0);
}
Object value_1 = specification_Constraint_Shape(instance);
if (value_1 != null) {
- instance.setSpecification((ValueSpecification) value_1);
+ instance.setSpecification(
+ (ValueSpecification) value_1);
}
} catch (RuntimeException e) {
UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
@@ -88,7 +92,8 @@ public class ElementInitializers { try {
Object value_0 = UMLOCLFactory.getExpression(7, UMLPackage.eINSTANCE.getComment(), null).evaluate(instance);
if (value_0 != null) {
- instance.setBody((String) value_0);
+ instance.setBody(
+ (String) value_0);
}
} catch (RuntimeException e) {
UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
@@ -102,7 +107,8 @@ public class ElementInitializers { try {
Object value_0 = name_TimeObservation_Shape(instance);
if (value_0 != null) {
- instance.setName((String) value_0);
+ instance.setName(
+ (String) value_0);
}
} catch (RuntimeException e) {
UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
@@ -116,7 +122,8 @@ public class ElementInitializers { try {
Object value_0 = name_DurationObservation_Shape(instance);
if (value_0 != null) {
- instance.setName((String) value_0);
+ instance.setName(
+ (String) value_0);
}
} catch (RuntimeException e) {
UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
@@ -130,7 +137,8 @@ public class ElementInitializers { try {
Object value_0 = name_Path_Edge(instance);
if (value_0 != null) {
- instance.setName((String) value_0);
+ instance.setName(
+ (String) value_0);
}
} catch (RuntimeException e) {
UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/providers/UMLEditPartProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/providers/UMLEditPartProvider.java index 622831176db..9ce53031eff 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/providers/UMLEditPartProvider.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/providers/UMLEditPartProvider.java @@ -25,7 +25,9 @@ public class UMLEditPartProvider extends DefaultEditPartProvider { * @generated
*/
public UMLEditPartProvider() {
- super(new UMLEditPartFactory(), UMLVisualIDRegistry.TYPED_INSTANCE, ModelEditPart.MODEL_ID);
+ super(new UMLEditPartFactory(),
+ UMLVisualIDRegistry.TYPED_INSTANCE,
+ ModelEditPart.MODEL_ID);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/providers/UMLElementTypes.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/providers/UMLElementTypes.java index 672744ed1e8..7f4091702a9 100755 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/providers/UMLElementTypes.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/providers/UMLElementTypes.java @@ -58,8 +58,7 @@ public class UMLElementTypes { /**
* @generated
*/
- private static DiagramElementTypeImages elementTypeImages = new DiagramElementTypeImages(
- UMLDiagramEditorPlugin.getInstance().getItemProvidersAdapterFactory());
+ private static DiagramElementTypeImages elementTypeImages = new DiagramElementTypeImages(UMLDiagramEditorPlugin.getInstance().getItemProvidersAdapterFactory());
/**
* @generated
@@ -69,63 +68,51 @@ public class UMLElementTypes { /**
* @generated
*/
- public static final IElementType Package_CommunicationDiagram = getElementTypeByUniqueId(
- "org.eclipse.papyrus.uml.diagram.communication.Package_CommunicationDiagram"); //$NON-NLS-1$
+ public static final IElementType Package_CommunicationDiagram = getElementTypeByUniqueId("org.eclipse.papyrus.uml.diagram.communication.Package_CommunicationDiagram"); //$NON-NLS-1$
/**
* @generated
*/
- public static final IElementType Interaction_Shape = getElementTypeByUniqueId(
- "org.eclipse.papyrus.umldi.Interaction_Shape"); //$NON-NLS-1$
+ public static final IElementType Interaction_Shape = getElementTypeByUniqueId("org.eclipse.papyrus.umldi.Interaction_Shape"); //$NON-NLS-1$
/**
* @generated
*/
- public static final IElementType Lifeline_Shape = getElementTypeByUniqueId(
- "org.eclipse.papyrus.umldi.Lifeline_Shape"); //$NON-NLS-1$
+ public static final IElementType Lifeline_Shape = getElementTypeByUniqueId("org.eclipse.papyrus.umldi.Lifeline_Shape"); //$NON-NLS-1$
/**
* @generated
*/
- public static final IElementType Constraint_Shape = getElementTypeByUniqueId(
- "org.eclipse.papyrus.umldi.Constraint_Shape"); //$NON-NLS-1$
+ public static final IElementType Constraint_Shape = getElementTypeByUniqueId("org.eclipse.papyrus.umldi.Constraint_Shape"); //$NON-NLS-1$
/**
* @generated
*/
- public static final IElementType Comment_Shape = getElementTypeByUniqueId(
- "org.eclipse.papyrus.umldi.Comment_Shape"); //$NON-NLS-1$
+ public static final IElementType Comment_Shape = getElementTypeByUniqueId("org.eclipse.papyrus.umldi.Comment_Shape"); //$NON-NLS-1$
/**
* @generated
*/
- public static final IElementType TimeObservation_Shape = getElementTypeByUniqueId(
- "org.eclipse.papyrus.umldi.TimeObservation_Shape"); //$NON-NLS-1$
+ public static final IElementType TimeObservation_Shape = getElementTypeByUniqueId("org.eclipse.papyrus.umldi.TimeObservation_Shape"); //$NON-NLS-1$
/**
* @generated
*/
- public static final IElementType DurationObservation_Shape = getElementTypeByUniqueId(
- "org.eclipse.papyrus.umldi.DurationObservation_Shape"); //$NON-NLS-1$
+ public static final IElementType DurationObservation_Shape = getElementTypeByUniqueId("org.eclipse.papyrus.umldi.DurationObservation_Shape"); //$NON-NLS-1$
/**
* @generated
*/
- public static final IElementType Path_Edge = getElementTypeByUniqueId(
- "org.eclipse.papyrus.uml.communication.Path_Edge"); //$NON-NLS-1$
+ public static final IElementType Path_Edge = getElementTypeByUniqueId("org.eclipse.papyrus.uml.communication.Path_Edge"); //$NON-NLS-1$
/**
* @generated
*/
- public static final IElementType Comment_AnnotatedElementEdge = getElementTypeByUniqueId(
- "org.eclipse.papyrus.umldi.Comment_AnnotatedElementEdge"); //$NON-NLS-1$
+ public static final IElementType Comment_AnnotatedElementEdge = getElementTypeByUniqueId("org.eclipse.papyrus.umldi.Comment_AnnotatedElementEdge"); //$NON-NLS-1$
/**
* @generated
*/
- public static final IElementType Constraint_ConstrainedElementEdge = getElementTypeByUniqueId(
- "org.eclipse.papyrus.umldi.Constraint_ConstrainedElementEdge"); //$NON-NLS-1$
+ public static final IElementType Constraint_ConstrainedElementEdge = getElementTypeByUniqueId("org.eclipse.papyrus.umldi.Constraint_ConstrainedElementEdge"); //$NON-NLS-1$
/**
* @generated
*/
- public static final IElementType DurationObservation_EventEdge = getElementTypeByUniqueId(
- "org.eclipse.papyrus.umldi.DurationObservation_EventEdge"); //$NON-NLS-1$
+ public static final IElementType DurationObservation_EventEdge = getElementTypeByUniqueId("org.eclipse.papyrus.umldi.DurationObservation_EventEdge"); //$NON-NLS-1$
/**
* @generated
*/
- public static final IElementType TimeObservation_EventEdge = getElementTypeByUniqueId(
- "org.eclipse.papyrus.umldi.TimeObservation_EventEdge"); //$NON-NLS-1$
+ public static final IElementType TimeObservation_EventEdge = getElementTypeByUniqueId("org.eclipse.papyrus.umldi.TimeObservation_EventEdge"); //$NON-NLS-1$
/**
* @generated
@@ -167,18 +154,25 @@ public class UMLElementTypes { elements.put(Package_CommunicationDiagram, UMLPackage.eINSTANCE.getPackage());
+
elements.put(Interaction_Shape, UMLPackage.eINSTANCE.getInteraction());
+
elements.put(Lifeline_Shape, UMLPackage.eINSTANCE.getLifeline());
+
elements.put(Constraint_Shape, UMLPackage.eINSTANCE.getConstraint());
+
elements.put(Comment_Shape, UMLPackage.eINSTANCE.getComment());
+
elements.put(TimeObservation_Shape, UMLPackage.eINSTANCE.getTimeObservation());
+
elements.put(DurationObservation_Shape, UMLPackage.eINSTANCE.getDurationObservation());
+
elements.put(Path_Edge, UMLPackage.eINSTANCE.getMessage());
elements.put(Comment_AnnotatedElementEdge, UMLPackage.eINSTANCE.getComment_AnnotatedElement());
@@ -276,8 +270,7 @@ public class UMLElementTypes { */
@Override
public boolean isKnownElementType(IElementType elementType) {
- return org.eclipse.papyrus.uml.diagram.communication.providers.UMLElementTypes
- .isKnownElementType(elementType);
+ return org.eclipse.papyrus.uml.diagram.communication.providers.UMLElementTypes.isKnownElementType(elementType);
}
/**
@@ -293,8 +286,7 @@ public class UMLElementTypes { */
@Override
public ENamedElement getDefiningNamedElement(IAdaptable elementTypeAdapter) {
- return org.eclipse.papyrus.uml.diagram.communication.providers.UMLElementTypes
- .getElement(elementTypeAdapter);
+ return org.eclipse.papyrus.uml.diagram.communication.providers.UMLElementTypes.getElement(elementTypeAdapter);
}
};
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/providers/UMLMarkerNavigationProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/providers/UMLMarkerNavigationProvider.java index 8c7aad090b2..611cd34c917 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/providers/UMLMarkerNavigationProvider.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/providers/UMLMarkerNavigationProvider.java @@ -52,7 +52,8 @@ public class UMLMarkerNavigationProvider extends AbstractModelMarkerNavigationPr }
EditPart targetEditPart = (EditPart) editPartRegistry.get(targetView);
if (targetEditPart != null) {
- UMLDiagramEditorUtil.selectElementsInDiagram(editor, Arrays.asList(new EditPart[] { targetEditPart }));
+ UMLDiagramEditorUtil.selectElementsInDiagram(
+ editor, Arrays.asList(new EditPart[] { targetEditPart }));
}
}
@@ -63,7 +64,8 @@ public class UMLMarkerNavigationProvider extends AbstractModelMarkerNavigationPr try {
resource.deleteMarkers(MARKER_TYPE, true, IResource.DEPTH_ZERO);
} catch (CoreException e) {
- UMLDiagramEditorPlugin.getInstance().logError("Failed to delete validation markers", e); //$NON-NLS-1$
+ UMLDiagramEditorPlugin.getInstance().logError(
+ "Failed to delete validation markers", e); //$NON-NLS-1$
}
}
@@ -80,12 +82,14 @@ public class UMLMarkerNavigationProvider extends AbstractModelMarkerNavigationPr int markerSeverity = IMarker.SEVERITY_INFO;
if (statusSeverity == IStatus.WARNING) {
markerSeverity = IMarker.SEVERITY_WARNING;
- } else if (statusSeverity == IStatus.ERROR || statusSeverity == IStatus.CANCEL) {
+ } else if (statusSeverity == IStatus.ERROR ||
+ statusSeverity == IStatus.CANCEL) {
markerSeverity = IMarker.SEVERITY_ERROR;
}
marker.setAttribute(IMarker.SEVERITY, markerSeverity);
} catch (CoreException e) {
- UMLDiagramEditorPlugin.getInstance().logError("Failed to create validation marker", e); //$NON-NLS-1$
+ UMLDiagramEditorPlugin.getInstance().logError(
+ "Failed to create validation marker", e); //$NON-NLS-1$
}
return marker;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/providers/UMLParserProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/providers/UMLParserProvider.java index 90dc26ba406..162485a09b7 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/providers/UMLParserProvider.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/providers/UMLParserProvider.java @@ -59,7 +59,9 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid */
private IParser getInteraction_NameLabel_Parser() {
if (interaction_NameLabel_Parser == null) {
- EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("{0}"); //$NON-NLS-1$
parser.setEditorPattern("{0}"); //$NON-NLS-1$
@@ -79,7 +81,9 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid */
private IParser getInteraction_FloatingNameLabel_Parser() {
if (interaction_FloatingNameLabel_Parser == null) {
- EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
MessageFormatParser parser = new MessageFormatParser(features);
interaction_FloatingNameLabel_Parser = parser;
}
@@ -111,7 +115,9 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid */
private IParser getLifeline_FloatingNameLabel_Parser() {
if (lifeline_FloatingNameLabel_Parser == null) {
- EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
MessageFormatParser parser = new MessageFormatParser(features);
lifeline_FloatingNameLabel_Parser = parser;
}
@@ -128,7 +134,9 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid */
private IParser getConstraint_NameLabel_Parser() {
if (constraint_NameLabel_Parser == null) {
- EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
MessageFormatParser parser = new MessageFormatParser(features);
constraint_NameLabel_Parser = parser;
}
@@ -175,7 +183,9 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid */
private IParser getTimeObservation_NameLabel_Parser() {
if (timeObservation_NameLabel_Parser == null) {
- EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
MessageFormatParser parser = new MessageFormatParser(features);
timeObservation_NameLabel_Parser = parser;
}
@@ -207,7 +217,9 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid */
private IParser getDurationObservation_NameLabel_Parser() {
if (durationObservation_NameLabel_Parser == null) {
- EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
MessageFormatParser parser = new MessageFormatParser(features);
durationObservation_NameLabel_Parser = parser;
}
@@ -239,7 +251,9 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid */
private IParser getPath_MessageLabel_Parser() {
if (path_MessageLabel_Parser == null) {
- EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setEditorPattern("{0}"); //$NON-NLS-1$
parser.setEditPattern("{0}"); //$NON-NLS-1$
@@ -302,6 +316,10 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid case AppliedStereotypeMessageEditPart.VISUAL_ID:
return getPath_StereotypeLabel_Parser();
+
+
+
+
}
}
return null;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/providers/UMLValidationDecoratorProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/providers/UMLValidationDecoratorProvider.java index 84ef921c712..80ebb9e2f29 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/providers/UMLValidationDecoratorProvider.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/providers/UMLValidationDecoratorProvider.java @@ -37,7 +37,8 @@ public class UMLValidationDecoratorProvider extends ValidationDecoratorProvider */
public void createDecorators(IDecoratorTarget decoratorTarget) {
EditPart editPart = (EditPart) decoratorTarget.getAdapter(EditPart.class);
- if (editPart instanceof GraphicalEditPart || editPart instanceof AbstractConnectionEditPart) {
+ if (editPart instanceof GraphicalEditPart ||
+ editPart instanceof AbstractConnectionEditPart) {
Object model = editPart.getModel();
if ((model instanceof View)) {
View view = (View) model;
@@ -63,7 +64,8 @@ public class UMLValidationDecoratorProvider extends ValidationDecoratorProvider return false;
}
IDecoratorTarget decoratorTarget = ((CreateDecoratorsOperation) operation).getDecoratorTarget();
- View view = (View) decoratorTarget.getAdapter(View.class);
+ View view = (View) decoratorTarget.getAdapter(
+ View.class);
return view != null && ModelEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(view));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/providers/UMLViewProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/providers/UMLViewProvider.java index c1b4b70cfe8..e29e2e12e8a 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/providers/UMLViewProvider.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/providers/UMLViewProvider.java @@ -23,6 +23,7 @@ import org.eclipse.gmf.runtime.common.core.service.AbstractProvider; import org.eclipse.gmf.runtime.common.core.service.IOperation;
import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
import org.eclipse.gmf.runtime.diagram.core.providers.IViewProvider;
+import org.eclipse.gmf.runtime.diagram.core.services.view.CreateChildViewOperation;
import org.eclipse.gmf.runtime.diagram.core.services.view.CreateDiagramViewOperation;
import org.eclipse.gmf.runtime.diagram.core.services.view.CreateEdgeViewOperation;
import org.eclipse.gmf.runtime.diagram.core.services.view.CreateNodeViewOperation;
@@ -98,6 +99,16 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { return provides((CreateViewForKindOperation) operation);
}
assert operation instanceof CreateViewOperation;
+
+ /* we check this view provider is the good one for the currently edited diagram */
+ if (operation instanceof CreateChildViewOperation) {
+ View container = ((CreateChildViewOperation) operation).getContainerView();
+ Diagram diagram = container.getDiagram();
+ if (!getDiagramProvidedId().equals(diagram.getType())) {
+ return false;
+ }
+ }
+
if (operation instanceof CreateDiagramViewOperation) {
return provides((CreateDiagramViewOperation) operation);
} else if (operation instanceof CreateEdgeViewOperation) {
@@ -113,10 +124,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { */
protected boolean provides(CreateViewForKindOperation op) {
/*
- if (op.getViewKind() == Node.class)
- return getNodeViewClass(op.getSemanticAdapter(), op.getContainerView(), op.getSemanticHint()) != null;
- if (op.getViewKind() == Edge.class)
- return getEdgeViewClass(op.getSemanticAdapter(), op.getContainerView(), op.getSemanticHint()) != null;
+ if (op.getViewKind() == Node.class)
+ return getNodeViewClass(op.getSemanticAdapter(), op.getContainerView(), op.getSemanticHint()) != null;
+ if (op.getViewKind() == Edge.class)
+ return getEdgeViewClass(op.getSemanticAdapter(), op.getContainerView(), op.getSemanticHint()) != null;
*/
// check Diagram Type should be the class diagram
@@ -143,7 +154,7 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { * This method can be overloaded when diagram editor inherits from another one, but should never be <code>null</code>
* </p>
*
- * @return the unique identifier of the diagram for which views are provided.
+ * @return the unique identifier of the diagram for which views are provided.
*/
return ModelEditPart.MODEL_ID;
}
@@ -152,9 +163,7 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { * @generated
*/
protected boolean provides(CreateDiagramViewOperation op) {
- return ModelEditPart.MODEL_ID.equals(op.getSemanticHint())
- && UMLVisualIDRegistry.getDiagramVisualID(getSemanticElement(op.getSemanticAdapter())) != null
- && !UMLVisualIDRegistry.getDiagramVisualID(getSemanticElement(op.getSemanticAdapter())).isEmpty();
+ return ModelEditPart.MODEL_ID.equals(op.getSemanticHint()) && UMLVisualIDRegistry.getDiagramVisualID(getSemanticElement(op.getSemanticAdapter())) != null && !UMLVisualIDRegistry.getDiagramVisualID(getSemanticElement(op.getSemanticAdapter())).isEmpty();
}
/**
@@ -202,8 +211,7 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { case CommentEditPartCN.VISUAL_ID:
case TimeObservationEditPartCN.VISUAL_ID:
case DurationObservationEditPartCN.VISUAL_ID:
- if (domainElement == null || !visualID
- .equals(UMLVisualIDRegistry.getNodeVisualID(op.getContainerView(), domainElement))) {
+ if (domainElement == null || !visualID.equals(UMLVisualIDRegistry.getNodeVisualID(op.getContainerView(), domainElement))) {
return false; // visual id in semantic hint should match visual id for domain element
}
break;
@@ -228,8 +236,7 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { }
String elementTypeHint = ((IHintedType) elementType).getSemanticHint();
- if (elementTypeHint == null
- || (op.getSemanticHint() != null && !elementTypeHint.equals(op.getSemanticHint()))) {
+ if (elementTypeHint == null || (op.getSemanticHint() != null && !elementTypeHint.equals(op.getSemanticHint()))) {
return false; // our hint is visual id and must be specified, and it should be the same as in element type
}
//String visualID = org.eclipse.papyrus.uml.diagram.communication.part.UMLVisualIDRegistry.getVisualID(elementTypeHint);
@@ -297,8 +304,7 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { if (vid != null) {
switch (vid) {
case MessageEditPart.VISUAL_ID:
- return createPath_Edge(getSemanticElement(semanticAdapter), containerView, index, persisted,
- preferencesHint);
+ return createPath_Edge(getSemanticElement(semanticAdapter), containerView, index, persisted, preferencesHint);
case CommentAnnotatedElementEditPart.VISUAL_ID:
return createComment_AnnotatedElementEdge(containerView, index, persisted, preferencesHint);
case ConstraintConstrainedElementEditPart.VISUAL_ID:
@@ -329,15 +335,12 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Interaction");
Node interaction_NameLabel = createLabel(node, UMLVisualIDRegistry.getType(InteractionNameEditPart.VISUAL_ID));
- Node interaction_FloatingNameLabel = createLabel(node,
- UMLVisualIDRegistry.getType(InteractionFloatingLabelEditPart.VISUAL_ID));
+ Node interaction_FloatingNameLabel = createLabel(node, UMLVisualIDRegistry.getType(InteractionFloatingLabelEditPart.VISUAL_ID));
interaction_FloatingNameLabel.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location interaction_FloatingNameLabel_Location = (Location) interaction_FloatingNameLabel
- .getLayoutConstraint();
+ Location interaction_FloatingNameLabel_Location = (Location) interaction_FloatingNameLabel.getLayoutConstraint();
interaction_FloatingNameLabel_Location.setX(50);
interaction_FloatingNameLabel_Location.setY(0);
- createCompartment(node, UMLVisualIDRegistry.getType(InteractionCompartmentEditPart.VISUAL_ID), true, false,
- false, false);
+ createCompartment(node, UMLVisualIDRegistry.getType(InteractionCompartmentEditPart.VISUAL_ID), true, false, false, false);
PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "Interaction");
return node;
}
@@ -357,8 +360,7 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Lifeline");
Node lifeline_NameLabel = createLabel(node, UMLVisualIDRegistry.getType(LifelineNameEditPart.VISUAL_ID));
- Node lifeline_FloatingNameLabel = createLabel(node,
- UMLVisualIDRegistry.getType(LifelineFloatingLabelEditPartCN.VISUAL_ID));
+ Node lifeline_FloatingNameLabel = createLabel(node, UMLVisualIDRegistry.getType(LifelineFloatingLabelEditPartCN.VISUAL_ID));
lifeline_FloatingNameLabel.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
Location lifeline_FloatingNameLabel_Location = (Location) lifeline_FloatingNameLabel.getLayoutConstraint();
lifeline_FloatingNameLabel_Location.setX(0);
@@ -418,17 +420,14 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "TimeObservation");
- Node timeObservation_NameLabel = createLabel(node,
- UMLVisualIDRegistry.getType(TimeObservationNameEditPartCN.VISUAL_ID));
+ Node timeObservation_NameLabel = createLabel(node, UMLVisualIDRegistry.getType(TimeObservationNameEditPartCN.VISUAL_ID));
timeObservation_NameLabel.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
Location timeObservation_NameLabel_Location = (Location) timeObservation_NameLabel.getLayoutConstraint();
timeObservation_NameLabel_Location.setX(25);
timeObservation_NameLabel_Location.setY(3);
- Node timeObservation_StereotypeLabel = createLabel(node,
- UMLVisualIDRegistry.getType(TimeObservationStereotypeLabelEditPartCN.VISUAL_ID));
+ Node timeObservation_StereotypeLabel = createLabel(node, UMLVisualIDRegistry.getType(TimeObservationStereotypeLabelEditPartCN.VISUAL_ID));
timeObservation_StereotypeLabel.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location timeObservation_StereotypeLabel_Location = (Location) timeObservation_StereotypeLabel
- .getLayoutConstraint();
+ Location timeObservation_StereotypeLabel_Location = (Location) timeObservation_StereotypeLabel.getLayoutConstraint();
timeObservation_StereotypeLabel_Location.setX(25);
timeObservation_StereotypeLabel_Location.setY(-10);
return node;
@@ -448,18 +447,14 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "DurationObservation");
- Node durationObservation_NameLabel = createLabel(node,
- UMLVisualIDRegistry.getType(DurationObservationLabelEditPartCN.VISUAL_ID));
+ Node durationObservation_NameLabel = createLabel(node, UMLVisualIDRegistry.getType(DurationObservationLabelEditPartCN.VISUAL_ID));
durationObservation_NameLabel.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location durationObservation_NameLabel_Location = (Location) durationObservation_NameLabel
- .getLayoutConstraint();
+ Location durationObservation_NameLabel_Location = (Location) durationObservation_NameLabel.getLayoutConstraint();
durationObservation_NameLabel_Location.setX(25);
durationObservation_NameLabel_Location.setY(3);
- Node durationObservation_StereotypeLabel = createLabel(node,
- UMLVisualIDRegistry.getType(DurationObservationStereotypeLabelEditPartCN.VISUAL_ID));
+ Node durationObservation_StereotypeLabel = createLabel(node, UMLVisualIDRegistry.getType(DurationObservationStereotypeLabelEditPartCN.VISUAL_ID));
durationObservation_StereotypeLabel.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location durationObservation_StereotypeLabel_Location = (Location) durationObservation_StereotypeLabel
- .getLayoutConstraint();
+ Location durationObservation_StereotypeLabel_Location = (Location) durationObservation_StereotypeLabel.getLayoutConstraint();
durationObservation_StereotypeLabel_Location.setX(25);
durationObservation_StereotypeLabel_Location.setY(-10);
return node;
@@ -494,8 +489,7 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { Location path_MessageLabel_Location = (Location) path_MessageLabel.getLayoutConstraint();
path_MessageLabel_Location.setX(1);
path_MessageLabel_Location.setY(-23);
- Node path_StereotypeLabel = createLabel(edge,
- UMLVisualIDRegistry.getType(AppliedStereotypeMessageEditPart.VISUAL_ID));
+ Node path_StereotypeLabel = createLabel(edge, UMLVisualIDRegistry.getType(AppliedStereotypeMessageEditPart.VISUAL_ID));
path_StereotypeLabel.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
Location path_StereotypeLabel_Location = (Location) path_StereotypeLabel.getLayoutConstraint();
path_StereotypeLabel_Location.setX(1);
@@ -689,10 +683,8 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { * @generated
*/
private void initFontStyleFromPrefs(View view, final IPreferenceStore store, String elementName) {
- String fontConstant = PreferencesConstantsHelper.getElementConstant(elementName,
- PreferencesConstantsHelper.FONT);
- String fontColorConstant = PreferencesConstantsHelper.getElementConstant(elementName,
- PreferencesConstantsHelper.COLOR_FONT);
+ String fontConstant = PreferencesConstantsHelper.getElementConstant(elementName, PreferencesConstantsHelper.FONT);
+ String fontColorConstant = PreferencesConstantsHelper.getElementConstant(elementName, PreferencesConstantsHelper.COLOR_FONT);
FontStyle viewFontStyle = (FontStyle) view.getStyle(NotationPackage.Literals.FONT_STYLE);
if (viewFontStyle != null) {
@@ -711,37 +703,36 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { * @generated
*/
private void initForegroundFromPrefs(View view, final IPreferenceStore store, String elementName) {
- String lineColorConstant = PreferencesConstantsHelper.getElementConstant(elementName,
- PreferencesConstantsHelper.COLOR_LINE);
+ String lineColorConstant = PreferencesConstantsHelper.getElementConstant(elementName, PreferencesConstantsHelper.COLOR_LINE);
org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter.getColor(store, lineColorConstant);
- ViewUtil.setStructuralFeatureValue(view, NotationPackage.eINSTANCE.getLineStyle_LineColor(),
- FigureUtilities.RGBToInteger(lineRGB));
+ ViewUtil.setStructuralFeatureValue(view, NotationPackage.eINSTANCE.getLineStyle_LineColor(), FigureUtilities.RGBToInteger(lineRGB));
}
/**
* @generated
*/
private void initBackgroundFromPrefs(View view, final IPreferenceStore store, String elementName) {
- String fillColorConstant = PreferencesConstantsHelper.getElementConstant(elementName,
- PreferencesConstantsHelper.COLOR_FILL);
- String gradientColorConstant = PreferencesConstantsHelper.getElementConstant(elementName,
- PreferencesConstantsHelper.COLOR_GRADIENT);
- String gradientPolicyConstant = PreferencesConstantsHelper.getElementConstant(elementName,
- PreferencesConstantsHelper.GRADIENT_POLICY);
+ String fillColorConstant = PreferencesConstantsHelper.getElementConstant(elementName, PreferencesConstantsHelper.COLOR_FILL);
+ String gradientColorConstant = PreferencesConstantsHelper.getElementConstant(elementName, PreferencesConstantsHelper.COLOR_GRADIENT);
+ String gradientPolicyConstant = PreferencesConstantsHelper.getElementConstant(elementName, PreferencesConstantsHelper.GRADIENT_POLICY);
+
org.eclipse.swt.graphics.RGB fillRGB = PreferenceConverter.getColor(store, fillColorConstant);
- ViewUtil.setStructuralFeatureValue(view, NotationPackage.eINSTANCE.getFillStyle_FillColor(),
- FigureUtilities.RGBToInteger(fillRGB));
+ ViewUtil.setStructuralFeatureValue(view, NotationPackage.eINSTANCE.getFillStyle_FillColor(), FigureUtilities.RGBToInteger(fillRGB));
+
- FillStyle fillStyle = (FillStyle) view.getStyle(NotationPackage.Literals.FILL_STYLE);
- fillStyle.setFillColor(FigureUtilities.RGBToInteger(fillRGB).intValue());
+ FillStyle fillStyle = (FillStyle) view
+ .getStyle(NotationPackage.Literals.FILL_STYLE);
+ fillStyle
+ .setFillColor(FigureUtilities.RGBToInteger(fillRGB).intValue());
;
if (store.getBoolean(gradientPolicyConstant)) {
GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(
store.getString(gradientColorConstant));
fillStyle.setGradient(gradientPreferenceConverter.getGradientData());
- fillStyle.setTransparency(gradientPreferenceConverter.getTransparency());
+ fillStyle
+ .setTransparency(gradientPreferenceConverter.getTransparency());
}
}
|