[JPP-Devel] SVN: [6309] core/trunk/ChangeLog

2020-06-08 Thread jump-pilot-svn--- via Jump-pilot-devel
Revision: 6309
  http://sourceforge.net/p/jump-pilot/code/6309
Author:   ma15569
Date: 2020-06-08 12:14:16 + (Mon, 08 Jun 2020)
Log Message:
---
Updated ChangeLog file

Modified Paths:
--
core/trunk/ChangeLog

Modified: core/trunk/ChangeLog
===
--- core/trunk/ChangeLog2020-06-08 12:09:09 UTC (rev 6308)
+++ core/trunk/ChangeLog2020-06-08 12:14:16 UTC (rev 6309)
@@ -4,6 +4,13 @@
 # 3. be concise but convey the change in a way that ordinary users understand
 #< 80 chars 
-->#
 
+2020-06-08 Giuseppe Aruta
+   Apdated JumpPrintee plugin to version 1.90:
+   Added a valid plugin to export the view to several file formats (Raster, 
+   SVG, PDF). Export view to scale: style elements will be resized according
+   to the selected scale. This plugin substitutes SaveViewAsRaster and 
+   SaveViewAsSVG plugins in OpenJUMP PLUS version 
+
 2020-06-04 Giuseppe Aruta
 CAD tools. Small enhancement: a new saved block will be automatically 
 available as a symbol (Cadplan VertexSymbols plugin) in the session 
without 



___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


[JPP-Devel] SVN: [6308] core/trunk/lib/plus/JumpPrinter-1.90.jar

2020-06-08 Thread jump-pilot-svn--- via Jump-pilot-devel
Revision: 6308
  http://sourceforge.net/p/jump-pilot/code/6308
Author:   ma15569
Date: 2020-06-08 12:09:09 + (Mon, 08 Jun 2020)
Log Message:
---
Added new build of JumpPrinter plugin

Added Paths:
---
core/trunk/lib/plus/JumpPrinter-1.90.jar

Added: core/trunk/lib/plus/JumpPrinter-1.90.jar
===
(Binary files differ)

Index: core/trunk/lib/plus/JumpPrinter-1.90.jar
===
--- core/trunk/lib/plus/JumpPrinter-1.90.jar2020-06-08 12:07:39 UTC (rev 
6307)
+++ core/trunk/lib/plus/JumpPrinter-1.90.jar2020-06-08 12:09:09 UTC (rev 
6308)

Property changes on: core/trunk/lib/plus/JumpPrinter-1.90.jar
___
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property


___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


[JPP-Devel] SVN: [6307] plug-ins/CadPlan_JumpPrinter/dist

2020-06-08 Thread jump-pilot-svn--- via Jump-pilot-devel
Revision: 6307
  http://sourceforge.net/p/jump-pilot/code/6307
Author:   ma15569
Date: 2020-06-08 12:07:39 + (Mon, 08 Jun 2020)
Log Message:
---
Added new build and source code (version 1.90)

Added Paths:
---
plug-ins/CadPlan_JumpPrinter/dist/JumpPrinter-1.90.jar
plug-ins/CadPlan_JumpPrinter/dist/JumpPrinter-1.90.zip

Added: plug-ins/CadPlan_JumpPrinter/dist/JumpPrinter-1.90.jar
===
(Binary files differ)

Index: plug-ins/CadPlan_JumpPrinter/dist/JumpPrinter-1.90.jar
===
--- plug-ins/CadPlan_JumpPrinter/dist/JumpPrinter-1.90.jar  2020-06-08 
12:04:23 UTC (rev 6306)
+++ plug-ins/CadPlan_JumpPrinter/dist/JumpPrinter-1.90.jar  2020-06-08 
12:07:39 UTC (rev 6307)

Property changes on: plug-ins/CadPlan_JumpPrinter/dist/JumpPrinter-1.90.jar
___
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: plug-ins/CadPlan_JumpPrinter/dist/JumpPrinter-1.90.zip
===
(Binary files differ)

Index: plug-ins/CadPlan_JumpPrinter/dist/JumpPrinter-1.90.zip
===
--- plug-ins/CadPlan_JumpPrinter/dist/JumpPrinter-1.90.zip  2020-06-08 
12:04:23 UTC (rev 6306)
+++ plug-ins/CadPlan_JumpPrinter/dist/JumpPrinter-1.90.zip  2020-06-08 
12:07:39 UTC (rev 6307)

