Login  Register

Re: svn commit: r818850 - in /ofbiz/trunk: applications/commonext/documents/ApacheOfbizTechnical.xml applications/content/data/ContentHelpData.xml applications/content/data/ContentTypeData.xml framework/base/src/org/ofbiz/base/util/UtilMisc.java

Posted by Jacques Le Roux on Sep 27, 2009; 6:36am
URL: http://ofbiz.116.s1.nabble.com/Re-svn-commit-r818850-in-ofbiz-trunk-applications-commonext-documents-ApacheOfbizTechnical-xml-applia-tp207965p207974.html

I don't know for Galileo, but I think I will very appreciate WYSIWG Oxygen dockook editing...
And I hate Galileo XML editor when it automatically put --> as soon as you habe typed <!--. Maybe there is a parameter though ?

For the moment I keep Ganymede (and Oxygen ;o)

Jacques

From: "Hans Bakker" <[hidden email]>

> The advantages of Galileo are the xml editor which is really useful now,
> do not need Oxygen anymore... and the java editor which has a lot of
> enhancements.
>
> regards,
> Hans
>
> On Sun, 2009-09-27 at 10:27 +0530, Ashish Vijaywargiya wrote:
>> I am also using Ganymede & as far as my personal experience with Ganymede is
>> concerned in last 10 months - it is very stable and fast.
>>
>> I was thinking to start using Galileo before few days and then I checked its
>> feature list but  didn't find any feature much useful in our development. So
>> I decided to keep myself stick with Ganymede.
>>
>> --
>> Ashish
>>
>> On Sat, Sep 26, 2009 at 3:11 PM, Jacques Le Roux <
>> [hidden email]> wrote:
>>
>> > Hi Hans,
>> >
>> > I just tried Ctrl+I and I have no tabs problems.
>> > I have "heard" that last version (Galileo) has such a problem. I still use
>> > Ganymede (version: 3.4.2 Build id: M20090211-1700) since Galileo does not
>> > bring much to me.
>> >
>> > Jacques
>> >
>> > From: "Hans Bakker" <[hidden email]>
>> >
>> >  What i just did was removing the 2 tabs you reported, and then did a
>> >> control-i to automatically indent the code.
>> >>
>> >> it looks like the Eclipse project assumes that using tabs is normally
>> >> the standard. Although the java editor is set to spaces for tabs, the
>> >> control-i does include them again.
>> >>
>> >> it looks like we cannot use Eclipse for the OFBiz project.
>> >>
>> >> removed the tabs by hand.
>> >>
>> >> Regards,
>> >> Hans
>> >>
>> >>
>> >> On Fri, 2009-09-25 at 19:42 +0530, Ashish Vijaywargiya wrote:
>> >>
>> >>> Hans,
>> >>>
>> >>> I noticed that you have replaced the method - which is very good.
>> >>> But now I see lot of *tabs* in your code.
>> >>> I am surprised to see how you can miss such things after seeing so many
>> >>> comments on your work.
>> >>> Can you please take care of this code ASAP? - Thanks!
>> >>>
>> >>> -            out.close();
>> >>> -        }
>> >>> +    public static void copyFile(File sourceLocation , File
>> >>> targetLocation) throws IOException {
>> >>> +    if (sourceLocation.isDirectory()) {
>> >>> +    throw new IOException("File is a directory, not a file, cannot
>> >>> copy") ;
>> >>> +    } else {
>> >>> +
>> >>> +    InputStream in = new FileInputStream(sourceLocation);
>> >>> +    OutputStream out = new FileOutputStream(targetLocation);
>> >>> +
>> >>> +    // Copy the bits from instream to outstream
>> >>> +    byte[] buf = new byte[1024];
>> >>> +    int len;
>> >>> +    while ((len = in.read(buf)) > 0) {
>> >>> +    out.write(buf, 0, len);
>> >>> +    }
>> >>> +    in.close();
>> >>> +    out.close();
>> >>> +    }
>> >>>     }
>> >>>  }
>> >>>
>> >>> --
>> >>> Regards
>> >>> Ashish Vijaywargiya
>> >>> HotWax Media Pvt. Ltd.
>> >>> http://www.hotwaxmedia.com
>> >>>
>> >>> Helping hand around the World ...
>> >>> USA | Italy | New Zealand | India
>> >>>
>> >>>
>> >>>
>> >>> [hidden email] wrote:
>> >>> > Author: hansbak
>> >>> > Date: Fri Sep 25 13:37:35 2009
>> >>> > New Revision: 818850
>> >>> >
>> >>> > URL: http://svn.apache.org/viewvc?rev=818850&view=rev
>> >>> > Log:
>> >>> > added a chapter how to internationalize the help files show with:
>> >>> >
>> >>> http://localhost:8080/cmssite/cms/APACHE_OFBIZ_HTML#helpInternationalization
>> >>> >
>> >>> > Modified:
>> >>> >
>> >>> ofbiz/trunk/applications/commonext/documents/ApacheOfbizTechnical.xml
>> >>> >     ofbiz/trunk/applications/content/data/ContentHelpData.xml
>> >>> >     ofbiz/trunk/applications/content/data/ContentTypeData.xml
>> >>> >     ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilMisc.java
>> >>> >
>> >>> > Modified:
>> >>> ofbiz/trunk/applications/commonext/documents/ApacheOfbizTechnical.xml
>> >>> > URL:
>> >>> >
>> >>> http://svn.apache.org/viewvc/ofbiz/trunk/applications/commonext/documents/ApacheOfbizTechnical.xml?rev=818850&r1=818849&r2=818850&view=diff
>> >>> >
>> >>> ==============================================================================
>> >>> > ---
>> >>> ofbiz/trunk/applications/commonext/documents/ApacheOfbizTechnical.xml
>> >>> (original)
>> >>> > +++
>> >>> ofbiz/trunk/applications/commonext/documents/ApacheOfbizTechnical.xml Fri
>> >>> Sep 25 13:37:35 2009
>> >>> > @@ -222,6 +222,30 @@
>> >>> >              </orderedlist>
>> >>> >          </para>
>> >>> >      </section>
>> >>> > +    <section>
>> >>> > +        <title><anchor
>> >>> id="helpInternationalization"/>Internationalization of the help
>> >>> system</title>
>> >>> > +        <para>
>> >>> > +            Because the help system is making use of the content
>> >>> component, internationalization of the help files is very
>> >>> > easy because
>> >>> > +            it is a basic function of the content component. If you
>> >>> want to make a translation of an existing help file, make
>> >>> > a copy in the same directory
>> >>> > +            and make it unique by attaching the "_languageCode" at he
>> >>> end.
>> >>> > +            Create, as also was done for the english version a
>> >>> dataresource and content record in the
>> >>> > data/${componentName}HelpData.xml file.
>> >>> > +            Then create an ContentAssoc record in
>> >>> data/${componentName}HelpData.xml file to associate this new file with the
>> >>> > english file with the type
>> >>> > +            ALTERNATE_LOCALE. Please find below an example from the
>> >>> ContentHelpData.xml for a Dutch version of the root help
>> >>> > file.
>> >>> > +            <programlisting>
>> >>> > +    &lt;!-- how to create alternative locales --&gt;
>> >>> > +    &lt;DataResource dataResourceId="HELP_ROOT_NL" localeString="nl"
>> >>> dataResourceTypeId="OFBIZ_FILE"
>> >>> > +
>> >>>  objectInfo="applications/content/data/helpdata/HELP_ROOT_NL.xml"
>> >>> dataTemplateTypeId="NONE" statusId="CTNT_IN_PROGRESS"
>> >>> > +        dataResourceName="Help system root" mimeTypeId="text/xml"
>> >>> isPublic="Y" /&gt;
>> >>> > +    &lt;Content contentId="HELP_ROOT_NL" contentTypeId="DOCUMENT"
>> >>> templateDataResourceId="HELP_TEMPL"
>> >>> > +        dataResourceId="HELP_ROOT_NL" localeString="nl"
>> >>> statusId="CTNT_IN_PROGRESS"
>> >>> > +        contentName="Help system root in dutch"
>> >>> mimeTypeId="text/html"/&gt;
>> >>> > +    &lt;ContentAssoc contentId="HELP_ROOT" contentIdTo="HELP_ROOT_NL"
>> >>> > +        contentAssocTypeId="ALTERNATE_LOCALE" fromDate="2006-01-12
>> >>> 01:01:01"/&gt;
>> >>> > +            </programlisting>
>> >>> > +            The switching between locales is from then on completely
>> >>> automatic.
>> >>> > +        </para>
>> >>> > +    </section>
>> >>> > +
>> >>> >      </appendix>
>> >>> >
>> >>> >      <appendix>
>> >>> >
>> >>> > Modified: ofbiz/trunk/applications/content/data/ContentHelpData.xml
>> >>> > URL:
>> >>> >
>> >>> http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/data/ContentHelpData.xml?rev=818850&r1=818849&r2=818850&view=diff
>> >>> >
>> >>> ==============================================================================
>> >>> > --- ofbiz/trunk/applications/content/data/ContentHelpData.xml
>> >>> (original)
>> >>> > +++ ofbiz/trunk/applications/content/data/ContentHelpData.xml Fri Sep
>> >>> 25 13:37:35 2009
>> >>> > @@ -34,7 +34,9 @@
>> >>> >      <DataResource dataResourceId="HELP_ROOT" localeString="en"
>> >>> dataResourceTypeId="OFBIZ_FILE"
>> >>> > objectInfo="applications/content/data/helpdata/HELP_ROOT.xml"
>> >>> dataTemplateTypeId="NONE" statusId="CTNT_IN_PROGRESS"
>> >>> > dataResourceName="Help system root" mimeTypeId="text/xml" isPublic="Y"
>> >>> />
>> >>> >      <Content contentId="HELP_ROOT" contentTypeId="DOCUMENT"
>> >>> templateDataResourceId="HELP_TEMPL" dataResourceId="HELP_ROOT"
>> >>> > localeString="en" statusId="CTNT_IN_PROGRESS" contentName="Help system
>> >>> root" mimeTypeId="text/html"/>
>> >>> >      <DataResource dataResourceId="HELP_ROOT_NL" localeString="nl"
>> >>> dataResourceTypeId="OFBIZ_FILE"
>> >>> > objectInfo="applications/content/data/helpdata/HELP_ROOT_NL.xml"
>> >>> dataTemplateTypeId="NONE" statusId="CTNT_IN_PROGRESS"
>> >>> > dataResourceName="Help system root" mimeTypeId="text/xml" isPublic="Y"
>> >>> />
>> >>> > +
>> >>> >      <!-- how to create alternative locales -->
>> >>> > +    <DataResource dataResourceId="HELP_ROOT_NL" localeString="nl"
>> >>> dataResourceTypeId="OFBIZ_FILE"
>> >>> > objectInfo="applications/content/data/helpdata/HELP_ROOT_NL.xml"
>> >>> dataTemplateTypeId="NONE" statusId="CTNT_IN_PROGRESS"
>> >>> > dataResourceName="Help system root" mimeTypeId="text/xml" isPublic="Y"
>> >>> />
>> >>> >      <Content contentId="HELP_ROOT_NL" contentTypeId="DOCUMENT"
>> >>> templateDataResourceId="HELP_TEMPL"
>> >>> > dataResourceId="HELP_ROOT_NL" localeString="nl"
>> >>> statusId="CTNT_IN_PROGRESS" contentName="Help system root in dutch"
>> >>> > mimeTypeId="text/html"/>
>> >>> >      <ContentAssoc contentId="HELP_ROOT" contentIdTo="HELP_ROOT_NL"
>> >>> contentAssocTypeId="ALTERNATE_LOCALE" fromDate="2006-01-12
>> >>> > 01:01:01"/>
>> >>> >
>> >>> >
>> >>> > Modified: ofbiz/trunk/applications/content/data/ContentTypeData.xml
>> >>> > URL:
>> >>> >
>> >>> http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/data/ContentTypeData.xml?rev=818850&r1=818849&r2=818850&view=diff
>> >>> >
>> >>> ==============================================================================
>> >>> > --- ofbiz/trunk/applications/content/data/ContentTypeData.xml
>> >>> (original)
>> >>> > +++ ofbiz/trunk/applications/content/data/ContentTypeData.xml Fri Sep
>> >>> 25 13:37:35 2009
>> >>> > @@ -265,7 +265,4 @@
>> >>> >      <DataResource dataResourceId="DOCBOOK_HTML_TEMPL"
>> >>> dataResourceTypeId="OFBIZ_FILE"
>> >>> > objectInfo="applications/content/template/docbook/html/docbook.xsl"
>> >>> dataTemplateTypeId="XSLT" statusId="CTNT_IN_PROGRESS"
>> >>> > dataResourceName="Help template file" mimeTypeId="text/html"
>> >>> isPublic="Y"/>
>> >>> >      <DataResource dataResourceId="DOCBOOK_PDF_TEMPL"
>> >>> dataResourceTypeId="OFBIZ_FILE"
>> >>> > objectInfo="applications/content/template/docbook/fo/docbook.xsl"
>> >>> dataTemplateTypeId="XSLT" statusId="CTNT_IN_PROGRESS"
>> >>> > dataResourceName="Help template file" mimeTypeId="text/html"
>> >>> isPublic="Y"/>
>> >>> >
>> >>> > -    <!-- localization example file -->
>> >>> > -    <DataResource dataResourceId="HELP_ROOT_NL" localeString="nl"
>> >>> dataResourceTypeId="OFBIZ_FILE"
>> >>> > objectInfo="applications/content/data/helpdata/HELP_ROOT_NL.xml"
>> >>> dataTemplateTypeId="NONE" statusId="CTNT_IN_PROGRESS"
>> >>> > dataResourceName="Help system root" mimeTypeId="text/xml" isPublic="Y"
>> >>> />
>> >>> > -
>> >>> >  </entity-engine-xml>
>> >>> >
>> >>> > Modified:
>> >>> ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilMisc.java
>> >>> > URL:
>> >>> >
>> >>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilMisc.java?rev=818850&r1=818849&r2=818850&view=diff
>> >>> >
>> >>> ==============================================================================
>> >>> > --- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilMisc.java
>> >>> (original)
>> >>> > +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilMisc.java
>> >>> Fri Sep 25 13:37:35 2009
>> >>> > @@ -1014,23 +1014,22 @@
>> >>> >              this.wait(timeout);
>> >>> >          }
>> >>> >      }
>> >>> > - public static void copyFile(File sourceLocation , File
>> >>> targetLocation) throws IOException {
>> >>> > -
>> >>> > -        if (sourceLocation.isDirectory()) {
>> >>> > -                throw new IOException("File is a directory, not a
>> >>> file, cannot copy") ;
>> >>> > -        } else {
>> >>> > -
>> >>> > -        InputStream in = new FileInputStream(sourceLocation);
>> >>> > -             OutputStream out = new FileOutputStream(targetLocation);
>> >>> > -
>> >>> > -            // Copy the bits from instream to outstream
>> >>> > -            byte[] buf = new byte[1024];
>> >>> > -            int len;
>> >>> > -            while ((len = in.read(buf)) > 0) {
>> >>> > -                out.write(buf, 0, len);
>> >>> > -            }
>> >>> > -            in.close();
>> >>> > -            out.close();
>> >>> > -        }
>> >>> > +    public static void copyFile(File sourceLocation , File
>> >>> targetLocation) throws IOException {
>> >>> > +    if (sourceLocation.isDirectory()) {
>> >>> > +    throw new IOException("File is a directory, not a file, cannot
>> >>> copy") ;
>> >>> > +    } else {
>> >>> > +
>> >>> > +    InputStream in = new FileInputStream(sourceLocation);
>> >>> > +    OutputStream out = new FileOutputStream(targetLocation);
>> >>> > +
>> >>> > +    // Copy the bits from instream to outstream
>> >>> > +    byte[] buf = new byte[1024];
>> >>> > +    int len;
>> >>> > +    while ((len = in.read(buf)) > 0) {
>> >>> > +    out.write(buf, 0, len);
>> >>> > +    }
>> >>> > +    in.close();
>> >>> > +    out.close();
>> >>> > +    }
>> >>> >      }
>> >>> >  }
>> >>> >
>> >>> >
>> >>> >
>> >>>
>> >> --
>> >> Antwebsystems.com: Quality OFBiz services for competitive rates
>> >>
>> >>
>> >
>> >
>> >
> --
> Antwebsystems.com: Quality OFBiz services for competitive rates
>