Re: [api-dev] Netbeans OOo Plugin 2.0: How to add custom files for an option dialog to an add-on project?

2008-12-11 Thread Benjamin Vollmer

Hi,

Christian Lins wrote:

On 12/11/08 11:43, Benjamin Vollmer wrote:


- Jürgen said it make sense to use a folder structure like 
/registry/data/org/openoffice/Office/ for the data-configuration 
files. But my experience is that for the OptionsDialog.xcu this 
doesn't work. The refered .xdl Dialog will only be displayed when the 
OptionsDialog.xcu is in the root folder of the extension.


Probably a referencing problem. Did you use %origin% to specify the 
location of the xdl file?

Please note that %origin% is relative to the referencing xcu file!
Ok, let us take my example. OptionsDialog.xcu is stored under 
/registry/data/org/openoffice/Office/ and the option dialog file is 
stored under /dialogs/. How should my entry look like?


prop oor:name=OptionsPage
 value../../../../../../%origin%/dialogs/Leaf.xdl/value
/prop

(This didn't work for me.)




I'm currently working on a sample extension for Jürgen that shows how 
to add an Option page and extension help. I'll need some days to 
finally polish it, but if it helps I can provide a work-in-progress 
project earlier... :-)




Thanks but at the the moment I don't need more input. All my problems 
with the options are solved. I have now other questions on my list. ;-)


regards
Benjamin

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [api-dev] Netbeans OOo Plugin 2.0: How to add custom files for an option dialog to an add-on project?

2008-12-11 Thread Steff Grund

Hello,

this works for me:

 prop oor:name=OptionsPage
  value%origin%/../../../../../dialogs/Leaf.xdl/value
 /prop

Regards, Steffen

Benjamin Vollmer wrote:

Hi,

Ok, let us take my example. OptionsDialog.xcu is stored under 
/registry/data/org/openoffice/Office/ and the option dialog file is 
stored under /dialogs/. How should my entry look like?


prop oor:name=OptionsPage
 value../../../../../../%origin%/dialogs/Leaf.xdl/value
/prop

