Using an IDE to develop OpenSplice DDS applications - open-source

I keep trying to configure Open Splice on the Eclipse platform but I'm not making any progress. I use the Open Splice DDS in the Java Standalone mode. The Eclipse platform I work on is the Eclipse edition for Java EE developers (Helios).
The problem is: when I try to create a run configuration I need to select an application type from the left hand side menu. It seems that none of the available application types can be used to create a working run configuration for a batch file. I want to be able to start, stop, and open splice from inside Eclipse as well as to run the preprocessor and my applications without having to use a cmd console. I'm new to both Eclipse and OpenSplice and any help would be really important to me.
Thanks in advance.

If you are developing Java applications can now use OpenSplice Mobile which is a pure Java DDS implementation for j2se and Android.
OpenSplice Mobile comes with a mvn build system that can be easily used to create eclipse project (or simply imported into eclipse or IntelliJ).
You can find some examples at:
https://github.com/kydos/mobile-dds-demo
And get OpenSplice Mobile at:
http://www.prismtech.com/opensplice/software-downloads
A+

The problem is: when I try to create a run configuration I need to
select an application type from the left hand side menu. It seems that
none of the available application types can be used to create a
working run configuration for a batch file.
This explanation assumes you are in the Java perspective. Other perspectives will be very similar or the same.
Do not use the Run Configurations dialog box. In stead, select Run in the menu, which will show External Tools as its bottom item, which has a sub-item External Tools Configurations.... Clicking that will display a dialog box showing a list of possible configuration types on the left-hand side. Select the type Program, followed by clicking the New Launch Configuration icon on the top-left of your list. On the right-hand side, a number of edit boxes will appear allowing you to change the name of this launch configuration (which you can set to something like ospl start) set the launch command (like ospl.bat to be selected via Browse...), its arguments (like start) and several others like working directory and environment variables.
Click apply when done. From now on, the ospl start command can be run via the Run menu item, External Tools and then ospl start. Make this a favorite so it will be moved up in the menu to decrease the number of clicks.
The process can be repeated for any number of applications you want to start.

Related

Visual Studio will not run things in browser and certain shortcuts do nothing

I'm new to JavaScript (/html in general) and to visual studio. I seem to have two different issues: I'm having trouble running code in browsers, and some of the keyboard shortcuts are broken.
I've recently installed Visual Studio 2017. Everything seems great except I need a way to test my open file. I've looked online at certain guides which tell me to configure the task runner to be able to do so. The problem is, to get to the tasks.json which I need to edit, I have to open the command palette with ctrl + shift + p, which doesn't seem to work. Additionally, I can't find any other way to open the command palette using the bar at the top nor can I find any other way to open tasks.json. Also, I noticed that I should be able to run code in browser using the "View in Browser (Google Chrome)" and "Browse With..." options under "file". The keyboard shortcut doesn't work for View in Browser, and when I click on both options, I get a dialogue box with the error "The operation could not be completed. Class not registered".
How can I set things up properly, or at least be able to properly test my code?
I think what you need is Visual Studio Code, not Microsoft Visual Studio.
Both were similar but target different programming platform.
If you want to develop web application, HTML/CSS/ts/js etc, better if you use VS Code.

AIR Build Server Setup

I am at the point where I am running into incredibly long build times for my project and more projects to come. I would like to make a build server but I have not had any experience with them aside from downloading files from them as an end user.
My ideal setup is this: A GitHub where I can place my .fla file, classes and ANEs. The server sees this, compiles it, and allows me to test it remotely or hook into some debugger that lets me see stack traces and active variables at breakpoints and errors like Adobe Animate or Flash Builder.
Now I see there are GitHub plugins for Jenkins. I see there are questions referring to how to set one up with Flex/AIR. I come here with a few issues.
I am too far into my project to switch over from using Animate to something like Flash Develop or anything ADT related. The only thing I have found is how to take existing elements from my library in Animate and have them in a .swc for handling. However, this doesn't let me access existing elements in the Timeline and would rather not try to export/position/handle them in code (which is the only workaround that I see if this is not possible)
I run ANEs that are dependent on Google Play services and other Android specific libraries. Thus, I haven't been able to use the standard mobile debug launcher for AIR. I see Jenkins has some specific abilities for Android. Is it possible to somehow use this to give me a proper window for testing? I am thinking that I would need to run their emulator after compiling everything but I am unsure if there is a more efficient method or if it would even work.
I have never worked with Jenkins before or any other tools capable of automating tasks. Any step by step explanations is appreciated if you have the time.

Text fields and areas in swing applications become non-editable when forwarding X11 session with XMing using openjdk

I'm attempting to run intellij from a Linux machine that is connected with putty that has had the display forwarded by Xming. Intellij is able to come up and I'm able to use most of the widgets, however I'm unable to select or type into any of the text fields.
I've found the following bug report: https://bugs.openjdk.java.net/browse/JDK-8040662 however, since this is not a common use-case, the bug is sitting at "won't fix."
I also keep finding similar questions, such as: X11 forwarding affects Java Swing GUI dropdowns - Items not selectable, Menus collapse immediately but it seems like nobody has an answer.
Currently I'm running with the following versions:
Intelij: IC-141.1532.4
Openjdk: 1.7.0_76
XMing: 6.9.0.31
The solution is to use the current Oracle Java 7 JDK, which has been patched to fix this issue.

