intelliJ idea 10 community edition and GWT plugin - gwt

Having hard time installing GWT plugin. Tried to search for GWT plugins and all I was able to find was GWT Imagebundle which is pretty outdated. Tried File Menu -> configure plugins but didn't help as the plugin is not installed yet.
Is there a support for GWT plugin in intelliJ 10 community edition? If there is can some one please point me to the right document to install it? Just to make sure, I installed scala plugin and I am able to see it in "Add modules" section.
This is my first time using intellij and I love it so far.

There is no GWT support in the Community Edition.

Starting from the version 11 it's not possible to add PROJECT_FOLDER/src as it was described in the previously posted (by ctorx) link http://java.dzone.com/tips/gwt-development-intellij-idea. Once we add a source folder it appears as an "Empty library" and doesn't work. This is because IDEA treats it as a folder where should be compiled classes not sources.
But there is a workaround. To fix it we have to hack the module's IML file. Find the following lines in the IML file of your entry point module
<orderEntry type="module-library">
<library>
<CLASSES />
<JAVADOC />
<SOURCES>
<root url="file://$MODULE_DIR$/src/main/java" />
</SOURCES>
</library>
</orderEntry>
and move your path into the CLASSES tag, so the entire thing looks like the following
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="file://$MODULE_DIR$/src/main/java" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>

Related

Drools Eclipse Plugin ignores source level

I have installed the Drools Eclipse Plugin org.drools.eclipse 7.36.0.Final into my Eclipse 2020_03 running with a Oracle JDK 1.8.0_92. I have downloaded und unzipped drools-distribution-7.36.0.Final and added the binaries/ directory as Drools > Installed Drools Runtimes in the Eclipse Preferences.
As soon as I use any Java 1.5+ features (generics, foreach loops, closures, ...) I get error markers in the Rule Editor saying that there are syntax errors and those features require source level 1.5 (1.8 for closures).
My .drl files and the project itself seem to be fine, because I can compile and run via maven without errors. So it's not a blocking issue, but it's annoying that I cannot seem to get syntax checks for .drl files working properly in my IDE.
I have searched the internet and tried out all kinds of things:
I have set the JDT source levels in my project and workspace to 1.8
I have checked Installed JREs in the properties and only the one JDK 1.8.0_92 is listed
I have created a kmodule.xml file in /src/main/resources/META-INF/ with this content
<?xml version="1.0" encoding="UTF-8"?>
<kmodule xmlns="http://jboss.org/kie/6.0.0/kmodule">
<configuration>
<property key="drools.dialect.java.compiler.lnglevel" value="1.8" />
<property key="drools.dialect.java.compiler" value="ECLIPSE" />
<property key="drools.compiler.lnglevel" value="1.8" />
</configuration>
<kbase name="rules">
<ksession name="codegen-rules"/>
</kbase>
</kmodule>
I have created a kie.properties.conf file in /src/main/resources/META-INF/ with this content:
drools.dialect.java.compiler.lnglevel=1.8
drools.dialect.java.compiler=ECLIPSE
drools.compiler.lnglevel=1.8
I have added the properties in the VM args section of my eclipse.ini file:
-Ddrools.dialect.java.compiler.lnglevel=1.8
-Ddrools.dialect.java.compiler=ECLIPSE
-Ddrools.compiler.lnglevel=1.8
But all of these do not seem to have any effect and it keeps giving me the same error markers.
How can I tell the Rule Editor that I want to enable Java 1.8 source level when syntax checking my .drl files?
I have run into this issue as well using the latest eclipse release and the latest drools release.
Using Eclipse 2019-03 and the Jboss Tools Integration Stack here does work. So either something broke in later eclipse releases or in the later drools versions. The integration stack uses 7.21.0.Final
I have not dug into what exactly broke but even if I did I don't know who I would report it to :(

Include an external update site in my update site in Eclipse

I have an update site in which I'm including my features, like this:
<?xml version="1.0" encoding="UTF-8"?>
<site>
<feature url="features/my_feature1_1.0.0.qualifier.jar" id="my_feature1" version="1.0.0.qualifier">
<category name="My Category"/>
</feature>
<feature url="features/my_feature2_1.0.0.qualifier.jar" id="my_feature2" version="1.0.0.qualifier">
<category name="My Category"/>
</feature>
...
</site>
Some of the plugins included by those features have dependencies on plugins that I download from other updates sites, right now I have to manually install those update sites before installing mine, to automate this, I can download and include those dependencies to my site.xml but at the end the .zip will contain them and the size will be too big, is there a way to link an external update site to mine so it is automatically downloaded during the installation of my update site?
It seems that there is a associateSitesURL tag that provides this behavior for site.xml. That being said, it looks like site.xml has been replaced in favor of category.xml (see for instance this answer on SO) and I don't know whether this tag is still supported.
Vogella has a section about how to create one. Using a category.xml file, you can specify an additional update site by adding a repository-reference tag. For instance, add the following code to the category.xml file to reference an Orbit update site:
<repository-reference location="https://download.eclipse.org/tools/orbit/downloads/drops/R20170818183741/repository" enabled="true" />
The URL can also be specified directly from the category.xml file editor:
I failed to find any documentation on this but I used it in a side project and it seemed to work as expected.
This is possible using an element like this <repository-reference location="http://download.eclipse.org/releases/2020-12" enabled="true" /> in category.xml. See the article Eclipse p2 site references for details.

