[Git][java-team/sweethome3d-furniture-editor][upstream] New upstream version 1.23

Markus Koschany gitlab at salsa.debian.org
Sun Oct 14 12:46:55 BST 2018


Markus Koschany pushed to branch upstream at Debian Java Maintainers / sweethome3d-furniture-editor


Commits:
c626820a by Markus Koschany at 2018-10-14T11:28:15Z
New upstream version 1.23
- - - - -


5 changed files:

- .settings/org.eclipse.jdt.core.prefs
- README.TXT
- build.xml
- src/com/eteks/furniturelibraryeditor/swing/ImportFurnitureTaskPanel.java
- src/com/eteks/furniturelibraryeditor/swing/package.properties


Changes:

=====================================
.settings/org.eclipse.jdt.core.prefs
=====================================
@@ -9,6 +9,7 @@ org.eclipse.jdt.core.compiler.debug.sourceFile=generate
 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
 org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
 org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647
 org.eclipse.jdt.core.formatter.align_type_members_on_columns=true
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
@@ -22,8 +23,10 @@ org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
 org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=49
 org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
 org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=20
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header=0
 org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
 org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references=0
 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=18
 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=18
 org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
@@ -33,6 +36,8 @@ org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration
 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=2
 org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
 org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_type_arguments=0
+org.eclipse.jdt.core.formatter.alignment_for_type_parameters=0
 org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
 org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
 org.eclipse.jdt.core.formatter.blank_lines_after_package=1
@@ -53,6 +58,7 @@ org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
 org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
 org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
 org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
 org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
 org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
 org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
@@ -68,7 +74,7 @@ org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
 org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
 org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=do not insert
 org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.comment.line_length=120
 org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
 org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
 org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
@@ -90,6 +96,7 @@ org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
 org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
 org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
 org.eclipse.jdt.core.formatter.indentation.size=8
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_enum_constant=insert
 org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
 org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
 org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
@@ -99,6 +106,7 @@ org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do
 org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
 org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
 org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
 org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
 org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
 org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
@@ -146,6 +154,7 @@ org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=inser
 org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
 org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
 org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
 org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
 org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
 org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
@@ -223,6 +232,7 @@ org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do n
 org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
 org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
 org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
 org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
 org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
 org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
@@ -277,16 +287,28 @@ org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
 org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
 org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
 org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=120
+org.eclipse.jdt.core.formatter.lineSplit=500
 org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
 org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
 org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
 org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.parentheses_positions_in_annotation=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_enum_constant_declaration=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_lambda_declaration=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_method_delcaration=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_switch_statement=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause=common_lines
 org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
 org.eclipse.jdt.core.formatter.tabulation.char=space
 org.eclipse.jdt.core.formatter.tabulation.size=2
 org.eclipse.jdt.core.formatter.use_on_off_tags=false
 org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false
 org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true
 org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
 org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true


=====================================
README.TXT
=====================================
@@ -1,18 +1,18 @@
-FURNITURE LIBRARY EDITOR v 1.22
+FURNITURE LIBRARY EDITOR v 1.23
 -------------------------------
 
 This archive contains source code of the Furniture Library Editor for Sweet Home 3D.
 
 You may also download this source code with the following SVN command:
 
-svn checkout https://svn.code.sf.net/p/sweethome3d/code/tags/V_1_22/FurnitureLibraryEditor FurnitureLibraryEditor
+svn checkout https://svn.code.sf.net/p/sweethome3d/code/tags/V_1_23/FurnitureLibraryEditor FurnitureLibraryEditor
 
 
 As this project depends on Sweet Home 3D, download and install also Sweet Home 3D source code from 
-http://prdownloads.sourceforge.net/sweethome3d/SweetHome3D-5.7-src.zip 
+http://prdownloads.sourceforge.net/sweethome3d/SweetHome3D-6.0-src.zip 
 or with the following SVN command: 
 
-svn checkout https://svn.code.sf.net/p/sweethome3d/code/tags/V_5_7/SweetHome3D SweetHome3D
+svn checkout https://svn.code.sf.net/p/sweethome3d/code/tags/V_6_0/SweetHome3D SweetHome3D
 
 
 HOW TO USE THIS SOURCE CODE


=====================================
build.xml
=====================================
@@ -10,7 +10,7 @@
 -->
 <project basedir="." default="furnitureLibraryEditorJarExecutable" name="FurnitureLibraryEditor">
   <!-- The current version of the Furniture Library Editor -->
-  <property name="version" value="1.22"/>
+  <property name="version" value="1.23"/>
 
   <target name="furnitureLibraryEditor" 
           description="Builds build/FurnitureLibraryEditor.jar with all its classes">
