Re: [JPP-Devel] ReplaceValuePlugIn

2007-10-13 Thread Eric Lemesre
Paul,

Thanks for attachement !
It possible to build a conditionnal assembly?

some think like that :
assembly

  moduleSets
moduleSet 
file:///home/lemeser/.mozilla/firefox/czpjfwd3.default/ScrapBook/data/20071008234927/assembly.html#class_moduleSet
  includeSubModules/
  includes
  includeorg.openjump.plugin:*/include
   /includes
  excludes
excludeorg.openjump.plugin:${plugin.enable.PostGISPlugin}/exclude
excludeorg.openjump.plugin:${plugin.enable.JoinTable}/exclude
excludeorg.openjump.plugin:${plugin.enable.OtherPlugin}/exclude
  /excludes
/moduleSet
file:///home/lemeser/.mozilla/firefox/czpjfwd3.default/ScrapBook/data/20071008234927/assembly.html#class_moduleSet
  /moduleSets

and enablePlugIn.properties
# plugin to enable when is not empty
plugin.enable.PostGISPlugin=PostGISPlugin
plugin.enable.JoinTable=
plugin.enable.OtherPlugin=OtherPlugin

it is verry simple to enable/disable plugin without touch the assembly
descriptor

Eric.

2007/10/13, Paul Austin [EMAIL PROTECTED]:

 Eric,

 The current maven build is a non standard build as OJ doesn't have the
 correct directory structure. I'd like to get that changed at some point.

 For the main maven build for OJ i don't think we should split the api
 and workbench as for JUMP deliveries you need both. We can however
 create assemblies for them so that the are available if anyone else
 needs them.

 I also have another assembly descriptor that can be used in another
 project to build a custom OJ bundle with a bunch of plug-ins, basically
 make all you plug-ins maven plug-ins, add a dependency to OJ and the
 plug-ins from a wrapper project and it will bundle them into the lib/ext
 directory. Unfortunately due to some bugs in Maven you have to do some
 customization for it to work. See attached example.

 Paul

 Eric Lemesre wrote:
  Paul,
 
  I commit the change and I complete my first commit (language and
  changelog).
  I like maven ;-) but my local repository is verry small.
  When i package openjump (mvn package) i have
   5 required artifacts are missing :
 
  * net.sf.buoy:buoy:jar:1.8
  * com.sun.media:jai_codec:jar:1.1.2_01
  * com.ermapper:ermapper:jar:UNKNOWN
  * javax.media:jai_core:jar:1.1.2_01
  *  org.jmat:jmat:jar:5.0
 
  It is probably the good time to build a maven2 repository for openjump?
  and put in
  openjump-core-1.2D.jar
  openjump-core-1.2C.jar
  openjump-core-1.2-SNAPSHOT.jar
 
  and with the same version
  openjump-api and openjump-workbench
 
  and all necessary jar for build.
 
  Eric
 
  2007/10/12, Paul Austin [EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED]:
 
  Eric,
 
  Sorry about that, it must have been something to do with the merge
  process. Have you been able to recover the old version?
 
  Paul
 
  Eric Lemesre wrote:
   Hi paul,
  
   It is probebly a mistake, but your commit( rev 1141) erase my
  commit
   (rev 1132) on
   org.openjump.sigle.plugin.replace.ReplaveValuePlugin.java
  
   Eric
  
   2007/10/3, Sunburned Surveyor  [EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED]
   mailto:[EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED]:
  
   Thanks for filling us in on how you use OpenJUMP Eric, and
  thank you
   for making the effort to contribute.
  
   The Sunburned Surveyor
  
   On 10/1/07, Eric Lemesre [EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED]
   mailto: [EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED] wrote:
Hi SS,
   
I am using OpenJUMP for visualisation state's vendor  :
 where
   they work,
where they live and where is her cusmoters.
Other software like ERSI EMG3, is too expensive an less
  modulate
   than
OpenJUMP.
   
I can get data from PostgreSQL, Degrees, and geoserver and
  give
   it to
resposables (quikly ;-) ).
   
I hope my compagny always use OpenJUMP and give more
  developpers to
