How to supply an external tool in Eclipse with multiple selected resources? - eclipse

There are variables:
${selected_resource_loc}, ${selected_resource_name}, ${selected_resource_path}
but none in plural:
${selected_resources_locs}, ${selected_resources_names}, ${selected_resources_paths}
If you select more than one resource and run your external tool the former resolve to the first resource only.
Eclipse Platform User Guide > External tools is helplessly outdated. There are many more meanwhile:

Related

Is it possible to select a target platform from within a run configuration?

I'm using Eclipse RCP 2021-9 (can't update because the project is based on this specific version)
Let's say I have 2 target platforms and 2 run configurations in my RCP workspace. I'd like the run config 1 to run with TP 1 and the run config 2 to run with TP 2.
Is it possible ? If so, how would I do that ?
I looked into the run configuration dialog and couldn't find anything related to the target platform.
Thanks
To my knowledge this is not possible.
You should either create a combined Target Platform (Oomph's targlets may be of help but they have their own limitations). Or use 2 different Eclipse instances (possibly pointing at the same sources, just make sure to refresh your workspace etc. when needed).

Is it possible to auto select different "gcloud" configs for different projects in multiple workspaces / folders ? Gcloud on multiple projects

From this question and this article we get that is possible to create multiple configs for the gcloud SDK.
But it seems that you have to manually switch between then, by running:
gcloud config configurations activate <CONFIG_NAME>
But is there a way for each config to be automatically selected whenever I open up a project workspace/folder on VSCode? How can I do this?
I've just tested activating a new config on a different VSCode project. That seems to update it globally. Now, all of my VSCode windows (different projects) are seeing the same activated config.
Isn't it dangerous? I mean, I could be uploading stuff to the cloud on a different project that I'm not aware of. How do people usually handle this? Do I need to run the activate command on every script before deploying something?
Unfortunately, I am not aware of such a possibility, however I have found something interesting that may help you. There is following extension:
GCP Project Switcher
The extension only allows you to change projects, however as I looked into the code it is running gcloud set config project command under the hood. You could raise a request to add the possibility to change the whole configuration to the instead of project only, as it is a very similar approach.

Apama 10.3: Add pysys nature to projects

I am working with Apama 10.3, in Software AG Designer. I have a project that I'd like to add the Pysys nature to my project, but the usual attempts (right-click on project name, project > properties, etc.) don't help. I couldn't find anything in the documentation either.
How can I work with Pysys in Designer, please? I'd like to be able to build my tests via the IDE, for consistency and convenience.
Currently eclipse/Designer doesn't have a PySys nature, but what you can do is add a generic eclipse "Python" nature – which you can do using "PyDev".
And then to launch pysys from eclipse you’ll need to add a launch configuration. There are various options but the most convenient for this purpose is the “external tool” eclipse feature.
You need to invoke pysys.py with the right environment for locating python and also Apama if you want to use it with the Apama extensions. If you’re using PySys with Apama 10.3.1+ this is easy as you can use the new capability of the apama_env.bat script to execute a command e.g. ${apama_home}\bin\apama_env pysys run –n 0 –purge. If you’re on an earlier version I’m afraid you probably need to create a trivial .bat script of your own that first runs apama_env and then pysys %*
You'll want to set the working directory in the eclipse launch config go ${project_loc}/tests so it runs all tests. Or alternatively, ${selected_resource_loc}, to invoke a specific test subtree. You could create separate launch configs for both use cases.

View executed commands in eclipse

I am working on a eclipse based product. Basically it's a plugin built over eclipse which adds multiple functionalities, buttons, menu entries, a new interface and other stuff. I would like to automate some daily tasks but I don't know what commands are running behind the scenes. Is there a log with the running commands or something similar? I don't have acces to the source code neither can contact the product owners.
There is no simple log of commands.
You can enable tracing for a lot of different components of Eclipse but the trace output generally assumes you know a lot about Eclipse internals.
Recent releases of Eclipse have a preference page to enable tracing in 'General > Tracing'. This is described in the Eclipse help here.
You can also enable tracing using command line options as described here

How do you deploy a website and database project using TFS 2010?

I've been trying to figure this out and so far haven't found a simple solution. Is it really that hard to deploy a database project (and a web site) using TFS 2010 as part of the build process?
I've found one example that involved lots of complicated checks and editing the workflow (which is a giant workflow btw).
I've even purchased the book "professional application lifecycle management with VS 2010", but apparently professionals don't deploy their applications since it isn't even mentioned in the book.
I know I'm retarded when it comes to TFS, but it seems like there should be any easy way to do this. Is there?
I can't speak for the database portion, but I just went through this on the web portion, the magic part is not very well documented component, namely the MSBuild Parameters.
In your build definition:
Process on the Left
Required > Items to Build > Configurations to Build
Edit, add a new one, for this example
Configuration: Dev (I cover how to create a configuration below)
Platform: Any CPU
Advanced > MSBuild Process
Use the following arguments (at least for me, your publish method may vary).
MsBuild Params:
/p:MSDeployServiceURL="http://myserver"
/p:MSDeployPublishMethod=RemoteAgent
/p:DeployOnBuild=True
/p:DeployTarget=MsDeployPublish
/p:CreatePackageOnPublish=True
/p:username=aduser
/p:password=adpassword
Requirements:
You need to install the MS Deploy Remote Agent Service on the destination web server, MSDeploy needs to be on the Build/Deployer server as well, but this should be the case by default.
The account you use in the params above needs admin access, at least to IIS...I'm not sure what the minimum permission requirements are.
You configure which WebSite/Virtual Directory the site goes to in the Web project you're deploying. Personally I have a build configuration for each environment, this makes the builds very easy to handle and organize. For example we have Release, Debug and Dev (there are more but for this example that's it). Only the Web project has a Dev configuration.
To do this, right click the solution, Configuration Manager..., On the web project click the configuration drop down, click New.... Give it a name, "Dev" for this example, copy settings from debug or release, whatever matches closest to what your deployment server environment should be. Make sure "Create new solution configurations" is checked, it is by default. After creating this, change the configuration dropdown on the solution to the new Dev one, and Any CPU...make sure your projects are all correct, I had some flipping to x86 and x64 randomly, not sure of the exact cause of that).
In your web project, right click, properties. On the left, click Package/Publish Web (you'll also want to mess with the other Package/Publish SQL tab, but I can't speak to that). In the options on the right click Create deployment package as a zip file. The default location is fine, the next textbox I didn't find documented anywhere. The format is this: WebSite/Virtual Directory, so if you have a site called "BuildSite" in IIS with no virtual directory (app == site root), you would have BuildSite only in this box. If it was in a virtual directory, you might have Default Web Site/BuildVirtualDirectory.
After you set all that, make sure to check-in the solution and web project so the build server has the configuration changes you made, then kick off a build :)
If you have more questions, I recommend you watch this video by Vishal Joshi, specifically around 22 and 59 minutes in, he covers the database portion as well...but I have no actual experience trying it since we're on top of a non MSSQL database.