Easiest way to unit test SWT and Swing apps in a headless environment?

I'm looking to unit test some SWT and Swing code for a project I'm working on and the tests run fine as long as I'm running them from eclipse.
As soon as I run them in my hudson environment it fails since hudson runs the tests in headless mode.
What's the best way of doing this? Open source solutions only please (since the project is open source).
You could run Xvfb (X virtual framebuffer, an X11 server that performs all graphical operations in memory) and this works fine.
But there is another solution with Hudson's plugin for Xvnc. Simply install the plugin and check the checkbox in the job configuration screen:
alt text http://www.justinedelson.com/blog/wp-content/uploads/xvnc_box.jpg
Hudson will then automatically start up a Xvnc session and set the DISPLAY environment variable to the appropriate value and then shut down the session when the build is complete. One advantage this has over the Xvfb method is that if you have multiple Swing/SWT projects building simultaneously, each build has its own X session. This may not be an issue at all but it seems like a good idea.
Before using this plugin, you obviously have to have Xvnc installed. What's less obvious (although sensible) is that you must also set a password. You do this by running:
$ vncpassword
This has to be done as the same user Hudson runs as.
Try the Abbot Java GUI Testing Framework and SWTbot. At least SWTbot should be able to do it.
If neither offers a headless mode, then this blog post might give you some ideas how to get rid of the UI for testing.
Using Swing I tend to organise things so that the component tree can be created without a Window at the top. Doing this allows you to simply create a JPanel in a unit test and use that as your top-level component. There are certain things you cannot test, such as focus and any logic involved in the creation of the Frame for normal operation, but the vast majority can be tested.
You may want to look into the FEST library to make life easier whether you go headless or not, it looks very good: http://fest.easytesting.org/swing/wiki/pmwiki.php
I was sure I posted this here before, not sure what happened to it.
Cacio allows for running Swing app headless.
http://rkennke.wordpress.com/2011/10/17/cacio-for-ui-testing/
I don't know about SWT, but with Swing you can't. Any instantiation of a Window (JFrame, JDialog, etc.) even if it is never set to visible will blow up in headless mode (on JDK 5). What we did was not run in headless mode and install Xvfb to provide the windowing without actually having a real windowing system installed.
You could try RedDeer Testing framework
https://github.com/jboss-reddeer/reddeer
• Support for running tests in a Jenkins CI environment (Hudson like)

Adobe AIR Update Framework: How to check for updates upon AIR application install?

-How can I check for a new version of my application upon installation?
I feel like I remember installing an AIR application and during the install being alerted that there is a new version, and a prompt as to whether or not I wish to update.
-How do I alert the user, via textfield, that there is an update for the application and to run the "Check for updates" option?
I do not want to force the check for updates, ApplicationUpdaterUI, I want to notify users that there is a new version, and then allow then to bring up the ApplicationUpdaterUI.
Currently, upon initialization the application is popping the "Check for updates" dialog box. I would greatly appreciate some insight on either of these two questions.
I would like to note that I am developing using FlashDevelop3 RC2 and Flex 3 SDK which contains the AIR SDK and the AIR Update Framework.
Brian Hodgeblog.hodgedev.com
I don't think you can check for updates during installation. What you could do is install a basic shell app that always loads in the actual application as a swf file. You could even download this swf file the first time the app is run. After that you can always check for a new version of the app (swf) and download/update accordingly.
Hope this helps... During install - NO - you really can't run anything if you're using the standard AIR installer. You can move to a custom installer - but that's a much more work.
However, when you're first invoked - when your application starts - you can check then (and you can check as often as you want thereafter ).
The guy you want to see is ApplicationUpdater instead of ApplicationUpdaterUI. Using ApplicationUpdater you can get all of the checking / downloading / etc... But then display ANY or NO UI - of your own.
For example - you can check for updates, download them of you determine they are needed and on next 'start' of your application - you can literally 'install' all without asking the user.
I don't recommend this... But it's possible.
Fitting the scenario you asked above - you can check for updates, determine if the update is needed (comparing version or whatever) and then notify the user any way you want - as subtle as you want - to ask the user to update.
You can also do this with ApplicationUpdaterUI - you just need to turn all of the UI stuff OFF (which sort of defeats the purpose of using the UI guy) and just catch the events and display your own UI --- like:
_applicationUpdater.isCheckForUpdateVisible = false;
_applicationUpdater.isDownloadUpdateVisible = false;
_applicationUpdater.isDownloadProgressVisible = false;
Hope that helps.
I think your best bet here is to either:
a) Make sure the .air package that people are installing is always the latest version (this may not be possible if you're distributing an app on solid media, like CDs)
b) Make the update process the first thing that happens in the application (i.e. don't show your primary UI until you've checked for an updated version / shown them the update UI)
However, if you contact Adobe, you can get permission to use a bundled installer which can install both AIR and your application in a non-standard way (e.g. through InstallShield). With this method, you could do pretty much anything you wanted when the app installed, including running a simple script which would check whether they have the latest version.
You can check out http://www.adobe.com/devnet/air/articles/distributing_air_in_enterprise_02.html for a bit more info about bundled installation.