contribute.
At this moment I am alone ;-{.
   
   
2007/9/28, Sunburned Surveyor 
  [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
   mailto: [EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED]:
 Eric,

 I am getting to this e-mail a little bit late, but I see
  that
   Michael
 and Stefan have already given you a warm welcome.

 I just want to say thanks for your contribution and I
  hope we
   get to
 work together in the future.

 I'm curious, how are you using OpenJUMP?

 The Sunburned Surveyor

 On 9/28/07, Stefan Steiniger [EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED]
   mailto: [EMAIL PROTECTED] mailto:[EMAIL 

Re: [JPP-Devel] ReplaceValuePlugIn

2007-10-13 Thread Paul Austin

Hi Eric,

IN theory you can use includes and excludes to simplify the whole thing, 
but there seems to be a bug in the maven assembly plug-in that only 
processes the first include or exclude. Which is why the descriptor was 
so long winded. I have a bug open on it but nothing seems to be 
happening with it.


Paul

Eric Lemesre wrote:

Paul,

Thanks for attachement !
It possible to build a conditionnal assembly?

some think like that :
assembly
  moduleSets

moduleSet 
file:///home/lemeser/.mozilla/firefox/czpjfwd3.default/ScrapBook/data/20071008234927/assembly.html#class_moduleSet
  includeSubModules/
  includes
  includeorg.openjump.plugin:*/include
   /includes
  excludes
exclude
org.openjump.plugin:${plugin.enable.PostGISPlugin}/exclude
excludeorg.openjump.plugin:${plugin.enable.JoinTable}/exclude
excludeorg.openjump.plugin:${plugin.enable.OtherPlugin}
/exclude
  /excludes
/moduleSet 
file:///home/lemeser/.mozilla/firefox/czpjfwd3.default/ScrapBook/data/20071008234927/assembly.html#class_moduleSet
  /moduleSets


and enablePlugIn.properties
# plugin to enable when is not empty
plugin.enable.PostGISPlugin=PostGISPlugin
plugin.enable.JoinTable=
plugin.enable.OtherPlugin=OtherPlugin

  
it is verry simple to enable/disable plugin without touch the assembly 
descriptor


Eric.

2007/10/13, Paul Austin [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]:


Eric,

The current maven build is a non standard build as OJ doesn't have
the
correct directory structure. I'd like to get that changed at some
point.

For the main maven build for OJ i don't think we should split the api
and workbench as for JUMP deliveries you need both. We can however
create assemblies for them so that the are available if anyone else
needs them.

I also have another assembly descriptor that can be used in another
project to build a custom OJ bundle with a bunch of plug-ins,
basically
make all you plug-ins maven plug-ins, add a dependency to OJ and the
plug-ins from a wrapper project and it will bundle them into the
lib/ext
directory. Unfortunately due to some bugs in Maven you have to do
some
customization for it to work. See attached example.

Paul

Eric Lemesre wrote:
 Paul,

 I commit the change and I complete my first commit (language and
 changelog).
 I like maven ;-) but my local repository is verry small.
 When i package openjump (mvn package) i have
  5 required artifacts are missing :

 * net.sf.buoy:buoy:jar:1.8
 * com.sun.media:jai_codec:jar:1.1.2_01
 * com.ermapper:ermapper:jar:UNKNOWN
 * javax.media:jai_core:jar:1.1.2_01
 *  org.jmat:jmat:jar:5.0

 It is probably the good time to build a maven2 repository for
openjump?
 and put in
 openjump-core-1.2D.jar
 openjump-core-1.2C.jar
 openjump-core-1.2-SNAPSHOT.jar

 and with the same version
 openjump-api and openjump-workbench

 and all necessary jar for build.

 Eric

 2007/10/12, Paul Austin [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]:

 Eric,

 Sorry about that, it must have been something to do with the
merge
 process. Have you been able to recover the old version?

 Paul

 Eric Lemesre wrote:
  Hi paul,
 
  It is probebly a mistake, but your commit( rev 1141) erase my
 commit
  (rev 1132) on
  org.openjump.sigle.plugin.replace.ReplaveValuePlugin.java
 
  Eric
 
  2007/10/3, Sunburned Surveyor 
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
 mailto: [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]:
 
  Thanks for filling us in on how you use OpenJUMP Eric, and
 thank you
  for making the effort to contribute.
 
  The Sunburned Surveyor
 
  On 10/1/07, Eric Lemesre [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 
  mailto: [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] wrote:
   Hi SS,
  
   I am using OpenJUMP for visualisation state's
vendor  : where
  they work,
   where they live and where is her cusmoters.
   Other software like ERSI EMG3, is too expensive an less
 modulate
  than
   OpenJUMP.
  
   I can get data from PostgreSQL, Degrees, and
geoserver and
 give
  it to
   resposables (quikly ;-) ).

Re: [JPP-Devel] ReplaceValuePlugIn

2007-10-12 Thread Paul Austin
Eric,

Sorry about that, it must have been something to do with the merge
process. Have you been able to recover the old version?

Paul

Eric Lemesre wrote:
 Hi paul,

 It is probebly a mistake, but your commit( rev 1141) erase my commit
 (rev 1132) on
 org.openjump.sigle.plugin.replace.ReplaveValuePlugin.java

 Eric

 2007/10/3, Sunburned Surveyor  [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]:

 Thanks for filling us in on how you use OpenJUMP Eric, and thank you
 for making the effort to contribute.

 The Sunburned Surveyor

 On 10/1/07, Eric Lemesre [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] wrote:
  Hi SS,
 
  I am using OpenJUMP for visualisation state's vendor  : where
 they work,
  where they live and where is her cusmoters.
  Other software like ERSI EMG3, is too expensive an less modulate
 than
  OpenJUMP.
 
  I can get data from PostgreSQL, Degrees, and geoserver and give
 it to
  resposables (quikly ;-) ).
 
  I hope my compagny always use OpenJUMP and give more developpers to
  contribute.
  At this moment I am alone ;-{.
 
 
  2007/9/28, Sunburned Surveyor  [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]:
   Eric,
  
   I am getting to this e-mail a little bit late, but I see that
 Michael
   and Stefan have already given you a warm welcome.
  
   I just want to say thanks for your contribution and I hope we
 get to
   work together in the future.
  
   I'm curious, how are you using OpenJUMP?
  
   The Sunburned Surveyor
  
   On 9/28/07, Stefan Steiniger [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] wrote:
Hei again,
   
   
Eric Lemesre schrieb:
 Salut Stefan,

 I am totaly agree with this condition Of course.
 I prefer to get write acces by pass the second condition.
 I think it
  is
 the better way for all.
   
ok..
Btw. it depends how fast you are with your second extension.
 But if it
does not take weeks, you can commit both tools together if
 you have
write access.
   

 For my second contribution i want to extends JoinTable plugin.
  * select fields to join
  * select datasource type
   
sounds very good :)
   
 Can i add Jlist  to MultiInputDialog?
   
yes.. i think so :)
If nobodoy else has a problem with.
   
stefan
   

 Eric

 2007/9/26, Stefan Steiniger  [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]:

 Salut Eric,

 nice to have you on board :)
 We have setup some informal rules for contribution.
 You get write
 access
 to the svn in two ways:
 1) you get immediate access to the svn if you got a
 recommendation
  by
 developer that is already well known by the project
 (or a member);
  or
 2) we review the first two contributions. If both are
 ok you will
  grant
 write access. As you passed the 1st code-review round
 already
  according
 to Michael, I would like to ask you, to send to your
 second
  contribution
 to the devel-list for a review (if you have finished
 that work
  already)

 I hope you understand this policy and I suppose the
 2nd sample you
 presenet will be a piece of cake for you? Alteratively
 you may
  tell us
 (or me and Michael personally) about your programming
 experience.

 Anyway, as it seems to me you will qualify ;) i ask
 you to already
  send
 me your sourceforge account name (on my personal
 email), so i can
 prepare anything for svn-write access.

 cheers, currently from Germany (Btw. I met some people
 from
  Intevation
 on the Intergeo fair)

 stefan

 @ Michael: thank you for reviewing! If you want you
 can commit the
  code.
 Otherwise I will do in the next days.


 Michaël Michaud schrieb:
   Hi Eric,
  
   Nice to see another french guy involved in OpenJUMP
 development
  ;-)
   I reviewed your code and it's ok for me.
   Maybe you should explain the use case for setting
 an attribute
  with
   another attribute value.
   Anyway, this is just a new capability of an
 existing plugin.
   I can commit the code, or we have to ask Sunburned
 Surveyor or
  Stefan
   Steiniger (I think Stefan is out of his office
 until 

Re: [JPP-Devel] ReplaceValuePlugIn

2007-10-12 Thread Eric Lemesre
Hi paul,

It is probebly a mistake, but your commit( rev 1141) erase my commit (rev
1132) on
org.openjump.sigle.plugin.replace.ReplaveValuePlugin.java

Eric

2007/10/3, Sunburned Surveyor [EMAIL PROTECTED]:

 Thanks for filling us in on how you use OpenJUMP Eric, and thank you
 for making the effort to contribute.

 The Sunburned Surveyor

 On 10/1/07, Eric Lemesre [EMAIL PROTECTED] wrote:
  Hi SS,
 
  I am using OpenJUMP for visualisation state's vendor  : where they work,
  where they live and where is her cusmoters.
  Other software like ERSI EMG3, is too expensive an less modulate than
  OpenJUMP.
 
  I can get data from PostgreSQL, Degrees, and geoserver and give it to
  resposables (quikly ;-) ).
 
  I hope my compagny always use OpenJUMP and give more developpers to
  contribute.
  At this moment I am alone ;-{.
 
 
  2007/9/28, Sunburned Surveyor [EMAIL PROTECTED]:
   Eric,
  
   I am getting to this e-mail a little bit late, but I see that Michael
   and Stefan have already given you a warm welcome.
  
   I just want to say thanks for your contribution and I hope we get to
   work together in the future.
  
   I'm curious, how are you using OpenJUMP?
  
   The Sunburned Surveyor
  
   On 9/28/07, Stefan Steiniger [EMAIL PROTECTED] wrote:
Hei again,
   
   
Eric Lemesre schrieb:
 Salut Stefan,

 I am totaly agree with this condition Of course.
 I prefer to get write acces by pass the second condition. I think
 it
  is
 the better way for all.
   
ok..
Btw. it depends how fast you are with your second extension. But if
 it
does not take weeks, you can commit both tools together if you have
write access.
   

 For my second contribution i want to extends JoinTable plugin.
  * select fields to join
  * select datasource type
   
sounds very good :)
   
 Can i add Jlist  to MultiInputDialog?
   
