[dev] Toolbar naming - Previously - Re: [dev] Error log and debugging an extension

2009-01-05 Thread Karthik Sudarshan

Hi Ariel,
   Thanks for the pointer. But as in the mail thread I have the same 
problem that the Add-on 1 doesn't change even after adding the 
WindowState.xcu file. I just tested it with WriterWindowState.xcu 
example file that you had provided and still no change. I've ensured 
that the node:name value in Addons.xcu and the name in the 
WriterWindowState.xcu are the same and the entry has been added to the 
manifest file as well. Is there anything else that I need to be looking 
into? Also if I need this toolbar in all the OOo modules, should I add 
one WindowState.xcu file for each module??


-Karthik

PS : I'll make sure that I start a new thread for every new issue from 
the next time :)


Ariel Constenla-Haile wrote:

Hi Karthik,

Karthik Sudarshan escribió:

Thanks Ariel for the help.

I was already using NB for development, and the debug was giving me 
problems, 


why didn't you use then the OOo API plug-in for NB IDE?
Things are more easy with the plug-in, than just creating a new Java 
project with a custom ant build script.


but now it looks like they have been resolved (just needed to be 
patient since the message said Listening to port  but the 
OpenOffice process was started after the deployment of extension , 
i.e., the Extension manager window would come and after closing that 
the main OpenOffice window would start and after this the breakpoint 
was hit).


I had given up and after your mail, gave it another shot, and it 
worked :)


I have another doubt though. 


it would be nice a new thread for a new doubt :-)

When the project was created in NB, I added a Menu and a Toolbar. The 
Menu's name/title is appropriately picked up from Addons.xcu file and 
shows the name I've entered, but the Toolbar's name always comes as 
Add-on 1. How can I fix this?


the toolbar title is specified in the window state configuration for 
the module (Writer, Calc, Base, etc.) where your toolbar is to be 
displayed. See 
http://api.openoffice.org/servlets/ReadMsg?list=devmsgNo=19190


I don't know if there is an issue/RFE for this, but the toolbar title 
should be set in the Addons.xcu, it's more logical.



Regards



-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org



Re: [dev] Toolbar naming - Previously - Re: [dev] Error log and debugging an extension

2009-01-05 Thread Ariel Constenla-Haile

Hi Karthik

seems Oliver was faster. I tested it and worked ok too.

Karthik Sudarshan escribió:

Hi Oliver,
   Thanks for the reply and the test.oxt file. It worked for me too 
after removing the files from user\registry\data directory. Since you 
didn't have it in your box, there was nothing in the cache and it worked 
for you too.


that's way I strongly suggest not to install - while developing - the 
extension in your common OOo installation; use instead the debug option 
in the OOo API NB plug-in: this way, the user directory is created 
inside the project's build dir, and if anything goes wrong you just 
clean the project (this will erase the build dir. with the user dir.).


Regards
--
Ariel Constenla-Haile
La Plata, Argentina


Aus der Kriegsschule des Lebens
- Was mich nicht umbringt,
macht mich härter.
Nietzsche Götzendämmerung, Sprüche und Pfeile, 8.

-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org



Re: [dev] Toolbar naming - Previously - Re: [dev] Error log and debugging an extension

2009-01-05 Thread Karthik Sudarshan

Hi Oliver,
   Thanks for the reply and the test.oxt file. It worked for me too 
after removing the files from user\registry\data directory. Since you 
didn't have it in your box, there was nothing in the cache and it worked 
for you too.


Thanks a lot for your help :)

-Karthik

Oliver Brinzing wrote:

Hi Karthik,

i simply added your files to a zip archive (test.oxt) and it works.
Test Name is shown as title if i open a *writer* document ...

test.oxt zip-archive:

+ META-INF
   manifest.xml
Addons.xcu
WriterWindowState.xcu

of course, the Command0 is disabled, cause i don't have the 
protocolhandler.xcu and *.jar file.
(i also removed the two entries form the manifest.xml ...)

to check, if deployment worked look at:

.\uno_packages\cache\registry\com.sun.star.comp.deployment.configuration.PackageRegistryBackend\registry\data\org\openoffice\Office

oo will merge the *.xcu files from all extensions to the specfic files you will 
find there.
for example all Addons.xcu are merged into the Addons.xcu at this place.

i will send you the test.oxt via email ...

regards

Oliver

  



-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org



Re: [dev] Toolbar naming - Previously - Re: [dev] Error log and debugging an extension

