How to: snippet expansion in eclim? - code-snippets

I'm going direct to the question:
I want to be able to do the "sysout" snippet expansion like in eclipse
how is it done?

EclimHelpGrep snippet
will give you
1.5.2 (Aug. 30, 2009)
=====================
Bug Fixes:
- Various bug fixes.
Eclim:
- Added |:ProjectRename| and |:ProjectMove| commands to allow
renaming and moving of projects.
- Added |:ProjectProblems| command to populate vim's quickfix
with a list of all eclipse build errors and warnings for the
current and all related projects.
Note: To have problems reported for java projects created via
eclim, you may need to recreate your java projects to ensure
that the java builder is properly added. As of eclim 1.5.2,
eclim's java project creation now adds the java builder.
- Added |:HistoryDiffNext| and |:HistoryDiffPrev| commands to
view history diffs while navigating the history stack.
- Abbreviation support removed in favor of any one of the third
party snippets plugins available on vim.org (snipMate,
snippetsEmu, etc.).
- Added support for hosting third party nailgun apps in eclim via
an ext dir (eclimd#eclimd-extdir).
Java:
- Updated |:JavaImpl|, |:JavaDelegate|, and |:JUnitImpl| to
better support generics.
- Updated |:JUnitImpl| to support junit 4 method signatures.
- Updated |:JavaImport| and :JavaImportSort to honor eclipse's
import order preference and added the ability to edit that
preference via |:ProjectSettings| and :EclimSettings.
- Added initial refactoring (|vim-java-refactor|) support.
Git Log (1.5.2)
(https://github.com/ervandew/eclim/compare/1.5.1...1.5.2)
The relevant part is:
- Abbreviation support removed in favor of any one of the third
party snippets plugins available on vim.org (snipMate,
snippetsEmu, etc.).
I'll look into those and update this. As of now I don't use any snippet plugin.

Related

custom codec not found in plugin

I have a grails application with multiple internally developed plugins. Since upgrading from 4.x to 5.2.3, codecs are not found in one plugin, but are found in others. Specifically, I can place the same file (UsernameListCodec.groovy, package name changed from one plugin to the next but otherwise no changes) in grails-app/utils in one plugin and it works; when placed in grails-app/utils in another plugin it fails with MissingMethodException.
What could cause this? The plugins are fairly different in terms of what they provide, but very similar in terms of how they're built, published, etc. Clearly this is something I'm doing wrong (since the codec works in another plugin) but I don't even know where to begin looking. Does a plugin need to do something in particular to be able to provide custom codecs as of grails 5?

Delphi Open Tools - How to Use IOTABuildEventProvider and IOTABuildEvent?

I'm developing a project group manager now that DDEVExtensions is no longer supported, I've got a handle on the version info and other project attributes - however I want to access the build events as well.
I've found the two interfaces to use, IOTABuildEventProvider and IOTABuildEvent, but can find no examples, documentation at all anywhere.
Just want to find out how to create a IOTABuildEventProvider from the IOTAProject interface instance I have, and how to use it.
Thanks

How to Configure SonarQube for delphi?

I want to configure SonarQube so it can analyze Delphi project too, and when I search online I saw there used to be a delphi plugin for SonarQube. But when I look at the plugins with the latest build it doesn't show the delphi plugin.
Is the plugin still available in an other way?
Or is it possible to configure SonarQube for delphi without the plugin?
As of G. Ann response was actually discontinued puglin for Sonar, but searching the internet, and recently (3 days) the developer Fabricio Columbus made it happen!
We tested and is running the current version of Sonar:
Compatible with SonarQube 4.5.x and SonarQube 5.1.2
https://github.com/fabriciocolombo/sonar-delphi
Release: https://github.com/fabriciocolombo/sonar-delphi/releases
JAR: https://github.com/fabriciocolombo/sonar-delphi/releases/download/0.3.3-SNAPSHOT/sonar-delphi-plugin-0.3.3-SNAPSHOT.jar
PS: Translated from Portuguese to English by Google Translate.
To analyze the files of language X, you need a plugin for language X that recognize's X's structure, syntax &etc. Without that you can't derive metrics (LOC, complexity, &etc.) or recognize bad code (i.e. raise issues for antipatterns.) So to answer your second question first, you won't be able to analyze Delphi code without some kind of Delphi plugin.
The Delphi plugin was deprecated quite a while ago because it seemed to suffer from a lack of interest all around & didn't evolve to maintain compatibility with the platform as it evolved.
If you look, you can find downloads of the old plugin, but to use it, you'd have to retrogress to a quite old version of the platform, & I don't recommend that. I'm not sure how far back you'd have to go - you could crack open the jar and get that from the pom - but it looks like the last mailing list activity on this plugin was Feb. 2012. So again, I don't recommend going this route.

How to handle project specific components in Delphi?

Let's say we have a team that works on many different projects. Each team member uses different set of visual/non-visual controls/components during it's development cycle. Since Delphi requires each component to be compiled and installed globally in the IDE, how to manage this situation while working with project which was started by the other team member?
It would be great if I could checkout the sources of a project from the version control and have the ability to compile it immediately. I don't care or sometimes don't know what visual or non-visual components are required for this project, I guess they all should be included in the project sources.
Maybe there are some tools which could read main project file or directory and compile/install all the needed components on project loading (and uninstall them when project is closed)?
How do you handle this issue in Delphi?
In our company, we have the same problem.
We solve this by forcing everyone to have all necessary library paths added to their delphi ide.
We are using an additional sdk/framwork repository which containins all components/sdks/frameworks of everyone .
We keep a single text file, listing all libs with its version, install infos, etc.
Everyone checks their wanted libraries, so we do not have double libraries or different versions.
Since we all work under Windows and since Delphi keeps its paths and (afaik) installed-components informations in the registry, we extracted these informations.
We store for each used delphi version a .reg file within the sdk repository trunk.
So, if someone changes a framework, he updates the informations for everyone in the .reg files and commits it.
now, if someone wants to setup their dev-machine, they check-out the sdk, adds the e.g. xe2.reg informations to their registry, then check out the project and ... tada. compiling.
We have not tried to extract the "installed components" packages. thats on our to-do list.
An alternative would be to keep a batch file for building and installing all sdk packages at once. But i do not know if installing components via commandline is possible in delphi.
Something like the JEDI installer would be nice. The installer detects installed Delphi versions and builds & installs everything nicely.
A freely configurable version would be nice, so add all sdks -> install on each version.. perfect.
Anyone who wants to compile a given project must first install any components that project is using. There is no getting around that, unless the project directly includes the components source code and instantiates the components in code instead of using a DFM. AFAIK, there is no IDE tool that will automated component (un)installation on a per-project basis for you.
It's very wise to constraint which components and libraries that will be used by your team. If each member decide which component they will use, your final executable or packages will grow a lot and you can have some incompatibilities between libraries.
Besides, you can have extra costs buying and updating libraries that are very similar. Remember that each time Delphi is updated, you should buy new licences from most of that libraries.
So the best approach is:
ask which libraries each developer are using and discuss with them the real need of each one;
catalog those library required and install them on the machine that you will compile your final code;

Upgrading from Grails 1.0.3 to 1.3.5

I've just inherited an application written in Grails (version 1.0.3) and would like to upgrade it to the newest release (version 1.3.5).
I can't seem to find a reference that enumerates the differences between the two versions. I know there is the "grails upgrade" command - but is this the best option given the large differences in versions.
I have a similar question that I asked today as well for upgrading the version of Groovy, and the sntactical differences to be aware of (between version 1.3.5 and 1.7.5) - but I thought it may be best to separate the two questions to focus on each.
Many thanks,
~Aki
Things have changed quite a bit since 1.0.3, and unfortunately grails upgrade isn't going to do much for you.
Two significant changes that come to mind are that there was a bug in 1.0.3 and previous where 1-many and many-to-many collections (hasMany/belongsTo) were supposed to be lazy-loaded but weren't. This was fixed in 1.0.4 and several users found that they were relying on the behavior and saw issues. Most people didn't, and just saw a significant performance boost. So watch out for lazy loading exceptions.
Another thing that changed is that plugins are no longer in the root of the project in the 'plugins' folder but are now stored under your $HOME/.grails folder. If you've checked the plugins into source control (and especially if you've made any changes) then you can revert to 1.0.x behavior by adding a property to BuildConfig.groovy (a new file that was introduced in 1.1):
grails.project.plugins.dir = 'plugins'
I described my process for upgrading plugins and apps here: How to install Grails plugin from source code? - it's about a plugin project but the same goes for app upgrades.
The log4j configuration changed from one that's properties-based to a DSL. This means that if you leep your config settings from Config.groovy the log4j behavior will be the default, so you'll need to convert that.
Another change that isn't required but should be considered is that Ivy jar file resolution from Maven repos is now preferred over putting jar files in the lib directory. You can still put them in the lib dir, but it's more DRY to have Ivy download them once.
You'll probably also find that some of the plugins you have don't work in 1.3, so there might be some migration work there.
There are two recent books that cover Grails 1.2/1.3, "Grails: A Quick-Start Guide": http://www.amazon.com/dp/1934356468/ and "Getting Started with Grails, 2nd ed": http://www.infoq.com/minibooks/grails-getting-started - you should probably check those out since they're the most current Grails books.
Overall it shouldn't be that bad, as long as you don't try to upgrade in-place. Use the approach I described in the other post I referenced, i.e. create empty apps and diff files to see what changed (basically a 3-way diff).
The newest release is 1.3.6 (as of Dec 15). You can get a list of changes from the Release Notes of each release. Also, the upgrading from previous versions link the documentation is a good source of changes.

Resources