yes.. i think so :)
If nobodoy else has a problem with.
   
stefan
   

 Eric

 2007/9/26, Stefan Steiniger  [EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED]:

 Salut Eric,

 nice to have you on board :)
 We have setup some informal rules for contribution. You get
 write
 access
 to the svn in two ways:
 1) you get immediate access to the svn if you got a
 recommendation
  by
 developer that is already well known by the project (or a
 member);
  or
 2) we review the first two contributions. If both are ok you
 will
  grant
 write access. As you passed the 1st code-review round already
  according
 to Michael, I would like to ask you, to send to your second
  contribution
 to the devel-list for a review (if you have finished that work
  already)

 I hope you understand this policy and I suppose the 2nd sample
 you
 presenet will be a piece of cake for you? Alteratively you may
  tell us
 (or me and Michael personally) about your programming
 experience.

 Anyway, as it seems to me you will qualify ;) i ask you to
 already
  send
 me your sourceforge account name (on my personal email), so i
 can
 prepare anything for svn-write access.

 cheers, currently from Germany (Btw. I met some people from
  Intevation
 on the Intergeo fair)

 stefan

 @ Michael: thank you for reviewing! If you want you can commit
 the
  code.
 Otherwise I will do in the next days.


 Michaël Michaud schrieb:
   Hi Eric,
  
   Nice to see another french guy involved in OpenJUMP
 development
  ;-)
   I reviewed your code and it's ok for me.
   Maybe you should explain the use case for setting an
 attribute
  with
   another attribute value.
   Anyway, this is just a new capability of an existing
 plugin.
   I can commit the code, or we have to ask Sunburned Surveyor
 or
  Stefan
   Steiniger (I think Stefan is out of his office until next
 week)
 who are
   the administrators of the site and can give svn access to
 new
 developers.
  
   Michaël
  
   Eric Lemesre a écrit :
  
   Hello,
  
   Thank verry much for the good job in OpenJUMP.
  
   I make somme modifications in the plugIn
 ReplaceValuePlugIn
  (in
   org.openjump.sigle.plugin.replace ).
   This plugin replace a attribute with a constante. And now
 we
  can
 copy
   one attribute to an other one.
  
   I joint the code.
  
   How can i have acces to repository and what is rules to
 use?
   Or how to put this modifications in JPP?
  
   I have planed somme other works and want to give it to the
  community
  
   Thanks
   Eric
  
  



Re: [JPP-Devel] ReplaceValuePlugIn

2007-10-12 Thread Paul Austin
Eric,

The current maven build is a non standard build as OJ doesn't have the
correct directory structure. I'd like to get that changed at some point.

For the main maven build for OJ i don't think we should split the api
and workbench as for JUMP deliveries you need both. We can however
create assemblies for them so that the are available if anyone else
needs them.

I also have another assembly descriptor that can be used in another
project to build a custom OJ bundle with a bunch of plug-ins, basically
make all you plug-ins maven plug-ins, add a dependency to OJ and the
plug-ins from a wrapper project and it will bundle them into the lib/ext
directory. Unfortunately due to some bugs in Maven you have to do some
customization for it to work. See attached example.

Paul

