How do I "export" this Eclipse plugin from sources? - java

I'd like to use this Eclipse plugin:
https://marketplace.eclipse.org/content/opencl-development-tool#group-details
with my Eclipse 2019-09. But - there's a version incompatibility, or so I'm told. It's been suggested to me that I might be able to use the plugin sources to "export it yourself as a deployable in order to install it".
But it's not at all clear to me how I'm supposed to do that. I'm not fluent with building Java artifacts nor with Eclipse plugin development and deployment. At the link above, there are several repositores, and most of them are only two or three files, one of them being pom.xml. Only one seems like a proper repo (this one).
What do I do with these repos and how can I make a plugin I can install in Eclipse, using them?

Looks like it's become simpler over time--there's a wizard with options for doing this once you've got the plug-in in your workspace compiling cleanly. Install the Plug-in Development Environment for your version of Eclipse. It should be in an update site already in your list of Available Software Sites (that's a preference page). Then, follow the steps of the Export and Install into the Running Host task in the built-in Help. The first 3 sentences of that task refer to the normal process of debugging plug-ins from source projects in the workspace. The rest of it is a guide to exactly what needs to be done here.
Here's the link to the 2020-03 version of that documentation:
https://help.eclipse.org/2020-03/topic/org.eclipse.pde.doc.user/tasks/ui_export_install_into_host.htm?cp=4_2_4_0
And the relevant parts:
...it is sometimes necessary for code to be tested in your host, your currently running Eclipse instance. To test code in the host, you need to export and install into the running Eclipse instance.
To export plug-ins and features and install them into the host Eclipse do the following:
Develop your plug-ins and features in the workspace
Open the export wizard, either Open the plug-in export wizard File > Export... > Plug-in Development > Deployable plug-ins and fragments or Open the feature export wizard File > Export... > Plug-in Development > Deployable features
Select your plug-ins or features to export and install
Select the last option on the Destination tab Install into host. Repository. Then choose a directory to create the repository in
Hit Finish. The export operation will run followed by the installation operation.
If the operations completed successfully, you will be prompted to restart. Choose to restart now
our plug-ins will be installed and running after the restart. You can see what has been installed using the Installation Details button on the About Dialog (available by going to Help > About Eclipse SDK)

Related

IntelliJ IDEA project modules are not auto identified on WSL

The files within my Gradle project are not identified by IntelliJ when a project in WSL (Windows subsystem for Linux) is opened by IntelliJ IDEA Ultimate. Correct java versions are also installed within WSL and the paths are also set correctly.
This is a Gradle project and my java files are shown with a red icon on them and it says "Java file outside of source root".
Then I went to File -> Project Structure -> Modules, and observed that the correct modules were not identified.
When I open the same project in Windows or Ubuntu, the modules are automatically detected and I don't need to add them manually.
How I opened the project is using File -> Open on IntelliJ for Windows and gave the project path within WSL (E.g. \\wsl$\Ubuntu-20.04\home\username\idea-project).
My Gradle versions is as below,
Has anyone come across any situation like this that could help me figure out what is the issue behind this.
Thank you.

Auto-install Eclipse Lombok plugin - Java

