ystsoi/eclipse-fileencodinginfo

Please include build.xml to SVN

GoogleCodeExporter opened this issue · 6 comments

Please include build.xml to SVN.
I want to rewrite this script only for two encoding (UTF-8, ISO-8859-2).

Original issue reported on code.google.com by castus...@gmail.com on 1 Jul 2010 at 7:54

I see.

Because many code files in the plugin reference the CharsetMatch class provided 
by ICU, which provides the automatic detection function. Therefore, the 
simplest change maybe:
1) Create another CharsetMatch class in the same package as other code files, 
which should implement at least two methods, getConfidence and getName.
2) Remove "import com.ibm.icu.text.CharsetMatch;" in code files.
3) Update EncodingUtil.detectCharsets() to always return two CharsetMatch 
objects for the two encodings.

See whether this will work for you.

Original comment by yst...@gmail.com on 1 Jul 2010 at 9:09

Thank you! Unfortunately i`m not JAVA developer, but Front-end dev. I thought 
it would be easier ;)

Original comment by castus...@gmail.com on 1 Jul 2010 at 11:16

The learning curve for plugin development should be steep, especially for 
non-Java developer.

Attached a custom version for you, which just provides two encodings, without 
detection.

Just dropping it into the eclipse\dropins folder is OK.

See whether it is OK.

Original comment by yst...@gmail.com on 1 Jul 2010 at 12:12

Attachments:

Wow man, you are great! Thank you very much, works fine, this is what I was 
looking for!

Original comment by castus...@gmail.com on 1 Jul 2010 at 1:09

I do not have the build.xml too, and I do not know how to create one for 
building the plugin. Any reference?

In the past, I just package the plugin by Export... > Plug-in Development > 
Deployable plug-ins and fragments > ...
For the update site, I just open the site.xml file, and then click the Build or 
Build All button.

And do you mean you want to rewrite the plugin, so that it just detects either 
UTF-8 or ISO-8859-2?

Original comment by yst...@gmail.com on 1 Jul 2010 at 8:27

For me this plugin must have only two options in menu (right click) - UTF-8 and 
ISO-8859-2. No automatic detection, because sometimes when I open file and must 
change encoding to ISO this option isn`t on list.

Original comment by castus...@gmail.com on 1 Jul 2010 at 8:32