(This didn't work for me.)






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [api-dev] Netbeans OOo Plugin 2.0: How to add custom files for an option dialog to an add-on project?

2008-12-11 Thread Juergen Schmidt

Benjamin Vollmer wrote:

Hello,

Ariel Constenla-Haile wrote:

I send a NB project to your mail (you may have to correct the library
dependency, as I'm working on a OOo 3.1).

  


Thanks Ariel. I finally get it to work. My Conclusion: Only with the 
informations from dev guide it is impossible to implement an extension 
with an option dialog. I had several problems, here is the short 
summarize for the list:


- I  didn't understand that the main class from the nb addon project 
must implement the XContainerWindowEventHandler interface. I used a 
seperate class for this because in the dev guide it seems to be also a 
standalone class, but this class was never instantiated.
mmh, seems that we can improve it. The problem is that the example in 
the Devguide uses an addon to make use of the own configuration entries. 
This of course is not necessary. Improtant is that you need an own 
implementation (service UNO oject) that implements 
XContainerWindowEventHandler. This of course can be created by the 
plugin with the new file type wizard for UNO objects ... I will publish 
a complete lab with 5 detailed examples realted to extension development 
in Java with NetBeans next week. It's my lab from the OOCon this year 
and i will do one last review before i will publish it.





- The dev guide has an advice to use own package names  and not 
org.openoffice.Office but obviously some xcu and xcs files must have 
this package name (e.g. the OptionsDialog.xcu where the path to the .xdl 
is defined).
mmh, i think you simply have misunderstand it. You use an already 
defined configuration schema to hook your options page into the office. 
That of course is org.openoffice.Office.OptionsDialog. You can't change 
this. The DevGuide means that you should define your own schema with 
your own package name for your own configuration entries.





- Jürgen said it make sense to use a folder structure like 
/registry/data/org/openoffice/Office/ for the data-configuration 
files. But my experience is that for the OptionsDialog.xcu this doesn't 
work. The refered .xdl Dialog will only be displayed when the 
OptionsDialog.xcu is in the root folder of the extension.
sorry, my mistake i forgot to explain this little detail around %origin% 
;-) But Steffen and Christian have already explained it. We should 
introduce a further variable %oxtroot% or something like that expands to 
the package root directory ...


Juergen



regards
Benjamin

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [api-dev] Netbeans OOo Plugin 2.0: How to add custom files for an option dialog to an add-on project?

2008-12-04 Thread Benjamin Vollmer

Hello,

I still have problems with the option handling in the extension context. 
The answers from the mailinglist were helpful, but I need more 
informations. The paths and identifiers are now correct.


Unsolved questions:
- Why does my .xdl-dialog not appear in the options dialog? I tried to 
debug my OptionsEventHandler, but when I click on  OK, the class isn't 
involved. 
- How can I access my own properties which I have defined in the 
ExtensionsData.xcs file? I implemented a generic ConfigReader class and 
now I can read the OOo properties but not my own? Error message is:
/org.openoffice.Office.ExtensionsData (and for locale de) could not be 
created. Unable to retrieve the node from the configuration server.

The backend returned the following error:
SchemaBuilder: Could not expand instances: Template not found 
[@/org.openoffice.Office.ExtensionsData/Leaves]


For a bigger extension it is important to set up the config environment 
properly, but unfortunately the documentation in the developers guide 
wasn't so helpful for me. And I still haven't found an existing 
opensource extension, which uses the options functionality. Can anybody 
here give me a complete working example?


Regards
Benjamin



Juergen Schmidt wrote:

Hi,

sure you need the appropriate modules with debug info. But i would 
first check the extension identifier. It is important that you use the 
correct identifier that you have defined in the project properties (or 
in the description.xml) in the OptionsDialog.xcu as well.


You can also debug your options handler object (the object that 
implements the XContainerWindowEventHandler) and can check if it gets 
instantiated. Set a breakpoint in the callHandlerMethod method


Juergen


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [api-dev] Netbeans OOo Plugin 2.0: How to add custom files for an option dialog to an add-on project?

2008-12-04 Thread Ariel Constenla-Haile
Hello Benjamin,

Benjamin Vollmer escribió:
 Hello,
 
 I still have problems with the option handling in the extension context.
 The answers from the mailinglist were helpful, but I need more
 informations. The paths and identifiers are now correct.
 
 Unsolved questions:
 - Why does my .xdl-dialog not appear in the options dialog? 

this can have several reasons, impossible to guess without looking at
your code.

 I tried to
 debug my OptionsEventHandler, but when I click on  OK, the class isn't
 involved. - How can I access my own properties which I have defined in
 the ExtensionsData.xcs file? I implemented a generic ConfigReader class
 and now I can read the OOo properties but not my own? Error message is:
 /org.openoffice.Office.ExtensionsData (and for locale de) could not be
 created. Unable to retrieve the node from the configuration server.
 The backend returned the following error:
 SchemaBuilder: Could not expand instances: Template not found
 [@/org.openoffice.Office.ExtensionsData/Leaves]

this is thrown in
http://svn.services.openoffice.org/ooo/trunk/configmgr/source/backend/schemabuilder.cxx
and means there is a problem with the configuration schema (the xcs
file) for your configuration data (the xcu).

 For a bigger extension it is important to set up the config environment
 properly, but unfortunately the documentation in the developers guide
 wasn't so helpful for me. And I still haven't found an existing
 opensource extension, which uses the options functionality. Can anybody
 here give me a complete working example?

I send a NB project to your mail (you may have to correct the library
dependency, as I'm working on a OOo 3.1).


Regards,
Ariel.


-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [api-dev] Netbeans OOo Plugin 2.0: How to add custom files for an option dialog to an add-on project?

2008-11-17 Thread Benjamin Vollmer

Hi,

A small update: I corrected the paths to the .xcs / .xcu files and now 
both files will be included in the generated .oxt file. I have now a new 
leaf in the writer options as I should be, but the dialog elements from 
the referred .xdl file are still missing.


Is there a way to debug this problem?

regards
Benjamin

Juergen Schmidt wrote:

Hi Benjamin,

well it depends where you add the files in your project. With the old 
plugin it should work if the files are in the project/src directory.


You should use the latest plugin (2.0.1, not available via the update 
center so far) and you should create the xcu/xcs files with the new 
file wizard. The plugin will create the files under a new directory 
registry/[data/**/*.xcu|schema/**/*.xcs]. The reason for that is first 
a clear separation of related office only files. And take care of the 
package name in the xcu file. For example for an options page it 
should be project/registry/data/org/openoffice/Office/OptionsDialog.xcu
The reason for this is a potentially easier integration in the open 
office build and localization process.


I will provide a detailed step by step example online asap (part of my 
oocon workshop).


I will upload the 2.0.1 plugin in the file section of the api project 
later today. After some more testing we will provide it via the NB 
update center as well.


Juergen

Benjamin Vollmer wrote:

Hello,

last Weekend I tried to enable a custom option pane for my extension 
project. After some research a found the following helpful resources:


http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Extensions/Options_Dialog 


http://lxr.go-oo.org/source/framework/desktop/test/deployment/options/
http://extensions.openoffice.org/servlets/ReadMsg?list=devmsgNo=1420

So I added three files to my project. One for configuration data 
(*.xcu), one for the configuration schema (*.xcs) and a dialog file 
(*.xdl). Then I added the entries for the .xcu and .xcs files to the 
uno-extension-manifest. But it seems that the NetBeans Plugin ignores 
my custom .xcs and .xcu files. When I deploy the project, both files 
are missing in the .oxt package and I get an error when I want to add 
the extension in the extension manager. Of course I can add the files 
manually to the .oxt package, but thats annoying. Is this a bug or am 
I doing something wrong?


BTW: I also have also a description file and it is also missing in 
the .oxt package?



Regards
Benjamin

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [api-dev] Netbeans OOo Plugin 2.0: How to add custom files for an option dialog to an add-on project?

2008-11-17 Thread Juergen Schmidt

Hi,

sure you need the appropriate modules with debug info. But i would first 
check the extension identifier. It is important that you use the correct 
identifier that you have defined in the project properties (or in the 
description.xml) in the OptionsDialog.xcu as well.


You can also debug your options handler object (the object that 
implements the XContainerWindowEventHandler) and can check if it gets 
instantiated. Set a breakpoint in the callHandlerMethod method


Juergen

Benjamin Vollmer wrote:

Hi,

A small update: I corrected the paths to the .xcs / .xcu files and now 
both files will be included in the generated .oxt file. I have now a new 
leaf in the writer options as I should be, but the dialog elements from 
the referred .xdl file are still missing.


Is there a way to debug this problem?

regards
Benjamin

Juergen Schmidt wrote:

Hi Benjamin,

well it depends where you add the files in your project. With the old 
plugin it should work if the files are in the project/src directory.


You should use the latest plugin (2.0.1, not available via the update 
center so far) and you should create the xcu/xcs files with the new 
file wizard. The plugin will create the files under a new directory 
registry/[data/**/*.xcu|schema/**/*.xcs]. The reason for that is first 
a clear separation of related office only files. And take care of the 
package name in the xcu file. For example for an options page it 
should be project/registry/data/org/openoffice/Office/OptionsDialog.xcu
The reason for this is a potentially easier integration in the open 
office build and localization process.


I will provide a detailed step by step example online asap (part of my 
oocon workshop).


I will upload the 2.0.1 plugin in the file section of the api project 
later today. After some more testing we will provide it via the NB 
update center as well.


Juergen

Benjamin Vollmer wrote:

Hello,

last Weekend I tried to enable a custom option pane for my extension 
project. After some research a found the following helpful resources:


http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Extensions/Options_Dialog 


http://lxr.go-oo.org/source/framework/desktop/test/deployment/options/
http://extensions.openoffice.org/servlets/ReadMsg?list=devmsgNo=1420

So I added three files to my project. One for configuration data 
(*.xcu), one for the configuration schema (*.xcs) and a dialog file 
(*.xdl). Then I added the entries for the .xcu and .xcs files to the 
uno-extension-manifest. But it seems that the NetBeans Plugin ignores 
my custom .xcs and .xcu files. When I deploy the project, both files 
are missing in the .oxt package and I get an error when I want to add 
the extension in the extension manager. Of course I can add the files 
manually to the .oxt package, but thats annoying. Is this a bug or am 
I doing something wrong?


BTW: I also have also a description file and it is also missing in 
the .oxt package?



Regards
Benjamin

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [api-dev] Netbeans OOo Plugin 2.0: How to add custom files for an option dialog to an add-on project?

2008-11-12 Thread Juergen Schmidt

Hi Benjamin,

did the project wizard work for you in this environment?

Juergen

Benjamin Vollmer wrote:

Juergen Schmidt wrote:
You should use the latest plugin (2.0.1, not available via the update 
center so far) and you should create the xcu/xcs files with the new 
file wizard. The plugin will create the files under a new directory 
registry/[data/**/*.xcu|schema/**/*.xcs]. The reason for that is first 
a clear separation of related office only files. And take care of the 
package name in the xcu file. For example for an options page it 
should be project/registry/data/org/openoffice/Office/OptionsDialog.xcu


The new file wizard doesn't work for me. I tried it with the new 2.0.1 
version, but I get a NullPointerException when I click on Next after I 
choose the xcs or xcu template. Cutted stacktrace:

java.lang.NullPointerException
   at java.lang.String.concat(String.java:2008)
   at 
org.openoffice.extensions.filetypes.registry_ui.RegistryVisualPanel1.getName(RegistryVisualPanel1.java:71) 



System configuration is Ubuntu 8.10, Netbeans 6.1, OpenJDK 6 and OOo SDK 
3.0 DEV300_m27.


The reason for this is a potentially easier integration in the open 
office build and localization process.


I will provide a detailed step by step example online asap (part of my 
oocon workshop).


Ok, thats a good news. I will wait for further informations before I 
start a new try.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [api-dev] Netbeans OOo Plugin 2.0: How to add custom files for an option dialog to an add-on project?

2008-11-11 Thread Juergen Schmidt

Hi Benjamin,

well it depends where you add the files in your project. With the old 
plugin it should work if the files are in the project/src directory.


You should use the latest plugin (2.0.1, not available via the update 
center so far) and you should create the xcu/xcs files with the new file 
wizard. The plugin will create the files under a new directory 
registry/[data/**/*.xcu|schema/**/*.xcs]. The reason for that is first a 
clear separation of related office only files. And take care of the 
package name in the xcu file. For example for an options page it should 
be project/registry/data/org/openoffice/Office/OptionsDialog.xcu
The reason for this is a potentially easier integration in the open 
office build and localization process.


I will provide a detailed step by step example online asap (part of my 
oocon workshop).


I will upload the 2.0.1 plugin in the file section of the api project 
later today. After some more testing we will provide it via the NB 
update center as well.


Juergen

Benjamin Vollmer wrote:

Hello,

last Weekend I tried to enable a custom option pane for my extension 
project. After some research a found the following helpful resources:


http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Extensions/Options_Dialog 


http://lxr.go-oo.org/source/framework/desktop/test/deployment/options/
http://extensions.openoffice.org/servlets/ReadMsg?list=devmsgNo=1420

So I added three files to my project. One for configuration data 
(*.xcu), one for the configuration schema (*.xcs) and a dialog file 
(*.xdl). Then I added the entries for the .xcu and .xcs files to the 
uno-extension-manifest. But it seems that the NetBeans Plugin ignores my 
custom .xcs and .xcu files. When I deploy the project, both files are 
missing in the .oxt package and I get an error when I want to add the 
extension in the extension manager. Of course I can add the files 
manually to the .oxt package, but thats annoying. Is this a bug or am I 
doing something wrong?


BTW: I also have also a description file and it is also missing in the 
.oxt package?



Regards
Benjamin

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Sun Microsystems GmbHJuergen Schmidt
Nagelsweg 55 Technical Lead Programmability
20097 Hamburg, Germany

Registered Office: Sun Microsystems GmbH, Sonnenallee 1, D-85551 
Kirchheim-Heimstetten

Commercial register of the Local Court of Munich: HRB 161028
Managing Directors: Thomas Schroeder, Wolfgang Engels, Dr. Roland Boemer
Chairman of the Supervisory Board: Martin Haering

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [api-dev] Netbeans OOo Plugin 2.0: How to add custom files for an option dialog to an add-on project?

2008-11-11 Thread Juergen Schmidt

Hi,

i have uploaded the version 2.0.1 in the file section of the api 
project. Please report potential issues as soon as possible and help us 
to test the new version.


http://api.openoffice.org/files/documents/22/4375/org-openoffice-extensions-2.0.1.nbm


Juergen


Juergen Schmidt wrote:

Hi Benjamin,

well it depends where you add the files in your project. With the old 
plugin it should work if the files are in the project/src directory.


You should use the latest plugin (2.0.1, not available via the update 
center so far) and you should create the xcu/xcs files with the new file 
wizard. The plugin will create the files under a new directory 
registry/[data/**/*.xcu|schema/**/*.xcs]. The reason for that is first a 
clear separation of related office only files. And take care of the 
package name in the xcu file. For example for an options page it should 
be project/registry/data/org/openoffice/Office/OptionsDialog.xcu
The reason for this is a potentially easier integration in the open 
office build and localization process.


I will provide a detailed step by step example online asap (part of my 
oocon workshop).


I will upload the 2.0.1 plugin in the file section of the api project 
later today. After some more testing we will provide it via the NB 
update center as well.


Juergen

Benjamin Vollmer wrote:

Hello,

last Weekend I tried to enable a custom option pane for my extension 
project. After some research a found the following helpful resources:


http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Extensions/Options_Dialog 


http://lxr.go-oo.org/source/framework/desktop/test/deployment/options/
http://extensions.openoffice.org/servlets/ReadMsg?list=devmsgNo=1420

So I added three files to my project. One for configuration data 
(*.xcu), one for the configuration schema (*.xcs) and a dialog file 
(*.xdl). Then I added the entries for the .xcu and .xcs files to the 
uno-extension-manifest. But it seems that the NetBeans Plugin ignores 
my custom .xcs and .xcu files. When I deploy the project, both files 
are missing in the .oxt package and I get an error when I want to add 
the extension in the extension manager. Of course I can add the files 
manually to the .oxt package, but thats annoying. Is this a bug or am 
I doing something wrong?


BTW: I also have also a description file and it is also missing in the 
.oxt package?



Regards
Benjamin

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [api-dev] Netbeans OOo Plugin 2.0: How to add custom files for an option dialog to an add-on project?

2008-11-11 Thread Benjamin Vollmer

Juergen Schmidt wrote:
You should use the latest plugin (2.0.1, not available via the update 
center so far) and you should create the xcu/xcs files with the new 
file wizard. The plugin will create the files under a new directory 
registry/[data/**/*.xcu|schema/**/*.xcs]. The reason for that is first 
a clear separation of related office only files. And take care of the 
package name in the xcu file. For example for an options page it 
should be project/registry/data/org/openoffice/Office/OptionsDialog.xcu


The new file wizard doesn't work for me. I tried it with the new 2.0.1 
version, but I get a NullPointerException when I click on Next after I 
choose the xcs or xcu template. Cutted stacktrace:

java.lang.NullPointerException
   at java.lang.String.concat(String.java:2008)
   at 
org.openoffice.extensions.filetypes.registry_ui.RegistryVisualPanel1.getName(RegistryVisualPanel1.java:71)


System configuration is Ubuntu 8.10, Netbeans 6.1, OpenJDK 6 and OOo SDK 
3.0 DEV300_m27.


The reason for this is a potentially easier integration in the open 
office build and localization process.


I will provide a detailed step by step example online asap (part of my 
oocon workshop).


Ok, thats a good news. I will wait for further informations before I 
start a new try.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]