Property changes on: plug-ins/CadPlan_JumpPrinter/dist/JumpPrinter-1.90.zip
___
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property


___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


[JPP-Devel] SVN: [6306] plug-ins/CadPlan_JumpPrinter/trunk/src/com/cadplan/jump/ PrinterExtension.java

2020-06-08 Thread jump-pilot-svn--- via Jump-pilot-devel
Revision: 6306
  http://sourceforge.net/p/jump-pilot/code/6306
Author:   ma15569
Date: 2020-06-08 12:04:23 + (Mon, 08 Jun 2020)
Log Message:
---
SaveViewPlugin initialized by PrinterExtension file

Modified Paths:
--

plug-ins/CadPlan_JumpPrinter/trunk/src/com/cadplan/jump/PrinterExtension.java

Modified: 
plug-ins/CadPlan_JumpPrinter/trunk/src/com/cadplan/jump/PrinterExtension.java
===
--- 
plug-ins/CadPlan_JumpPrinter/trunk/src/com/cadplan/jump/PrinterExtension.java   
2020-06-08 12:02:16 UTC (rev 6305)
+++ 
plug-ins/CadPlan_JumpPrinter/trunk/src/com/cadplan/jump/PrinterExtension.java   
2020-06-08 12:04:23 UTC (rev 6306)
@@ -24,8 +24,6 @@
 import com.vividsolutions.jump.workbench.plugin.Extension;
 import com.vividsolutions.jump.workbench.plugin.PlugInContext;
 
-import javax.swing.*;
-
 /**
  * User: geoff
  * Date: 22/12/2006
@@ -34,12 +32,23 @@
  */
 public class PrinterExtension extends Extension
 {
-public void configure(PlugInContext context) throws Exception
-{
- new PrinterPlugIn().initialize(context);
-}
+   @Override
+   public void configure(PlugInContext context) throws Exception
+   {
+   new PrinterPlugIn().initialize(context);
+   new SaveViewPlugIn().initialize(context);
+   }
 
-public String getVersion() {
-return "1.88 (2018-01-28)";
-  }
+
+
+
+   @Override
+   public String getVersion() {
+   return "1.90 (2020-06-08)";
+   }
+
+   @Override
+   public String getName() {
+   return "Printer - © 2005 Geoffrey G Roy. Modified version by 
Giuseppe Aruta 2020";
+   }
 }



___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


[JPP-Devel] SVN: [6305] plug-ins/CadPlan_JumpPrinter/trunk/src/com/cadplan/jump

2020-06-08 Thread jump-pilot-svn--- via Jump-pilot-devel
Revision: 6305
  http://sourceforge.net/p/jump-pilot/code/6305
Author:   ma15569
Date: 2020-06-08 12:02:16 + (Mon, 08 Jun 2020)
Log Message:
---
Added a valid plugin to export the view in several file format (Raster, SVG, 
PDF) with some enhancement (resize view to save according to a scale).
This plugin substitute SaveViewAsRaster and SaveViewAsSVG plugins. 

Added Paths:
---
plug-ins/CadPlan_JumpPrinter/trunk/src/com/cadplan/jump/SaveViewPlugIn.java
plug-ins/CadPlan_JumpPrinter/trunk/src/com/cadplan/jump/SaveViewUtils.java

