Giter Site home page Giter Site logo

vrl-studio / vrl Goto Github PK

View Code? Open in Web Editor NEW
28.0 13.0 18.0 115.36 MB

Visual Reflection Library

Home Page: http://vrl.mihosoft.eu

Java 61.03% Shell 0.06% HTML 38.83% CSS 0.02% Objective-C 0.05% Batchfile 0.01%
visual-programming-language visual-reflection-library vrl vrl-studio java integrated-development-environment swing javafx

vrl's Introduction

VRL (Visual Reflection Library)

Build Status Download

Webpage: http://vrl-studio.mihosoft.eu

Join the Developer Group if you'd like to contribute.

Dependencies

  • Java >= 1.8 (JDK)
  • NetBeans >= 7.4

How To Build

  • Open the VRL project with NetBeans and build it

NOTE: Alternatively you can build VRL from the command line by using Ant >= 1.8

Nice, But What Can I Do With It?

To see what is possible with VRL check out VRL-Studio. It is a VRL based IDE that allows to write programs at runtime! Each object you instantiate can be visualized and manipulated through an automatically created user interface.

API Doc & Builds

For 0.5 (Playground)

Maven Artifacts

Repository: maven central (http://repo1.maven.org/maven2, see above for latest version)

<dependency>
  <groupId>eu.mihosoft.vrl</groupId>
  <artifactId>vrl</artifactId>
  <version>0.4.3.0.2</version>
</dependency>

vrl's People

Contributors

bsumirak avatar cpoliwoda avatar miho avatar stephanmg avatar

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

Watchers

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

vrl's Issues

No warning on saving an object not implementing Serializable

On saving a project that contains a window representing an object that does not implement Serializable, this window disappears without any warning being displayed.
The only notice is "Window x deleted!" in the log, which is not very informative, since the user can see that for himself.

Edit: Sorry, I guess this belongs to VRL-Studio, not VRL, but I am leaving it here.

VRL does not compile with newer NetBeans version (tested with NB 7.4)

Trying to compile VRL with recent NetBeans versions (e.g., 7.4) results in compile error:

/Users/miho/EigeneApps/VRL/VRL/nbproject/build-impl.xml:990: The following error occurred while executing this line:
/Users/miho/EigeneApps/VRL/VRL/nbproject/build-impl.xml:834: copylibs doesn't support the "excludeFromCopy" attribute
BUILD FAILED (total time: 11 seconds)

VRL-Studio and Console Apps throw FileNotFoundException on OS X

Exact error message:

java.io.FileNotFoundException: /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Resources/Java/JavaRuntimeSupport.jar (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:120)
at eu.mihosoft.vrl.lang.visual.JarClassCompletionList.<init>(CompletionUtil.java:133)
at eu.mihosoft.vrl.lang.visual.CompletionUtil.registerClassesFromJar(CompletionUtil.java:109)
at eu.mihosoft.vrl.lang.visual.CompletionUtil.<clinit>(CompletionUtil.java:81)
at eu.mihosoft.vrl.system.VRLPlugin.init(VRLPlugin.java:300)
at eu.mihosoft.vrl.system.VRL.initPlugins(VRL.java:587)
at eu.mihosoft.vrl.system.VRL.initAll(VRL.java:330)
at eu.mihosoft.vrlstudio.main.Studio.main(Studio.java:2504)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at apple.launcher.LaunchRunner.run(LaunchRunner.java:116)
at apple.launcher.LaunchRunner.callMain(LaunchRunner.java:51)
at apple.launcher.JavaApplicationLauncher.launch(JavaApplicationLauncher.java:52)

Old Java 3D (pre 1.6) with Jogl 1.x does not work on JDK>6 and OS X

Native bindings have changed during the JDK transition from Apple to Oracle/Sun. Therefore, the current Java3D version does not work anymore with Oracle JDK on OS X. On Linux and Windows it still works.

To be JDK8 compatible we have to update the Java3D version and Jogl bindings.

Method Selectors

Currently, only existing invocations (defined via code) can be changed. Selecting an overloaded version of the same method or any other method is not possible. We should add model/reflecion based combobox like in VRL < 0.5.

Importing jars

Should a menu item be provided to allow jars to be added without a plugin?

Creating a plugin simply to provide access to a third-party library, particularly a 'standard' library such as some Apache and w3c libraries, creates extra labour and runs the risk (has the benefit?) that not all packages will be made available by the developer.

If this goes against the grain, could it be done for those libraries that are excluded in the VRL-Studio Ant-build but present in the standard Groovy distribution?

Improve "Cannot establish connection"

Now a notification "Source/Target not equal" appears. Sometimes you don't get it, why they are not the same. Something like Source (IGridObject) and Target (IUserMatrix) are not equal would help.

Can't load file: java.lang.IllegalArgumentException: illegal component position 9 should be less then 9

Problem:

Error while loading project, all connections missing.

  • affects VRL-0.4.2.8.4

How to reproduce:

  • create a new project that contains more than one component
  • open some toolwindows as used by the VRL-UG/UserData plugin
  • save the project
  • load the project

The following exception will be thrown:

>> serialization error: ContentProvider missing! Window-Name: Value. Ignoring window.
>> serialization error: ContentProvider missing! Window-Name: Value. Ignoring window.
java.lang.IllegalArgumentException: illegal component position 9 should be less then 9
    at java.awt.Container.checkAdding(Container.java:454)
    at java.awt.Container.setComponentZOrder(Container.java:701)
    at eu.mihosoft.vrl.io.vrlx.AbstractWindows.addToCanvas(AbstractWindows.java:130)
    at eu.mihosoft.vrl.io.vrlx.VRLXVisual$WindowTask.load(VRLXVisual.java:214)
    at eu.mihosoft.vrl.io.vrlx.VRLXReflection$WindowTask.load(VRLXReflection.java:375)
...

buggy message box

When a message appears in a message box at the bottom of the canvas and I then take the focus from the VRL-Studio window until the message box disappears, then put the focus on VRL-Studio again and try to reopen the message box by clicking on the notification item: the message box only appears for a frame or two and then disappears again. If I repeat the clicking often (or fast?) enough, it eventually stays visible.

Start Object shows wrong button text ("stop")

A while ago we introduced a change in the start-obj behavior. It toggles its button between "start" and "stop". Most of the time it shows the wrong text "stop" even though the invocation has stopped.

start-obj-shows-stop

Constructor call can not be re-added

Whenever a method with the annotation "initalizer=true" is added in the visual representation of an object the addition of further methods with the same annotation is blocked. So far, so good.
If you accidentally try to add the same initializer method twice, however, then remove the method and try to add it again, this does not work. The init method is then effectively in-addable.

Try out this class:
ctorbug png

(1) Create an instance.
(2) Click on the "add" button twice.
(3) Remove the constructor method.
(4) Try to add it again using the "add" button --> failure.

++ Operator bug

The ++ operator works in for loops. But for assigning and incrementing variables outside of loops, ++ is silently ignored.

VRL console app feature broken on OS X

With the current development version on the master branch (java8) the console app feature does not work on os x since the run script still forces java 6 instead of 8:

Michaels-MacBook-Pro:2d-static-console-app miho$ ./run.sh
>> detected x86 (64 bit) os
>> integrated jre not found!
 --> executing installed java version
Exception in thread "main" java.lang.UnsupportedClassVersionError: groovy/lang/GroovyObject : Unsupported major.minor version 51.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
    at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)