2009-01-05 Thread Oliver Brinzing
Hi Karthik,

i simply added your files to a zip archive (test.oxt) and it works.
Test Name is shown as title if i open a *writer* document ...

test.oxt zip-archive:

+ META-INF
   manifest.xml
Addons.xcu
WriterWindowState.xcu

of course, the Command0 is disabled, cause i don't have the 
protocolhandler.xcu and *.jar file.
(i also removed the two entries form the manifest.xml ...)

to check, if deployment worked look at:

.\uno_packages\cache\registry\com.sun.star.comp.deployment.configuration.PackageRegistryBackend\registry\data\org\openoffice\Office

oo will merge the *.xcu files from all extensions to the specfic files you will 
find there.
for example all Addons.xcu are merged into the Addons.xcu at this place.

i will send you the test.oxt via email ...

regards

Oliver

-- 

GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45



signature.asc
Description: OpenPGP digital signature


Re: [dev] Toolbar naming - Previously - Re: [dev] Error log and debugging an extension

2009-01-05 Thread Karthik Sudarshan
Thanks Ariel. Yup I understand it now, and will use the debug option 
going forward.


-Karthik

Ariel Constenla-Haile wrote:

Hi Karthik

seems Oliver was faster. I tested it and worked ok too.

Karthik Sudarshan escribió:

Hi Oliver,
   Thanks for the reply and the test.oxt file. It worked for me too 
after removing the files from user\registry\data directory. Since you 
didn't have it in your box, there was nothing in the cache and it 
worked for you too.


that's way I strongly suggest not to install - while developing - the 
extension in your common OOo installation; use instead the debug 
option in the OOo API NB plug-in: this way, the user directory is 
created inside the project's build dir, and if anything goes wrong you 
just clean the project (this will erase the build dir. with the user 
dir.).


Regards



-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org



Re: [dev] Toolbar naming - Previously - Re: [dev] Error log and debugging an extension

2009-01-05 Thread Ariel Constenla-Haile

Hi Karthik,

Karthik Sudarshan escribió:

Hi Ariel,
   Thanks for the pointer. But as in the mail thread I have the same 
problem that the Add-on 1 doesn't change even after adding the 
WindowState.xcu file. I just tested it with WriterWindowState.xcu 
example file that you had provided and still no change. I've ensured 
that the node:name value in Addons.xcu and the name in the 
WriterWindowState.xcu are the same and the entry has been added to the 
manifest file as well. Is there anything else that I need to be looking 
into? 


your enumeration seems to be complete.
Just make sure that:

* if in Addons.xcu you have a toolbar

node oor:name=AddonUI
node oor:name=OfficeToolBar
node oor:name=ar.com.arielconstenlahaile.demo 
oor:op=replace

...

in *WindowState.xcu yo have

node oor:name=UIElements
node oor:name=States
node 
oor:name=private:resource/toolbar/addon_ar.com.arielconstenlahaile.demo 
oor:op=replace



that is: the name for the States node has the following schema

private:resource/toolbar/addon_[the name of the toolbar in Addons.xcu]


* *WindowState.xcu has the correct package name:
 for example, for OOo Calc's window state
oor:component-data xmlns:oor=http://openoffice.org/2001/registry; 
xmlns:xs=http://www.w3.org/2001/XMLSchema; oor:name=CalcWindowState 
oor:package=org.openoffice.Office.UI


* this is added to the manifest, and the entry really points to it:


  manifest:file-entry 
manifest:media-type=application/vnd.sun.star.configuration-data

   manifest:full-path=WriterWindowState.xcu/
  manifest:file-entry 
manifest:media-type=application/vnd.sun.star.configuration-data

   manifest:full-path=CalcWindowState.xcu/

means that WriterWindowState.xcu and CalcWindowState.xcu are in the 
extension's root directory.


Beside these, the feature works OK in DEV300_m38, and I'm not aware of 
any issue with it.


Also if I need this toolbar in all the OOo modules, should I add 
one WindowState.xcu file for each module??