Added: 
plug-ins/CadPlan_JumpPrinter/trunk/src/com/cadplan/jump/SaveViewPlugIn.java
===
--- plug-ins/CadPlan_JumpPrinter/trunk/src/com/cadplan/jump/SaveViewPlugIn.java 
(rev 0)
+++ plug-ins/CadPlan_JumpPrinter/trunk/src/com/cadplan/jump/SaveViewPlugIn.java 
2020-06-08 12:02:16 UTC (rev 6305)
@@ -0,0 +1,429 @@
+package com.cadplan.jump;
+
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+//import java.awt.Graphics2D;
+import java.awt.GridBagLayout;
+import java.awt.event.ItemEvent;
+import java.awt.event.ItemListener;
+//import java.awt.geom.NoninvertibleTransformException;
+import java.awt.image.BufferedImage;
+import java.io.File;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.swing.Box;
+import javax.swing.BoxLayout;
+import javax.swing.ButtonGroup;
+import javax.swing.Icon;
+import javax.swing.ImageIcon;
+import javax.swing.JCheckBox;
+import javax.swing.JFileChooser;
+import javax.swing.JFormattedTextField;
+import javax.swing.JLabel;
+//import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JRadioButton;
+import javax.swing.filechooser.FileFilter;
+
+import org.openjump.core.apitools.IOTools;
+import org.openjump.core.ui.plugin.file.LayerPrinter2;
+import org.openjump.core.ui.plugin.file.WorldFileWriter;
+import org.openjump.core.ui.util.ScreenScale;
+import org.saig.core.gui.swing.sldeditor.util.FormUtils;
+
+import com.vividsolutions.jts.geom.Envelope;
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jump.I18N;
+import com.vividsolutions.jump.task.TaskMonitor;
+import com.vividsolutions.jump.workbench.JUMPWorkbench;
+import com.vividsolutions.jump.workbench.WorkbenchContext;
+import com.vividsolutions.jump.workbench.model.Layer;
+import com.vividsolutions.jump.workbench.model.Layerable;
+import com.vividsolutions.jump.workbench.plugin.EnableCheckFactory;
+import com.vividsolutions.jump.workbench.plugin.MultiEnableCheck;
+import com.vividsolutions.jump.workbench.plugin.PlugInContext;
+import com.vividsolutions.jump.workbench.plugin.ThreadedBasePlugIn;
+import com.vividsolutions.jump.workbench.ui.GUIUtil;
+import com.vividsolutions.jump.workbench.ui.LayerViewPanel;
+import com.vividsolutions.jump.workbench.ui.MenuNames;
+import com.vividsolutions.jump.workbench.ui.ValidatingTextField;
+import com.vividsolutions.jump.workbench.ui.Viewport;
+import com.vividsolutions.jump.workbench.ui.images.IconLoader;
+import com.vividsolutions.jump.workbench.ui.plugin.PersistentBlackboardPlugIn;
+
+/**
+ * Save the view to a PNG or a JPG image file.
+ * The exported image can have a size different from the original view.
+ */
+public class SaveViewPlugIn extends ThreadedBasePlugIn {
+   //ImageIO doesn't know about the "gif" format. I guess it's a copyright
+   // issue [Jon Aquino 11/6/2003]
+   //Don't use TYPE_INT_ARGB for jpegs -- they will turn pink [Jon Aquino
+   // 11/6/2003]
+   //ImageIO can probably write gif images from java 6, but we do we 
really 
+   // need that ? [mmichaud 2012-09-02]
+   //Extended capability to export to SVG and PDF and 
+   //to save images at defined scales. [Giuseppe Aruta 2020-06-07]
+
+   private List myFileFilters;
+   //Arrays.asList(
+   /*  createFileFilter("PNG - Portable Network Graphics", 
"png",
+   BufferedImage.TYPE_INT_ARGB),
+   createFileFilter("JPEG - Joint Photographic Experts 
Group", "jpg",
+   BufferedImage.TYPE_INT_RGB));*/
+
+
+   private JFileChooser fileChooser = null;
+   private WorkbenchContext workbenchContext;
+   private JCheckBox worldFileCheckBox = null;
+   private final ImageIcon icon = IconLoader.icon("Box.gif");
+   private Geometry fence = null;
+
+
+   private ButtonGroup buttonGroup = new ButtonGroup();
+   private JRadioButton perLength = new JRadioButton();
+   private JRadioButton perScale = new JRadioButton();
+   private JFormattedTextField scaleField;
+
+   static WorkbenchContext wContext = 
JUMPWorkbench.getInstance().getContext();
+
+   public Icon getIcon() {
+   return IconLoader.icon("Camera.gif");
+   }
+
+   private ValidatingTextField pixelSize

[JPP-Devel] SVN: [6304] plug-ins/CADExtension/trunk/src/howto-compile.txt

2020-06-08 Thread jump-pilot-svn--- via Jump-pilot-devel
Revision: 6304
  http://sourceforge.net/p/jump-pilot/code/6304
Author:   ma15569
Date: 2020-06-08 11:57:15 + (Mon, 08 Jun 2020)
Log Message:
---
updated compile text file

Modified Paths:
--
plug-ins/CADExtension/trunk/src/howto-compile.txt

Modified: plug-ins/CADExtension/trunk/src/howto-compile.txt
===
--- plug-ins/CADExtension/trunk/src/howto-compile.txt   2020-06-08 11:44:48 UTC 
(rev 6303)
+++ plug-ins/CADExtension/trunk/src/howto-compile.txt   2020-06-08 11:57:15 UTC 
(rev 6304)
@@ -1 +1,3 @@
 VertexSymbolsXXX.jar file is required to compile CAD plugin from version 0.8
+The file is available at 
svn.code.sf.net/p/jump-pilot/code/plug-ins/CadPlan_VertexSymbols/dist
+or in the folder OpenJUMP/lib/ext



___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


Re: [JPP-Devel] CAD plugin. Add new library (as depency)

2020-06-08 Thread Giuseppe Aruta
OK

2020-06-08 13:50 GMT+02:00, edgar.sol...@web.de :
> yeah, it's a little more complex. your way is fine as well. maybe you should
> point out where the developer can find/download the needed jar file?!.. ede
>
> On 08.06.2020 13:31, Giuseppe Aruta wrote:
>> Hi Ede, I tried in this way but it doesn't work for me. I had a some
>> exceptions even within try/catch blocks.
>> I will use the option to save a howto_compile.txt file into src folder
>> Peppe
>>
>> Il giorno gio 4 giu 2020 alle ore 12:05 > > ha scritto:
>>
>> On 04.06.2020 10:19, Giuseppe Aruta wrote:
>> > Indeed I was planning this way: from user's point of view there is
>> no difference.
>>
>> yup. exactly my point.
>>
>> > On the other hand, I was thinking about developers who have a
>> project in their eclipse connected to svn (or not) and have a warning that
>> a library is missing whenever they want to compile (right now, a very rare
>> situation)
>>
>> this would be solved via reflection meaning instantiating classes from
>> a string name and running methods derived from string names as well e.g.
>> like
>>
>>
>> https://stackoverflow.com/questions/3574065/instantiate-a-class-object-with-constructor-that-accepts-a-string-parameter
>>
>> https://stackoverflow.com/questions/1782598/with-java-reflection-how-to-instantiate-a-new-object-then-call-a-method-on-it
>>
>> so in your case (just written, down not compiled) roughly
>>
>> Class cl = Class.forName("com.cadplan.jump.utils.LoadSymbolFiles");
>> // find constructor with the context argument
>> Constructor cons = cl.getConstructor(WorkbenchContext.class);
>> // this is your instance
>> Object o = cons.newInstance(context);
>> // find & run the method
>> Method method = cl.getDeclaredMethod("start");
>> method.invoke(o);
>>
>> this way the classes accessed do not have to be present during compile
>> but only during runtime. this may throw a lot of exceptions, so make sure
>> to catch them properly, easiest with one catches all.
>>
>> > I can add a readme text file on SVN>CAD plugin>dist folder
>> explaining that VertexSymbol.jar library is required to compile
>>
>> better put a howto_compile.txt or such in the src folder ;) where devs
>> will stumble over it.
>>
>> > Best regards
>> > Peppe
>>
>> ditto.. sunny regards from rainy germany, ede
>>
>> >
>> >
>> > Il giorno mer 3 giu 2020 alle ore 22:20 >  > >> ha scritto:
>> >
>> >     On 03.06.2020 17:32, Giuseppe Aruta wrote:
>> >     > Hi all,
>> >     > I want to add VertexSymbolsXXX.jar as depency to CAD plugin.
>> >     > This is the reason:
>> >     > Currently, whenever the user saves a new block (CAD
>> toolbar>Block>Save
>> >     > geometry as block) as file, this can be used also as a
>> point/line symbol
>> >     > for styling. But, to do that, the user needs to close/restart
>> again OJ.
>> >     > Adding this dependency and using a few lines of code, a new
>> block will be
>> >     > automatically available as a symbol without restarting
>> OpenJUMP.
>> >     > I would like your opinion before to to this change
>> >
>> >     could you explain why you want to make it a dependency rather
>> than just detecting if the other extension is installed and run some code
>> only when it is detected?
>> >
>> >     ..ede
>> >
>> >
>> >     ___
>> >     Jump-pilot-devel mailing list
>> >     Jump-pilot-devel@lists.sourceforge.net
>> 
>> > >
>> >     https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>> >
>> >
>> >
>> > ___
>> > Jump-pilot-devel mailing list
>> > Jump-pilot-devel@lists.sourceforge.net
>> 
>> > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>> >
>>
>>
>>
>> ___
>> Jump-pilot-devel mailing list
>> Jump-pilot-devel@lists.sourceforge.net
>> 
>> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>>
>>
>>
>> ___
>> Jump-pilot-devel mailing list
>> Jump-pilot-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>>
>
>
>
> ___
> Jump-pilot-devel mailing list
> Jump-pilot-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>