Eric Lemesre wrote:
 Paul,

 I commit the change and I complete my first commit (language and
 changelog).
 I like maven ;-) but my local repository is verry small.
 When i package openjump (mvn package) i have
  5 required artifacts are missing :

 * net.sf.buoy:buoy:jar:1.8
 * com.sun.media:jai_codec:jar:1.1.2_01
 * com.ermapper:ermapper:jar:UNKNOWN
 * javax.media:jai_core:jar:1.1.2_01
 *  org.jmat:jmat:jar:5.0

 It is probably the good time to build a maven2 repository for openjump?
 and put in
 openjump-core-1.2D.jar
 openjump-core-1.2C.jar
 openjump-core-1.2-SNAPSHOT.jar

 and with the same version
 openjump-api and openjump-workbench

 and all necessary jar for build.

 Eric

 2007/10/12, Paul Austin [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]:

 Eric,

 Sorry about that, it must have been something to do with the merge
 process. Have you been able to recover the old version?

 Paul

 Eric Lemesre wrote:
  Hi paul,
 
  It is probebly a mistake, but your commit( rev 1141) erase my
 commit
  (rev 1132) on
  org.openjump.sigle.plugin.replace.ReplaveValuePlugin.java
 
  Eric
 
  2007/10/3, Sunburned Surveyor  [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]:
 
  Thanks for filling us in on how you use OpenJUMP Eric, and
 thank you
  for making the effort to contribute.
 
  The Sunburned Surveyor
 
  On 10/1/07, Eric Lemesre [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]
  mailto: [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] wrote:
   Hi SS,
  
   I am using OpenJUMP for visualisation state's vendor  : where
  they work,
   where they live and where is her cusmoters.
   Other software like ERSI EMG3, is too expensive an less
 modulate
  than
   OpenJUMP.
  
   I can get data from PostgreSQL, Degrees, and geoserver and
 give
  it to
   resposables (quikly ;-) ).
  
   I hope my compagny always use OpenJUMP and give more
 developpers to
   contribute.
   At this moment I am alone ;-{.
  
  
   2007/9/28, Sunburned Surveyor 
 [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
  mailto: [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]:
Eric,
   
I am getting to this e-mail a little bit late, but I see
 that
  Michael
and Stefan have already given you a warm welcome.
   
I just want to say thanks for your contribution and I
 hope we
  get to
work together in the future.
   
I'm curious, how are you using OpenJUMP?
   
The Sunburned Surveyor
   
On 9/28/07, Stefan Steiniger [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]
  mailto: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:
 Hei again,


 Eric Lemesre schrieb:
  Salut Stefan,
 
  I am totaly agree with this condition Of course.
  I prefer to get write acces by pass the second
 condition.
  I think it
   is
  the better way for all.

 ok..
 Btw. it depends how fast you are with your second
 extension.
  But if it
 does not take weeks, you can commit both tools together if
  you have
 write access.

 
  For my second contribution i want to extends
 JoinTable plugin.
   * select fields to join
   * select datasource type

 sounds very good :)

  Can i add Jlist  to MultiInputDialog?

 yes.. i think so :)
 If nobodoy else has a problem with.

 stefan

 
  Eric
 
  2007/9/26, Stefan Steiniger  [EMAIL PROTECTED]
 mailto:[EMAIL 

Re: [JPP-Devel] ReplaceValuePlugIn

2007-10-02 Thread Sunburned Surveyor
Thanks for filling us in on how you use OpenJUMP Eric, and thank you
for making the effort to contribute.

The Sunburned Surveyor

On 10/1/07, Eric Lemesre [EMAIL PROTECTED] wrote:
 Hi SS,

 I am using OpenJUMP for visualisation state's vendor  : where they work,
 where they live and where is her cusmoters.
 Other software like ERSI EMG3, is too expensive an less modulate than
 OpenJUMP.

 I can get data from PostgreSQL, Degrees, and geoserver and give it to
 resposables (quikly ;-) ).

 I hope my compagny always use OpenJUMP and give more developpers to
 contribute.
 At this moment I am alone ;-{.


 2007/9/28, Sunburned Surveyor [EMAIL PROTECTED]:
  Eric,
 
  I am getting to this e-mail a little bit late, but I see that Michael
  and Stefan have already given you a warm welcome.
 
  I just want to say thanks for your contribution and I hope we get to
  work together in the future.
 
  I'm curious, how are you using OpenJUMP?
 
  The Sunburned Surveyor
 
  On 9/28/07, Stefan Steiniger [EMAIL PROTECTED] wrote:
   Hei again,
  
  
   Eric Lemesre schrieb:
Salut Stefan,
   
I am totaly agree with this condition Of course.
I prefer to get write acces by pass the second condition. I think it
 is
the better way for all.
  
   ok..
   Btw. it depends how fast you are with your second extension. But if it
   does not take weeks, you can commit both tools together if you have
   write access.
  
   
For my second contribution i want to extends JoinTable plugin.
 * select fields to join
 * select datasource type
  
   sounds very good :)
  
Can i add Jlist  to MultiInputDialog?
  
   yes.. i think so :)
   If nobodoy else has a problem with.
  
   stefan
  
   
Eric
   
2007/9/26, Stefan Steiniger  [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]:
   
Salut Eric,
   
nice to have you on board :)
We have setup some informal rules for contribution. You get write
access
to the svn in two ways:
1) you get immediate access to the svn if you got a recommendation
 by
developer that is already well known by the project (or a member);
 or
2) we review the first two contributions. If both are ok you will
 grant
write access. As you passed the 1st code-review round already
 according
to Michael, I would like to ask you, to send to your second
 contribution
to the devel-list for a review (if you have finished that work
 already)
   
I hope you understand this policy and I suppose the 2nd sample you
presenet will be a piece of cake for you? Alteratively you may
 tell us
(or me and Michael personally) about your programming experience.
   
Anyway, as it seems to me you will qualify ;) i ask you to already
 send
me your sourceforge account name (on my personal email), so i can
prepare anything for svn-write access.
   
cheers, currently from Germany (Btw. I met some people from
 Intevation
on the Intergeo fair)
   
stefan
   
@ Michael: thank you for reviewing! If you want you can commit the
 code.
Otherwise I will do in the next days.
   
   
Michaël Michaud schrieb:
  Hi Eric,
 
  Nice to see another french guy involved in OpenJUMP development
 ;-)
  I reviewed your code and it's ok for me.
  Maybe you should explain the use case for setting an attribute
 with
  another attribute value.
  Anyway, this is just a new capability of an existing plugin.
  I can commit the code, or we have to ask Sunburned Surveyor or
 Stefan
  Steiniger (I think Stefan is out of his office until next week)
who are
  the administrators of the site and can give svn access to new
developers.
 
  Michaël
 
  Eric Lemesre a écrit :
 
  Hello,
 
  Thank verry much for the good job in OpenJUMP.
 
  I make somme modifications in the plugIn ReplaceValuePlugIn
 (in
  org.openjump.sigle.plugin.replace ).
  This plugin replace a attribute with a constante. And now we
 can