Improve Error Messages

By now, when you have a exception in your groovy code (like String bla=nil; int i=bla.length()) , the standard message shown below is not very descriptive: it shows the type of exception, but not its location. Location can be shown by enabling err log output from the settings. So here's my suggestion: If it is known that the code is in the project class (that is possible see VisualObjectInspector.java : 921), print "deepest" project code position the error occured, like
At MyGroovyCode.groovy:54 : java.lang.NullPointerException: Cannot invoke method length() on null object
It would be really nice if - in such cases - it is possible to go to the code location. That would be also nice for compilation errors.

Instantiate (spelling)

Note use of "instanciate" as property in some classes.

Correct English spelling = "instantiate".

method order mix-up in multimethods branch

Having added an object to the canvas and using several of its methods, saving and the re-opening a project will mix up the order in which the methods are represented and subsequently called.

Conditional dependencies

Add conditional dependencies (i,e, use when available) to support plugins that are designed internally to fail gracefully when an optional library is not available.

Model based instrumentation

Instead of a Groovy based transform we need a model based instrumentation in the future to ensure that instrumentation also works for other (potential) language bindings. Instead of a special utility method the idea is to directly insert pre/post events into the source.

Example 1:

int a;
a=2;

will be transformed to something like:

preEvent("declare a");
int a;
postEvent("declare a");
preEvent("assign a");
a=2;
postEvent("assign a");

For chained invocations and operators we need to introduce additional tmp-variables:

Example 2:

if(a < b) {
  //
}

will be transformed to something like:

preEvent("LESS Operator");
boolean __vrl__tmpVar_1 = a < b;
postEvent("LESS Operator");
preEvent("if");
if(__vrl__tmpVar_1) {
  //
}
postEvent("if");

We will also need to introduce a mapping between events and visual nodes to use the instrumentation from the ui.

Loops:

Loops need special treatment:

while(a<b){
  //
}

will be transformed to:

boolean __vrl_tmpVar_1 = true;
while(true) {
  preEvent("LESS Operator");
  __vrl_tmpVar_1 = a < b;
  postEvent("LESS Operator");
  if(!__vrl_tmpVar_1) break;
  //
}

For complex condition arguments we need to extract the whole invocation chain and move it into the while loop.

indentation in code editor

indentation is not working as expected:

  1. in an empty line, hitting tab won't bring you to the correct indentation point
  2. something like "fix indentation" would be nice.
  3. below is a code which produces different indentations which is confusing.
 @ComponentInfo(name="CMPNAME", category="Custom")
public class CLSNAME implements java.io.Serializable {
    private static final long serialVersionUID=1L;


  void bla(
    int a){   // from here
      // indentation 7 spaces
  }

  void bla(int a)
  { // from here
    // indentation 4 spaces
  }
    // add your code here

}

V3DMath using non-existent(?) getter/setter

In V3DMath.java, the angle field in javax.vecmath.AxisAngle4d is accessed via a getter/setter in lines 250/251.

This is a public field without getters/setters in my copies of vecmath so, at least to compile, should this read (???)

    double angle = rotation2.angle;//.getAngle();
    rotation2.angle=-angle;//setAngle(-angle);

Static method calls

Currently, static method calls are only possible if the invocation and the method definition are inside of the same compilation unit:

class A {
  public static void staticMethod() {}
  public void method() {
    staticMethod();
  }
}

Invocations like Math.abs(a-b) are not possible since the Groovy AST visitor assumes a non-static method invocation. But that can actually be resolved by checking whether the ObjectExpression is a class.

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.