___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
http

Re: [JPP-Devel] CAD plugin. Add new library (as depency)

2020-06-08 Thread edgar . soldin
yeah, it's a little more complex. your way is fine as well. maybe you should 
point out where the developer can find/download the needed jar file?!.. ede

On 08.06.2020 13:31, Giuseppe Aruta wrote:
> Hi Ede, I tried in this way but it doesn't work for me. I had a some 
> exceptions even within try/catch blocks.
> I will use the option to save a howto_compile.txt file into src folder
> Peppe
>
> Il giorno gio 4 giu 2020 alle ore 12:05  > ha scritto:
>
> On 04.06.2020 10:19, Giuseppe Aruta wrote:
> > Indeed I was planning this way: from user's point of view there is no 
> difference.
>
> yup. exactly my point.
>
> > On the other hand, I was thinking about developers who have a project 
> in their eclipse connected to svn (or not) and have a warning that a library 
> is missing whenever they want to compile (right now, a very rare situation)
>
> this would be solved via reflection meaning instantiating classes from a 
> string name and running methods derived from string names as well e.g. like
>
> 
> https://stackoverflow.com/questions/3574065/instantiate-a-class-object-with-constructor-that-accepts-a-string-parameter
> 
> https://stackoverflow.com/questions/1782598/with-java-reflection-how-to-instantiate-a-new-object-then-call-a-method-on-it
>
> so in your case (just written, down not compiled) roughly
>
> Class cl = Class.forName("com.cadplan.jump.utils.LoadSymbolFiles");
> // find constructor with the context argument
> Constructor cons = cl.getConstructor(WorkbenchContext.class);
> // this is your instance
> Object o = cons.newInstance(context);
> // find & run the method
> Method method = cl.getDeclaredMethod("start");
> method.invoke(o);
>
> this way the classes accessed do not have to be present during compile 
> but only during runtime. this may throw a lot of exceptions, so make sure to 
> catch them properly, easiest with one catches all.
>
> > I can add a readme text file on SVN>CAD plugin>dist folder explaining 
> that VertexSymbol.jar library is required to compile
>
> better put a howto_compile.txt or such in the src folder ;) where devs 
> will stumble over it.
>
> > Best regards
> > Peppe
>
> ditto.. sunny regards from rainy germany, ede
>
> >
> >
> > Il giorno mer 3 giu 2020 alle ore 22:20    >> ha scritto:
> >
> >     On 03.06.2020 17:32, Giuseppe Aruta wrote:
> >     > Hi all,
> >     > I want to add VertexSymbolsXXX.jar as depency to CAD plugin.
> >     > This is the reason:
> >     > Currently, whenever the user saves a new block (CAD 
> toolbar>Block>Save
> >     > geometry as block) as file, this can be used also as a point/line 
> symbol
> >     > for styling. But, to do that, the user needs to close/restart 
> again OJ.
> >     > Adding this dependency and using a few lines of code, a new block 
> will be
> >     > automatically available as a symbol without restarting OpenJUMP.
> >     > I would like your opinion before to to this change
> >
> >     could you explain why you want to make it a dependency rather than 
> just detecting if the other extension is installed and run some code only 
> when it is detected?
> >
> >     ..ede
> >
> >
> >     ___
> >     Jump-pilot-devel mailing list
> >     Jump-pilot-devel@lists.sourceforge.net 
>  
>  >
> >     https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
> >
> >
> >
> > ___
> > Jump-pilot-devel mailing list
> > Jump-pilot-devel@lists.sourceforge.net 
> 
> > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
> >
>
>
>
> ___
> Jump-pilot-devel mailing list
> Jump-pilot-devel@lists.sourceforge.net 
> 
> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>
>
>
> ___
> Jump-pilot-devel mailing list
> Jump-pilot-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>