We just started using Lombok plugin for Java.
Developers in our company use Eclipse for workspace and we have some clients who get access to part of our source code.
If we use Lombok library, it doesn't get detected in Eclipse until the plugin is manually installed.
It's hard to send a communication to multiple clients and have them mandate the plugin installation.
Is there a way to automatically install a plugin from the project itself, may be with an yes/no question to let the users accept it, that way we don't get accused of sneaking stuff in :)
It is NOT possible to install an Eclipse plugin from the project itself.
It is clearly stated in the Lombok documentation that manual installation is necessary as Lombok is a preprocessor. Lombok needs to be installed to the Eclipse install folder (next to eclipse.ini). https://projectlombok.org/setup/eclipse
And I suppose it would be a security leak (both in Eclipse and your Customer's environment) if you are able to install something into the 'Program Files' folder from your projects without user interaction. However manually copying is feasible and could be a workaround if you are very keen to do so.
Workaround: You might provide an ANT/GRADLE script that will distribute you local copy of the lombok.jar into Eclipse's program folder. And also create a launcher configuration. So you can refer to this launcher step to be executed. Please note that you need to restart eclipse just after lombok installed. But in fact this is what lombok.jar does when running as described in the install guide.
The standard lombok installation is being done manually.
Therefore, I've created an automatic installer.
It's available here: https://github.com/zorik9/lombok-automatic-installer
Right now it supports only eclipse IDE in windows machine.
The idea is to configure once the variables: lombok_version, eclipse_home and workspace_dir (not mandatory)
And based on this configuration, run the installation script on each machine.
For more details, please read the readme.md file.

Exporting an E4 Application

I have a feature based E4 application that I'd like to export as an executable project (.exe since I'm under windows).
I'm following the automated procedure called "Export Project Wizard" but despite I'm getting a .exe file + some JAR's in the same export folder, when I run it I get this error message: "org.eclipse.e4.core.di.InjectionException: java.lang.NoClassDefFoundError com/test/test1"
com.test.test1 is an external plugin which I included in the depedency tab, and it seems that Eclipse won't find it.
How can I work it out? Should it not automatically export all the required plugins?
I also tried to export that plugin manually, as JAR, but it didn't work.
Thanks
Use 'Export > Plug-in Development > Eclipse product'. This will require you to specify the xxx.product file that was created when you created your e4 application.
You can also launch the same wizard from the xxx.product editor by clicking 'Use the Eclipse product export wizard'.
You must configure your xxx.product file to specify all the features that you are using - your own features and the standard Eclipse features (on the Dependencies tab). For example on my product I have:
my feature
org.eclipse.e4.rcp
org.eclipse.emf.common
org.eclipse.emf.ecore
the 3 Eclipse features are the minimum needed for an e4 application.
Your feature must list all your plugins in its feature.xml plus any dependencies that are not covered in any other feature. Every plugin you want to use must appear in one of the features.

Google web toolkit with Netbeans?

