GWT module not detected by IntelliJ IDEA - gwt

I'm trying to enable GWT debugging in IntelliJ 14 Ultimate for an old project.
I have enabled gwt support in IntelliJ, downloaded the GWT version that is used by the project (2.2.0) and created a facet that targets that path:
I set it to target the web facet. I then got a warning about how the gwt compiler output and gwt-user.jar were not part of the artifact so I added them to it:
As I created the facet I added to the main app module. Finally I created a run/debug configuration where I specified the app module and enabled "User Super Dev Mode" but the "GWT Modules to load" field is disabled.
I built/compiled the project and am not getting any errors however I still can't see any GWT modules in the project Facets or Module sections.
This JetBrains article seems to imply that I should add framework support for GWT however I do not see it as an option when i right click the project>Add Framework Support..
Thank you

SuperDevMode was added in GWT 2.5; with 2.2 you're forced to use the legacy DevMode, with browser plugins, which means Internet Explorer or an old Firefox.

Unlike support for other frameworks, I cannot see GWT when I right click project root in Project tab and select "Add Framework support".
However, It still works when I select
Project Structure → Facets → Add → GWT

After a few hours of trying a bunch of different things (updated IDE, change JDK, recreate project, etc) the "culprit" turned out to be my VCS: I copied a colleague's local version and it IntelliJ was able to recognize the GWT module.
I was surprised since I had run multiple pulls (well 'updates' to be more exact since it is Perforce we're talking about) yesterday so I tried a force pull and voila... the modules are now showing:
Thanks for your replies Vojtech and Thomas!

I just had to move the gwt XML, for ex to the folder where client and server folders are. And Intellij recognised it.

Related

AEM error on real time

Is there a way to configure AEM into an IDE like IntelliJ,Eclipse...
So that the IDE shows the errors on my project before I compile it even if I put it outside the source folder like for example the components created.
If possible both the .java and .jsp
I'm not entirely sure what you mean by outside the source folder, but have you taken a look at adobe's documentation?
They have instructions for IntelliJ + AEM with Maven. It also instruct on jsp support as well. It's for 5.6.1 but it should be valid for 6.x as well.
https://docs.adobe.com/docs/en/cq/5-6-1/developing/developmenttools/howto-develop-aem-projects-with-intellij.html
Here's one for Eclipse
https://helpx.adobe.com/experience-manager/using/creating-aem-project-using-eclipse.html
They also have a more generic set of instruction
https://docs.adobe.com/docs/en/cq/5-6-1/developing/developmenttools/how-to-build-aem-projects-using-apache-maven.html#How-To%20Work%20with%20JSPs
Yes, you can maintain CRX data(AEM folders like /etc, /apps, /content, etc) in an IDE like eclipse. This will help you iron out all the compilation errors using features of IDE. Make use of this eclipse plugin called vaultclipse. You can install it from eclipse marketplace.
There is also another plugin called AEM plugin, details on how to use it here.

GWT+Eclipse without GWT_CONTAINER

The situation
I'm using GWT with Eclipse and Google Plugin for Eclipse (GPE).
Gradle is the build tool and the Eclipse classpath is generated by Gradle. As I have no "com.google.gwt.eclipse.core.GWT_CONTAINER" on my classpath, GPE always shows the error "The project 'Test' does not have any GWT SDKs on its build path" and the Console sometimes prints "GWT SDK not installed.".
Annother effect is that Eclipse doesn't let me GWT-compile the project (but running dev mode works fine). But that one is ok for me, as I compile using Gradle.
Things I'm aware of
I know that I can exclude all GWT depedencies from the Eclipse classpath and add the container through Gradle (I did that for other projects). But as I can't enforce the GWT version provided by Eclipse (I can only specify the SDK's name in the classpath by adding the suffix "/" to the conatiner), I think thats an ugly solution. Another point is that the GPE update site only lists the latest GWT version available. There's no way to automatically install an older version (yes you can provide one externally).
When using GPE together with Maven and m2e it simply works: GPE links no real SDK for Maven projects but there's a link to the "com.google.gwt" group in the local Maven repository. But that's magic I can't use because:
Gradle's local repository format is different to Maven's
This logic is implemented in the plugin "com.google.gdt.eclipse.maven" and I can't use that without adding a pom.xml to the project
The questions
Is there a possibility to deactivate this nasty error without loosing other GPE features?
Is it possible to do something similar to what GPE+m2e does without
creating my own Eclipse plugin?
Am I right that excluding the jars and adding the container is the only viable solution by now?
You can adapt this library to launch with custom classpath and other settings: https://github.com/eclecticlogic/gwt-launcher

Eclipse Juno no JSP in Dynamic Web Project (but everything else is fine)

The short question, is when creating dynamic web project (1.6 jdk) I can see all file types to create but there is no option for jsp. To add to that when I check file associations there is no JSP editor to select from.
A slightly longer version is I simply want to edit JSP files, I have Juno EE version installed and it says web tools platform is installed and everything works just fine.
However while everything works, there was no *.jsp in file associations and on adding it there was no JSP editor in the list. This is an out of the box Juno EE.
So I checked installed plugins and it tells me that web tools is installed, there is an icon and a load of plugins. They are all listed under Java EE in the plugin/installation list. I even tried installing just 'java web develop tools' which lists as 'tools for working with jsp' but when I do that I get ""Eclipse Java Web Developer Tools" will be ignored because it is already installed." however I cannot uninstall it because it's part of Java EE eclipse platform. I have no other plugins installed that might have broken this, however it has taken some time to get all the settings good so I'd rather not install it all again.
So I tried to install the full WTP by hand and it said some things were already installed, but it installed others. However, still no JSP editor. Hence why I tried a dynamic web project to see if I could create JSP and it wasn't listed.
So, eclipse base install has absolutely everything (xml, html editor, java editor, all the tools) but just not JSP.
My JDK is fine as dynamic web project is not created unless you have a valid 1.6 or above.
Anyone help?
It seems your missing Eclipse web developer tools and Eclipse java web developer tools.
Help>Install new software>http://download.eclipse.org/releases/juno, select appropriate items under Web,XML,Java EE
Hope this helps
In Eclipse Juno, select File/New/Other, then type in jsp in the wizard field. Select jsp file or jsp tag and there you go. Hope that helps.
Try to install Eclipse with Java EE developer.It should work.
You can go to Eclipse Market place and search for "Java EE Developer tool". On clicking it you should be able to see if your Web developer tool is selected or not. Please select that option and your issue will be resolved.
Check your path. Make sure it is pointing to at least a 1.6 version of Java. Restart Eclipse. That fixed it for me.
If you have installed every thing proper and still it is not showing JSP option while creating new .jsp file then click to the web icon on top right corner of eclipse. If it doesn't work then you need to install updated version of eclipse.
I also faced the same problem; I looked through the "Web,XML,Java EE..." installables available at under Kepler downloads:
and that brought me the New->'JSP File' context menu item.

Eclipse Juno project facets does not recognize that I have Java 1.6

I have an Eclipse/Maven web project. I'm trying to update the facets to support JSF2. However I can't update the dynamic web module to 3.0 (or even 2.5) because Eclipse refuses to recognize that I'm using Java 1.6. It shows Java 1.6 in the facet properties, but every time I try to change the dynamic web module to 2.5 or 3.0, it tells me I must use Java 1.6 even though that is selected. How can I solve this?
I'm not sure if and how Maven plays a role here, but ignoring that, you can alternatively also change the project facets by editing the .settings/org.eclipse.wst.common.project.facet.core.xml file. You can find the file when you browse in Navigator view (instead of Project Explorer). To set the dynamic web project facet version to 3.0, edit the following entry (with an unknown version, represented by ...)
<installed facet="jst.web" version="..."/>
to
<installed facet="jst.web" version="3.0"/>
If that doesn't solve the concrete problem, then most probably some Maven plugin has forced the facet versions based on a pom.xml or so.
Had the same problem, looked at the .project file of my maven/eclipse project.
Turned out, that you have to first make the Project a Java project in your Project facet project preferences page!
Unfortunately, as of right now, Eclipse Java EE tooling does not support changing spec versions on module facets (ear, ejb, web, etc.). You can edit the metadata file directly as BalusC has described and patch up any other source compatibility issues. Alternatively, you can create a new project with the appropriate spec version and copy you source into it.
If like me you find that only your Dynamic Web projects have this problem, try checking whether the server you are deploying to is configured for the JRE version you want. (Global Preferences -> Server -> Runtime Environments; then edit the server runtime environment in question.)
You may also need to manually edit your Eclipse settings, as suggested by BalusC and Konstantin. If you do, after restarting Eclipse re-open the Facets preference pane and click OK or Apply. This lets Eclipse sanity check your new setting.

Platform-specific dependency creeping into Eclipse plugin

I have implemented a graph editor with Eclipse EMF and GMF frameworks. After completing my project, I realized that this plugin shows dependencies (not explicitly added by me) on some OS-specific plugins.i.e:org.eclipse.ui.win32, org.eclipse.swt.win32.win32.x86. And whenever I have tried to bypass this dependency at my update site something went wrong with the installation process of the plugin.
As such it is impossible to run my plugin in *nix environment or even win64 machines.This seems a very heavy constraint dependency to me. Am I doing something in a wrong way? Or is there no other way of building Eclipse plugins which are cross-platform other than building the project from scratch at each different OSs?
We created a similar style of plug-in in my project. Under "Plug-in Dependencies" in Package Explorer I can see org.eclipse.swt.win32 listed, but it is not listed in required plug-ins in plugin.xml.
We also successfully created an update site which works for Mac users without issue.
So, yes it is possible to have a cross-platform plug-in.
I would suggest you first try to to use "Export..." -> "Deployable plug-ins and fragments" to create a bunch of jar files for your plug-in. See if these can be successfully installed by copying into the drop-ins folder of a fresh eclipse installation. Do this first on a Win32 install, then try on another platform. Once you have that working, use the new Eclipse installation to create the Update site.