___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


[JPP-Devel] SVN: [6303] plug-ins/CADExtension/trunk/src/howto-compile.txt

2020-06-08 Thread jump-pilot-svn--- via Jump-pilot-devel
Revision: 6303
  http://sourceforge.net/p/jump-pilot/code/6303
Author:   ma15569
Date: 2020-06-08 11:44:48 + (Mon, 08 Jun 2020)
Log Message:
---
Added note to remind that CAD plugin requires also vertexSymbols.jar to be 
compiled

Added Paths:
---
plug-ins/CADExtension/trunk/src/howto-compile.txt

Added: plug-ins/CADExtension/trunk/src/howto-compile.txt
===
--- plug-ins/CADExtension/trunk/src/howto-compile.txt   
(rev 0)
+++ plug-ins/CADExtension/trunk/src/howto-compile.txt   2020-06-08 11:44:48 UTC 
(rev 6303)
@@ -0,0 +1 @@
+VertexSymbolsXXX.jar file is required to compile CAD plugin from version 0.8


Property changes on: plug-ins/CADExtension/trunk/src/howto-compile.txt
___
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property


___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


Re: [JPP-Devel] CAD plugin. Add new library (as depency)

2020-06-08 Thread Giuseppe Aruta
Hi Ede, I tried in this way but it doesn't work for me. I had a some
exceptions even within try/catch blocks.
I will use the option to save a howto_compile.txt file into src folder
Peppe

