Ballerina Swan Lake an IDEs. How to get sequence diagrams - visual-studio-code

It's me again!
After getting help with this question here, I managed writing a little microservice in Ballerina. For that I switched to Swan Lake as recommended.
But now I'm having difficulties using IDEs and their plugins. Because all questions related to that are pretty old I'm creating a new post.
I'm writing a paper about Ballerina and cloud native languages and thought it would be cool to show a generated sequence diagram, so I tried setting up a proper project and generating one.
However: The IntelliJ plugin doesn't seem to support Swan Lake yet. I always get an error message that the SDK is invalid. So I switched to VS Code.
Here I have a lot of problems. I can run and build my stuff just fine and I also have syntax highlight, but I don't know how to get a diagram. The documentation tells me to either open it through the project overview or the file overview. But I do not have that. My VS Code Window looks as follows:
If I try to use "Ballerina: Document" it tells me "Current file does not belong to a Ballerina project"
Also notice that the explorer one the left looks completely different compared to the documentation
But how would I set this up correctly? I did everything that the docs tell me to do and I have tried the integrator. Doesn't support Swan Lake yet. And as I said: IntelliJ doesn't work either.
Is it even possible to set this up correctly with Swan Lake at the moment? Am I just to stupid? I have never used VS Code before, so maybe there's a trick?

The sequence diagram view in Ballerina has been removed temporarily in Swan Lake. But this support will be brought back before the GA version. I guess it will be available in the Beta release, which is due in April.

Download the latest Ballerina extension for Visual Studio Code and either navigate to the button showed in num 1 for Ballerina Low-Code or navigate to num 2 to Show Diagram for the diagram view of current ballerina file. Read more from here. Ballerina provides language support through VS Code for Swan Lake but not for IntelliJ yet(Hope Ballerina will provide language support to IntelliJ with Fleet).

Related

Netlogo: Internal error with Time extention