copy
  one attribute to an other one.
 
  I joint the code.
 
  How can i have acces to repository and what is rules to use?
  Or how to put this modifications in JPP?
 
  I have planed somme other works and want to give it to the
 community
 
  Thanks
  Eric
 
 
   
 
   
 
 
  /*
  * The Unified Mapping Platform (JUMP) is an extensible,
interactive GUI
  * for visualizing and manipulating spatial features with
geometry and attributes.
  *
  * Copyright (C) 2003 Vivid Solutions
  *
  * This program is free software; you 

Re: [JPP-Devel] ReplaceValuePlugIn

2007-09-28 Thread Eric Lemesre
Salut Stefan,

I am totaly agree with this condition Of course.
I prefer to get write acces by pass the second condition. I think it is the
better way for all.

For my second contribution i want to extends JoinTable plugin.
 * select fields to join
 * select datasource type

Can i add Jlist  to MultiInputDialog?

Eric

2007/9/26, Stefan Steiniger [EMAIL PROTECTED]:

 Salut Eric,

 nice to have you on board :)
 We have setup some informal rules for contribution. You get write access
 to the svn in two ways:
 1) you get immediate access to the svn if you got a recommendation by
 developer that is already well known by the project (or a member); or
 2) we review the first two contributions. If both are ok you will grant
 write access. As you passed the 1st code-review round already according
 to Michael, I would like to ask you, to send to your second contribution
 to the devel-list for a review (if you have finished that work already)

 I hope you understand this policy and I suppose the 2nd sample you
 presenet will be a piece of cake for you? Alteratively you may tell us
 (or me and Michael personally) about your programming experience.

 Anyway, as it seems to me you will qualify ;) i ask you to already send
 me your sourceforge account name (on my personal email), so i can
 prepare anything for svn-write access.

 cheers, currently from Germany (Btw. I met some people from Intevation
 on the Intergeo fair)

 stefan

 @ Michael: thank you for reviewing! If you want you can commit the code.
 Otherwise I will do in the next days.


 Michaël Michaud schrieb:
  Hi Eric,
 
  Nice to see another french guy involved in OpenJUMP development ;-)
  I reviewed your code and it's ok for me.
  Maybe you should explain the use case for setting an attribute with
  another attribute value.
  Anyway, this is just a new capability of an existing plugin.
  I can commit the code, or we have to ask Sunburned Surveyor or Stefan
  Steiniger (I think Stefan is out of his office until next week) who are
  the administrators of the site and can give svn access to new
 developers.
 
  Michaël
 
  Eric Lemesre a écrit :
 
  Hello,
 
  Thank verry much for the good job in OpenJUMP.
 
  I make somme modifications in the plugIn ReplaceValuePlugIn (in
  org.openjump.sigle.plugin.replace).
  This plugin replace a attribute with a constante. And now we can copy
  one attribute to an other one.
 
  I joint the code.
 
  How can i have acces to repository and what is rules to use?
  Or how to put this modifications in JPP?
 
  I have planed somme other works and want to give it to the community
 
  Thanks
  Eric
 
 
 
 
 
  /*
  * The Unified Mapping Platform (JUMP) is an extensible, interactive GUI
  * for visualizing and manipulating spatial features with geometry and
 attributes.
  *
  * Copyright (C) 2003 Vivid Solutions
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
  * as published by the Free Software Foundation; either version 2
  * of the License, or (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston,
 MA  02111-1307, USA.
  *
  * For more information, contact:
  *
  * Vivid Solutions
  * Suite #1A
  * 2328 Government Street
  * Victoria BC  V8T 5G5
  * Canada
  *
  * (250)385-6040
  * www.vividsolutions.com
  */
 
  package org.openjump.sigle.plugin.replace;
 
  import java.awt.event.ActionEvent;
  import java.awt.event.ActionListener;
  import java.util.*;
 
  import javax.swing.ImageIcon;
  import javax.swing.JCheckBox;
  import javax.swing.JComboBox;
  import javax.swing.JOptionPane;
  import javax.swing.JTextField;
 
 
 
  import org.openjump.sigle.utilities.gui.DialogUtil;
 
  import com.vividsolutions.jump.I18N;
  import com.vividsolutions.jump.feature.*;
  import com.vividsolutions.jump.task.*;
  import com.vividsolutions.jump.workbench.WorkbenchContext;
  import com.vividsolutions.jump.workbench.model.*;
  import com.vividsolutions.jump.workbench.plugin.*;
  import com.vividsolutions.jump.workbench.ui.*;
  import com.vividsolutions.jump.workbench.ui.images.IconLoader;
 
 
  /**
  *
  * @author Erwan Bocher Laboratoire RESO UMR CNRS 6590
  * @url www.projet-sigle.org
  * @curentdate 25 juil. 06
  * @package name org.openjump.sigle.plugin.replace
  * @license Licence CeCILL http://www.cecill.info/
  * @todo TODO
  *
  */
 
 
 
  public class ReplaceValuePlugIn
 extends AbstractPlugIn
 implements ThreadedPlugIn
  {
 
 
   private 

Re: [JPP-Devel] ReplaceValuePlugIn

2007-09-28 Thread Stefan Steiniger
Hei again,


Eric Lemesre schrieb:
 Salut Stefan,
 
 I am totaly agree with this condition Of course.
 I prefer to get write acces by pass the second condition. I think it is 
 the better way for all.

ok..
Btw. it depends how fast you are with your second extension. But if it 
does not take weeks, you can commit both tools together if you have 
write access.

 
 For my second contribution i want to extends JoinTable plugin.
  * select fields to join
  * select datasource type

sounds very good :)

 Can i add Jlist  to MultiInputDialog?

yes.. i think so :)
If nobodoy else has a problem with.

stefan

 
 Eric
 
 2007/9/26, Stefan Steiniger  [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]:
 
 Salut Eric,
 
 nice to have you on board :)
 We have setup some informal rules for contribution. You get write
 access
 to the svn in two ways:
 1) you get immediate access to the svn if you got a recommendation by
 developer that is already well known by the project (or a member); or
 2) we review the first two contributions. If both are ok you will grant
 write access. As you passed the 1st code-review round already according
 to Michael, I would like to ask you, to send to your second contribution
 to the devel-list for a review (if you have finished that work already)
 
 I hope you understand this policy and I suppose the 2nd sample you
 presenet will be a piece of cake for you? Alteratively you may tell us
 (or me and Michael personally) about your programming experience.
 
 Anyway, as it seems to me you will qualify ;) i ask you to already send
 me your sourceforge account name (on my personal email), so i can
 prepare anything for svn-write access.
 
 cheers, currently from Germany (Btw. I met some people from Intevation
 on the Intergeo fair)
 
 stefan
 
 @ Michael: thank you for reviewing! If you want you can commit the code.
 Otherwise I will do in the next days.
 
 
 Michaël Michaud schrieb:
   Hi Eric,
  
   Nice to see another french guy involved in OpenJUMP development ;-)
   I reviewed your code and it's ok for me.
   Maybe you should explain the use case for setting an attribute with
   another attribute value.
   Anyway, this is just a new capability of an existing plugin.
   I can commit the code, or we have to ask Sunburned Surveyor or Stefan
   Steiniger (I think Stefan is out of his office until next week)
 who are
   the administrators of the site and can give svn access to new
 developers.
  
   Michaël
  
   Eric Lemesre a écrit :
  
   Hello,
  
   Thank verry much for the good job in OpenJUMP.
  
   I make somme modifications in the plugIn ReplaceValuePlugIn (in
   org.openjump.sigle.plugin.replace).
   This plugin replace a attribute with a constante. And now we can
 copy
   one attribute to an other one.
  
   I joint the code.
  
   How can i have acces to repository and what is rules to use?
   Or how to put this modifications in JPP?
  
   I have planed somme other works and want to give it to the community
  
   Thanks
   Eric
  
  
 
 
  
  
   /*
   * The Unified Mapping Platform (JUMP) is an extensible,
 interactive GUI
   * for visualizing and manipulating spatial features with
 geometry and attributes.
   *
   * Copyright (C) 2003 Vivid Solutions
   *
   * This program is free software; you can redistribute it and/or
   * modify it under the terms of the GNU General Public License
   * as published by the Free Software Foundation; either version 2
   * of the License, or (at your option) any later version.
   *
   * This program is distributed in the hope that it will be useful,
   * but WITHOUT ANY WARRANTY; without even the implied warranty of
   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   * GNU General Public License for more details.
   *
   * You should have received a copy of the GNU General Public License
   * along with this program; if not, write to the Free Software
   * Foundation, Inc., 59 Temple Place - Suite 330, Boston,
 MA  02111-1307, USA.
   *
   * For more information, contact:
   *
   * Vivid Solutions
   * Suite #1A
   * 2328 Government Street
   * Victoria BC  V8T 5G5
   * Canada
   *
   * (250)385-6040
   * www.vividsolutions.com http://www.vividsolutions.com
   */
  
   package org.openjump.sigle.plugin.replace;
  
   import java.awt.event.ActionEvent;
   import java.awt.event.ActionListener;
   import java.util.*;
  
   import javax.swing.ImageIcon;
   import javax.swing.JCheckBox;
   import javax.swing.JComboBox;
   import 

