Eclipse-Plugin - How to open a custom progam in a custom view? - java

Basically I want to open a file in a custom program, which I can define, thus I can run a bash terminal for example in the workbench with gvim or vim.
In theory I think, that I need a custom plugin which adds a new entry in the 'Show in' context menu.
Any guidance is appreciated.

Interacting with 3rd party program of generic origin has no common solution as it hardly depends on 3rd party technologies. You need to greatly restrict you scenario to something more specific to find an answer.
Please have a look at Eclipse Remote System Explorer (RSE) https://help.eclipse.org/2019-03/index.jsp?topic=%2Forg.eclipse.rse.doc.user%2Fgettingstarted%2Fg_start.html that sounds a bit related with what you want to achieve.

Related

Execute java GUI program from external website

maybe what I'm asking is difficult to do or even ridiculous, but I'll give it a try anyway.
I have a typical PHP website, with a products list. And I have a Java application which manages the products (CRUD). In that application I have a JDialog that pops up when I select to edit a product.
My question is: ¿Is there a way, no matter how difficult to implement, in which I click an "Edit product" button on the webpage and the java application JDialog pops up to edit that product?
Thank you.
I'm no expert on the matter but take a look at custom protocol handlers.
Define a custom protocol myapp:\\ that you can use on your web page in hrefs like:
Open Product 1
Then on OS level you need to specify how this protocol should be handled. (In your case that will be to run your Java program with the correct arguments to open product1). The installation of your Java program should make the necessary changes to the OS in order to correctly handle this custom protocol.
Take a look at this site for more information.

how to run and control an excel instance from java

My java application has a button which should open a user selected Excel file when clicked. On this file the user has to select a diagram. Finally they should click a button which triggers a process (macro, java method?) which changes the size of the diagram to values read from an object of the java application etc.
When searching on the internet I found things like COM bridges for java like JACOB, but this seem to run on windows32 only; is there anything that works cross-plattform?
I would be very happy if somebody could help me to find a good approach, a fitting library or any other helpful hint, because I am a bit confused at the moment and don't know how to start at all ;)
Thank you very much and have a nice day!
edda
Check out http://j-interop.org/ . This can be used to call dcom applicaitons in a platform independent manner.

Reusing Eclipse Run menu in Eclipse RCP application

I want to create an eclipse RCP application for a custom language. A programs which is written using the cutom language should be run and show it's output when the user click on the Run button.
Is it possible to integrate eclipse Run menu in eclipse RCP application with it's default features as we create NEW menu item by using ActionFactory? If it is possible how to do that?
Thanks in advance.
If you "just" want the Run menu along with the default entries, just include a dependency to org.eclipse.debug.ui.
You will then need to add launch configuration types for your specific language using the various extension point from the plugins org.eclipse.debug.core and org.eclipse.debug.ui.
As always, when it comes to the more advanced functionality of Eclipse, the easiest way to get access to the functionality is via resources and examples. Although it is a bit dated, the article "We Have Lift-off" (http://www.eclipse.org/articles/Article-Launch-Framework/launch.html) is the best starting point for this. Have a look at the various references to org.eclipse.debug.core.launchConfigurationTypes to find the best example to use asa starting point - in particular the ANT Build stuff as this is pretty simple...
In general you can find the plug-in that contributes a specific entry using the PDE Menu Spy (Alt-Shift-F2 on MacOS)...

how can i make UI automation in java by which i can capture button or menu of any external application dynamically

I want to automate an external application, but I have several problems:
How can I recognize a button or other field of an external application in Java?
I use the Robot class in Java for making notepad automation where I open notepad, select file menu, and save or exit, etc.
The problem is, it needs X,Y coordinates for the mouse pointer to go to the proper location.
I want to make it more dynamic, i.e. it should recognize the file menu of a running notepad anywhere on the desktop.
How can this be done in Java? Is there any class in Java I can use to do this?
Thanks everyone to give me response, I want to be more specific i want to know how can i make ui automation by using any tool if it is not possible in java or using any api of java.automation tool must be freeware.....i am searching net for that i found AutoIt is like that.But if any one do this type of things please share his/her experiance means is it possible to do that in AutoIt or not possible if not then which tool do that kind of things.
It is easy to integrate Sikuli into a Java-application since it is written in Java. Sikuli uses image recognition to find elements visible on the screen like buttons and such. It is very easy to use and provides an alternative for tasks that are difficult to handle with static positioning, like finding moving windows and such.
Take a look at this: http://sikuli.org/docx/faq/030-java-dev.html
Hope this helps!
You should have a look at Sikuli. It takes as inputs images of the ui elements to select an area in the targeted app. It's a UI Automation Application
That's a bit difficult to install (at least on Debian/Ubuntu, where I tested it), as you'll need a recent version of OpenCV, a particular version of JXGrabKey but the quality of the program worth the trip. Good Luck
Java doesn't have an API to examine the UI of another application; that would be a very big security risk.
Which is why the Robot class can only record events (key presses, mouse movements and clicks) but not which UI element was involved in most cases.
It would be possible to do more if the external application was written in Java because then, you could analyze the objects in memory but for obvious reasons, this isn't possible for C++ or .NET applications.

Adding Help Contents, Search Help using Command Framework

My colleagues and I are building a new RCP application and trying to find our footing in RCP. My coworker managed to get the Eclipse Help framework working pretty quickly - but he used the old style Actions and ActionBarAdvisor.makeActions() to do it. All of the RCP Menu creation tutorials I've read (the ones that were written post Eclipse 3.3 anyway) advocate depreciating Actions and switching over completely to Commands. So I'm trying to do this. However, I cannot get the help Commands to work - not without using the help actions.
Specifically, I'm attempting to figure out how to add the default Eclipse help menu commands org.eclipse.ui.help.helpContents and org.eclipse.ui.help.helpSearch to my help menu. I've created the menu contribution, and added the commands. But they remain greyed out. I can't find any mention of anything else I have to do to hook them up to the help framework my coworker had working before using actions. If I add the actions for them and register them in make Action, they still work. But I'm trying to do this without Actions. How is this done? What am I not doing?
According to the Command tutorial on vogella.de some common commands need some ActionFactories registered:
Standard commands sometimes map to actions which are contributed via ActionFactory in the class ApplicationActionBarAdvisor. If the ActionFactory returns an IAction you need to register this action. If not these commands are inactive in your menu. For example the following made the reset perspective and welcome command active.
I think, this might be the case with the Help command as well - but I have not tested it. The other possibility would be that there is no enabled handler for the command...

Categories

Resources