All information is now maintained on the [the projects's github.io pages] (http://jankoehnlein.github.io/FXDiagram/)
jankoehnlein / fxdiagram Goto Github PK
View Code? Open in Web Editor NEWJavaFX diagram
License: Apache License 2.0
JavaFX diagram
License: Apache License 2.0
All information is now maintained on the [the projects's github.io pages] (http://jankoehnlein.github.io/FXDiagram/)
Add a state node
delete diagram
add state diagram for same node
-> nothing happens
Composite update sites really slow down the build significantly. We should switch to simpler and more specific ones.
LCARS: Either ship the mongoDB, report a proper error or remove the node
Xtext: Show something meaningful or remove the node
When a connection's labels change, there should be a way to reconcile this.
That used to work :-(
Currently we have some ugly switch expression to extract the domainObject from XNodes or XConnections
Currently, I ship two example movies which make 30MB of the binary. I should reduce that.
When I start Eclipse an error is logged to the console by the e(fx)clipse Java 6 plug-in. We should remove that from the TP and the updatesite.
I'm using version 0.25.0-SNAPSHOT of FXDiagram with Eclipse and Xtext. I have create a own diagram configuration for our DSL. When adding some references to new elements via the side buttons of an existing node the selection animation hangs. The problem is an unhandled but swallowed NoSuchElementException
in the rendering thread.
I have debugged the problem and found the following issues:
Due to the size of our model only very few objects are exported in an IResourceDescription
. Some Element types do have a QualifiedName (calculated by DefaultDeclarativeQualifiedNameProvider
) but are not exported in an IResourceDescription
, in particular, the element type that is represented by an edge on a diagram.
When trying to add some of those edges to new nodes via the side buttons of an existing node the following happens: In XtextEObjectID.Factory
a DefaultXtextEObjectID
is created if a QN exists. Later, when the element shall be resolved, resolve(ResourceSet)
in DefaultXtextEObjectID
fails with a NoSuchElementException
because the object is not exported via the IResourceDescription
. This NoSuchElementException
is not logged and essentially crashes the animation that displays the available nodes for the edge type.
When a nested diagram is opened for the first time, its contents are automatically layouted. It would be much smoother when this happened before it becomes visible.
This requires to precompute the bounds of nodes. Node#autosize()
should work as long as we don't allow CSS styled nodes. Consider creating a new API method getBounds(BoundsType)
, that obsoletes getSnapBounds()
as well.
I'm just starting out with Xtext and wanted to try out FXDiagram for graphical view of a textual
DSL that I'm developing as a learning exercise. I tried to look for a complete working example
of the code snippets on
http://jankoehnlein.github.io/FXDiagram/hla.html
and browsed the sources and plugin.xml files in the Xtext generated projects to no avail.
I couldn't find (with ctntl-H) any references to Diagram in my Eclipse Neon workspace either!
I'm puzzled because I can use the FXDiagram view for the compartments example of statemachine
in an EclipseApplication.
Thanks,
Currently, each new release deletes the previous one on the bintray update site. This is OK as long as we don't have an official release. After that, we should at least keep the previous releases available or some time.
Possible solutions:
The promote.sh
script does a number of naughty things in order to reduce the jar files to the minimum.
Most of this should be ported to the maven build.
Some keybindings work OOTB, others are shadowed by Eclipse actions (CMD-SHIFT-L), others don't have an effect at all (CMD-Z).
Akira-san also reported CMD-P not working on Japanese keyboards.
I'm using version 0.25.0-SNAPSHOT of FXDiagram with Eclipse. I get the following error when saving an untitled diagram to a *.fxd file:
Caused by: java.lang.IllegalArgumentException: Path must include project and resource name: /Untitled.fxd at org.eclipse.core.runtime.Assert.isLegal(Assert.java:63) at org.eclipse.core.internal.resources.Workspace.newResource(Workspace.java:2075) at org.eclipse.core.internal.resources.Container.getFile(Container.java:192) at de.fxdiagram.eclipse.actions.EclipseSaveAction.doSave(EclipseSaveAction.java:83) at de.fxdiagram.eclipse.actions.EclipseSaveAction.lambda$0(EclipseSaveAction.java:64)
The problem is caused by an incorrectly constructed default file name in EclipseSaveAction
:
workspaceDir.getFile(new Path(root.fileName))
creates a file directly within the workspace. However, Eclipse requires files to be in a project. I think the issue should be fixed by using the save dialog for eclipse resources as in #41.
I'm using version 0.25.0-SNAPSHOT of FXDiagram with Eclipse. I get the following error when saving a diagram as SVG:
Exception in thread "JavaFX Application Thread" java.lang.NullPointerException at de.fxdiagram.core.export.SvgExporter.doGetSvgLink(SvgExporter.java:640) at de.fxdiagram.core.export.SvgExporter.toSvgElement(SvgExporter.java:168) at de.fxdiagram.core.export.SvgExporter.toSvg(SvgExporter.java:136) at de.fxdiagram.core.export.SvgExporter.toSvg(SvgExporter.java:162) at de.fxdiagram.core.tools.actions.ExportSvgAction.perform(ExportSvgAction.java:61) at de.fxdiagram.core.tools.DiagramActionTool.lambda$11(DiagramActionTool.java:192)
linkProvider
is set to null when using method def toSvg(XDiagram diagram, File baseDir)
. I think there should be a null check in def SvgLink doGetSvgLink(Node node)
, e.g.:
val newLink = linkProvider?.getLink(node) ?: SvgLink.NONE
The PDE example has a number of glitches
For the latter we might consider choosing a different form of diagram persistence (action based), or a mechanism to make shapes invisible.
... when "link FXDiagram with Editor" is enabled
The class diagram currently shows packages from dmodel files only. Would be great if it also worked on the package declaration within Xtend and Java files.
I'm having trouble getting FXDiagram to work in my non PDE maven build. I can successfully build the project and have published the maven jars. However, there are many dependencies that apparently are not included in pom's of the built artifacts. Apparently, the OSGi bundle dependencies are not picked up by the vanilla maven dependency mechanism.
I understand this has to do with the eclipse plugin. However, I'm curious as to how I work with this issue. Do you have a simple example of just running your demo from within a separate, generic, maven only build?
Appreciate any guidance you can provide.
The faces of FlipNodes can have different shapes and silhouettes. It would be great if they could define different Anchors.
java.util.ConcurrentModificationException
at java.util.HashMap$KeySet.forEach(HashMap.java:931)
at de.fxdiagram.eclipse.FXDiagramTab.lambda$1(FXDiagramTab.java:201)
at de.fxdiagram.eclipse.FXDiagramTab$$Lambda$176/1536814563.widgetDisposed(Unknown Source)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:123)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4199)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1467)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1490)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1471)
at org.eclipse.swt.widgets.Widget.release(Widget.java:1308)
at org.eclipse.swt.widgets.Widget.dispose(Widget.java:671)
at org.eclipse.swt.custom.CTabItem.dispose(CTabItem.java:128)
at org.eclipse.swt.custom.CTabFolder.onMouse(CTabFolder.java:1880)
at org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.java:288)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4199)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1467)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1490)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1475)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1279)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4042)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3669)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:135)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
at org.eclipse.equinox.launcher.Main.main(Main.java:1438)
I'm using version 0.25.0 of FXDiagram with a Xtext DSL. Models are spread across several files. Creating diagrams works fine in Eclipse with the Diagram View being inside or outside of the Eclipse main window.
If the Diagram View is inside the Eclipse main window and is set to maximized (because the diagrams get large) the follwing happens when adding a new node (from another model file) using the side buttons of an existing node:
As far as I know there are no examples in Xtext that use more than one model file. However, the problem can also be reproduced with FXDiagram on a Java class, although the Java editor is not automatically opened when adding a new class:
The expected behavior is demonstrated e.g., by the statemachine (fowlerdsl) editor. Adding and double clicking a new node opens the statemachine editor as a small overlay.
Introduction and Summary Nodes open and close without Exceptions.
Other Nodes experience repeated AIOBEs.
I note a fix for https://bugs.openjdk.java.net/browse/JDK-8096304
Does this trace look familiar?
de.fxdiagram.core.XConnection layoutChildren
SEVERE: ArrayIndexOutOfBoundsException in XConnection.layoutChildren() -1
java.lang.ArrayIndexOutOfBoundsException: -1
at java.util.ArrayList.elementData(Unknown Source)
at java.util.ArrayList.get(Unknown Source)
at com.sun.javafx.collections.ObservableListWrapper.get(Unknown Source)
at com.sun.javafx.collections.VetoableListDecorator.get(Unknown Source)
at javafx.scene.Parent.updateCachedBounds(Unknown Source)
at javafx.scene.Parent.recomputeBounds(Unknown Source)
... elided
at javafx.scene.Node$LazyBoundsProperty.get(Unknown Source)
at javafx.scene.Node.getBoundsInLocal(Unknown Source)
at de.fxdiagram.core.anchors.ConnectionRouter.midPoint(ConnectionRouter.java:593)
at de.fxdiagram.core.anchors.ConnectionRouter.findClosestSourceAnchor(ConnectionRouter.java:548)
at de.fxdiagram.core.anchors.ConnectionRouter.calculatePoints(ConnectionRouter.java:318)
at de.fxdiagram.core.XConnection.layoutChildren(XConnection.java:679)
The container node should automatically resize to its contained diagram (as opposed to the LevelOfDetailNode
that scales its diagram to fit within its fixed bounds).
I can view FXDiagram of a statemachine example in an EclipseApplication on Windows 10,
but it crashes on Ubuntu 14.04 (but I can run the standalone Java demo fine).
The main error shown in the console of the original Eclipse instance is:
40 [main] ERROR org.eclipse.xtext.service.CompoundModule - Type org.eclipse.xtext.xbase.file.AbstractFileSystemSupport not present
However, I'm confused because the log shows libgdk at the top.
Sorry I'm not familiar with Eclipse packages etc, and I couldn't find any leads from
web searches for the xtext error, so I decided to file this sighting. I've attached the
log file and console output.
Thanks,
When a connections source/target has change, morph the connection on reconcile
Currently we get a popup "An internal error occurred during: "Launching de.fxdiagram.annotations.tests".
java.lang.NullPointerException". Something seems to be missing in the Oomph setup.
Steps to reproduce:
Currently, selection is hard baked into XShape. Shouldn't this be a behavior?
I'm using version 0.26.0 of Fxdiagram. With #41 the save diagram dialog has been changed to an eclipse dialog. Saving a diagram works fine. However, the load diagram dialog is still a standard file dialog. This dialog should also be changed to an eclipse dialog.
The mapping API is not really limited to Eclipse, and should be usable in non-OSGi apps as well.
The names appear in the UI now and should be nice.
Should rather issue a remove command than resetting the diagram object, to be undoable.
Auxiliary lines should attract dragged nodes within a certain threshold, and once docked need a bit more fore to release them.
Needs thorough testing, as it might annoy users when they cannot place elements as they want. Consider using a modifier key to switch this behavior off.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.