Re: [JPP-Devel] ReplaceValuePlugIn

2007-09-28 Thread Eric Lemesre
Hi Michaël,

Thanks for your review!
I expliain capability by description in dialog .
do you want the new code and localisations on personnal mail?

Eric

2007/9/25, Michaël Michaud [EMAIL PROTECTED]:

 Hi Eric,

 Nice to see another french guy involved in OpenJUMP development ;-)
 I reviewed your code and it's ok for me.
 Maybe you should explain the use case for setting an attribute with
 another attribute value.
 Anyway, this is just a new capability of an existing plugin.
 I can commit the code, or we have to ask Sunburned Surveyor or Stefan
 Steiniger (I think Stefan is out of his office until next week) who are
 the administrators of the site and can give svn access to new developers.

 Michaël

 Eric Lemesre a écrit :

  Hello,
 
  Thank verry much for the good job in OpenJUMP.
 
  I make somme modifications in the plugIn ReplaceValuePlugIn (in
  org.openjump.sigle.plugin.replace).
  This plugin replace a attribute with a constante. And now we can copy
  one attribute to an other one.
 
  I joint the code.
 
  How can i have acces to repository and what is rules to use?
  Or how to put this modifications in JPP?
 
  I have planed somme other works and want to give it to the community
 
  Thanks
  Eric


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


Re: [JPP-Devel] ReplaceValuePlugIn

2007-09-28 Thread Sunburned Surveyor
Eric,

I am getting to this e-mail a little bit late, but I see that Michael
and Stefan have already given you a warm welcome.

I just want to say thanks for your contribution and I hope we get to
work together in the future.

I'm curious, how are you using OpenJUMP?

The Sunburned Surveyor

On 9/28/07, Stefan Steiniger [EMAIL PROTECTED] wrote:
 Hei again,


 Eric Lemesre schrieb:
  Salut Stefan,
 
  I am totaly agree with this condition Of course.
  I prefer to get write acces by pass the second condition. I think it is
  the better way for all.

 ok..
 Btw. it depends how fast you are with your second extension. But if it
 does not take weeks, you can commit both tools together if you have
 write access.

 
  For my second contribution i want to extends JoinTable plugin.
   * select fields to join
   * select datasource type

 sounds very good :)

  Can i add Jlist  to MultiInputDialog?

 yes.. i think so :)
 If nobodoy else has a problem with.

 stefan

 
  Eric
 
  2007/9/26, Stefan Steiniger  [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]:
 
  Salut Eric,
 
  nice to have you on board :)
  We have setup some informal rules for contribution. You get write
  access
  to the svn in two ways:
  1) you get immediate access to the svn if you got a recommendation by
  developer that is already well known by the project (or a member); or
  2) we review the first two contributions. If both are ok you will grant
  write access. As you passed the 1st code-review round already according
  to Michael, I would like to ask you, to send to your second contribution
  to the devel-list for a review (if you have finished that work already)
 
  I hope you understand this policy and I suppose the 2nd sample you
  presenet will be a piece of cake for you? Alteratively you may tell us
  (or me and Michael personally) about your programming experience.
 
  Anyway, as it seems to me you will qualify ;) i ask you to already send
  me your sourceforge account name (on my personal email), so i can
  prepare anything for svn-write access.
 
  cheers, currently from Germany (Btw. I met some people from Intevation
  on the Intergeo fair)
 
  stefan
 
  @ Michael: thank you for reviewing! If you want you can commit the code.
  Otherwise I will do in the next days.
 
 
  Michaël Michaud schrieb:
Hi Eric,
   
Nice to see another french guy involved in OpenJUMP development ;-)
I reviewed your code and it's ok for me.
Maybe you should explain the use case for setting an attribute with
another attribute value.
Anyway, this is just a new capability of an existing plugin.
I can commit the code, or we have to ask Sunburned Surveyor or Stefan
Steiniger (I think Stefan is out of his office until next week)
  who are
the administrators of the site and can give svn access to new
  developers.
   
Michaël
   
Eric Lemesre a écrit :
   
Hello,
   
Thank verry much for the good job in OpenJUMP.
   
I make somme modifications in the plugIn ReplaceValuePlugIn (in
org.openjump.sigle.plugin.replace).
This plugin replace a attribute with a constante. And now we can
  copy
one attribute to an other one.
   
I joint the code.
   
How can i have acces to repository and what is rules to use?
Or how to put this modifications in JPP?
   
I have planed somme other works and want to give it to the community
   
