Eclipse plugin to automatically generate a template TLD file - eclipse

Is there and Eclipse plugin to automatically generate a template TLD file (.tld) when writing custom tags?
Thanks to nitind answer :
Eclipse:

You can create one using the New XML File wizard; the DTD and schema files for tag libraries should be in the built-in catalog.
If you're building .tag files, you won't need one.

Related

how to use .less files in adobe CQ5?

i'm new in Adobe CQ5, and developing CMS Application using this, i create ClienLibraryFolder in following directory:
/etc/designs/MySiteName/ClientLibFolder/MyLess.less
but when i'm using this on .jsp file it is not design anything what i defined in .less file, while using .css files i'm getting all things. can anyone suggest me what i'm missing here
I assume you have added the MyLess.less to the css.txt in /etc/designs/MySiteName/ClientLibFolder.
The next step would be to ensure the OSGI bundle is running which compiles the less file. For information on where the bundle is located you can refer to this blog post http://www.citytechinc.com/us/en/blog/2012/08/less_css_in_adobecq.html

Customize reports.html file inside jbehave\view folder

I have to customize the reports.html file created inside jbehave\view folder. Is there any example available for the same.
You must check this official reference.
I managed to customize it by simply copying the jbehave-reports.ftl file from the JBehave jar into my test resources under the ftl directory. JBehave obviously reads the template from classpath at ftl/jbehave-reports.ftl, so the project-local file overrides the file from the jar.

How Eclipse download and store XSD external files?

When I open XSD file in Eclipse( in XSD Editor), it download all xsd:import's are contained in file. But if I don't have internet, editor cannot download, it's obvious. In preferences(Window -> Preferences) is XML-> XML Catalog. Is possible add my xsd:import (xsd files) to catalog and Eclipse will use it in offline mode?
Yes you can add your xsd/dtd file to the catalog.
I did it like this (for test) and eclipse does not complain:
Entry element: URI
Location: C:\Users\me\Desktop\log4j.dtd
URI: file:///C:/Users/me/Desktop/log4j.dtd
Key type: URI
Key: http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/xml/doc-files/log4j.dtd
I used the native URL in my log4j.xml afterwards
<!DOCTYPE log4j:configuration SYSTEM "http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/xml/doc-files/log4j.dtd">
I suppose this should also work with xsd files.
This comes from another answer from me.

Programmatically remove linked files from the project in eclipse

I'm developing plugin for Eclipse. This plugin nothing else but the wizard to allows user to create its own file format with inbuilt jar files inside. All the JARs inside are linked resources for the project.
To clean the project I need to remove all the linked JARs from the project programmatically.
Are there any suggestions how to do that?
how to search files by mask?
how to know that this is linked file?
and how to remove linked resource?

Externalizing strings in plugin.xml for Eclipse plugin

How do I externalize strings in my Eclipse plugin's plugin.xml?
Right-clicking on the plugin project > PDE Tools > Externalize Strings does not show up my plugin.
I'm trying to do this manually now. I added entries in plugin.properties and replaced the equivalent string in plugin.xml with a % sign followed by the string key. But that does not seem to work. What am I missing here?
I finally figured out how to manually externalize the plugin.
Eclipse, it turns out, externalizes plugin.xml this way:
In the plugin manifest (META-INF/MANIFEST.MF), add the following line
Bundle-Localization: plugin
where you intend to store the externalized strings in a file called "plugin.properties" (Turns out this was the missing piece).
Add the externalized string key-value pairs in plugin.properties.
Replace the actual strings in plugin.xml with the keys from plugin.properties (prefixed with %).
If your working set have plugin projects in it, the Externalize Strings wizard to help externalize strings in your Manifest and plugin.xml files should be available.
Externalizing manifest files extracts translatable strings and stores them in a properties file for multi-language support.
The wizard is available under the PDE Tools menu in the context menu of a PDE project's MANIFEST.MF or plugin.xml files.
(source: eclipse.org)
Be aware that there were some bugs related to detecting all non-externalized attributes/values of the <extension-point> and <extension> elements, or showing up un-externalized names of extension(-point), which are only solved in 3.4 or very recent 3.5M4.
However, if the "Externalize Strings" menu does not show up at all on your plugin projects, may be its "project nature" is corrupted somehow, may be your former Java project is not properly converted to a PDE project ?
So two suggestions:
try with a fresh install of an eclipse3.5M4
import your plugin project and check its nature
And then tell us if that menu is still unavailable.
As you mention in your own answer, the externalization process is declared by the string
Bundle-Localization: plugin
in the MANIFEST.MF file, as mentioned in this message.
A bug has been created, but:
The localization is not something specific to PDE but instead the OSGI specification
that line is not always in the MANIFEST:
Prior to 3.3, we created all our manifests by creating a plugin.xml and then
converting it. The converter always added "Bundle-Localization: plugin" to the
Manifest, since that is the default location if the plug-in has no Manifest.
If a plug-in had no translations files, this header was unnecessary bloat.
In 3.3, we created plug-in projects by creating Manifest directly, which means we
decided to create only the headers necessary for project creation.
it is likely to be an issue for those that have created bundles with
externalization < 3.2, and then not being able to see them when running in 3.3.