sorry :-(  but yes, you have to make a *WindowState.xcu for *every* OOo 
module (sounds like a non-sense, but that's how thing work now - you may 
try submitting a RFE).


Regards
--
Ariel Constenla-Haile
La Plata, Argentina


Aus der Kriegsschule des Lebens
- Was mich nicht umbringt,
macht mich härter.
Nietzsche Götzendämmerung, Sprüche und Pfeile, 8.

-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org



Re: [dev] Toolbar naming - Previously - Re: [dev] Error log and debugging an extension

2009-01-05 Thread Oliver Brinzing
Hi,

if you sure, your *.xcu files are correct you can try to close oo,
delete all files in .\user\registry\cache and reinstall all extensions

example Addons.xcu:

oor:component-data oor:name=Addons oor:package=org.openoffice.Office
xmlns:install=http://openoffice.org/2004/installation;
xmlns:oor=http://openoffice.org/2001/registry;
xmlns:xs=http://www.w3.org/2001/XMLSchema;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
node oor:name=AddonUI
node oor:name=OfficeToolBar
node oor:name=my.toolbar oor:op=replace

example CalcWindowState.xcu:

oor:component-data xmlns:oor=http://openoffice.org/2001/registry;
xmlns:xs=http://www.w3.org/2001/XMLSchema;
oor:name=CalcWindowState
oor:package=org.openoffice.Office.UI

node oor:name=UIElements
node oor:name=States
node 
oor:name=private:resource/toolbar/addon_my.toolbar oor:op=replace
prop oor:name=ContextSensitive 
oor:type=xs:boolean
valuefalse/value
/prop
prop oor:name=UIName oor:type=xs:string
valueMy Addon/value
/prop

look at node oor:name=my.toolbar oor:op=replace and
node oor:name=private:resource/toolbar/addon_my.toolbar oor:op=replace

see: http://www.mail-archive.com/d...@api.openoffice.org/msg02760.html

IMHO you have to create an *WindowState.xcu file for every module

Oliver

-- 

GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45



signature.asc
Description: OpenPGP digital signature


Re: [dev] Toolbar naming - Previously - Re: [dev] Error log and debugging an extension

2009-01-05 Thread Karthik Sudarshan

Hi Carsten,
Yup that did it :) Thanks a lot for your suggestion. I've got my 
original add on working as well.


Regards,
Karthik

Carsten Driesner wrote:

Karthik Sudarshan wrote:

Thanks Ariel and Oliver for your replies.

I'm doing all the things that you have mentioned in your mails, but 
still I don't see any progress. To check it out, I created a new 
project just for this purpose (with the help of OOo plugin on NB).


I'm attaching the Addons.xcu, WriterWindowState.xcu and the MANIFEST 
files with this mail. Can you see if there is any problem with this? 
Oliver I did delete all the files from the user\registry\cache and 
uninstalled the extensions and reinstalled the same. No luck !!



Hi Karthik,

You need to delete the WriterWindowState.xcu in the user\registry 
folder, the cache folder is NOT enough. If you first install your 
extension without xxxWindowState.xcu file the Office uses a 
pre-defined schema, e.g. Add-on n as a title. This title will be 
stored in the user registry part. If you later add a 
WriterWindowState.xcu file to your extension it won't be used. That's 
because the user layer has a higher priority. To let the extension 
basex xxxWindowState.xcu file win, you have to delete/edit the 
xxxWindowState.xcu file in user\registry folder.


Regards,
Carsten




-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org



Re: [dev] Toolbar naming - Previously - Re: [dev] Error log and debugging an extension

2009-01-05 Thread Carsten Driesner

Karthik Sudarshan wrote:

Thanks Ariel and Oliver for your replies.

I'm doing all the things that you have mentioned in your mails, but 
still I don't see any progress. To check it out, I created a new project 
just for this purpose (with the help of OOo plugin on NB).


I'm attaching the Addons.xcu, WriterWindowState.xcu and the MANIFEST 
files with this mail. Can you see if there is any problem with this? 
Oliver I did delete all the files from the user\registry\cache and 
uninstalled the extensions and reinstalled the same. No luck !!



Hi Karthik,

You need to delete the WriterWindowState.xcu in the user\registry 
folder, the cache folder is NOT enough. If you first install your 
extension without xxxWindowState.xcu file the Office uses a pre-defined 
schema, e.g. Add-on n as a title. This title will be stored in the 
user registry part. If you later add a WriterWindowState.xcu file to 
your extension it won't be used. That's because the user layer has a 
higher priority. To let the extension basex xxxWindowState.xcu file win, 
you have to delete/edit the xxxWindowState.xcu file in user\registry folder.


Regards,
Carsten

--
Carsten Driesner (cd) - Project Lead OpenOffice.org Framework
Framework wiki: http://wiki.services.openoffice.org/wiki/Framework
OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS

-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org