How to set property eclipse.update.reconcile=true in Eclipse product built with Tycho

I build my Eclipse 4 Application with Maven Tycho 0.15.0. Everything works fine except of the fact, that when i add
<configurations>
...
<property name="org.eclipse.update.reconcile" value="true" />
</configurations>
Tycho is ignoring the property and writing org.eclipse.update.reconcile=false to the config.ini.
I want my application to use every bundle that I drop in the plugins folder therefore I added org.eclipse.update.configurator and the above property.
Any ideas?
As described on official site:
When setting the start level for org.eclipse.update.configurator,
PDE/Build will also automatically set In addition to these properties,
org.eclipse.update.reconcile=false.
In fact if you point
<plugin id="org.eclipse.update.configurator"/>
in .product file you always have default start level as a result
org.eclipse.update.reconcile=false
in your config.ini file.
Solution is not specify
<plugin id="org.eclipse.update.configurator"/>
in .product file. It still will be in plugins.

how to use ant-contrib tasks in eclipse auto content assist

I have Eclipse Ganymede and would like to use the auto content assist feature for ant. I have the ant-contrib-1.0b3.jar with me.
What configuration is required in eclipse to use auto content assist which can include tasks for ant-contrib as well?
When I use the following the ant can recognize tasks for ant-contrib but content assist doesn't work?
<!-- Define classpath for ant-contrib tasks -->
<path id="ant.contrib.classpath">
<fileset dir="/path/to/lib/">
<include name="ant-contrib-1.0b3.jar" />
</fileset>
</path>
<!-- Task definition -->
<taskdef resource="net/sf/antcontrib/antcontrib.properties">
<classpath refid="ant.contrib.classpath" />
</taskdef>
Please try the following.
I understand that for Ant 1.6 and later you need to reference the antcontrib XML file instead of the properties file like so :
<!-- Task definition -->
<taskdef resource="net/sf/antcontrib/antlib.xml">
<classpath refid="ant.contrib.classpath" />
</taskdef>
This is also detailed here.
Besides that, in Preferences -> Ant -> Editor -> Content Assist check that Provide proposals for user defined tasks is checked like so (this is also the default) :
If both of the above are in place you should get the content assist as shown here (This is the code from your post, the only difference being, that have replaced the reference to antcontrib.properties with antlib.xml) :
Replacing the reference to the properties file with the xml one made all the difference for me on Eclipse Indigo SR2 (64 Bit).
I checked to make sure that this feature ( Content assist for user-defined ant tasks) is available at least since Eclipse 3.3. There were performance problems in the Ant Editor related specifically to this feature in Eclipse 3.3 but the same have since been resolved.

Cleaning Deployment Assembly with Eclipse Plugin

When faced with the unenviable task of cleaning all generated project artefacts/resources in a stock-standard Java EE/Tomcat configuration, I generally do one (or all) of 3 things:
Project/Clean
Right-click my server, and delete any artefacts (can't remember the exact command)
Source/Clean
I'm now playing around with the Google Eclipse Plugin for Appengine, which uses an inbuilt Jetty server.
Firstly, the plugin doesn't have any options to clean out generated class files before redeploying (well, not that I can see anyway). And secondly, the sever is not available as a configuration option.
Are there any quick fixes available to clean all artefacts/resources in my war/WEB-INF directory?
You can easily make it about one click and not unenviable. Just use ant and pattern matching. Open the ant view in Eclipse and add your file and it's just a click away.
Before 1.7 when app size was more limited, I used to copy almost everything out so I could upload it and serve from the blobstore (GWT permutations galore!). I was doing this alot!!!
see these for details http://ant.apache.org/manual/Types/fileset.html and http://ant.apache.org/manual/Tasks/delete.html
Here's my simple code example:
<target name="moveXprojectGae">
<delete includeemptydirs="true">
<fileset dir="XprojectGae" includes="**/*"/>
</delete>
<move todir="XprojectGae">
<fileset dir="war/XprojectGae">
<exclude name="**.rpc"/>
<exclude name="**nocache.js"/>
</fileset>
</move>
</target>