Giter VIP home page Giter VIP logo

drawfbp's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

drawfbp's Issues

DrawFBP modified to use double buffering

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

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

gradle
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/gradle-wrapper.properties
  • gradle 7.6.2
maven
pom.xml
  • math.geom2d:javaGeom 0.11.1
  • javax.help:javahelp 2.0.05

  • Check this box to trigger a request for Renovate to run again on this repository

Ambiguous use of block type "B" & declaring netin, netout ports

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.

Selected subnet name gets wrongly attached to component

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.

Getting started simply

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.

  1. Go to http://search.maven.org
  2. Search for DrawFBP.
  3. Download the .tar file
  4. Create FBP folder
  5. Extract .tar to FBP
  6. Open terminal
  7. cd FBP/drawfbp-2.13.4/bin
  8. ./drawfbp

Add screenshots and versions for Mac and 'doze.

Improve Zoom

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.

java.lang.NullPointerException in 2.10.7

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)

What is generating a `drawfbp.bat` file in `build\scripts`?

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!

trouble getting File->Compile Code to work

from doing the tutorial things overall worked out but couldn't get the compile to work from inside DrawFBP so I just compiled my files separately from the command line.

I did set JAVA_HOME before starting drawfbp
(and then later I tried setting CLASSPATH too but that didn't help)

Screen Shot 2019-07-04 at 7 28 10 AM

File system navigation

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.

Discrepancies between .drw XML schema and actual DrawFBP output

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 output
  • block > subnetports > subnetport is not defined in the XML schema, but present in the actual output

Missing math.geom2d classes

Minor 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!

Flow-based for Ada Language

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

consider porting to javafx?

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

https://openjfx.io/

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

Latest DrawFBP version missing on Maven Central

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.

External Ports not generating correct symbols

Latest version of DrawFBP not generating correct symbols for External Ports (Input, Output or OI).

Diagram shows correct ones - will be fixed in v2.14.2

test

(Symbol for OI could use some tweaking...!)

Lockup on code generation if port name is missing

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.

CppFBP stuff in DrawFBP project

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 !

Display Properties not showing anything (for some users)

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.

Generated code window slow!

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)

javac problem

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 to arrows

Add capacity attribute to arrows; display on diagram; generate for JavaFBP, C#FBP and CppFBP

Support arbitrary string instead of class.

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.

Action Required: Fix Renovate Configuration

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.

Some more enhancements

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."

.drw files are missing the <net> open tag

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.

Filling in C# classes for a network using C#FBP

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...

Vanishing arrows at least in V2.22.0 upwards

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.

Self host at least part of the editor

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.

Starting drawfbp

On start up the interface opens at a specific size every time. Give control of positioning to the system.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.