jpaulm / drawfbp Goto Github PK
View Code? Open in Web Editor NEWTool for Creating and Exploring Flow-Based Programming Diagram Hierarchies
Home Page: http://www.jpaulmorrison.com/fbp/
Tool for Creating and Exploring Flow-Based Programming Diagram Hierarchies
Home Page: http://www.jpaulmorrison.com/fbp/
Cast error when changing font size
Hi @bergm , one of your main comments on DrawFBP was that it is a bit slow - I have put up a new release (3.0.0) which uses double buffering (at least my imperfect understanding of it!). On my machine there is not much obvious difference in performance, but I am hoping that you will see an improvement - so I would appreciate it very much if you could give it a try!
The changes were fairly extensive, so I may well have introduced new, unexpected bugs. Please let me know of any issues that you run into! For the same reason, I have not yet put it up on Maven. So v3.0.0 can be found on build/libs or Releases... I would really appreciate it if you could give it a test run!
PS If there is no appreciable difference in performance, perhaps you could take a quick look at the paint
and paintComponent
methods in DrawFBP.java ...
PS @bobcorrick Don't know if you want to take a look at this release... I know you are pretty busy, but your skill at finding bugs would be very helpful as well!
Thank in advance!
Paul
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
build.gradle
io.codearte.gradle.nexus:gradle-nexus-staging-plugin 0.30.0
math.geom2d:javaGeom 0.11.1
javax.help:javahelp 2.0.05
gradle/wrapper/gradle-wrapper.properties
gradle 7.6.2
pom.xml
math.geom2d:javaGeom 0.11.1
javax.help:javahelp 2.0.05
Greetings, in the .drw files generated by DrawFBP, there is a type information for each block. There are multiple types:
const TypeBlock = "B" // normal component
const TypeIIP = "I"
const TypeEnclosure = "O" // just for presentation purposes, has .IsSubnet = false
const TypeSubnet = "B" // reference to actual subnet, has .IsSubnet = true
const TypeExtPortIn = "B" //TODO type "B" gets reused here...how to discern these? corresponds to INPORT = network inport in .fbp
const TypeExtPortOut = "B" //TODO type "B" gets reused here...how to discern these? corresponds to OUTPORT = network outport in .fbp
const TypeExtPortOI = "B" //TODO type "B" gets reused here...how to discern these?
const TypeLegend = "L"
const TypeFile = "F"
const TypePerson = "P"
const TypeReport = "R"
As given by the comments, the block type "B" gets reused for multiple block types. How are network-level input and output ports declared in the diagram using the .drw XML format?
Meaning, what is the equivalent of the .fbp form, where network-wide ports are declared using INPORT=...
and OUTPORT=...
?
INPORT=filter.IN:NETIN
filter(bin/filter-records) OUT -> IN copy(bin/copy)
'OUT1' -> ARGS copy
OUTPORT=copy.OUT1:NETOUT
This declares a network-wide input port NETIN
leading into filter.IN, further into the copy component, and from copy.OUT1 into the network-wide output port NETOUT
.
If they are not already differentiatable / discernable using some other means than the block type, please make these network-wide input, output and input-output ports discernable / differentiatable, for example using block types NI
, NO
, NIO
for network in, network out, network in-out respectively.
At least in C# mode: When I select a .drw file for a subnet component, the file selector dialog has still .cs files in the filter and even if I select . as filter and select a .drw file, the name displayed in the diagram gets an .cs appended.
I got lost in the instructions. It has to be so simple a monkey can do it.
The internal dialogue might go like this:
Flow based programming, that sounds interesting, let's have a look.
github, hmmm. let's read on.
grable, hmmmm, maven hmmmm. eclipse, hmmmmmm
crap, what else is there......
It is all about curb appeal and a welcoming front door.
This is what I did:-
Instructions for Linux Monkeys.
Add screenshots and versions for Mac and 'doze.
I'd like to get a better picture when zooming, I don't remember much about how drawing with graphics2d in java works but you can accomplish this via a transform matrix or the old trick of rendering a larger image and then resizing it to the target viewport to get some antialiasing.
It's a small detail but It'd help when doing a presentation.
Hi all,
I downloaded DrawFBP and in the 2.10.7 build I am getting the following error:
java -jar drawfbp-2.10.7.jar
Exception in thread "main" java.lang.NullPointerException
at com.jpmorrsn.graphics.DrawFBP.createAndShowGUI(DrawFBP.java:329)
at com.jpmorrsn.graphics.DrawFBP.(DrawFBP.java:275)
at com.jpmorrsn.graphics.DrawFBP.main(DrawFBP.java:2674)
Just for fun I ran the 2.10.6 build and it works fine.
Environment: Mac OSX 10.10
Java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
I succeeded in associating my drawfbp.bat
file with the file type .drw
, but it turned out that it was getting blocked by a GitHub-generated .bat
file of the same name in build\scripts
!
The latter seems to be built by build.gradle
, and it is actually close to what I would like, except that it references a folder called .../build/lib
and assumes it contains some jar files... This folder does exist but it doesn't contain these files! It also uses -classpath
, where I would prefer it to use -jar
(as the .jar
file is a "fat" one). I assume there is a template somewhere for this .bat
file, but I don't know where to look.
Help would be appreciated! The generated .bat file can be seen in https://github.com/jpaulm/drawfbp/blob/master/build/scripts/drawfbp.bat . Thanks in advance!
When I File/Open Diagram, the file list is in a strange order, I do not know where this is set, but it cannot be changed. alphabetic order would be nice. also an option to omit hidden files. Would also save effort if it remembered where it was last time.
Greetings, there are some observed differences / discrepancies between what is defined in the XML schema file for .drw files and what is actually output by DrawFBP.
Observations so far:
block > issubnet
is not defined in the XML schema, but present in the actual outputblock > subnetports > subnetport
is not defined in the XML schema, but present in the actual outputMinor mystery: when I execute this release directly from my build/libs
, it seems to be missing the necessary math.geom2d
classes - executing from Releases or Maven works fine, or from the build\libs
directory on GitHub! Will investigate!
Hello Everybody,
Is it possible to implement or generate code for Ada language with drawfbp or create adafbp (just like cppfbp, c#fbp, javafbp, etc...
Many thanks!
God blesses!!!
Best regards,
Sanyaade
not super serious (me I was interested in javafx at one time but haven't done anything but play with it) but this seems an obvious thought since of course javafx is meant as the successor to swing
I would think overall the result could/should feel more up to date (I notice e.g. on my Mac the fonts all look slightly soft/fuzzy I think they've improved the antialiasing in javafx so things look sharper - small thing but makes a better impression).
I'm not super up on how hard it would be at one time I'd looked into things I thought I'd found a lot of material on how to rewrite apps from swing to javafx but IIRC there were also options to incorporate javafx into swing apps (and even vice versa IIRC). So I think there's options besides a complete rewrite.
though (I just remembered) another advantage for developers using javafx was the nice drag and drop GUI editing with SceneBuilder in theory this might reduce the effort as well:
https://gluonhq.com/products/scene-builder/
it seems like javafx has had trouble gaining popularity so there's definite cost/benefit tradeoffs here but from a brief google on "javafx diagram editor" there are some interesting javafx libraries for sure... some hits (the first looks esp. nice though I noticed I guess that is the library being used by another FBP-inspired tool? https://vrl-studio.mihosoft.eu/):
https://github.com/miho/VWorkflows
http://jankoehnlein.github.io/FXDiagram/
https://github.com/tesis-dynaware/graph-editor
https://platform.netbeans.org/graph/
This is a UML digram editor they ported from swing to javafx:
https://github.com/prmr/JetUML
they wrote up their experiences here:
https://www.cs.mcgill.ca/~martin/papers/software2019.pdf
Not sure how relevant just thought this was an impressive use of javafx (flow diagrams in 3D? :)
https://github.com/Nurtak/ObjectGraphVisualization
Greetings, in the README, it is mentioned that the latest version is (as of 2018-08-09) the version 2.14.1 and that a compiled release version .jar would be available on Maven Central.
Following the given link and searching for DrawFBP shows only 2.13.x as the latest version, see this direct link - the 2.14.x versions are missing.
Previously opened windows can't be closed any more.
Steps: Open two windows in succession (pressing twice File/Generate XYZ Network) and try to close them.
Width of IIP block set to zero when editing contents
Should be fixed in v3.0.5
When generating code for a flow when a port name is missing, drawFBP freezes.
Just create two processes, connect them and remove one port name. When creating the code, the window freezes and one has to kill the process.
I came across some commits by @john-r-iii in DrawFBP, but seeming to all refer to the jpaulm/cppfbp project - around 2016... I don't see those folders there any more!
a) How come?
b) wouldn't those changes be useful for the real jpaulm/cppfbp project?!
Thanks, @john-r-iii !
The code currently assumes that the Properties file exists. The Readme mentions this file, but does not state that you have to have one if you want to display the DrawFBP properties. DrawFBP will be changed to create a minimal Properties file if the user has not created one - DrawFBP will add properties as needed.
This change will be implemented in v2.15.3. Thanks, @bobcorrick !
Readme will be updated to mention this file.
The window with the generated code is very slow. It's sometimes hard to select a larger portion of the define functions content because the mouse pointer is moving slowly etc. It feels like the whole rendering of a bit of colored text in this text view is already too much. But maybe it's really because you are hooking into the render/display loop and then this affects everything. Could that be? (edited)
Check out MyFileChooser changes...
Hi Alex,
Of the set you raised, the only real mystery is the javac one... I don't understand the error message!
The second line of errorMsg1 seems to suggest that it's looking for javac within refactoring/bin ! But the -d option indicates the target directory! It also says "no such directory", but I do a Java mkdirs just before that message... maybe it doesn't work in *nix...?
Can you try a few naked compiles on your system to see if we can get some more info?
I have also had problems with DOS commands under Java in the past, so we could try a different format - if you don't mind doing some experimenting...?
Thanks in advance,
Paul
Add capacity attribute to arrows; display on diagram; generate for JavaFBP, C#FBP and CppFBP
When DrawFBP generates code for C# and the diagram is a subnet, then the class name will still contain the .class suffix (from Java I guess). E.g. Component("SUBIN", typeof(SubIn.class));
instead of Component("SUBIN", typeof(SubIn));
Embarrassing! I think this will be fixed as of v3.0.6 - have to do more testing!
Edge of Legend not detected if font size larger than standard
When dealing with other languages a class file might not be the correct abstraction so allowing a string to be used as the "component" property of a process will help.
There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.
Error type: undefined. Note: this is a nested preset so please contact the preset author if you are unable to fix it yourself.
Suggested by Ged Byrne:
When I click and drag on the square the component is moved. I had no reason to expect a different behaviour when I click and drag on the edge. In most modern UI there are affordances to indicate behaviour. For example, when over a component the mouse changes to the four arrows to indicate that I can use it to move the box around. When I'm at the edges it changes to a single arrow and a line to indicate that I can adjust the size of the box. DrawFBP has no affordances, not even a tool tip message.
It would be helpful if ports were visible on the diagram, like in expression flow. When I hover over one of those ports the mouse pointer should change and a tooltip should say something like "Click and drag to connect ports."
Problem in last few releases: clicking on "canvas" does not bring up desired icon!
To create a "process" block, IIP, etc., you have to use Diagram\New Block
for releases before v3.1.6
Turns out this only occurs when a diagram has duplicate bend items - this is fixed by v3.1.6
While implementing an XML parser for .drw files, this error message came up trying to parse .drw files genareted by v2.12.23:
element <drawfbp_file> closed by </net>
which means that the corresponding opening tag <net>
is missing, which is true:
<?xml version="1.0"?>
<drawfbp_file xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://github.com/jpaulm/drawfbp/blob/master/lib/drawfbp_file.xsd"> <desc> </desc> <complang>Java</complang> <clicktogrid>true</clicktogrid>
<blocks><block> <x> 123 </x> <y> 54 </y> <id> 16 </id> <type>I</type> <width>187</width> <height>17</height> <description>-quiet /var/log/syslog</description> <multiplex>false</multiplex><invisible>false</invisible><issubnet>false</issubnet>
The <net>
opening tag needs to be inserted after <drawfbp_file [...]>
like so:
<?xml version="1.0"?>
<drawfbp_file xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://github.com/jpaulm/drawfbp/blob/master/lib/drawfbp_file.xsd"><net> <desc> </desc> <complang>Java</complang> <clicktogrid>true</clicktogrid>
<blocks><block> <x> 123 </x> <y> 54 </y> <id> 16 </id> <type>I</type> <width>187</width> <height>17</height> <description>-quiet /var/log/syslog</description> <multiplex>false</multiplex><invisible>false</invisible><issubnet>false</issubnet>
[...]
Please add outputting this <net>
tag when saving .drw files from DrawFBP.
Hi @bergm , looking at my latest code, I see that I recently dropped some of the C# function... My question is: do you expect the Choose Component function to find C# classes? I think I had that in earlier versions, but probably only using your local C# classes (i.e. not from a DLL)... More research needed, I guess!
I am opening this as a new issue...
There has to be a better way.
Edge shading on block remains after block dragged
Righthand external port names of Enclosures not filled in during Excise function; names on remaining arrows not filled in; when saving subnet, suggested name should be filled in
Just a note, without much investigation. It seams it can quite easily happen that diagram elements vanish. It happend already twice to me, this time a larger part of a flow. Initially I thought drawfbp stumbled over an incorrect manual change in the .drw file, but now it happend again.
Export Image truncating caption at bottom of image
It would be very interesting to me to see at least part of the editor self hosted, aka created with JavaFBP. That would be a good way for me to see FBP used in the real world and would go a long way in proving the philosophy.
On start up the interface opens at a specific size every time. Give control of positioning to the system.
Background of exported image is black in this rewrite (not released yet)
This may be relevant: https://stackoverflow.com/questions/31530113/background-color-in-java-graphics-2d-is-always-black-color
Associating the drawfbp.bat file with the .drw extension - help would be appreciated!
Blue circles only show up on Process blocks - needed elsewhere also...
Version number was not reflecting changes in font or font size. Also, apparently DrawFBP was not retaining font size changes from one run to the next.
Thanks, @bobcorrick !
Starting with Version V 2.22.1 and higher, attached classes (class names) suddenly vanish and keep vanished if the file has been saved in one of the newer versions.
I can't find information about the keyboard shortcuts, are they available?
It takes two tries to connect arrow to block!
Will be fixed in v3.0.4
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.