-
Notifications
You must be signed in to change notification settings - Fork 16
Wollok v1.2 Buddha
Now first class objects (named objects) can inherit from a class. This allows to create well-known objects that share behaviour with other objects but overrides just part of its behaviour. Like a mix between the two words (objects and classes) for modelling special cases.
![screen shot 2015-09-16 at 15 47 53](https://cloud.githubusercontent.com/assets/4428120/9934782/c8437926-5d29-11e5-87c9-d1e3b0a3757d.png)
Wollok now has the concept of test cases as one of the major elements in the language. A test is just like an executable function which contains asserts statements. A test file can have as many tests cases as it wants. And it can also define local objects accesible for the tests cases.
There is also a UI support for tests to show the execution report and the famous green/red bar
![screen shot 2015-09-17 at 20 17 11](https://cloud.githubusercontent.com/assets/4428120/9948461/addd4210-5d79-11e5-81cb-0d203a547366.png)
There's a new static check for validating that an method which overrides another one, has a compatible semantic in terms of returning a value. This means that, if the original method was returning a value, the overriding one MUST also return a value. And the opposite.
Getters should return a value. Sometimes we just forget the "return" statement. This will check it
![screen shot 2015-09-18 at 21 38 35](https://cloud.githubusercontent.com/assets/4428120/9973687/45665462-5e4e-11e5-8e2b-46b7ef39a4b6.png)
We have added a couple of useful quick fixes for some of our static code checks. Here is the list with screenshots.
![screen shot 2015-10-08 at 18 32 23](https://cloud.githubusercontent.com/assets/4428120/10380694/afd17d20-6deb-11e5-9cc5-b4b573347051.png)
![screen shot 2015-10-08 at 23 06 20](https://cloud.githubusercontent.com/assets/4428120/10384429/87833aa4-6e11-11e5-85a1-377d965cf87c.png)
![screen shot 2015-10-08 at 23 22 23](https://cloud.githubusercontent.com/assets/4428120/10384568/7a4c1d4a-6e13-11e5-8aa6-358aeafecfe9.png)
![screen shot 2015-10-08 at 23 53 07](https://cloud.githubusercontent.com/assets/4428120/10384901/9edced7e-6e18-11e5-85e8-487752599c4a.png)
From native methods that cannot override
![screen shot 2015-10-09 at 09 30 07](https://cloud.githubusercontent.com/assets/4428120/10393700/87ce6b4e-6e68-11e5-8c8e-d6afd461db6f.png)
For bad if usage
![screen shot 2015-10-09 at 10 58 13](https://cloud.githubusercontent.com/assets/4428120/10395898/c786116c-6e75-11e5-8fd1-7460da77be84.png)
![screen shot 2015-10-09 at 11 41 36](https://cloud.githubusercontent.com/assets/4428120/10396785/ba9ce50c-6e7a-11e5-851d-4cb450bcbac7.png)
There are two options:
![screen shot 2015-10-09 at 12 38 26](https://cloud.githubusercontent.com/assets/4428120/10398337/de406fc6-6e82-11e5-92dc-6915492ab31c.png)
![screen shot 2015-10-09 at 13 59 56](https://cloud.githubusercontent.com/assets/4428120/10400302/462545de-6e8e-11e5-997e-9c765e97de07.png)
![screen shot 2015-10-09 at 14 19 33](https://cloud.githubusercontent.com/assets/4428120/10400733/e0228528-6e90-11e5-9607-0371456ebf0a.png)
We have implemented our first refactoring: the "extract method", which extracts a given selected piece of code into a new method on the current class/ object
![screen shot 2015-10-08 at 12 33 50](https://cloud.githubusercontent.com/assets/4428120/10380812/9522d1d0-6dec-11e5-8fbc-323f615674b4.png)
This is the wizard
![screen shot 2015-10-08 at 12 34 08](https://cloud.githubusercontent.com/assets/4428120/10380811/95209d3e-6dec-11e5-985b-9d6ec4c5da79.png)
And it has a preview of the changes
![screen shot 2015-10-08 at 12 35 00](https://cloud.githubusercontent.com/assets/4428120/10380813/9523a07e-6dec-11e5-80cd-70ef7bfba182.png)
The "object diagram" view for debugging has been improved a little bit.
- It now remembers the nodes positions between steps, so they are not being moved everywhere around the screen :)
- It now shows the names of the references as labels on top of the connections.
- It also uses a different color and size (smaller) for numbers values to make it easier to differentiate simple values from more complex user objects.
![screen shot 2015-09-17 at 23 22 58](https://cloud.githubusercontent.com/assets/4428120/9950692/7d436d36-5d93-11e5-967c-d47477b3729a.png)
- Also the List objects are differentiated by using a small rectangle with a different color, instead of a circle
- References from the list to its elements are also differentiated with a dashed line (instead of solid)
![screen shot 2015-09-17 at 23 44 00](https://cloud.githubusercontent.com/assets/4428120/9950903/54219ad8-5d96-11e5-95ec-a0d0260facdb.png)
A number of improvements have been made to the class diagram
![screen shot 2015-09-21 at 20 27 16](https://cloud.githubusercontent.com/assets/4428120/10007862/5424b6bc-609f-11e5-995e-8aa3478e5375.png)
- Inheritance arrows now being shown as empty triangles
- Selection synchronisation between outline view and the diagram (plus the editor)
- Methods in class boxes show full parameters signature and icons. Something similar for instance variables.
- Also methods and instance variables are differentiated visually by two separated boxes within the class node.
- Double-click on a class node will put the editor focus on that class.
- Classbox size is now automatically adjusted to fit for all of its content (methods and variables). So that all the content is visible.
- Methods which returns a value are being marked with a right arrow both in the outline view as well as the class diagram.
![screen shot 2015-09-21 at 20 45 38](https://cloud.githubusercontent.com/assets/4428120/10008150/e518b036-60a1-11e5-8a8f-992fb4b887c4.png)
- Inheritance connections are now horizontally and vertically only and they follow a single path to the superclass, which makes it appear like a single arrow from several originating subclasses. Like a regular UML arrow.
- Also the automatic layout now arranges the hierarchy from the TOP to the BOTTOM, down the hierarchy
![screen shot 2015-09-24 at 18 49 06](https://cloud.githubusercontent.com/assets/4428120/10087888/33acf214-62ed-11e5-8850-12b2e09c10e5.png)
- Now the diagram also shows named objects (root objects) along with classes
![screen shot 2015-09-30 at 10 59 54](https://cloud.githubusercontent.com/assets/4428120/10195177/b4d4c85c-6762-11e5-8423-736d8b590a6d.png)
When you launch a debug instance it actually executes the program in a separated process to be in control of it. The eclipse debugger UI then connects to that remote process. So the whole debugging session requires a remote communication between the IDE and the running wollok instance. So there's a handshake there. Sometimes the wollok program takes too much time to start listening for connections and you'll see a timeout in the UI. Previously we had a fixed wait time then in the UI. This is now configurable in Wollok preferences. So that slow machines can increase this value to be able to debug.
![screen shot 2015-09-16 at 20 11 40](https://cloud.githubusercontent.com/assets/4428120/9921192/52dd0f44-5cb1-11e5-881a-b342060295cf.png)