@@ -30,6 +30,9 @@
     <!-- Compile Furniture Library Editor -->
     <javac srcdir="src" destdir="build/classes"
            encoding="ISO-8859-1" target="1.5">
+      <extdirs>
+        <pathelement location="../SweetHome3D/lib"/>
+      </extdirs>
       <classpath>
         <pathelement location="build/classes"/>
         <pathelement location="../SweetHome3D/lib/batik-svgpathparser-1.7.jar"/>
@@ -144,7 +147,7 @@
         <include name="*.jar"/>
         <include name="macosx/*.jar"/>
         <include name="java3d-1.6/*.jar"/>
-      	<exclude name="java3d-1.6/jogl-all.jar"/>
+        <exclude name="java3d-1.6/jogl-all.jar"/>
         <exclude name="freehep-vectorgraphics-svg-*.jar"/>
         <exclude name="iText-*.jar"/>
         <exclude name="sunflow-*.jar"/>


=====================================
src/com/eteks/furniturelibraryeditor/swing/ImportFurnitureTaskPanel.java
=====================================
@@ -31,7 +31,6 @@ import java.net.URL;
 import java.net.URLDecoder;
 import java.net.URLEncoder;
 import java.util.Arrays;
-import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.atomic.AtomicReference;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipInputStream;
@@ -91,29 +90,16 @@ public class ImportFurnitureTaskPanel extends ThreadedTaskPanel implements Impor
    */
   public CatalogPieceOfFurniture readPieceOfFurniture(final Content model) throws InterruptedException {
     try {
-      final AtomicReference<BranchGroup> modelNode = new AtomicReference<BranchGroup>();
       String modelName = "model";
-      final CountDownLatch latch = new CountDownLatch(1);
-      EventQueue.invokeAndWait(new Runnable() {
-          public void run() {
-            // Load content using cache to make it accessible by preview components
-            ModelManager.getInstance().loadModel(model, new ModelManager.ModelObserver() {
-                public void modelUpdated(BranchGroup modelRoot) {
-                  latch.countDown();
-                  modelNode.set(modelRoot);
-                }
-                
-                public void modelError(Exception ex) {
-                  latch.countDown();
-                }
-              });
-          }
-        });
-      
-      latch.await();
+      final AtomicReference<BranchGroup> modelNode = new AtomicReference<BranchGroup>();
+      try {
+        // Load model without ModelManager cache in case its content changed 
+        modelNode.set(ModelManager.getInstance().loadModel(model));
+      } catch (IOException ex) {
+        // modelNode not set
+      }
       
       URLContent pieceModel = null;
-      Content previewModel = null;
       if (modelNode.get() != null) {
         // Copy model to a temporary OBJ content with materials and textures
         if (model instanceof URLContent) {
@@ -123,12 +109,19 @@ public class ImportFurnitureTaskPanel extends ThreadedTaskPanel implements Impor
           }
         } 
 
-        previewModel = model;
         pieceModel = copyToTemporaryOBJContent(modelNode.get(), model);
         int dotIndex = modelName.lastIndexOf('.');
         if (dotIndex != -1) {
           modelName = modelName.substring(0, dotIndex);
         } 
+        // Load copied content in current thread using cache to make it accessible by preview components without waiting in EDT
+        ModelManager.getInstance().loadModel(model, true, new ModelManager.ModelObserver() {
+            public void modelUpdated(BranchGroup modelRoot) {
+            }
+            
+            public void modelError(Exception ex) {
+            }
+          });
       } else {
         ZipInputStream zipIn = null;
         try {
@@ -154,26 +147,17 @@ public class ImportFurnitureTaskPanel extends ThreadedTaskPanel implements Impor
                 URL entryUrl = new URL("jar:" + urlContent.getURL() + "!/" 
                     + URLEncoder.encode(entryName, "UTF-8").replace("+", "%20").replace("%2F", "/"));
                 final Content entryContent = new TemporaryURLContent(entryUrl);
-                final CountDownLatch entryLatch = new CountDownLatch(1);
-                EventQueue.invokeAndWait(new Runnable() {
-                    public void run() {
-                      // Load content using cache to make it accessible by preview components
-                      ModelManager.getInstance().loadModel(entryContent, new ModelManager.ModelObserver() {
-                          public void modelUpdated(BranchGroup modelRoot) {
-                            modelNode.set(modelRoot);
-                            entryLatch.countDown();
-                          }
-                          
-                          public void modelError(Exception ex) {
-                            entryLatch.countDown();
-                          }
-                        });
+                // Load content using cache to make it accessible by preview components without waiting in EDT
+                ModelManager.getInstance().loadModel(entryContent, true, new ModelManager.ModelObserver() {
+                    public void modelUpdated(BranchGroup modelRoot) {
+                      modelNode.set(modelRoot);
+                    }
+                    
+                    public void modelError(Exception ex) {
                     }
                   });
                 
-                entryLatch.await();
                 if (modelNode.get() != null) {
-                  previewModel =
                   pieceModel = new TemporaryURLContent(entryUrl);
                   if (!entryFileName.toLowerCase().endsWith(".obj")
                       && (this.preferences.isModelContentAlwaysConvertedToOBJFormat()
@@ -209,10 +193,10 @@ public class ImportFurnitureTaskPanel extends ThreadedTaskPanel implements Impor
       
       Vector3f size = ModelManager.getInstance().getSize(modelNode.get());
       // Generate icon image        
-      final Content finalPreviewModel = previewModel;
+      final Content previewModel = pieceModel;
       EventQueue.invokeAndWait(new Runnable() {
           public void run() {
-            iconPreviewComponent.setModel(finalPreviewModel);
+            iconPreviewComponent.setModel(previewModel);
           }
         });
       Thread.sleep(this.firstRendering ? 1000 : 100);
@@ -238,24 +222,9 @@ public class ImportFurnitureTaskPanel extends ThreadedTaskPanel implements Impor
       } else {
         key = null;
       }
-      // Compute a more human readable name with spaces instead of hyphens and without camel case and trailing digit 
-      String pieceName = "" + Character.toUpperCase(modelName.charAt(0));
-      for (int i = 1; i < modelName.length(); i++) {
-        char c = modelName.charAt(i);
-        if (c == '-' || c == '_') {
-          pieceName += ' ';
-        } else if (!Character.isDigit(c) || i < modelName.length() - 1) {
-          // Remove camel case
-          if ((Character.isUpperCase(c) || Character.isDigit(c)) 
-              && Character.isLowerCase(modelName.charAt(i - 1))) {
-            pieceName += ' ';
-            c = Character.toLowerCase(c);
-          }
-          pieceName += c;
-        }
-      }
+      
       CatalogPieceOfFurniture piece = new CatalogPieceOfFurniture(key, 
-          pieceName, null, null, new String [0], null, null, iconContent.get(), null, pieceModel, 
+          getPieceOfFurnitureName(modelName), null, null, new String [0], null, null, iconContent.get(), null, pieceModel, 
           size.x, size.z, size.y, 0f, 1f, true, null, null, false, pieceModel.getSize(), 
           this.preferences.getDefaultCreator(), true, true, true, true, null, null, null);
       FurnitureCategory defaultCategory = new FurnitureCategory(
@@ -273,6 +242,30 @@ public class ImportFurnitureTaskPanel extends ThreadedTaskPanel implements Impor
       return null;
     }
   }
+
+  /**
+   * Returns a human readable name matching the given model name with spaces instead of hyphens 
+   * and without camel case and trailing digit.
+   */
+  protected String getPieceOfFurnitureName(String modelName) {
+    // Compute a more human readable name with spaces instead of hyphens and without camel case and trailing digit 
+    String pieceName = "" + Character.toUpperCase(modelName.charAt(0));
+    for (int i = 1; i < modelName.length(); i++) {
+      char c = modelName.charAt(i);
+      if (c == '-' || c == '_') {
+        pieceName += ' ';
+      } else if (!Character.isDigit(c) || i < modelName.length() - 1) {
+        // Remove camel case
+        if ((Character.isUpperCase(c) || Character.isDigit(c)) 
+            && Character.isLowerCase(modelName.charAt(i - 1))) {
+          pieceName += ' ';
+          c = Character.toLowerCase(c);
+        }
+        pieceName += c;
+      }
+    }
+    return pieceName;
+  }
   
   /**
    * Returns a copy of a given <code>model</code> as a zip content at OBJ format.


=====================================
src/com/eteks/furniturelibraryeditor/swing/package.properties
=====================================
@@ -122,7 +122,7 @@ EditorPane.about.message=<html><font face="sanssherif"><center><font size="+2"><
     </p><p><font size="-2">\u00a9 Copyrights 2010-2018 eTeks  info at eteks.com\
     <br>Distributed under GNU General Public License</font>
 # Note to translators: dot not copy the 2 following keys in localized file
-EditorPane.about.version=1.22
+EditorPane.about.version=1.23
 EditorPane.about.icon=/com/eteks/furniturelibraryeditor/swing/resources/aboutIcon.png
 
 



View it on GitLab: https://salsa.debian.org/java-team/sweethome3d-furniture-editor/commit/c626820a1e9ffa29b607300e2304b611e47d142b

-- 
View it on GitLab: https://salsa.debian.org/java-team/sweethome3d-furniture-editor/commit/c626820a1e9ffa29b607300e2304b611e47d142b
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20181014/ca6fb06b/attachment.html>


More information about the pkg-java-commits mailing list