Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • af3/kernel
  • diewald/kernel
2 results
Show changes
Commits on Source (77)
Showing
with 71 additions and 20 deletions
......@@ -2,10 +2,10 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Tooling Base UI
Bundle-SymbolicName: org.fortiss.tooling.base.ui;singleton:=true
Bundle-Version: 2.22.0.qualifier
Bundle-Version: 2.23.0.qualifier
Bundle-Activator: org.fortiss.tooling.base.ui.ToolingBaseUIActivator
Require-Bundle: org.fortiss.tooling.base;bundle-version="2.22.0";visibility:=reexport,
org.fortiss.tooling.kernel.ui;bundle-version="2.22.0";visibility:=reexport,
Require-Bundle: org.fortiss.tooling.base;bundle-version="2.23.0";visibility:=reexport,
org.fortiss.tooling.kernel.ui;bundle-version="2.23.0";visibility:=reexport,
org.eclipse.swt,
org.fortiss.tooling.common.ui
Bundle-ActivationPolicy: lazy
......
CurvedLinkLayoutedContentAnchorangeController.java 249629c966a1f92fc28294ef62117439799d7315 GREEN
CurvedLinkLayoutedDiagramAnchorangeController.java de1ab32e11205435cf7a89d2dcc352683ef8b39e GREEN
EObjectDiagramController.java 45f5b1439f33685523b035d2603e8329b647b62a GREEN
EObjectEllipticResizableContentControllerBase.java f12e8f5a646a23fe428ed4768bf041c8b885ec81 GREEN
EObjectDiagramController.java 4b51e73023a8e5dd7f5ae12b495b25f22c1b58bd GREEN
EObjectEllipticResizableContentControllerBase.java 7021ae2cadf40bdd099964908cc881644ad9ffb3 GREEN
EObjectModelChangeProvider.java f4b60cebb088a5c81ca92a41614e1a5d40030502 GREEN
EObjectRectangularResizableContentControllerBase.java cde6c13659611d927691c03ecd2621cff2414b03 GREEN
EObjectRectangularResizableContentControllerBase.java dbeb8371fdac0838c9a23b9dcff63f81aae1265b GREEN
KernelServiceBasedModelChangeProviderBase.java 8d1f8ef79ecd383ff74e5a2bbcf24345aabe70af GREEN
LayoutedContentAnchorageController.java 83f066a151dd2984c4bef64daf8165a0cd53b00f GREEN
LayoutedCurveLinkBendPointController.java d963a5e227de7bd8ba910c733df2ac7acf4fa1fa GREEN
......@@ -12,5 +12,5 @@ LayoutedEllipticResizableContentController.java 00037188773eb65866863ab89331bc98
LayoutedLineLinkBendPointController.java 8022cc66c4d33d7bf357ceb4c9ca1694f4f2fda8 GREEN
LayoutedLinkBendPointController.java d3f22ffb43426da62e849074a9d5a64e4d70a7ad GREEN
LayoutedRectangularResizableContentController.java 341f4a7da0d69360d7026af6d9b3d44dfd7d9bb1 GREEN
ModelElementFXEditorUIProviderBase.java 6bdd31d033228315e99c973b4986cdabc135ec9f GREEN
ModelElementFXEditorUIProviderBase.java 1ab1d053029e14510ff97c84821a62ddeaf595e7 GREEN
NamedCommentedLayoutModelChangeProvider.java 223e82c1b1cba842f6fae115182f5d0c6acb44b0 GREEN
......@@ -85,6 +85,8 @@ public class EObjectDiagramController<T extends EObject> extends DefaultDiagramC
IElementCompositionContext edc = createElementCompositionContext(modelParent, x, y, true,
getViewer().getFeatures().getCurrentZoomFactor());
List<MenuItem> result = createPrototypeMenu(modelParent, edc);
// Adds all menu items from the context menu service.
result.addAll(IContextMenuService.getInstance().getFXMenuItemsForElement(modelParent, null));
// Adds "Display" and "Zoom" menus
result.addAll(super.contextMenuContributions(node, diagramLocation));
if(modelParent instanceof IHierarchicElement && enableAutoLayout()) {
......
......@@ -38,6 +38,7 @@ import org.fortiss.tooling.kernel.extension.data.IElementCompositionContext;
import org.fortiss.tooling.kernel.model.INamedCommentedElement;
import org.fortiss.tooling.kernel.service.IElementCompositorService;
import org.fortiss.tooling.kernel.ui.extension.IModelElementHandler;
import org.fortiss.tooling.kernel.ui.service.IContextMenuService;
import org.fortiss.tooling.kernel.ui.service.IModelEditorBindingService;
import org.fortiss.tooling.kernel.ui.service.IModelElementHandlerService;
......@@ -133,7 +134,10 @@ public abstract class EObjectEllipticResizableContentControllerBase<T extends IN
EObject modelParent = (EObject)getModel();
IElementCompositionContext edc = createElementCompositionContext(modelParent, x, y, false,
getViewer().getFeatures().getCurrentZoomFactor());
return createPrototypeMenu(modelParent, edc);
List<MenuItem> menuItems = createPrototypeMenu(modelParent, edc);
menuItems.addAll(
IContextMenuService.getInstance().getFXMenuItemsForElement(modelParent, null));
return menuItems;
}
/** {@inheritDoc} */
......
......@@ -44,6 +44,7 @@ import org.fortiss.tooling.kernel.extension.data.IElementCompositionContext;
import org.fortiss.tooling.kernel.model.INamedCommentedElement;
import org.fortiss.tooling.kernel.service.IElementCompositorService;
import org.fortiss.tooling.kernel.ui.extension.IModelElementHandler;
import org.fortiss.tooling.kernel.ui.service.IContextMenuService;
import org.fortiss.tooling.kernel.ui.service.IModelEditorBindingService;
import org.fortiss.tooling.kernel.ui.service.IModelElementHandlerService;
......@@ -164,7 +165,10 @@ public abstract class EObjectRectangularResizableContentControllerBase<T extends
EObject modelParent = (EObject)getModel();
IElementCompositionContext edc = createElementCompositionContext(modelParent, x, y, false,
getViewer().getFeatures().getCurrentZoomFactor());
return createPrototypeMenu(modelParent, edc);
List<MenuItem> menuItems = createPrototypeMenu(modelParent, edc);
menuItems.addAll(
IContextMenuService.getInstance().getFXMenuItemsForElement(modelParent, null));
return menuItems;
}
/** {@inheritDoc} */
......
......@@ -22,6 +22,7 @@ import org.eclipse.jface.viewers.StructuredSelection;
import org.fortiss.tooling.base.model.element.IModelElement;
import org.fortiss.tooling.common.ui.javafx.control.treetableview.DynamicTreeTableUIProviderBase;
import org.fortiss.tooling.kernel.ui.extension.base.FXEditorBase;
import org.fortiss.tooling.kernel.ui.service.IContextMenuService;
import org.fortiss.tooling.kernel.ui.service.IModelElementHandlerService;
import javafx.scene.Node;
......@@ -60,6 +61,8 @@ public abstract class ModelElementFXEditorUIProviderBase<T extends IModelElement
}
ContextMenu contextMenu = new ContextMenu();
contextMenu.getItems().addAll(createPrototypeMenu(element, null));
contextMenu.getItems()
.addAll(IContextMenuService.getInstance().getFXMenuItemsForElement(element, null));
return contextMenu;
}
......
AbstractNameEditingSupport.java c57336a0e0da18711a1610ca667dfea76728807f GREEN
ActionUtils.java 322f43d4f92f992daef8ac88eb0f9197c840c89b GREEN
ContextMenuUtils.java 1b4f2a63dfca9ad363942baf320c93145c251836 GREEN
ContextMenuUtils.java a55ceed42f2eb88ba263a6fbcb394ddb80b1eda0 GREEN
EllipseLayoutUIUtils.java 0af2cfc038661828b1bb8c51c0a3816d453e8313 GREEN
FXDNDUtils.java 6ce94e239e68f9e2b3cc0524b072606f4a120076 GREEN
FontUtils.java a167a05bdaa8da9853705cc5134f30f6d81bc9f2 GREEN
......
......@@ -91,6 +91,7 @@ public final class ContextMenuUtils {
if(!newMenu.getItems().isEmpty()) {
result.add(newMenu);
}
return result;
}
......
......@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.fortiss.tooling.base;singleton:=true
Bundle-Version: 2.22.0.qualifier
Bundle-Version: 2.23.0.qualifier
Bundle-ClassPath: .
Bundle-Vendor: %providerName
Bundle-Localization: plugin
......
......@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Tooling Commons UI
Bundle-SymbolicName: org.fortiss.tooling.common.ui;singleton:=true
Bundle-Version: 2.22.0.qualifier
Bundle-Version: 2.23.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-11
Require-Bundle: org.fortiss.tooling.common;visibility:=reexport,
org.eclipse.core.resources;visibility:=reexport,
......
......@@ -5,7 +5,7 @@ DynamicTextFieldTreeTableCell.java 62fa0c08b11d87e0eed41f84be85505c2740e75d GREE
DynamicTreeContentProviderBase.java 91896b1fb5104d126544c44c1ff8c30f2a13a8d6 GREEN
DynamicTreeItem.java 7e81ea98038b5eca90df583e0268d4e8f37aaf25 GREEN
DynamicTreeItemBase.java d883066ecc181120302ca32f328538de7a45b093 GREEN
DynamicTreeTableUIProviderBase.java 29aa753793ab90676d45e5b76b11f7b46ce02a97 GREEN
DynamicTreeTableUIProviderBase.java 11565b3f72bb5a861043d1d68a93a939e37baafc GREEN
DynamicTreeTableViewer.java 77e9995a3bee37d57578dad9434a53c702128efa YELLOW
DynamicTreeUIProviderBase.java 82d3c051213f0147f4c67ad247a08696cee73110 GREEN
DynamicTreeViewer.java 33066062a82101cf28410e4d04f85bb9c24251db GREEN
......
......@@ -15,6 +15,8 @@ package org.fortiss.tooling.common.ui.javafx.control.treetableview;
import static java.util.stream.Collectors.toMap;
import static javafx.collections.FXCollections.observableArrayList;
import static javafx.scene.text.Font.font;
import static javafx.util.Duration.seconds;
import static org.apache.commons.lang3.SystemUtils.IS_OS_LINUX;
import java.util.Map;
......@@ -28,6 +30,7 @@ import javafx.scene.Node;
import javafx.scene.control.ComboBox;
import javafx.scene.control.ContextMenu;
import javafx.scene.control.TextField;
import javafx.scene.control.Tooltip;
import javafx.scene.control.TreeItem;
import javafx.scene.control.TreeTableCell;
import javafx.scene.control.TreeTableColumn;
......@@ -40,6 +43,7 @@ import javafx.scene.input.KeyEvent;
import javafx.scene.input.MouseButton;
import javafx.scene.input.MouseEvent;
import javafx.scene.paint.Color;
import javafx.scene.text.Font;
import javafx.util.Callback;
import javafx.util.converter.DefaultStringConverter;
......@@ -64,6 +68,22 @@ public abstract class DynamicTreeTableUIProviderBase<T> {
return "";
}
/**
* Retrieves the tooltip text which shall be displayed for the given element in the given
* column.
*
* No tooltip will be displayed, if this method return 'null'.
*
* @param element
* The element to get a tooltip for.
* @param column
* The column index for which to get a tooltip.
* @return The tooltip as a {@link String}.
*/
public String getTooltip(T element, int column) {
return null;
}
/**
* Determines, which {@link String} is in text editor cells when stating to edit.
*
......@@ -322,6 +342,21 @@ public abstract class DynamicTreeTableUIProviderBase<T> {
final Node icon = getIconNode(data, columnIndex);
cell.setGraphic(icon);
cell.setStyle(getCellStyle(data, columnIndex));
addContextMenuToCell(cell, columnIndex);
final String tooltipStr = getTooltip(data, columnIndex);
if(tooltipStr != null) {
Tooltip tt = new Tooltip();
double fontSize = 14.0;
Font font = font(fontSize);
tt.setText(tooltipStr);
tt.setShowDuration(seconds(15));
tt.setFont(font);
cell.setTooltip(tt);
}
} else {
// reset icon for cases, in which a row was styled before, but became empty by now.
cell.setGraphic(null);
......@@ -585,7 +620,7 @@ public abstract class DynamicTreeTableUIProviderBase<T> {
* @param columnIndex
* The column index of the given {@code cell}.
*/
private void addContextMenuToCell(TreeTableCell<T, String> cell, int columnIndex) {
private void addContextMenuToCell(TreeTableCell<T, ?> cell, int columnIndex) {
ContextMenu menu;
T data = cell.getTreeTableRow().getItem();
......@@ -603,7 +638,7 @@ public abstract class DynamicTreeTableUIProviderBase<T> {
* {@link DynamicTreeViewer} due to the absence of proper selection interfaces in
* JFX.
*/
private void addContextMenuHandler(TreeTableCell<T, String> cell, ContextMenu menu, T element) {
private void addContextMenuHandler(TreeTableCell<T, ?> cell, ContextMenu menu, T element) {
cell.getTreeTableView().addEventHandler(MouseEvent.MOUSE_RELEASED, e -> {
if(e.getButton() == MouseButton.SECONDARY) {
TreeItem<T> selected =
......
......@@ -6,6 +6,6 @@ DefaultDiagramController.java 3f60229b2e0fe0b6ac40c617858cc5a0685a59eb GREEN
DelegatingContentAnchorageController.java 1889628a346a2183082ffe213978f9d15a949494 GREEN
DragControllerBase.java b15ff874304f679fe494d85f57cc8cbe4d0d1d15 GREEN
DraggingUtils.java 95117e2ea4c36b6c6a31f8088bb95b484e0e6612 GREEN
LinkControllerBase.java b59796a87ac5d5e054c332d0867d5e3d308d9936 GREEN
LinkControllerBase.java 0fc15aa254831d741b6819d8b41a92e16e69141d GREEN
MoveControllerBase.java 38d632e31f5e27d112ecdd4933e3a331378180d0 GREEN
ResizableContentControllerBase.java 898500d389b035f8138308d496d2d24be501c719 GREEN
......@@ -138,14 +138,16 @@ public abstract class LinkControllerBase extends MVCBundlePartBase implements IC
@Override
public Change secondaryClick(MouseEvent event, Node node,
DiagramCoordinate locationOnNode) {
DiagramViewer viewer = getViewer();
if(event.isControlDown()) {
// link must be primary selected
DiagramViewer viewer = getViewer();
if(viewer.isPrimarySelected(getMVCBundle())) {
// control+right-click deletes the link
return () -> deleteLink();
}
}
viewer.showContextMenu(node, locationOnNode, getMVCBundle());
return null;
}
};
......
......@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Tooling Commons
Bundle-SymbolicName: org.fortiss.tooling.common;singleton:=true
Bundle-Version: 2.22.0.qualifier
Bundle-Version: 2.23.0.qualifier
Require-Bundle: org.eclipse.core.runtime;visibility:=reexport,
com.ibm.icu;visibility:=reexport,
org.junit;visibility:=reexport
......
......@@ -3,7 +3,7 @@ Automatic-Module-Name: org.fortiss.tooling.ext.reuse.ui
Bundle-ManifestVersion: 2
Bundle-Name: AF3 Reuse UI
Bundle-SymbolicName: org.fortiss.tooling.ext.reuse.ui;singleton:=true
Bundle-Version: 2.22.0.qualifier
Bundle-Version: 2.23.0.qualifier
Bundle-Activator: org.fortiss.tooling.ext.reuse.ui.ToolingReuseUIActivator
Require-Bundle: org.eclipse.ui.ide;visibility:=reexport,
org.fortiss.tooling.base.ui;visibility:=reexport,
......
org.fortiss.tooling.ext.reuse.ui/icons/af3_icon64.png

6.11 KiB

org.fortiss.tooling.ext.reuse.ui/icons/af3_logo.png

22.2 KiB

org.fortiss.tooling.ext.reuse.ui/icons/af3_logo_square.png

33.5 KiB

ReuseLibraryUIUtils.java 0f8d233c725d9dbd39ff6613a69c997786264054 GREEN
ReuseLibraryUIUtils.java fed62784975bf8e6fc1625505636e247dfb6c86e GREEN
ReuseLibraryViewUtils.java 34a852dc692ec56cb3e9fd8dcea99d64f31503b3 GREEN