I have installed the time extension but my code will setup but not run. Same for the example models I've tried. The error message I receive is below. Thanks for your help!
P.S:I am running NetLogo version 6.0.4.
NetLogo is unable to supply you with more details about this error.
Please report the problem at https://github.com/NetLogo/NetLogo/issues,
or to bugs#ccl.northwestern.edu, and paste the
contents of this window into your report
java.lang.IllegalAccessError: tried to access field
org.nlogo.agent.World.tickCounter from class time.datatypes.LogoSchedule
at time.datatypes.LogoSchedule.getTickCounter(LogoSchedule.java:135)
at time.datatypes.LogoSchedule.performScheduledTasks(LogoSchedule.java:156)
at time.primitives.DiscreteEventSchedulerPrimitives$GoUntil.perform(DiscreteEventSchedulerPrimitives.java:95)
at org.nlogo.prim._extern.perform(_extern.java:36)
at org.nlogo.nvm.Context.stepConcurrent(Context.java:107)
at org.nlogo.nvm.ConcurrentJob.step(ConcurrentJob.scala:65)
at org.nlogo.job.JobThread.runPrimaryJobs(JobThread.scala:133)
at org.nlogo.job.JobThread.$anonfun$run$1(JobThread.scala:68)
at
scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
at scala.util.control.Exception$Catch.apply(Exception.scala:224)
at org.nlogo.api.Exceptions$.handling(Exceptions.scala:41)
at org.nlogo.job.JobThread.run(JobThread.scala:66)
I'm not confident in my answer; however,
If you look at the code (updated Jan 14, 2017) (https://github.com/colinsheppard/time/blob/master/src/main/java/time/datatypes/LogoSchedule.java):
TickCounter getTickCounter(ExtensionContext context){
if(tickCounter==null){
tickCounter = context.workspace().world().tickCounter;
}
return tickCounter;
}
We see that the timer is getting the workspace's world's tickCounter.
If we look at the netlogo website for updates (https://ccl.northwestern.edu/netlogo/docs/transition.html), we see that:
One of our goals in NetLogo 6.0 has been to make it easier to develop
extensions and easy to develop more powerful extensions. To that end,
we’ve bumped the extension API from 5.0 to 6.0. Existing extensions
will need to recompile changing the “NetLogo-Extension-API-Version” in
their jar’s MANIFEST.MF from 5.0 to 6.0.
Some of the changes we’ve made to the extensions API include :
org.nlogo.api.Context now allows access to the current world and
workspace objects without requiring a cast to an
org.nlogo.nvm.ExtensionContext. org.nlogo.api.Workspace has been
introduced as a stable API for extensions to depend on. A NetLogo jar
is now available from BinTray. For a full list of changes between 5.0
and 6.0, please visit our Extension Transition Guide on GitHub.
That being said, I think the source code for the timer extension hasn't done the migration to conform to the new updates. You can see that it explicitly mentions the ExtensionContext.
Unfortunately, I believe the solution is to update the timer source code and commit.
I'm afraid I can't tell what the problem is from the error statement posted. The time extension is in flux right now because the NetLogo development team is updating it for inclusion in future releases of NetLogo. But they are not done and not all the bugs are out.
I am using Colin Sheppard's version at https://github.com/colinsheppard/time
It has been reliable except for the discrete event simulation primitives. The date/time utilities and the time series tool work, but we know that the discrete event scheduling does not work under NetLogo 6.x. If you want to use the discrete event scheduling, I'm afraid you'll need to be patient until the NetLogo project gets their version fully debugged.
I temporarily put a fairly comprehensive example code here:
http://langrailsback.com/file-transfers/
It includes Colin's version of the extension.

How to understand the code flow in nuxeo

Recently I have downloaded the Nuxeo code, SDK and Nuxio IDE for the development purpose. I am also able to do build the project run the SDK and importing project into eclipse. But as Nuxeo guys know, it's a huge project and document doesn't contains details about the Code Flow. So, I am sucked. To develop and fix bugs I need to know the existing code structure, functionality of each projects(modules/bundles) , how to identify the code flow if user click on a button. So, please help me
It depends on the UI you want to debug. If it's the JSF UI, then the buttons are usually associated with an "action" contributed from an XML file. You can then follow the thread.
Your question is too much generic to give you more details. Do look for development guidelines and/or how-to fix some bugs? In the latter case, it depends on each kind of bug, the Nuxeo version, the original code writer (Nuxeo legacy code or customized code), the use of Nuxeo Studio or not...

open source code visualization plugin for Eclipse?

is there a code visualization plugin for eclipse?
http://marketplace.eclipse.org/content/code-rocket-eclipse
it's too expensive however so is there a open source version?
ModelGoon is probably the most promising open source project for code visualization based on Eclipse JDT. GreenUML may also be of interest, but it doesn't seem too active. I even had to patch a few things to get it working properly in my case (see my github fork).
If you want visualization based on runtime capture of program execution you may want to see this answer to a related question.
Finally you may want to explore the Source Code Analyzer category on Eclipse marketplace, the listing is a bit broader in scope and includes both proprietary and open source solutions.

Can Rational Team Concert and IntelliJ coexist?

I am a long time intellij user.
The company where I work is likely to introduce Rational Team Concert to our department shortly. I went to the RTC demo and it looks like a reasonable product, built around Eclipse, but I would rather not give up using IntelliJ.
Does anyone have experience of using non-eclipse IDEs with RTC?
This is going to be hard - you could configure IntelliJ to call the RTC scm commands, but this is not going to be that easy. I have heard of a company planning to build an integration, but not seen this myself (they might have finished this already). Company is called CM-Logic and is UK-based.
I use both of them together. You can't use IDEA to checking or deliver code, but you can certainly edit code in IDEA and then use the RTC tools to checkin.
One warning: I'm on Ubuntu 64-bit, and everything is fine. I have a co-worker using IDEA & RTC on Windows 7 and he has to close IDEA every time he wants to check-in because IDEA has file locks that RTC balks at.
I have no knowledge of the CM Logic's JazzConnect-IDEA product. There doesn't seem to be any way to download a demo of it either.
Rational Team Concert's integration page says "Jazz Connect for IntelliJ IDEA enables developers using JetBrains to leverage the power of Rational Team Concert for source control, work item management, and collaboration services."
Also have a look at this page for other integrations of RTC.
I would say that it could, it looks like IntelliJ offers an version control integration point as does the Jazz SCM component, but I am not familiar enough with IntelliJ to say for sure(looks like ClearCase is already on the list so they are adding support for vendors), I would think that without a full fledged integration where your Work Items are integrated into your development RTC starts to loose it's flair but may be not for your management :)
It seems that the answer is no.
Coexistence could cover many aspects; source code repository, Task lists, builds etc. But the first step would be integrating with source code repository and RTC uses something called Jazz.
There seems to be no available plugin nor plans for such.
Update on this: A new feature for Intellij is in the works, and planned or release this year. Here is the internal RFE. The links tab has a video recording of RTC integration with IDEA.
https://jazz.net/jazz/web/projects/Rational%20Team%20Concert#action=com.ibm.team.workitem.viewWorkItem&id=358932&tab=com.ibm.team.workitem.tab.links (Jazz ID authentication required)

Generic code snippets or templates in Eclipse

I'm currently evaluating eclipse after using Textmate for all my development for many years. What I miss in Eclipse and what I can't find any solution for are some kind of generic templates:
I'm using PDT for my JavaScript and PHP development, and it supports code-templates. however , in my projects I'm writing large amounts of shell-scripts, yml-configuration-files, xml-files, gnu make scripts, etc., too. I'm writing source-documentation for all these scripts using a generic syntax (similar to robodoc) and you can save much time, when you can insert the doc-blocks using templates. however, besides PDT not all of the editor-plugins support templates.
Is there some generic way of storing code-snippets/templates in eclipse, which will work across all editor-plugins? I think it should be possible to implement such using eclipse monkey -- however, it seems development of monkey was stopped?
I'm using Eclipse 3.4.0.
If you have the web tools (WTP) plugins installed you should have a Snippets view which is an editor-independent place for collecting reusable code snippets. You can create and place your snippets in there and can separate them using 'drawers'. Double clicking or dragging a snippet item will insert it in the active editor.
The web tools user guide has a section about this view.
Why don't you try Snip2Code plugin?
It is a general purpose snippet manager platform that you can add to your Eclipse and will store your snippets on the cloud, so that you don't have to sync them when you reinstall Eclipse or move onto another machine.
http://www.snip2code.com/Static/Downloads