Il giorno gio 4 giu 2020 alle ore 12:05  ha scritto:

> On 04.06.2020 10:19, Giuseppe Aruta wrote:
> > Indeed I was planning this way: from user's point of view there is no
> difference.
>
> yup. exactly my point.
>
> > On the other hand, I was thinking about developers who have a project in
> their eclipse connected to svn (or not) and have a warning that a library
> is missing whenever they want to compile (right now, a very rare situation)
>
> this would be solved via reflection meaning instantiating classes from a
> string name and running methods derived from string names as well e.g. like
>
>
> https://stackoverflow.com/questions/3574065/instantiate-a-class-object-with-constructor-that-accepts-a-string-parameter
>
> https://stackoverflow.com/questions/1782598/with-java-reflection-how-to-instantiate-a-new-object-then-call-a-method-on-it
>
> so in your case (just written, down not compiled) roughly
>
> Class cl = Class.forName("com.cadplan.jump.utils.LoadSymbolFiles");
> // find constructor with the context argument
> Constructor cons = cl.getConstructor(WorkbenchContext.class);
> // this is your instance
> Object o = cons.newInstance(context);
> // find & run the method
> Method method = cl.getDeclaredMethod("start");
> method.invoke(o);
>
> this way the classes accessed do not have to be present during compile but
> only during runtime. this may throw a lot of exceptions, so make sure to
> catch them properly, easiest with one catches all.
>
> > I can add a readme text file on SVN>CAD plugin>dist folder explaining
> that VertexSymbol.jar library is required to compile
>
> better put a howto_compile.txt or such in the src folder ;) where devs
> will stumble over it.
>
> > Best regards
> > Peppe
>
> ditto.. sunny regards from rainy germany, ede
>
> >
> >
> > Il giorno mer 3 giu 2020 alle ore 22:20  edgar.sol...@web.de>> ha scritto:
> >
> > On 03.06.2020 17:32, Giuseppe Aruta wrote:
> > > Hi all,
> > > I want to add VertexSymbolsXXX.jar as depency to CAD plugin.
> > > This is the reason:
> > > Currently, whenever the user saves a new block (CAD
> toolbar>Block>Save
> > > geometry as block) as file, this can be used also as a point/line
> symbol
> > > for styling. But, to do that, the user needs to close/restart
> again OJ.
> > > Adding this dependency and using a few lines of code, a new block
> will be
> > > automatically available as a symbol without restarting OpenJUMP.
> > > I would like your opinion before to to this change
> >
> > could you explain why you want to make it a dependency rather than
> just detecting if the other extension is installed and run some code only
> when it is detected?
> >
> > ..ede
> >
> >
> > ___
> > Jump-pilot-devel mailing list
> > Jump-pilot-devel@lists.sourceforge.net  Jump-pilot-devel@lists.sourceforge.net>
> > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
> >
> >
> >
> > ___
> > Jump-pilot-devel mailing list
> > Jump-pilot-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
> >
>
>
>
> ___
> Jump-pilot-devel mailing list
> Jump-pilot-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>
___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel