Commit 738bb5f2 authored by Florian Hölzl's avatar Florian Hölzl
Browse files

Merged origin/master into 3815-lwfxef-integration.

Issue-Ref: 3815
Issue-Url: https://af3-developer.fortiss.org/issues/3815

Signed-off-by: Florian Hölzl's avatarFlorian Hoelzl <hoelzl@fortiss.org>
parents e510f333 45731c46
ColumnHandle.java 8fc5f04cbb0127e5df8c7a9e3b2620502bf93716 GREEN
GenericAnnotationView.java 6d5569d9a346d5fd60d28a1c60baa9963b5a4010 GREEN
GenericAnnotationView.java 68a6eb91a4db97a58ebfacf400e73c297ab6b1a3 GREEN
......@@ -15,6 +15,7 @@
+--------------------------------------------------------------------------*/
package org.fortiss.tooling.base.ui.annotation.view.generic;
import static org.apache.commons.lang3.reflect.MethodUtils.getMatchingMethod;
import static org.fortiss.tooling.base.ui.annotation.editingsupport.EditingSupportFactory.createEditingSupport;
import static org.fortiss.tooling.base.ui.annotation.labelprovider.LabelProviderFactory.createLabelProvider;
import static org.fortiss.tooling.kernel.utils.LoggingUtils.error;
......@@ -298,7 +299,7 @@ public class GenericAnnotationView extends AnnotationViewPartBase {
*/
private void setTableItemHeight(Table table, int height) {
try {
Method method = table.getClass().getDeclaredMethod("setItemHeight", int.class);
Method method = getMatchingMethod(table.getClass(), "setItemHeight", int.class);
if(method != null) {
boolean accessible = method.canAccess(table);
if(method.trySetAccessible()) {
......
AdvancedTreeViewerEditorBase.java 9d9eded6848ee78991d1416592d1136efd71d2b7 GREEN
AllocationDiagramEditorBase.java fa544546f73eea1150d90b7257b0e6bce82c288c GREEN
CommonDiagramEditorBase.java 69994faea09eec342b8dfaa484ffc03b60978496 GREEN
CommonDiagramEditorBase.java 3a3a0137561c13403c8d731434e4fd5f00d9c86f GREEN
ConstraintBasedProcessEditor.java 155a5a7ac41c668ae7ef978e8be13b83f5abd67d GREEN
ConstraintBasedProcessEditorHelper.java 11d48e8a2aecd48eea259a42ef1192c4b292a334 GREEN
DiagramEditorBase.java 09663ce095074d1a8eef086284eea0a7776e0431 GREEN
......
......@@ -71,7 +71,6 @@ import org.eclipse.gef.ui.actions.PrintAction;
import org.eclipse.gef.ui.actions.SelectAllAction;
import org.eclipse.gef.ui.actions.SelectionAction;
import org.eclipse.gef.ui.actions.UpdateAction;
import org.eclipse.gef.ui.actions.ZoomComboContributionItem;
import org.eclipse.gef.ui.actions.ZoomInAction;
import org.eclipse.gef.ui.actions.ZoomOutAction;
import org.eclipse.jface.action.IAction;
......@@ -86,7 +85,6 @@ import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorSite;
import org.eclipse.ui.ISelectionListener;
......@@ -137,9 +135,6 @@ abstract class CommonDiagramEditorBase<T extends EObject> extends GEFEditorBase<
/** Stores the zoom manager. */
private ZoomManager zoomManager;
/** Stores the zoom contribution item. */
private ZoomComboContributionItem zoomContribution;
/** A container for editor actions. */
private final ActionRegistry actionRegistry = new ActionRegistry();
......@@ -410,7 +405,6 @@ abstract class CommonDiagramEditorBase<T extends EObject> extends GEFEditorBase<
zoomManager.setZoomLevelContributions(getZoomLevelContributions());
registerZoomAction();
}
zoomContribution = new ZoomComboContributionItem(getSite().getPage());
}
/** Registers and returns the id of the given action. */
......@@ -471,18 +465,6 @@ abstract class CommonDiagramEditorBase<T extends EObject> extends GEFEditorBase<
private static final List<String> defaultZoomLevelContribution =
Arrays.asList(new String[] {FIT_ALL, FIT_WIDTH, FIT_HEIGHT});
/** Registers global actions (including zoom action). */
@Override
public void registerGlobalActions(IActionBars bars) {
bars.getToolBarManager().add(zoomContribution);
}
/** Unregisters global actions (including zoom action). */
@Override
public void unregisterGlobalActions(IActionBars bars) {
bars.getToolBarManager().remove(zoomContribution);
}
/**
* Registers the select all action. Sub-classes may override to prevent the
* action registering.
......
......@@ -671,27 +671,6 @@
</ownedStyle>
<actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/>
</ownedDiagramElements>
<ownedDiagramElements xmi:type="diagram:DNodeList" xmi:id="_yQ9OAEosEei1a5h03EPS7w" name="IModelElementSpecificationArray" visible="false" tooltipText="" width="14" height="5">
<target xmi:type="ecore:EDataType" href="platform:/resource/org.fortiss.tooling.base/model/base.ecore#//element/IModelElementSpecificationArray"/>
<semanticElements xmi:type="ecore:EDataType" href="platform:/resource/org.fortiss.tooling.base/model/base.ecore#//element/IModelElementSpecificationArray"/>
<graphicalFilters xmi:type="diagram:HideFilter" xmi:id="_19HWsEosEei1a5h03EPS7w"/>
<ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_yQ9OAUosEei1a5h03EPS7w" borderSize="1" borderSizeComputationExpression="1" borderColor="125,125,125" backgroundStyle="Liquid" foregroundColor="255,250,191">
<description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EDataType']/@style"/>
</ownedStyle>
<actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EDataType']"/>
<ownedElements xmi:type="diagram:DNodeListElement" xmi:id="_yRFw4EosEei1a5h03EPS7w" name="org.fortiss.tooling.base.model.element.IModelElementSpecification[]" visible="false" tooltipText="">
<target xmi:type="ecore:EDataType" href="platform:/resource/org.fortiss.tooling.base/model/base.ecore#//element/IModelElementSpecificationArray"/>
<semanticElements xmi:type="ecore:EDataType" href="platform:/resource/org.fortiss.tooling.base/model/base.ecore#//element/IModelElementSpecificationArray"/>
<decorations xmi:type="viewpoint:Decoration" xmi:id="_yRFw4kosEei1a5h03EPS7w">
<description xmi:type="description:SemanticBasedDecoration" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@decorationDescriptionsSet/@decorationDescriptions[name='External']"/>
</decorations>
<ownedStyle xmi:type="diagram:BundledImage" xmi:id="_yRFw4UosEei1a5h03EPS7w" showIcon="false">
<labelFormat>italic</labelFormat>
<description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EDataType']/@subNodeMappings[name='EC_DataType_InstanceClassName']/@style"/>
</ownedStyle>
<actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EDataType']/@subNodeMappings[name='EC_DataType_InstanceClassName']"/>
</ownedElements>
</ownedDiagramElements>
<ownedDiagramElements xmi:type="diagram:DNodeList" xmi:id="_yQ9OAkosEei1a5h03EPS7w" name="IDerivedAnnotation" tooltipText="" outgoingEdges="_yRI0P0osEei1a5h03EPS7w _yRJbQEosEei1a5h03EPS7w" width="12" height="10">
<target xmi:type="ecore:EClass" href="platform:/resource/org.fortiss.tooling.base/model/base.ecore#//element/IDerivedAnnotation"/>
<semanticElements xmi:type="ecore:EClass" href="platform:/resource/org.fortiss.tooling.base/model/base.ecore#//element/IDerivedAnnotation"/>
......
base.ecore d7254f90603d838d7371bfe830d6a7d20aa8bd59 GREEN
base.ecore 598ac2f27293be7344b762471a3570f45e63950d GREEN
......@@ -146,12 +146,6 @@
<details key="documentation" value="Super class of model element specifications that represent annotations (i.e., specifications that are guaranteed to exist exactly once for the model elements for which the annotation has been registered)"/>
</eAnnotations>
</eClassifiers>
<eClassifiers xsi:type="ecore:EDataType" name="IModelElementSpecificationArray"
instanceClassName="org.fortiss.tooling.base.model.element.IModelElementSpecification[]">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="@deprecated An array of model element specifications."/>
</eAnnotations>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="IDerivedAnnotation" abstract="true"
interface="true" eSuperTypes="#//element/IAnnotatedSpecification #//element/IHiddenSpecification">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
......
......@@ -10,7 +10,6 @@
ecorePackage="base.ecore#/">
<nestedGenPackages prefix="Element" basePackage="org.fortiss.tooling.base.model"
disposableProviderFactory="true" ecorePackage="base.ecore#//element">
<genDataTypes ecoreDataType="base.ecore#//element/IModelElementSpecificationArray"/>
<genClasses ecoreClass="base.ecore#//element/IModelElement">
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference base.ecore#//element/IModelElement/specifications"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true"
......
AddMissingAnnotationsMigrationProvider.java 8424a4e54cd747e2d9af9b85d8b9d4a2440456c3 YELLOW
AddMissingAnnotationsMigrationProvider.java a3f2b3cbcd39f85e15bc998650f899f55d9f563e GREEN
RemoveDuplicatedAnnotationsMigrationProvider.java f1bdb4733d5b9c6003a2b7fee59b89240a0a3b61 GREEN
RemoveOutdatedAnnotationInstanceMigrationProvider.java 29c29f2bb7515cad1de45a30ffc185001b47a016 GREEN
......@@ -35,7 +35,7 @@ import org.fortiss.tooling.kernel.extension.data.ITopLevelElement;
public class AddMissingAnnotationsMigrationProvider implements IMigrationProvider {
/** Remembers the processed {@link ITopLevelElement}s. */
Collection<ITopLevelElement> migratedProjects = new ArrayList<>();
private Collection<ITopLevelElement> migratedProjects = new ArrayList<>();
/** {@inheritDoc} */
@Override
......
DerivedAnnotationBaseStaticImpl.java 0b5a8e36f66c937b1659f0b73a0cf0428337e364 GREEN
DerivedAnnotationBaseStaticImpl.java 25b4a0b00fe68a1027ee81e52697e03988862373 GREEN
LibraryElementBaseStaticImpl.java 13222726153d5159994866795b059a4cc3522434 GREEN
......@@ -37,21 +37,20 @@ public class DerivedAnnotationBaseStaticImpl {
* @return See above.
*/
public static <T> T getValue(IDerivedAnnotation<T> annotation) {
T derivedValue = null;
if(annotation.getUserAnnotatedValue() != null) {
if(annotation.isUserAnnotatedValuePreferred()) {
// User annotated value is available and preferred -> return it
return annotation.getUserAnnotatedValue();
}
derivedValue = annotation.getDerivedValue();
if(derivedValue == null) {
// Derived value would be preferred, but it is not available -> return user
// annotated value
return annotation.getUserAnnotatedValue();
}
T userAnnotatedValue = annotation.getUserAnnotatedValue();
if(annotation.isUserAnnotatedValuePreferred() && userAnnotatedValue != null) {
// User annotated value is preferred and exists.
return userAnnotatedValue;
}
// Use cached result of derived value if it is available
return derivedValue != null ? derivedValue : annotation.getDerivedValue();
T derivedValue = annotation.getDerivedValue();
if(derivedValue != null) {
// User annotated value is not preferred: use the derived value.
return derivedValue;
}
// Derived value does not exist: return the user annotated value, even if it is not
// preferred. If neither the derived or the user annotated values exist, we return null.
return userAnnotatedValue;
}
}
AngleUtils.java 462551eae71738ff51f92c9906bff9a21a375d2b GREEN
AnnotationUtils.java d97bf564f04487c2628a4ab03f93726bc2de8678 YELLOW
AnnotationUtils.java d97bf564f04487c2628a4ab03f93726bc2de8678 GREEN
BaseMathUtils.java 65f6c39b641cba3c984a38f42b1bbf7dbf3287a3 GREEN
BaseModelElementUtils.java b8775b7a462efc168cf79a017aa3377a782d10f6 GREEN
ConstraintsBaseUtils.java bba938b43756ce6f35c338f6cef21c3ab5d49a9d GREEN
......
......@@ -12,7 +12,7 @@ ModelEditorBindingBase.java 4c5ac569c0b6e7678fc8191096b26dfd09fdcb98 GREEN
ModelElementHandlerBase.java 384727748f125c9d43f19d9c0eba4ba1be5a7a26 GREEN
MultiEObjectActionBase.java 9e237d8ea640c4194e4877af4a9cfce88698e543 GREEN
NamedCommentedModelElementHandlerBase.java 681b98b50b362f01abb7a36f108f4f11b9e51829 GREEN
PropertySectionBase.java 7b893ca28d86a415d9fc7a818e65c04ed244e896 GREEN
PropertySectionBase.java 20fb1daea544123ea941743aafeb9ac59daf5356 GREEN
TutorialStepUIAtomicBase.java cea2a158158b476de2108d2309afcf47f217b6d9 GREEN
TutorialStepUIAtomicWithWhitelistBase.java a9788ae514f62d27169c737ef59fb583234b5d43 GREEN
TutorialStepUICompositeBase.java 8225210eacb5b88de47d78280c5819f572f00ffa GREEN
......
......@@ -25,6 +25,7 @@ import static org.eclipse.core.databinding.conversion.StringToNumberConverter.to
import static org.fortiss.tooling.kernel.ui.databinding.FloatValidator.FLOAT_VALIDATOR;
import static org.fortiss.tooling.kernel.ui.databinding.IntValidator.INT_VALIDATOR;
import static org.fortiss.tooling.kernel.ui.databinding.NumberPositiveValidator.NUMBER_POSITIVE_VALIDATOR;
import static org.fortiss.tooling.kernel.ui.databinding.NumberPositiveZeroValidator.NUMBER_POSITIVE_ZERO_VALIDATOR;
import static org.fortiss.tooling.kernel.ui.util.DataBindingUtils.DECORATION_KEY;
import static org.fortiss.tooling.kernel.ui.util.DataBindingUtils.performComplexTextBinding;
import static org.fortiss.tooling.kernel.ui.util.WidgetsFactory.createTextWithUndo;
......@@ -448,6 +449,11 @@ public abstract class PropertySectionBase extends AbstractPropertySection {
bindIntegerValue(text, observedValue, NUMBER_POSITIVE_VALIDATOR);
}
/** Binds a positive or zero integer value. */
protected void bindPositiveOrZeroIntegerValue(Control text, IObservableValue<?> observedValue) {
bindIntegerValue(text, observedValue, NUMBER_POSITIVE_ZERO_VALIDATOR);
}
/** Binds a integer value. */
protected void bindIntegerValue(Control text, IObservableValue<?> observedValue,
IValidator numberValidator) {
......
......@@ -5,7 +5,7 @@ ConstraintUIService.java 433e35bb1c9bbc628c6ee070ff45632400becf4a GREEN
ContextMenuService.java ca3c899293f25b70ce8e5f0d86ca2f9683329d81 GREEN
EditPartFactoryService.java e9180c0020f1769d9e24ef3c08f9ca5599dbc5c3 GREEN
MarkerService.java b01b7706034691683df7bbc2e7828c42574b3147 GREEN
ModelEditorBindingService.java 0239c01eef78854fa4abd2df90d93a2b06d60593 GREEN
ModelEditorBindingService.java 948fcdc298a74e366351ad8835a145af6cd238be GREEN
ModelElementHandlerService.java 07a30545ad687ff0fe13bf7a9348c41fb03e0b2c GREEN
NavigatorService.java 2b1361eac805996e22e5409dafff9707fbac3376 GREEN
ToolingKernelUIInternal.java 38903445a9084b7908716a00f41621dfb3126fca GREEN
......
......@@ -33,6 +33,7 @@ import org.eclipse.ui.IPartService;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.IWorkbenchPartSite;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
import org.fortiss.tooling.kernel.ToolingKernelActivator;
......@@ -220,12 +221,9 @@ public class ModelEditorBindingService extends EObjectAwareServiceBase<IModelEdi
/** Closes the given editor. */
private void closeEditor(final IEditorPart editor) {
editor.getSite().getShell().getDisplay().asyncExec(new Runnable() {
@Override
public void run() {
editor.getSite().getPage().closeEditor(editor, false);
}
});
IWorkbenchPartSite editorSite = editor.getSite();
IWorkbenchPage page = editorSite.getPage();
editorSite.getShell().getDisplay().asyncExec(() -> page.closeEditor(editor, false));
}
/** {@inheritDoc} */
......
......@@ -6,7 +6,7 @@ DragAndDropUtils.java 7aab91518aa12d76533a345bf6ed0be9ac7ff0e5 GREEN
EObjectSelectionUtils.java 128cf8f96c6b9478171dff3deda662d5934f5f44 GREEN
HierarchicalNameViewerComparator.java 199d82e392d4e437810cc65c0fc521dab52038e0 GREEN
KernelUIUtils.java 46d3279ef3523b104f89a6c526109f72d36f72f2 GREEN
MessageUtilsExtended.java 67693ff5473d0b85081d273fc5f00612fdc8bfee GREEN
MessageUtilsExtended.java a08055b2f0005eebfa91662374d9ec4ce4f78aab GREEN
ObservableUtils.java 34abfd1dfaf9c0acbb31caf1f525e7b39416c116 GREEN
PropertiesConstantUtils.java 59b1a1e4d594bb98db3aa396f2ff6474ba405920 GREEN
SelectionUtils.java 33aec7cccccb28e5568140cf8e5443ce0f9f59f7 GREEN
......
......@@ -15,6 +15,7 @@
+--------------------------------------------------------------------------*/
package org.fortiss.tooling.kernel.ui.util;
import static org.conqat.ide.commons.ui.dialog.MessageUtils.askQuestion;
import static org.conqat.ide.commons.ui.dialog.MessageUtils.showError;
import static org.conqat.ide.commons.ui.dialog.MessageUtils.showInfo;
import static org.conqat.ide.commons.ui.dialog.MessageUtils.showWarning;
......@@ -32,28 +33,23 @@ public class MessageUtilsExtended {
/** Temporary result for the asked question. */
private static boolean tempQuestionResult;
/** Asks question in the UI thread. */
public static boolean askQuestion(final String title, final String message) {
syncExec(new Runnable() {
@Override
public void run() {
tempQuestionResult = askQuestion(title, message);
}
});
/** Asks question in the UI thread (and block). */
public static boolean askQuestionInUIThread(final String title, final String message) {
syncExec(() -> tempQuestionResult = askQuestion(title, message));
return tempQuestionResult;
}
/** Opens a error dialog in the UI thread. */
/** Opens a error dialog in the UI thread (and block). */
public static void showErrorInUIThread(final String title, final String message) {
syncExec(() -> showError(title, message));
}
/** Opens a warning dialog in the UI thread. */
/** Opens a warning dialog in the UI thread (and block). */
public static void showWarningInUIThread(final String title, final String message) {
syncExec(() -> showWarning(title, message));
}
/** Opens an info dialog in the UI thread. */
/** Opens an info dialog in the UI thread (and block). */
public static void showInfoInUIThread(final String title, final String message) {
syncExec(() -> showInfo(title, message));
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment