I am developing a small GWT based web application and using Sublime Text 2 as my editor for GWT code. I have added the following jar in my PATH:
gwt-2.5.0/gwt-user.jar
Still when I build the entry point java file, Sublime Text complains that it cannot see any of the GWT packages.
I am using the gwt-user.jar in the path since that is what I saw Eclipse requires to build the file. Is it possible to compile GWT code using ST or should I default to Eclipse?
Related
As stated in the title: I want to run an Eclipse-Plugin, more specifically a GEF-Editor, without starting an Eclipse instance before.
I've tried to use the export functionality provided in the MANIFEST.MF file:
However, running the generated JAR (call it editor.jar) by executing java -jar editor.jar on the command line fails with the message no main manifest attribute, in plugins editor.jar.
I'm aware of the fact, that this is because my MANIFEST.MF file is missing the following line
Main-Class: <packagename>.<classname>
which defines an entry point for my application. However, I've no idea what exactly I need to do here (in the case of an Eclipse-Plugin), cause I don't have something like a main method. I assume Eclipse is running some magic code it doesn't show to me, when I start my project as an Eclipse Application.
So, what do I need to do?
You could try running a GEF editor as a Java application. See Draw2D examples to understand how it can be done. You could probably re-use your GraphicalViewer and PaletteViewer, which means that mouse based interactions with the diagram and palette will be preserved.
However, your editor class would probably have to be incorporated into an SWT shell. Also, all actions contributed to by your editor into Eclipse toolbars, popup menus etc. would be gone. Outline and Tree view would have to be incorporated into your java app somehow if needed.
Think you'd be better off with an RCP application.
Wrap your GEF editor in a simple RCP. You can create one via the Plug-in wizard, setting "Would you create a rich client application?" to "Yes" in the process. This gives you the option to create a minimal application via the Hello World template in the next step. Once you have this, you can either embed your GEF editor in this plugin, or declare a dependency from the new RCP application to your GEF editor plugin, and start the editor from the Application class' start method.
For an overview of resources about RCP development, cf. Getting started with the Eclipse RCP.
It really doesn't add that much overhead to your editor but gives you the opportunity to work with the platform's workbench and workspace metaphors and create easy-to-deploy-and-use application bundles.
Once you have that in place, you can test your RCP from plugin.xml > Overview > Testing > Launch an Eclipse application. This will not run a whole new instance of the IDE, but just the RCP application itself.
Rather than exporting from the MANIFEST.MF, look into creating a product (you can do it via the wizard: New > Product Configuration), and building it via the Maven Tycho plugin(s) (have a look at the respective - really worthwhile - tutorial from EclipseCon Europe 2012: http://eclipsecon.org/europe2012/sessions/building-eclipse-plugins-and-rcp-applications-tycho.html, this includes a section on creating a product as well). Tycho gives true cross-platform builds, as long as you're not on Windows.
No magic code there :).
We have developed eclipse plugin which will convert the jsp to wicket framework.
Our tool will parse the jsp files and convert them to wicket using antlr.
-
we will run our plugin project using eclipse application.
A new runtime eclipse application will open with the plugin symbol in the tool bar.
For the first time when we click on the plugin symbol, the wizard pages are getting opened and the tool is parsing the jsp files and convert them to wicket using antlr.
After parsing the jsp files our tool generates some validator classes using velocity templates, and generates some other classes using templates that are necessary for the generated wicket project to run on the server.
Next time in the same runtime apllication if we click on the plugin symbol the wizard pages are getting opened but the parsing of jsp files is not performed.
what might be the issue? please help us.
Sorry we couldnot provide the code.
I am currently creating my first project using Google App Engine in Eclipse. For my main page it seems I can create either:
a servlet (class that extends HttpServlet)
or I can create a jsp file.
Is there a way in Eclipse to make it aware of the java code in a jsp file and to use all the IDE goodies such as colored text, inline documentation, auto-complete? And is there a way to auto build and validate the code in a jsp or it can only show the errors on the first load of the web app?
It seems to be a lot easier to develop in a servlet class than in a jsp file. Or did I miss something?
Eclipse tries to validate the markup and autocomplete it in the JSP files if you have the WTP (Web Tools Platform) installed. But even that sometimes doesn't work well because it's difficult to parse HTML containing JSP tags, Javascript, etc.
Regarding the Java code : it's bad practice to have Java code in scriptlets in JSPs. You should only use JSPs for pure presentation logic, and use JSTL and custom tags for that. The Java code should be in a servlet or action invoked before the JSP. Use an MVC framework (Stripes, Struts, Spring MVC, etc.) to separate your Java code from your JSP code. I've used Stripes on app engine with success and pleasure.
To make sure your JSPs are valid, you can be helped by Eclipse, but you should also deploy your webapp (on the local server) and run tests to make sure every JSP compiles and runs correctly. You can automate these tests with HtmlUnit or Selenium.
In my autogenerated ~/src/main/ folder, I have a folder called 'frontend' with my Java UiBinder file and my .ui.xml UiBinder file. How do I make STS/Roo run this instead of ApplicationScaffold.html?
Furthermore, what am I supposed to do with ApplicationScaffold? It seems useless.
The ApplicationScaffold.html file loads the ApplicationScaffold.nocache.js javascript file which bootstraps the GWT app. by calling the class which is mentioned in the ApplicationScaffold.gwt.xml file. Search for
I haven't tried this out myself but was just trying to figure out how to run the spring roo generated app in gwt debug mode inside eclipse and like this you can follow yourself whats happening (install the google gwt plugin) and right click on the roo project and do: properties->google->this project has a war file and point to the target/pizzashop-0.1.0.BUILD-SNAPSHOT folder. Then run -> debug as -> Gwt application ...
I'm a bit confused with NetBeans (versions 6.5 and 6.7). I have a NetBeans Module Suite application, which consists of several NetBeans Modules. I need to add some code in one of the modules. The new code is using a library, distributed as several jar files.
The problem is, that NetBeans does not allow me to add this library jars directly to the classpath. It wants to wrap all the jars in a new Library Wrapper Module, which is then added to the project and used from there. The effect is that all the original jars are combined into a single new jar automatically by NetBeans. This is a problem, because I can't just replace the jars later, without rebuilding this "Library Wrapper Module" and the original library is updated nightly.
I read some NetBeans forums, but I found nothing... I tried with simple java application, where it is possible to simply add jar(s) to the classpath using Project Properties -> Libraries -> Add JAR/Folder. If you use a NetBeans module instead of a simple application, the Libraries dialog looks different and does not have the "Add JAR/Folder" button.
Is it possible to add a plain normal jar in a NetBeans module and how?
It looks like the way a user can wrap a jar has changed in NetBeans 6.8.
Since this has been integrated into a property dialog of a project, the build process might be smarter, too. And it seems like that was your primary concern....