Generic code snippets or templates in Eclipse - eclipse

I'm currently evaluating eclipse after using Textmate for all my development for many years. What I miss in Eclipse and what I can't find any solution for are some kind of generic templates:
I'm using PDT for my JavaScript and PHP development, and it supports code-templates. however , in my projects I'm writing large amounts of shell-scripts, yml-configuration-files, xml-files, gnu make scripts, etc., too. I'm writing source-documentation for all these scripts using a generic syntax (similar to robodoc) and you can save much time, when you can insert the doc-blocks using templates. however, besides PDT not all of the editor-plugins support templates.
Is there some generic way of storing code-snippets/templates in eclipse, which will work across all editor-plugins? I think it should be possible to implement such using eclipse monkey -- however, it seems development of monkey was stopped?
I'm using Eclipse 3.4.0.

If you have the web tools (WTP) plugins installed you should have a Snippets view which is an editor-independent place for collecting reusable code snippets. You can create and place your snippets in there and can separate them using 'drawers'. Double clicking or dragging a snippet item will insert it in the active editor.
The web tools user guide has a section about this view.

Why don't you try Snip2Code plugin?
It is a general purpose snippet manager platform that you can add to your Eclipse and will store your snippets on the cloud, so that you don't have to sync them when you reinstall Eclipse or move onto another machine.
http://www.snip2code.com/Static/Downloads

Related

Eclipse Generic Text Editor Sort OUtline

I thought this would be very simple to achieve but I cannot sort the outline in alphabetical order in the generic text editor that is now the default editor for javascript files in Eclipse 2020-12. In fact I have no sorting options whatsoever in the outline.
This is all I have in any perspective using the generic text editor.
This really affects my productivity having to sroll through many functions in a javascript file to find the correct one. I have hundreds of javascript files with hundreds of functions each.
I am using Wild Web Developer tools as this is the way Eclipse is heading (and because each update automaticaly installs it). Also I have node.js installed even though I don't require node.js for anything other than the generic text editor.
I'd prefer to not have the overhead of uninstalling Wild Web Devleoper and installing JDT each time Eclipse updates. Ideally, I should be able to simply update when prompted and all works as previously.
This is the Eclipse version I am using
Version: 2020-12 (4.18.0)
Build id: 20201210-1552
Does anybody have any idea how I can simply sort my functions and variables alphabetically in the generic text editor please? (I can sort the outline in java files

How to develop something as a group in Eclipse

My friend and I were searching for already built-in features in Eclipse or plugins that allow you to develop code in a group, or to be more specific, in a pair.
I found only a single plugin that provides such features, however it is quite hard to install.
Are there any simple solutions for Eclipse, or should I use a different editor?
You could use Git/GitHub or a similar form of version control. I am pretty sure Eclipse has built in support for Git.

How to add my own tool in sakai 2.9 like announcement?

I am new to sakai, i want to add my own tool in sakai source code like announcement,syllabus...etc That tool having some my own functionality for this what i have to do, how can i develop my own tool in sakai.
Thanks.
Use one of the archetypes to get you started, then customise it. When you are comfortable you can change the UI layer to be whatever you like.
https://confluence.sakaiproject.org/display/BOOT/Developer+Tools
If you are looking for a solid "base" tool shell to begin with tool development my recommendation would be to start here: "Sakai Wicket Maven Archetype". There are a few other very good archetypes available but are often outdated and may cause you some problems based on my experience. This has been the one I've had the most success with.
This uses Wicket but does not mean you have to use Wicket to develop further with it. Make sure to pull the 1.2 version as last check the binaries for the others were not available yet so replace -DarchetypeVersion=1.4.1 with -DarchetypeVersion=1.2 It will compile and deploy successfully as a tool "as-is" that you can modify as needed. It also allows you to code in Java to directly access the sakai API and pull from its database or even add your own tables. I've successfully used it with NetBeans 8.0.1 and MySQL 5.6 under Windows 7 with Maven 3.2.3 and Sakai 10.1.
The code is well-documented and is no-frills but with enough varied functional use examples to allow you to do "almost" anything you want. The wicket manual is 600+ pages but in my experience you should be able to accomplish a lot just by looking at the code in the archetype.

Eclipse RCP translation tool

I am developing an Eclipse RCP application, which contains 600~ strings, translated to a couple of languages by myself.
The point is that I have to deliver it to the translation team to translate it to several languages in a couple of months, and I haven't found any translation tool for eclipse, which would help the translation team in its job. Is there any application which analyzes the file structure loading the messages.properties and bundles.properties files, and providing a UI to translate it safely.
If not, which would be the best way to perform this task?
Thanks.
Assuming you have used the NLS tools in Eclipse, you should already have the properties files containing the translated strings.
Eclipse projects are translated through an instance of the Babel server.
This is in itself an Eclipse hosted project.
The Babel server environment is a typical LAMP environment. You could try setting it up for your translators by following the instructions.
If this seems to be a lot of work for only 600 strings, it's because it is.
It is easier to use a hosted service like Amanuens or Transifex to cooperate with your translators.
Globalyzer (http://lingoport.com/globalyzer) can run as an eclipse plugin (or as a stand-alone workbench) and supports extensive internationalization activities across teams of developers and a wide variety of programming languages.

Eclipse plugins for working with Apache Wicket projects

Are there any widely adopted, currently maintained Eclipse plugins for working with Apache Wicket projects? If so, where are they? Who maintains them? What do they do?
Take a look at Qwickie (eclipse plugin): https://github.com/count-negative/qwickie
The standard used to be wicket bench, but it has been discontinued and you can find a fork named stump.
I don't know stump, but wicket bench mainly had a refactoring listener (if you rename a java class, the HTML is also renamed) and some wizards (create a Panel with associated markup etc).
I haven't used bench in years, as it was rather buggy in newer eclipse versions. But I have made pretty good experiences using a custom set of eclipse HTML templates that you can download from this location: http://www.wicket-praxis.de/blog/wp-content/uploads/2010/01/wicket-template.xml
(German) description on this page: http://www.wicket-praxis.de/blog/download/
You can install these as HTML Code Templates in Eclipse:
Window -> Preferences -> Web -> HTML Files -> Editor -> Templates -> Import...
and that will enable wicket-specific template shortcuts in the HTML editor.
It's too bad you don't use IntelliJ IDEA. It has an excellent plugin called WicketForge.
Not right on the question, but not completely off it, either.
I have released a tool that can be used as an eclipse save action. It generates Java interfaces with constants for ids in wicket templates and resource keys from translation files, so that you don't need to use strings for component ids and translation keys, but can use these generated constants.
It can be integrated in eclipse quite simply as an annotation processor. After a save of a component the interfaces will be generated and built. See its readme:
https://github.com/neurolabs/wicket-id-bindings-generator
I'm maintaining it on github (feel free to fork/contribute) and am using it in all of my wicket projects.