Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Platform - User Assistance (UA) » Product Name not getting picked up(Product name not appearing in Infocenter as title)
Product Name not getting picked up [message #845008] Sat, 14 April 2012 16:32 Go to next message
Jeof Ree is currently offline Jeof ReeFriend
Messages: 6
Registered: March 2012
Junior Member
I've created an Eclipse standalone help Infocenter deployed from a .war file, and have been successful at making all the modifications I need, e.g. branding and customizing the top banner and the splash page and so on.

The one thing I can't seem to get is how to get the <title></title> tag in the Infocenter HTML to be populated with the product name. I've set my plugin.xml and config,ini files up according to instructions I see, but so far the product name doesn't seem to be being picked up and put into the browser tab as a title.

I've learned how to tweak the preferences.ini file so that it doesn't print "Help - <product name>" -- which on mine was printing only "Help - " because it's not getting the product name. So now, with nothing in the title tag at all, it just defaults to putting "localhost:8080 etc" on the tab label.

I'll put the contents of my plugin.xml and config.ini files below. I'm not using a "customization.ini" file, my understanding is that I don't need to, since I made all of the modifications for the banner and so on by inserting the HTML and css and image files into the appropriate plugins/jar files inside my plugin, for example org.eclipse.help and org.eclipse.webapp. I can just insert the ones I need into each .war file I create to customize each one, and as I say that parts working fine.

***

Another thing I see is that my Apache Tomcat catalina.out log shows this error:

!ENTRY org.eclipse.update.configurator 4 0 2012-04-14 17:56:38.300
!MESSAGE Unable to find feature.xml in directory: /apache-tomcat/work/Catalina/localhost/com.xxx.xxx/eclipse/features/org.eclipse.help.infocenter_feature_1.0.0.jar


I have the org.eclipse.help.infocenter_feature_1.0.0.jar in my plugin at this location:

com.xxx.xxx/WEB-INF/features/

I realize that the error is saying it's not finding it expanded into the "work" directory, but it must not be finding it in my plugin in that case? Is that location incorrect, in my plugin? The "feature.xml" file is inside of the .jar file, I verified.

I don't know if those two are related, i.e. if the error is why the product name won't be found. Seems more likely I'm just doing something wrong with the plugin.xml and config.ini files.

Thanks,

plugin.xml

Quote:
<?xml version="1.0" encoding="utf-8"?>

<plugin id="com.xxx.xxx" name="XXX Reference Guide">

<extension point="org.eclipse.help.toc">
<toc file="xxx_xxx_.xml" primary="true"/>
</extension>
<extension point="org.eclipse.help.index">
<index file="index.xml"/>
</extension>

<extension id="helpProduct" point="org.eclipse.core.runtime.products">
<product name="XXX Reference Guide" application="" />
</extension>



</plugin>




config.ini

Quote:
#Eclipse Runtime Configuration File
#Substitute the product name below with the name of your product plugin if you want to be able to
#customize the help appearance

#eclipse.product=org.eclipse.productname


eclipse.product=com.xxx.xxx.helpProduct


osgi.bundles=org.eclipse.equinox.common@2:start, org.eclipse.update.configurator@start, org.eclipse.equinox.http.servletbridge@start,org.eclipse.equinox.http.registry@start, org.eclipse.help.webapp@start
osgi.bundles.defaultStartLevel=4




Re: Product Name not getting picked up [message #845895 is a reply to message #845008] Sun, 15 April 2012 14:23 Go to previous messageGo to next message
Leona Campbell is currently offline Leona CampbellFriend
Messages: 6
Registered: March 2012
Junior Member
Hi Jeof,
The title element that you see in a browser is identified in the plugin.properties file using a line that says:
name = titleofpage

I changed it the other day and I also had to clear the cache for it to show up. The way I do this is for each directory listed below, I run the command listed after it:

$ECLIPSE_DOCS_HOME/configuration/org.eclipse.help.base/
rm -rf index
$ECLIPSE_DOCS_HOME/configuration/org.eclipse.core.runtime/
rm-rf .*
$ECLIPSE_DOCS_HOME/configuration/org.eclipse.osgi/manifests/
rm -rf *


hth,
Leona
Re: Product Name not getting picked up [message #846866 is a reply to message #845895] Mon, 16 April 2012 20:39 Go to previous messageGo to next message
Jeof Ree is currently offline Jeof ReeFriend
Messages: 6
Registered: March 2012
Junior Member
Leona,

Oops. I forgot to include the contents of my plugin.properties file, mine contains this:

Quote:


# NLS_MESSAGEFORMAT_NONE
# NLS_ENCODING=UTF-8
name=ABC Reference Guide

providerName=DITA



My understanding was that the plugin declared the id, the config.ini file identified the directory, and that directed the system to pick up the product name from the plugin.properties file.

For the cache, I'm not using Eclipse to launch this but deploying it inside a.war file in an Apache Tomcat server. I do have to delete the Tomcat's "work" directory and the old .war file in its Webapps folder sometimes to make sure I deploy the new one I drop in, but that does seem to work, that is, I see my latest changes.

So I still don't understand what's missing. Something, clearly. Thanks very much for the help though, I really appreciate it.

Re: Product Name not getting picked up [message #846935 is a reply to message #846866] Mon, 16 April 2012 22:13 Go to previous messageGo to next message
Leona Campbell is currently offline Leona CampbellFriend
Messages: 6
Registered: March 2012
Junior Member
Bummer, I wish I could have helped! I'm not sure if this makes a difference, but I have a space before and after the "=" sign:

name = ABC Reference Guide

instead of

name=ABC Reference Guide
Re: Product Name not getting picked up [message #846959 is a reply to message #846935] Mon, 16 April 2012 22:44 Go to previous messageGo to next message
Jeof Ree is currently offline Jeof ReeFriend
Messages: 6
Registered: March 2012
Junior Member
Thanks, I do appreciate it.

I added the spaces (had noticed that too) and still no dice.

I actually had the plugin.xml and config.ini content all wrong above - or, well who knows, since I'm following a bunch of different models that I've found. For what it's worth, I now have those two like this:

plugin.xml

Quote:
<?xml version="1.0" encoding="utf-8"?>
<plugin name = "%name" id = "my.customization.doc" version = "1.0">

<extension point="org.eclipse.help.toc">
<toc file="customize.xml" primary="true"/>
</extension>
<extension point="org.eclipse.help.index">
<index file="index.xml"/>
</extension>

<extension id="helpProduct" point="org.eclipse.core.runtime.products">
<product name="%name" application="" />
</extension>

</plugin>



config.ini

Quote:
eclipse.product=my.customization.doc.helpProduct

osgi.bundles=org.eclipse.equinox.common@2:start, org.eclipse.update.configurator@start, org.eclipse.equinox.http.servletbridge@start,org.eclipse.equinox.http.registry@start, org.eclipse.help.webapp@start
osgi.bundles.defaultStartLevel=4



The names have also changed because I'm now trying to do this in a separate "customization plugin", one that has no content and is just for branding. This makes sense just because every time I generate the other plugins, it will replace the plugin.xml and plugin.properties files, whereas this empty branding plugin can just reside in the template war file's plugins folder and control the customization. The only problem is, that title still won't appear.

The weird part is that everything else works, just not that product name.

Thanks,
Re: Product Name not getting picked up [message #847776 is a reply to message #846959] Tue, 17 April 2012 16:40 Go to previous messageGo to next message
Leona Campbell is currently offline Leona CampbellFriend
Messages: 6
Registered: March 2012
Junior Member
I'm stumped! The only other suggestion I can come up with is that I used Firebug in FireFox to inspect the title element and then I searched for that element in my source. Good luck!
Re: Product Name not getting picked up [message #847972 is a reply to message #847776] Tue, 17 April 2012 20:58 Go to previous messageGo to next message
Jennifer Skiendzielewski is currently offline Jennifer SkiendzielewskiFriend
Messages: 31
Registered: January 2010
Location: Boulder, CO
Member
I fought this problem a while ago too... And I never managed to get <product name="%name" application="" /> to work for me. I was able to get the product name to show up by hard coding it in the plugin.xml like you did in your original example. If there's always going to be a 1:1 correspondence between those files, it seems like an OK time to do some hard-coding-- at least to get it to work!

A couple other questions:
1. What version of eclipse are you using? What OS are you running on?
2. (And I apologize if this sounds simplistic and repetitious), but you are clearing out your configuration directory of almost everything before you restart, right? That directory is my nemesis.

Re: Product Name not getting picked up [message #848325 is a reply to message #847972] Wed, 18 April 2012 05:50 Go to previous messageGo to next message
Jeof Ree is currently offline Jeof ReeFriend
Messages: 6
Registered: March 2012
Junior Member
Actually I can't even get it to pick it up from the plugin.xml file as written, I'd be thrilled to just have it hard coded without the %name function.

When you say "configuration directory", do you mean something in Eclipse? I'm assembling this inside a .war archive and deploying it using an Apache Tomcat server, not in Eclipse. I do have to do something similar in Tomcat to make sure I get the new stuff also.

I actually tried yesterday to launch the plugin in Eclipse (just using a command, I don't actually fire up the Eclipse user interface) and that way, I was able to at least get my plugin_customization.ini file customizations to show up, by using a -plugincustomization argument in the startup command. There must be some way to supply that same thing inside the .war file, since the only command I use to start is an Apache Tomcat start command and that's unrelated to Eclipse, i.e., I'm sure the above argument wouldn't work.

That still doesn't address this product name/title issue, since even when launched from Eclipse, and with the plugin_customization.ini modifications getting picked up, I still had nothing in the browser tab as a title.

I'm starting to think that I'm going to have to live with "Help - " as our browser tab title for both my Infocenters, because everything else works, and I've asked half the world now about it and nothing I've tried works.

Thanks for the help though, appreciate it.
Re: Product Name not getting picked up [message #848330 is a reply to message #847776] Wed, 18 April 2012 05:57 Go to previous messageGo to next message
Jeof Ree is currently offline Jeof ReeFriend
Messages: 6
Registered: March 2012
Junior Member
You know, I tried that also, chasing it all over the files, expanding all of the jar bundles and so on. I found "Help - " in content.jsp and help.jsp, but changing it there had no effect. I would be happy to just hard code "Help - " to read what I need it to instead.

Anyway thanks again.
Re: Product Name not getting picked up [message #987132 is a reply to message #848325] Fri, 23 November 2012 17:27 Go to previous message
Tim Raff is currently offline Tim RaffFriend
Messages: 9
Registered: November 2012
Junior Member
I think if you want the plugin customizations to be picked up, they need to be specified in the product, so instead of ...
<extension id="helpProduct" point="org.eclipse.core.runtime.products">
<product name="%name" application="" />
</extension>

I think it should be something like...
<extension id="helpProduct" point="org.eclipse.core.runtime.products">
<product name="%name" application="org.eclipse.help.base.helpApplication">
         <property
               name="preferenceCustomization"
               value="plugin_customization.ini">
         </property>
      </product>
</extension>


wrt the %name construct, I understand this is really for national language support and I think if you use this, then you will need a plugin.properties file that provides the strings. So for example, if you have %name in your plugin.xml file, you will need a plugin.properties file that looks like this:
name=whatever you want in the title bar

You will also need to add the following line to your MANIFEST.MF file to get the plugin to use the localized strings:
Bundle-Localization: plugin


Hope this helps.

[Updated on: Fri, 23 November 2012 18:07]

Report message to a moderator

Previous Topic:Forcing the URL of standalone infocenter to show full path to topic
Next Topic:Companies using Infocenter?
Goto Forum:
  


Current Time: Sun Dec 21 22:32:15 GMT 2014

Powered by FUDForum. Page generated in 0.02148 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software