Clion Remote - Is it possible to create a Remote Toolchain and apply it to a Project? - cmake

I am following the Clion Blog article: Stay Local, let your IDE do remote work for you
Under the heading, "How to configure a remote project in Clion?" I'm told: first of all go to settings/preferences / Build, Execution, Deployment / Toolchains: Create a new Toolchain
So, I'm guessing the author is suggesting that 'first' I can go to the toolchains dialog and create a 'remote toolchain' with ssh settings and so forth.
However, Clion does not seem to enable access to the Toolchains configuration unless I already have a project.
So is this a problem of my expectations for accurate precision being too high, or is there actually a way to create a toolchain configuration without first creating a project to associate the toolchain configuration with?
Also, after creating a toolchain configuration associated with a project, how can I associate that toolchain with other projects, as other areas of the bloc seem to say is possible?
Thanks,
Stato Machino

However, Clion does not seem to enable access to the Toolchains configuration unless I already have a project.
Hi Stato. You can configure your toolchain from Welcome screen or on IDE first running without opening any project.
Also, after creating a toolchain configuration associated with a project, how can I associate that toolchain with other projects, as other areas of the bloc seem to say is possible?
When you create CMake project or opening existing one CLion creates new profile with Default toolchain. Default is just a first toolchain in the list. So simply moving Remote toolchain to the top in Preferences | Build, Execution, Deployment | Toolchains will automatically switch all your project to remote mode.

Related

Change IBM Worklight project path

I need to create a Hybrid Worklight project but it needs to be physically inside another project.
The reason is that we are using an API that generates a project using grunt and the guide I got (company standards, practices, etc) says: Once the project is in Eclipse, create a wl folder and create the Worklight project inside of it.
When I create a new Worklight project in Eclipse it always goes to Eclipse's Workspace folder. How can I change this?
Thanks
You cannot (at least, not in a standard/supported/known working way); a Worklight project contains Worklight applications but cannot contain other Worklight projects. Worklight projects are always contained directly within an Eclipse workspace (unless working with the CLI tools).
Based upon your clarifying comment, it seems that your containing "(general) project" is just another directory that contains a wl directory - not a real Eclipse project - that in turn contains your Worklight project. It seems you are creating the whole thing using the CLI tools.
In order to work with this project within Eclipse, you'll need to create a new Eclipse workspace elsewhere (the Eclipse workspace itself isn't particularly important and doesn't necessarily need to saved in source control). You can then use File->Import->Existing Projects into Workspace to import the Worklight project from the wl directory. You can either "Copy projects into workspace" (in which case you will end up with two copies), or leave that unticked, in which case your Eclipse workspace directory will just contain a reference to the original directory (I suspect you want the latter).
As a word of advice, generally you should try not to work with both Eclipse and the CLI tools at the same time. Although it may work, you will get conflicts with (for example) the embedded test server, and long term, you'll just cause confusion.
Edit: looks like Andrew says pretty much the same.
Using Eclipse, since what you see in the Project Explorer view is the workspace Eclipse uses, it makes sense to me that when you create a Worklight project in Eclipse, it will be located - in the filesystem - inside the workspace.
If you want to create your Worklight project elsewhere, you'll probably need to use the Worklight CLI tool. From a terminal, navigate to the location of the Grunt project and then, using the CLI commands, generate a Worklight project in that location.

How can I check the build command for my JavafX app in IntelliJ IDEA

Im creating a JavaFX application in IntelliJ IDEA, and I am new to IntelliJ.
I would like to be able to compile my JavaFX application on a Raspberry Pi, but my app is quite complex and relies on 3rd party libraries, etc.
I would like to be able to see what exactly is going on in IntelliJ when I run "Make Project"
Is there a command line output screen that Im simply missing? I want the exact command that IntelliJ uses to compile the application.
Essentially, on the Pi, I want to get the code from my repo, run the compilation command and produce an executable JAR on demand.
I have of course read the doco on how to compile a JavaFX application, but if I could see what IntelliJ does, that would be fantastic.
So far I haven't found such an option but the process is most likely some sort of flow based on IntelliJ plugins and the documentation seems to support this theory.
Perhaps you'd consider using a software management and build tool such as maven or ant or something similar. This should give you (almost) unlimited options to configure your desired build sequence and 3rd party dependencies.