Thanks
Eric
   
   
  
 
   
   
/*
* The Unified Mapping Platform (JUMP) is an extensible,
  interactive GUI
* for visualizing and manipulating spatial features with
  geometry and attributes.
*
* Copyright (C) 2003 Vivid Solutions
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston,
  MA  02111-1307, USA.
*
* For more information, contact:
*
* Vivid Solutions
* Suite #1A
* 2328 Government Street
* Victoria BC 

Re: [JPP-Devel] ReplaceValuePlugIn

2007-09-26 Thread erwan bocher
Hi Eric,

Thanks for the collboration.

Feel free to continue.

R1.


2007/9/25, Michaël Michaud [EMAIL PROTECTED]:
 Hi Eric,

 Nice to see another french guy involved in OpenJUMP development ;-)
 I reviewed your code and it's ok for me.
 Maybe you should explain the use case for setting an attribute with
 another attribute value.
 Anyway, this is just a new capability of an existing plugin.
 I can commit the code, or we have to ask Sunburned Surveyor or Stefan
 Steiniger (I think Stefan is out of his office until next week) who are
 the administrators of the site and can give svn access to new developers.

 Michaël

 Eric Lemesre a écrit :

  Hello,
 
  Thank verry much for the good job in OpenJUMP.
 
  I make somme modifications in the plugIn ReplaceValuePlugIn (in
  org.openjump.sigle.plugin.replace).
  This plugin replace a attribute with a constante. And now we can copy
  one attribute to an other one.
 
  I joint the code.
 
  How can i have acces to repository and what is rules to use?
  Or how to put this modifications in JPP?
 
  I have planed somme other works and want to give it to the community
 
  Thanks
  Eric
 
 
 
 
 /*
  * The Unified Mapping Platform (JUMP) is an extensible, interactive GUI
  * for visualizing and manipulating spatial features with geometry and 
  attributes.
  *
  * Copyright (C) 2003 Vivid Solutions
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
  * as published by the Free Software Foundation; either version 2
  * of the License, or (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, 
  USA.
  *
  * For more information, contact:
  *
  * Vivid Solutions
  * Suite #1A
  * 2328 Government Street
  * Victoria BC  V8T 5G5
  * Canada
  *
  * (250)385-6040
  * www.vividsolutions.com
  */
 
 package org.openjump.sigle.plugin.replace;
 
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
 import java.util.*;
 
 import javax.swing.ImageIcon;
 import javax.swing.JCheckBox;
 import javax.swing.JComboBox;
 import javax.swing.JOptionPane;
 import javax.swing.JTextField;
 
 
 
 import org.openjump.sigle.utilities.gui.DialogUtil;
 
 import com.vividsolutions.jump.I18N;
 import com.vividsolutions.jump.feature.*;
 import com.vividsolutions.jump.task.*;
 import com.vividsolutions.jump.workbench.WorkbenchContext;
 import com.vividsolutions.jump.workbench.model.*;
 import com.vividsolutions.jump.workbench.plugin.*;
 import com.vividsolutions.jump.workbench.ui.*;
 import com.vividsolutions.jump.workbench.ui.images.IconLoader;
 
 
 /**
  *
 * @author Erwan Bocher Laboratoire RESO UMR CNRS 6590
 * @url www.projet-sigle.org
 * @curentdate 25 juil. 06
 * @package name org.openjump.sigle.plugin.replace
 * @license Licence CeCILL http://www.cecill.info/
 * @todo TODO
 *
  */
 
 
 
 public class ReplaceValuePlugIn
 extends AbstractPlugIn
 implements ThreadedPlugIn
 {
 
 
   private MultiInputDialog dialog;
   //-- replace later with correct language
   private static String ATTRIBUTE = 
  I18N.get(org.openjump.sigle.plugin.ReplaceValuePlugIn.Attribute);
   private static String VALUE = 
  I18N.get(org.openjump.sigle.plugin.ReplaceValuePlugIn.New-value);
   private static String ATTRIBUTE_SRC = 
  I18N.get(org.openjump.sigle.plugin.ReplaceValuePlugIn.Attribute-src);
   private static String BY_ATTRIBUTE = 
  I18N.get(org.openjump.sigle.plugin.ReplaceValuePlugIn.New-value-by-copy);
   private static String TYPE = ;
   private static String SELECTED_ONLY = 
  GenericNames.USE_SELECTED_FEATURES_ONLY;
 
 
   private Layer layer;
   private String attrName;
   private String attrNameSrc;
   private String value = ;
   private boolean useSelected = true;
   private boolean byAttribute = false;
   public static final ImageIcon ICON = IconLoader.icon(Wrench.gif);
 
 
   public ReplaceValuePlugIn()
   {
 
   }
 
   public void initialize(PlugInContext context) {
 
  context.getFeatureInstaller().addMainMenuItem(this,new String[] { 
  MenuNames.TOOLS, MenuNames.TOOLS_EDIT_ATTRIBUTES },
this.getName(), false, null,
createEnableCheck(context.getWorkbenchContext())
);
 
}
 
   public String getName(){
return 
  I18N.get(org.openjump.sigle.plugin.ReplaceValuePlugIn.Replace-Attribute-Value);
   }
 
   public boolean execute(PlugInContext context) throws Exception {
 // lemesre: 

Re: [JPP-Devel] ReplaceValuePlugIn

2007-09-25 Thread Michaël Michaud
Hi Eric,

Nice to see another french guy involved in OpenJUMP development ;-)
I reviewed your code and it's ok for me.
Maybe you should explain the use case for setting an attribute with 
another attribute value.
Anyway, this is just a new capability of an existing plugin.
I can commit the code, or we have to ask Sunburned Surveyor or Stefan 
Steiniger (I think Stefan is out of his office until next week) who are 
the administrators of the site and can give svn access to new developers.

Michaël

Eric Lemesre a écrit :

 Hello,

 Thank verry much for the good job in OpenJUMP.

 I make somme modifications in the plugIn ReplaceValuePlugIn (in 
 org.openjump.sigle.plugin.replace).
 This plugin replace a attribute with a constante. And now we can copy 
 one attribute to an other one.

 I joint the code.

 How can i have acces to repository and what is rules to use?
 Or how to put this modifications in JPP?

 I have planed somme other works and want to give it to the community

 Thanks
 Eric




/*
 * The Unified Mapping Platform (JUMP) is an extensible, interactive GUI
 * for visualizing and manipulating spatial features with geometry and 
 attributes.
 *
 * Copyright (C) 2003 Vivid Solutions
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 *
 * For more information, contact:
 *
 * Vivid Solutions
 * Suite #1A
 * 2328 Government Street
 * Victoria BC  V8T 5G5
 * Canada
 *
 * (250)385-6040
 * www.vividsolutions.com
 */

package org.openjump.sigle.plugin.replace;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.*;

import javax.swing.ImageIcon;
import javax.swing.JCheckBox;
import javax.swing.JComboBox;
import javax.swing.JOptionPane;
import javax.swing.JTextField;



import org.openjump.sigle.utilities.gui.DialogUtil;

import com.vividsolutions.jump.I18N;
import com.vividsolutions.jump.feature.*;
import com.vividsolutions.jump.task.*;
import com.vividsolutions.jump.workbench.WorkbenchContext;
import com.vividsolutions.jump.workbench.model.*;
import com.vividsolutions.jump.workbench.plugin.*;
import com.vividsolutions.jump.workbench.ui.*;
import com.vividsolutions.jump.workbench.ui.images.IconLoader;


/**
 * 
* @author Erwan Bocher Laboratoire RESO UMR CNRS 6590
* @url www.projet-sigle.org
* @curentdate 25 juil. 06
* @package name org.openjump.sigle.plugin.replace
* @license Licence CeCILL http://www.cecill.info/
* @todo TODO
*
 */



public class ReplaceValuePlugIn
extends AbstractPlugIn
implements ThreadedPlugIn
{

 
  private MultiInputDialog dialog;
  //-- replace later with correct language
  private static String ATTRIBUTE = 
 I18N.get(org.openjump.sigle.plugin.ReplaceValuePlugIn.Attribute);
  private static String VALUE = 
 I18N.get(org.openjump.sigle.plugin.ReplaceValuePlugIn.New-value);
  private static String ATTRIBUTE_SRC = 
 I18N.get(org.openjump.sigle.plugin.ReplaceValuePlugIn.Attribute-src);
  private static String BY_ATTRIBUTE = 
 I18N.get(org.openjump.sigle.plugin.ReplaceValuePlugIn.New-value-by-copy);
  private static String TYPE = ;
  private static String SELECTED_ONLY = 
 GenericNames.USE_SELECTED_FEATURES_ONLY;
   

  private Layer layer;
  private String attrName;
  private String attrNameSrc;
  private String value = ;
  private boolean useSelected = true;
  private boolean byAttribute = false;
  public static final ImageIcon ICON = IconLoader.icon(Wrench.gif);


  public ReplaceValuePlugIn()
  {
   
  }
  
  public void initialize(PlugInContext context) {
   
 context.getFeatureInstaller().addMainMenuItem(this,new String[] { 
 MenuNames.TOOLS, MenuNames.TOOLS_EDIT_ATTRIBUTES }, 
   this.getName(), false, null, 
   createEnableCheck(context.getWorkbenchContext())
   ); 
   
   }

  public String getName(){
   return 
 I18N.get(org.openjump.sigle.plugin.ReplaceValuePlugIn.Replace-Attribute-Value);
  }
  
  public boolean execute(PlugInContext context) throws Exception {
// lemesre: duplicate from private initialisation
 ATTRIBUTE = 
 I18N.get(org.openjump.sigle.plugin.ReplaceValuePlugIn.Attribute);
VALUE = I18N.get(org.openjump.sigle.plugin.ReplaceValuePlugIn.New-value);
 

[JPP-Devel] ReplaceValuePlugIn

2007-09-24 Thread Eric Lemesre
Hello,

Thank verry much for the good job in OpenJUMP.

I make somme modifications in the plugIn ReplaceValuePlugIn (in
org.openjump.sigle.plugin.replace).
This plugin replace a attribute with a constante. And now we can copy one
attribute to an other one.

I joint the code.

How can i have acces to repository and what is rules to use?
Or how to put this modifications in JPP?

I have planed somme other works and want to give it to the community

Thanks
Eric

/*
 * The Unified Mapping Platform (JUMP) is an extensible, interactive GUI
 * for visualizing and manipulating spatial features with geometry and attributes.
 *
 * Copyright (C) 2003 Vivid Solutions
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 *
 * For more information, contact:
 *
 * Vivid Solutions
 * Suite #1A
 * 2328 Government Street
 * Victoria BC  V8T 5G5
 * Canada
 *
 * (250)385-6040
 * www.vividsolutions.com
 */

package org.openjump.sigle.plugin.replace;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.*;

import javax.swing.ImageIcon;
import javax.swing.JCheckBox;
import javax.swing.JComboBox;
import javax.swing.JOptionPane;
import javax.swing.JTextField;



import org.openjump.sigle.utilities.gui.DialogUtil;

import com.vividsolutions.jump.I18N;
import com.vividsolutions.jump.feature.*;
import com.vividsolutions.jump.task.*;
import com.vividsolutions.jump.workbench.WorkbenchContext;
import com.vividsolutions.jump.workbench.model.*;
import com.vividsolutions.jump.workbench.plugin.*;
import com.vividsolutions.jump.workbench.ui.*;
import com.vividsolutions.jump.workbench.ui.images.IconLoader;


/**
 * 
* @author Erwan Bocher Laboratoire RESO UMR CNRS 6590
* @url www.projet-sigle.org
* @curentdate 25 juil. 06
* @package name org.openjump.sigle.plugin.replace
* @license Licence CeCILL http://www.cecill.info/
* @todo TODO
*
 */



public class ReplaceValuePlugIn
extends AbstractPlugIn
implements ThreadedPlugIn
{

 
  private MultiInputDialog dialog;
  //-- replace later with correct language
  private static String ATTRIBUTE = I18N.get(org.openjump.sigle.plugin.ReplaceValuePlugIn.Attribute);
  private static String VALUE = I18N.get(org.openjump.sigle.plugin.ReplaceValuePlugIn.New-value);
  private static String ATTRIBUTE_SRC = I18N.get(org.openjump.sigle.plugin.ReplaceValuePlugIn.Attribute-src);
  private static String BY_ATTRIBUTE = I18N.get(org.openjump.sigle.plugin.ReplaceValuePlugIn.New-value-by-copy);
  private static String TYPE = ;
  private static String SELECTED_ONLY = GenericNames.USE_SELECTED_FEATURES_ONLY;
	

  private Layer layer;
  private String attrName;
  private String attrNameSrc;
  private String value = ;
  private boolean useSelected = true;
  private boolean byAttribute = false;
  public static final ImageIcon ICON = IconLoader.icon(Wrench.gif);


  public ReplaceValuePlugIn()
  {
   
  }
  
  public void initialize(PlugInContext context) {
		
	  context.getFeatureInstaller().addMainMenuItem(this,new String[] { MenuNames.TOOLS, MenuNames.TOOLS_EDIT_ATTRIBUTES }, 
  			this.getName(), false, null, 
  			createEnableCheck(context.getWorkbenchContext())
); 
	   	
	}

  public String getName(){
  	return I18N.get(org.openjump.sigle.plugin.ReplaceValuePlugIn.Replace-Attribute-Value);
  }
  
  public boolean execute(PlugInContext context) throws Exception {
// lemesre: duplicate from private initialisation
	  ATTRIBUTE = I18N.get(org.openjump.sigle.plugin.ReplaceValuePlugIn.Attribute);
VALUE = I18N.get(org.openjump.sigle.plugin.ReplaceValuePlugIn.New-value);
	  ATTRIBUTE_SRC = I18N.get(org.openjump.sigle.plugin.ReplaceValuePlugIn.Attribute-src);
	  BY_ATTRIBUTE = I18N.get(org.openjump.sigle.plugin.ReplaceValuePlugIn.New-value-by-copy);
SELECTED_ONLY = GenericNames.USE_SELECTED_FEATURES_ONLY;
	  
	dialog = new MultiInputDialog(
context.getWorkbenchFrame(), getName(), true);
setDialogValues(dialog, context);
if (layer.isEditable()){
GUIUtil.centreOnWindow(dialog);
dialog.setVisible(true);
if (! dialog.wasOKPressed()) { return false; }
getDialogValues(dialog);
return true;
	  }
	  else {
		
	JOptionPane.showMessageDialog(dialog, I18N.get(ui.SchemaPanel.layer-must-be-editable));
	}
	  return false;

  }

  public void run(TaskMonitor monitor, PlugInContext