I prefer to use Netbeans as my IDE rather than Eclipse. A few years ago when I looked into Google Web toolkit, there was no good Netbeans plugin for GWT and everyone suggested to use Eclipse. How is the situation now? Is there any better plugin on the market, or is Eclipse the best option?
I prefer Netbeans over Eclipse too. To develop for GWT, I used the following setup steps without installing gwt4nb plugin. Since I use an IDE for code analysis and editing help only, and feel quite comfortable manipulating files and directories in the source tree directly. Though this may not fit your case, I guess for many developers the steps should be good enough because you can treat gwt development just a normal java project.
Install JDK, NetBeans-SE. Extract gwt package. I have a note for gwt-1.7.1. If running on a windows 64bit version, install 64bit netbeans and jdk, and also a 32 bit JRE.
Copy the Hello sample from gwt directory to a directory out of gwt package directory. Create a project of existing java source code, and put the project under the same Hello directory. Then netbeans will create two files in the Hello directory: nbbuild.xml and manifest.mf, and create its own nbproject directory under Hello. I simply ignore these files.
In netbeans "Projects" window, right click on "Libraries" and choose "Add JAR" to add the jar files from the gwt directory.
In netbeans "Files" window (not the "Projects" window), you will see the original "build.xml" file that comes with the Hello sample. Edit this file so the "gwt.sdk" points to the location of gwt package directory. On windows 64bit, also add a "jvm" property under "java" task. It shall look like (only jvm=... is newly added):
<target name="hosted" depends="javac" description="Run hosted mode">
<java failonerror="true" fork="true" classname="com.google.gwt.dev.HostedMode"
jvm="C:\\Users\\youhere\\Programs\\jre6.32\\bin\\java">
<classpath>
Use "Files" window, click to expand "build.xml" file node. Then right click on "hosted" ant target under "build.xml" and choose "Run Target" in the context menu to build and run the hosted mode.
The ant targets from "build.xml" you usually use:
"build": Use this to build the javascript.
"hosted": Use this to build java and start hosted server and browser.
Once the hosted server is started, you can run "build" target to build the javascript and to have the result served by the running hosted server immediately without restarting the server. Use your normal browser to see the javascript version at "localhost:8888". You can set a different port by editing the "build.xml" file.
Usually I copy the Hello sample to a different directory, and use that as a start point of a new project. After that manually edit the files to match the project naming and directory structure.
I also copy the other samples from gwt package to a new directory, then build and run them to use that as a code reference. If you want to also develop the servlet, take a look at the servlet of DynaTable sample and create or copy the files into the same directory structure in your project.
A note about gwt4nb plugin: I installed it but figured out it is too heavy weight for me. With the above manual setup, I can do everything that I need to without any difficulty.
I would say Eclipse is the best free option. Intellij IDEA (paid edition) has also good GWT support but it is not as good as Eclipse.
I think the only official support goes for eclipse, see here : https://developers.google.com/web-toolkit/download
Based on my personal experience, if you want to have a good integration between GWT and your IDE, go for Eclipse. If you intend to use Maven, I also suggest M2E http://m2eclipse.codehaus.org/
EDIT
Forgot to say the most important thing. Netbeans by the way, seems to have a nice support of GWT but I never tested, see : http://netbeans.org/kb/docs/web/quickstart-webapps-gwt.html
I am sure this is not the correct and suitable answer. But if you like to trade off, this is just an idea.
sudo -i
cd ~/gwt
./projectCreator -ant build -out projects/myapplication
./applicationCreator -out projects/myapplication myapplication.client.MyApp
Then, you can import the project ...
In Netbeans create a new projects and choose 'Java Project With
Existing Ant Script',
Set Location to the myapplication folder created earlier
Set Build Script to the build.ant.xml file created by projectCreator
Set Project Name to something more appropriate
Open the project properties and under Java Sources click Add Folder.
Select the projects/myapplication/src folder and press OK
Please excuse, if you didn't like this approach.
Sounds similar with Battle for Eclipse and Netbean but you are talking about concern with GWT.
So , I think you can choice as you more prefer depends on your experiences. You can do GWT developing in various IDE because I assume GWT runs on it's SDK not on IDE . But there has some points of views. Example : easy to generate , test , develop ..etc on each IDE.
I also personally love NetBean due to beautiful GUI :) . But I am working with Eclipse IDE because our team has been developed and configured on it for a long time so we have hard to change IDE (sometimes very hard to change Eclipse version because we can't imagine new version will more reliable for our projects).But I don't mean Eclipse is the best option , as I described you may configure your GWT projects on any other IDE also as your experiences via GWT SDK.
"...and everyone suggested to use Eclipse." . Yes you will see most of sample projects for it were figured with Eclipse IDE. Only aspect for GWT , I think you have chance to choose NetBean IDE without any worries.
You can develop GWT project on NetBean IDE as follow...
1.) First off, download and install the gwt4nb plugin. ( you may have exp for install plugin on NetBean IDE )
2.) download GWT SDK and extract it to your specific location.
3.) create a new Java Web –> Web Application. Name your application and hit Next until you get to the Frameworks tab. If you have successfully installed the gwt4nb plugin you should see Google Web Toolkit listed. Select the Google Web Toolkit framework.
4.) Next, browse to the GWT SDK installation folder. Name your GWT module and hit Finish.
5.) Clean and Build your project.(don't be forgot to wait until successfully finished Build.)
6.) Run the project, your browser should launch and the button “Click me!” and the text “Hello, GWT!!!” should be visible.
Cheer ! now you can create GWT sample project on NetBean IDE.
You can also create GWT's
Test Case
Constants
Module
RPC Service
UiBinder
By right click on your_project > Other... > Google Web Toolkit.
Have some useful tips for you !

How to install eclipse for java developer,c/c++ developer, php developer at the same time?

Now I am trying to install eclipse on my computer under Windows 7. The problem is how to install the eclipse for java,c/c++,php,javascript concurrently?
Would donwloading the four zip files and then unziping them all into one directly say d:\eclipse works?
Is there any good tutorials for installation/configuration of eclipse?
The zips are just pre-bundled archives of Eclipse plus the relevant plug-ins. Just pick one, install it, then use Help | Install New Software to add the other plug-ins you want.
You can download all the zip directory and unzip it in the same folder (e.g. ECLIPSE_HOME) and run eclipse. Eclipse will first inspect it 'plugins', 'features` folders and update configurations for future use.
Alternatively, you can download the main eclipse (Simple Eclipse for Java SE) and goto Help --> Install New Software menu and select the C++ packages (and all relevant packages) you need and install.
You could either download eclipse for one of the languages and then download plugins for that one or you could download the four separate zips and unzip them to the same PARENT folder!
Like:
/Eclipse/Java
/Eclipse/C
/Eclipse/Cpp
/Eclipse/Php
I'm not sure what would happen if you'd unzip them to the same folder, but I would dissuade it. By unzipping them to a separate folder you can launch a specific eclipse installation for one of the views, so you won't have to switch views.
Also, I remember that having one eclipse version with multiple plugins tends to make eclipse messy (at least at the time when I was using it, more or less a year ago)

Categories