How to ensure eclipse plugin has required bundles available?

I'm just starting to develop a new eclipse plugin where I want a web application server running in Eclipse. I found a nice blog, OSGi as a Web Application Server, that describes how to do this. The author suggests creating a target environment for my bundle requirements, and some of those bundles get pulled in from the Equinox Project SDK (now called Equinox Target Components in Juno). I notice that the tutorial project runs fine when my target platform is the platform I created in the tutorial, but fails to start when it is the default platform. So, now for my question...
If I need bundles that are not part of the default, how will my plugin project get access to those bundles? Will I need to deploy them along with my plugin? How would I know if the user's eclipse does or does not already have those required bundles?
You was not much clear about what kind of application you are developing. Running a web server in an Eclipse IDE as a plugin don't make any sense to me. This kind of server application is best just running on top of Equinox.
Anyway, the right path is to create a "Product Configuration" file and add categories that contains the needed bundles (go to File/Plug-in Development/Product Configuration).
With this file you can run an instance of the product (inside the IDE) and can export it (create a zip containing all needed bundles)
And if you want to able your user to install plugin inside his IDE you must create a P2 repository (using a Target Definition File) and expose the exported directory within a Http server. You could research about Tycho to build this kind of components in a maven style.
Well, I'm not sure if re-inventing the wheel again is really sufficient.
You might take a look at Pax-Web for inspiration on how to do it, or take a look Apache Karaf as a OSGi-Container (using Pax-Web). Or even better start contributing to one of the two :-)

Using KDevelop during development of a shared library

I'm trying to use KDevelop as an IDE for development of a C++ shared library. An earlier posts here indicate that I need to edit a CMake makefile for doing that. This is quite painful and very time consuming as it means converting our custom gmake-oriented build system into something of CMake.
Is there any other way for doing that?
KDevelop doesn't force you to use a specific buildsystem like many other IDEs do. CMake is just the default as it's very well integrated and many if not all KDE projects use cmake.
You can use a different build system by choosing "Custom Buildsystem" or "Custom Makefile Project Manager".
Custom Makefile Project Manager simply calls "make" - your current build system should work this that.

Setting up Xcode for developing Plug-ins

I've never worked in XCode before but I am designing a plugin (objective-c) for an open source radiology program called OsiriX. I can get the thing to compile and I can even get the plugin to run in OsiriX. But, I'm not sure how to run/debug it from XCode. Run/Debug is grayed out on my xcode. Is it because there's no main program?
(1) "Clean all" your projects so that there isn't detritus left around when you do this.
(2) Set Xcode to use a common build products directory (I stick mine in /tmp/ so that it periodically gets nuked). The preference is under the "Building" section.
(3) Re-build OsiriX (so that it'll be built in the shared location).
(4) Make sure the active configuration in your plug-in project has the exact same name as the configuration in OsiriX that you built in (3). (It should probably be "Debug" or "Release", depending on which you build). The configurations can be edited in the build settings editor.
(5) Build your plug-in.
(6) Add a custom executable to your plug-in project and set the path to OsiriX (Project -> New Custom Executable...).
You should now be able to build-and-run or build-and-debug your project. It will launch OsiriX from the build products directory. You might also want to set OsiriX to look for bundles in your build products directory, if it doesn't already. Or you could create a symbolic link from one of OsiriX's plug-in directories to the bundle in your build products directory.
cd /path/to/OsiriX's/bundle/directory
ln -s /path/to/build/products/YourPlugin.bundle
This is a very standard way of ocnfiguring Xcode for development of plug-ins. For example, preference pane developers will set up a custom executable for SystemPreferences.app (even in /Applications -- there is no need to point to a "debug" build of the application).
In order to debug your plugin, you have to be running Osirix in Xcode as well. Download the Osirix source code from Github and compile and run it. You'll have to add the plugin to its plugin list and then when you run in Xcode your NSLog statements from the plugin source will print out in the Xcode console screen for the main Osirix program. I believe breakpoints work as well.
My experience with Xcode is also somewhat limited, but I've found that using the latest version (6.1.1) I can debug my plugin simply by attaching to a running OsiriX process via the Debug -> Attach Process menu. This does not require you to build OsiriX from source - I'm currently using the standard (non-MD) version as downloaded from their website.
Note that you still need to restart OsiriX to pick up any changes to your plugin.