From: Reino Ruusu Date: Wed, 6 Nov 2019 13:07:21 +0000 (+0200) Subject: Compiler warning elimination X-Git-Tag: v1.43.0~139 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F60%2F3460%2F1;p=simantics%2F3d.git Compiler warning elimination Switch Java 1.6 with 1.8 Disable Java nature in pure binary bundles Change-Id: I47d0344ffe9c2a924f2a4a72fae6cfd478bee121 --- diff --git a/.project b/.project new file mode 100644 index 00000000..78c264cb --- /dev/null +++ b/.project @@ -0,0 +1,17 @@ + + + 3d + + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.m2e.core.maven2Nature + + diff --git a/org.jcae.opencascade.win32.x86_64/.project b/org.jcae.opencascade.win32.x86_64/.project index 254ed585..484a557c 100644 --- a/org.jcae.opencascade.win32.x86_64/.project +++ b/org.jcae.opencascade.win32.x86_64/.project @@ -5,11 +5,6 @@ - - org.eclipse.jdt.core.javabuilder - - - org.eclipse.pde.ManifestBuilder @@ -23,6 +18,5 @@ org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature diff --git a/org.jcae.opencascade.win32.x86_64/META-INF/MANIFEST.MF b/org.jcae.opencascade.win32.x86_64/META-INF/MANIFEST.MF index 005a0031..9eab8e0c 100644 --- a/org.jcae.opencascade.win32.x86_64/META-INF/MANIFEST.MF +++ b/org.jcae.opencascade.win32.x86_64/META-INF/MANIFEST.MF @@ -6,3 +6,4 @@ Bundle-Version: 7.3.0.qualifier Fragment-Host: org.jcae.opencascade;bundle-version="7.3.0" Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Eclipse-PlatformFilter: (& (osgi.os=win32) (osgi.arch=x86_64)) +Automatic-Module-Name: org.jcae.opencascade.win32.x86_64 diff --git a/org.jcae.opencascade.win32.x86_64/build.properties b/org.jcae.opencascade.win32.x86_64/build.properties index 64c5d46d..d9144c83 100644 --- a/org.jcae.opencascade.win32.x86_64/build.properties +++ b/org.jcae.opencascade.win32.x86_64/build.properties @@ -1,5 +1,4 @@ -output.. = bin/ bin.includes = META-INF/,\ .,\ OccJava.dll,\ diff --git a/org.jcae.opencascade/META-INF/MANIFEST.MF b/org.jcae.opencascade/META-INF/MANIFEST.MF index 4be8c2ca..d54c0fea 100644 --- a/org.jcae.opencascade/META-INF/MANIFEST.MF +++ b/org.jcae.opencascade/META-INF/MANIFEST.MF @@ -9,3 +9,4 @@ Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Export-Package: org.jcae.opencascade, org.jcae.opencascade.jni +Automatic-Module-Name: org.jcae.opencascade diff --git a/org.simantics.g3d.csg.ontology/.classpath b/org.simantics.g3d.csg.ontology/.classpath index 8a8f1668..b862a296 100644 --- a/org.simantics.g3d.csg.ontology/.classpath +++ b/org.simantics.g3d.csg.ontology/.classpath @@ -1,6 +1,6 @@ - + diff --git a/org.simantics.g3d.csg.ontology/.settings/org.eclipse.jdt.core.prefs b/org.simantics.g3d.csg.ontology/.settings/org.eclipse.jdt.core.prefs index da2e9609..295926d9 100644 --- a/org.simantics.g3d.csg.ontology/.settings/org.eclipse.jdt.core.prefs +++ b/org.simantics.g3d.csg.ontology/.settings/org.eclipse.jdt.core.prefs @@ -1,8 +1,7 @@ -#Tue Dec 13 11:35:42 EET 2011 eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 -org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.6 +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/org.simantics.g3d.csg.ontology/META-INF/MANIFEST.MF b/org.simantics.g3d.csg.ontology/META-INF/MANIFEST.MF index 7fdef4a2..aa284e2d 100644 --- a/org.simantics.g3d.csg.ontology/META-INF/MANIFEST.MF +++ b/org.simantics.g3d.csg.ontology/META-INF/MANIFEST.MF @@ -13,5 +13,6 @@ Require-Bundle: org.eclipse.core.runtime, org.simantics.action.ontology;bundle-version="1.0.0", org.simantics.selectionview.ontology;bundle-version="1.0.0", org.simantics.simulation.ontology;bundle-version="1.0.0" -Bundle-RequiredExecutionEnvironment: JavaSE-1.6 +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Export-Package: org.simantics.g3d.csg.ontology +Automatic-Module-Name: org.simantics.g3d.csg.ontology diff --git a/org.simantics.g3d.csg/.classpath b/org.simantics.g3d.csg/.classpath index 8a8f1668..b862a296 100644 --- a/org.simantics.g3d.csg/.classpath +++ b/org.simantics.g3d.csg/.classpath @@ -1,6 +1,6 @@ - + diff --git a/org.simantics.g3d.csg/.settings/org.eclipse.jdt.core.prefs b/org.simantics.g3d.csg/.settings/org.eclipse.jdt.core.prefs index 56c2dc85..295926d9 100644 --- a/org.simantics.g3d.csg/.settings/org.eclipse.jdt.core.prefs +++ b/org.simantics.g3d.csg/.settings/org.eclipse.jdt.core.prefs @@ -1,8 +1,7 @@ -#Mon Dec 12 16:51:11 EET 2011 eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 -org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.6 +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/org.simantics.g3d.csg/META-INF/MANIFEST.MF b/org.simantics.g3d.csg/META-INF/MANIFEST.MF index c2c209c9..a1c04274 100644 --- a/org.simantics.g3d.csg/META-INF/MANIFEST.MF +++ b/org.simantics.g3d.csg/META-INF/MANIFEST.MF @@ -22,7 +22,8 @@ Require-Bundle: org.eclipse.core.runtime, org.simantics.browsing.ui.common;bundle-version="1.1.0", org.simantics.objmap2;bundle-version="1.0.0", org.simantics.opencascade.vtk;bundle-version="1.0.0" -Bundle-RequiredExecutionEnvironment: JavaSE-1.6 +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Bundle-ActivationPolicy: lazy Export-Package: org.simantics.g3d.csg.handler, org.simantics.g3d.csg.model +Automatic-Module-Name: org.simantics.g3d.csg diff --git a/org.simantics.g3d.csg/src/org/simantics/g3d/csg/adapters/CSGSolidModelAdapter.java b/org.simantics.g3d.csg/src/org/simantics/g3d/csg/adapters/CSGSolidModelAdapter.java index 972d7977..2bfde870 100644 --- a/org.simantics.g3d.csg/src/org/simantics/g3d/csg/adapters/CSGSolidModelAdapter.java +++ b/org.simantics.g3d.csg/src/org/simantics/g3d/csg/adapters/CSGSolidModelAdapter.java @@ -62,11 +62,10 @@ public class CSGSolidModelAdapter implements SolidModelProvider, IAdaptable, ISt } - @SuppressWarnings("rawtypes") @Override - public Object getAdapter(Class adapter) { - if (Resource.class.equals(adapter)) - return model; + public C getAdapter(Class adapter) { + if (adapter.isAssignableFrom(Resource.class)) + return adapter.cast(model); return null; } diff --git a/org.simantics.g3d.csg/src/org/simantics/g3d/csg/editor/CSGEditor2.java b/org.simantics.g3d.csg/src/org/simantics/g3d/csg/editor/CSGEditor2.java index 3a85691b..9716d200 100644 --- a/org.simantics.g3d.csg/src/org/simantics/g3d/csg/editor/CSGEditor2.java +++ b/org.simantics.g3d.csg/src/org/simantics/g3d/csg/editor/CSGEditor2.java @@ -54,7 +54,6 @@ import org.simantics.g3d.csg.scenegraph2.SchemaBuilder; import org.simantics.g3d.csg.scenegraph2.SphereNode; import org.simantics.g3d.csg.scenegraph2.TorusNode; import org.simantics.g3d.csg.scenegraph2.UnionNode; -import org.simantics.g3d.scenegraph.IG3DNode; import org.simantics.g3d.scenegraph.NodeMap; import org.simantics.g3d.scenegraph.base.INode; import org.simantics.g3d.vtk.action.RemoveAction; @@ -96,9 +95,9 @@ public class CSGEditor2 extends ResourceEditorPart { private SWTAWTComponent component; private CSGrootNode rootNode; - private IMapping mapping; + private IMapping mapping; - private NodeSelectionProvider2 selectionProvider; + private NodeSelectionProvider2 selectionProvider; private vtkCameraAndSelectorAction cameraAction; private TranslateAction translateAction; @@ -174,12 +173,12 @@ public class CSGEditor2 extends ResourceEditorPart { throw new RuntimeException("Scenegraph loading failed."); populate(); - selectionProvider = new NodeSelectionProvider2(this,mapping,nodeMap); + selectionProvider = new NodeSelectionProvider2(this,mapping,nodeMap); cameraAction.addSelectionChangedListener(selectionProvider); - cameraAction.addHoverChangedListener(new HoverHighlighter(panel,nodeMap)); - selectionProvider.addSelectionChangedListener(new SelectionHighlighter(panel,nodeMap)); + cameraAction.addHoverChangedListener(new HoverHighlighter(panel,nodeMap)); + selectionProvider.addSelectionChangedListener(new SelectionHighlighter(panel,nodeMap)); getSite().setSelectionProvider(selectionProvider); getSite().getPage().addPostSelectionListener(selectionProvider); @@ -215,11 +214,11 @@ public class CSGEditor2 extends ResourceEditorPart { translateAction = new TranslateAction(panel,nodeMap); rotateAction = new RotateAction(panel,nodeMap); removeAction = new RemoveAction(nodeMap) { - public void setNode(IG3DNode node) { + @Override + public void setNode(INode node) { super.setNode(node); if (node.getParent() instanceof CSGparentNode) setEnabled(false); - } }; @@ -399,7 +398,7 @@ public class CSGEditor2 extends ResourceEditorPart { private IContentOutlinePage createOutline() { if (rootNode == null || selectionProvider == null) return null; - IContentOutlinePage outlinePage = new VTKContentOutlinePage(rootNode, selectionProvider); + IContentOutlinePage outlinePage = new VTKContentOutlinePage(rootNode, selectionProvider); outlinePage.addSelectionChangedListener(new ISelectionChangedListener() { @Override @@ -410,28 +409,27 @@ public class CSGEditor2 extends ResourceEditorPart { return outlinePage; } - @SuppressWarnings("rawtypes") @Override - public Object getAdapter(Class adapter) { - if (IPropertyPage.class.equals(adapter)) - return new StandardPropertyPage(getSite(),getPropertyContexts()); - if (IContentOutlinePage.class.equals(adapter)) { - return createOutline(); + public T getAdapter(Class adapter) { + if (adapter.isAssignableFrom(IPropertyPage.class)) + return adapter.cast(new StandardPropertyPage(getSite(),getPropertyContexts())); + if (adapter.isAssignableFrom(IContentOutlinePage.class)) { + return adapter.cast(createOutline()); } - if (NodeMap.class.equals(adapter)) { - return nodeMap; + if (adapter.isAssignableFrom(NodeMap.class)) { + return adapter.cast(nodeMap); } - if (INode.class.equals(adapter)) { - return rootNode; + if (adapter.isAssignableFrom(INode.class)) { + return adapter.cast(rootNode); } - if (IMapping.class.equals(adapter)) { - return mapping; + if (adapter.isAssignableFrom(IMapping.class)) { + return adapter.cast(mapping); } - if (InteractiveVtkPanel.class.equals(adapter)) { - return panel; + if (adapter.isAssignableFrom(InteractiveVtkPanel.class)) { + return adapter.cast(panel); } - if (VtkView.class.equals(adapter)) - return panel; + if (adapter.isAssignableFrom(VtkView.class)) + return adapter.cast(panel); return super.getAdapter(adapter); } diff --git a/org.simantics.g3d.csg/src/org/simantics/g3d/csg/editor/CSGNodeMap.java b/org.simantics.g3d.csg/src/org/simantics/g3d/csg/editor/CSGNodeMap.java index 48b710f6..89d05585 100644 --- a/org.simantics.g3d.csg/src/org/simantics/g3d/csg/editor/CSGNodeMap.java +++ b/org.simantics.g3d.csg/src/org/simantics/g3d/csg/editor/CSGNodeMap.java @@ -20,6 +20,7 @@ import org.simantics.db.Resource; import org.simantics.db.Session; import org.simantics.g3d.csg.scenegraph2.CSGrootNode; import org.simantics.g3d.csg.scenegraph2.ICSGnode; +import org.simantics.g3d.scenegraph.base.INode; import org.simantics.g3d.scenegraph.base.ParentNode; import org.simantics.g3d.vtk.awt.InteractiveVtkPanel; import org.simantics.g3d.vtk.common.AbstractVTKNodeMap; @@ -30,9 +31,7 @@ import vtk.vtkProp3D; public class CSGNodeMap extends AbstractVTKNodeMap { - - - public CSGNodeMap(Session session, IMapping mapping, InteractiveVtkPanel panel, CSGrootNode rootNode) { + public CSGNodeMap(Session session, IMapping mapping, InteractiveVtkPanel panel, CSGrootNode rootNode) { super(session, mapping, panel, rootNode); rootNode.setNodeMap(this); } diff --git a/org.simantics.g3d.csg/src/org/simantics/g3d/csg/scenegraph2/CSGparentNode.java b/org.simantics.g3d.csg/src/org/simantics/g3d/csg/scenegraph2/CSGparentNode.java index 6f83fdbf..087ec522 100644 --- a/org.simantics.g3d.csg/src/org/simantics/g3d/csg/scenegraph2/CSGparentNode.java +++ b/org.simantics.g3d.csg/src/org/simantics/g3d/csg/scenegraph2/CSGparentNode.java @@ -313,7 +313,7 @@ public abstract class CSGparentNode extends ParentNode implements ICSG } @Override - public Object getAdapter(Class adapter) { + public C getAdapter(Class adapter) { return null; } } diff --git a/org.simantics.g3d.csg/src/org/simantics/g3d/csg/scenegraph2/CSGrootNode.java b/org.simantics.g3d.csg/src/org/simantics/g3d/csg/scenegraph2/CSGrootNode.java index 9ae55a1f..2f3a3cac 100644 --- a/org.simantics.g3d.csg/src/org/simantics/g3d/csg/scenegraph2/CSGrootNode.java +++ b/org.simantics.g3d.csg/src/org/simantics/g3d/csg/scenegraph2/CSGrootNode.java @@ -159,9 +159,9 @@ public class CSGrootNode extends ParentNode implements IG3DNode, NodeM @Override - public Object getAdapter(Class adapter) { - if (NodeMap.class == adapter) - return nodeMap; + public C getAdapter(Class adapter) { + if (adapter.isAssignableFrom(NodeMap.class)) + return adapter.cast(nodeMap); return null; } diff --git a/org.simantics.g3d.ontology/.classpath b/org.simantics.g3d.ontology/.classpath index 8a8f1668..b862a296 100644 --- a/org.simantics.g3d.ontology/.classpath +++ b/org.simantics.g3d.ontology/.classpath @@ -1,6 +1,6 @@ - + diff --git a/org.simantics.g3d.ontology/.settings/org.eclipse.jdt.core.prefs b/org.simantics.g3d.ontology/.settings/org.eclipse.jdt.core.prefs index 5c42125f..295926d9 100644 --- a/org.simantics.g3d.ontology/.settings/org.eclipse.jdt.core.prefs +++ b/org.simantics.g3d.ontology/.settings/org.eclipse.jdt.core.prefs @@ -1,8 +1,7 @@ -#Mon Dec 12 12:36:09 EET 2011 eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 -org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.6 +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/org.simantics.g3d.ontology/META-INF/MANIFEST.MF b/org.simantics.g3d.ontology/META-INF/MANIFEST.MF index 2ce6eaf6..90b9b4e8 100644 --- a/org.simantics.g3d.ontology/META-INF/MANIFEST.MF +++ b/org.simantics.g3d.ontology/META-INF/MANIFEST.MF @@ -6,5 +6,6 @@ Bundle-Version: 1.0.0.qualifier Bundle-Vendor: VTT Require-Bundle: org.eclipse.core.runtime, org.simantics.layer0;bundle-version="1.0.0" -Bundle-RequiredExecutionEnvironment: JavaSE-1.6 +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Export-Package: org.simantics.g3d.ontology +Automatic-Module-Name: org.simantics.g3d.ontology diff --git a/org.simantics.g3d.vtk/.classpath b/org.simantics.g3d.vtk/.classpath index 8a8f1668..b862a296 100644 --- a/org.simantics.g3d.vtk/.classpath +++ b/org.simantics.g3d.vtk/.classpath @@ -1,6 +1,6 @@ - + diff --git a/org.simantics.g3d.vtk/META-INF/MANIFEST.MF b/org.simantics.g3d.vtk/META-INF/MANIFEST.MF index 827e4638..e0a83e09 100644 --- a/org.simantics.g3d.vtk/META-INF/MANIFEST.MF +++ b/org.simantics.g3d.vtk/META-INF/MANIFEST.MF @@ -31,3 +31,4 @@ Export-Package: org.simantics.g3d.vtk.action, org.simantics.g3d.vtk.shape, org.simantics.g3d.vtk.swt, org.simantics.g3d.vtk.utils +Automatic-Module-Name: org.simantics.g3d.vtk diff --git a/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/action/RemoveAction.java b/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/action/RemoveAction.java index 2ff89210..926a75de 100644 --- a/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/action/RemoveAction.java +++ b/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/action/RemoveAction.java @@ -12,7 +12,6 @@ package org.simantics.g3d.vtk.action; import org.eclipse.jface.action.Action; -import org.simantics.g3d.scenegraph.IG3DNode; import org.simantics.g3d.scenegraph.base.INode; import org.simantics.g3d.scenegraph.structural.IStructuralNode; import org.simantics.g3d.vtk.Activator; @@ -20,10 +19,10 @@ import org.simantics.g3d.vtk.common.VTKNodeMap; public class RemoveAction extends Action { - private VTKNodeMap nodeMap; + private VTKNodeMap nodeMap; protected INode node; - public RemoveAction(VTKNodeMap nodeMap) { + public RemoveAction(VTKNodeMap nodeMap) { setText("Remove"); setImageDescriptor(Activator.imageDescriptorFromPlugin("com.famfamfam.silk", "icons/delete.png")); this.nodeMap = nodeMap; diff --git a/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/awt/RotateAction.java b/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/awt/RotateAction.java index aaadc0ed..07d50797 100644 --- a/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/awt/RotateAction.java +++ b/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/awt/RotateAction.java @@ -26,6 +26,7 @@ import org.simantics.g3d.math.MathTools; import org.simantics.g3d.math.Ray; import org.simantics.g3d.preferences.PreferenceConstants; import org.simantics.g3d.scenegraph.IG3DNode; +import org.simantics.g3d.scenegraph.base.INode; import org.simantics.g3d.scenegraph.structural.IStructuralNode; import org.simantics.g3d.vtk.Activator; import org.simantics.g3d.vtk.common.VTKNodeMap; @@ -48,7 +49,7 @@ public class RotateAction extends vtkAwtAction{ public static final int Z = 2; public static final int P = 3; - private VTKNodeMap nodeMap; + private VTKNodeMap nodeMap; //private TranslateGizmo gizmo = new TranslateGizmo(); private RotateAxisGizmo gizmo = new RotateAxisGizmo(); private IG3DNode node; @@ -102,7 +103,7 @@ public class RotateAction extends vtkAwtAction{ return node; } - public RotateAction(InteractiveVtkPanel panel, VTKNodeMap nodeMap) { + public RotateAction(InteractiveVtkPanel panel, VTKNodeMap nodeMap) { super(panel); setImageDescriptor(Activator.imageDescriptorFromPlugin("com.famfamfam.silk", "icons/arrow_rotate_clockwise.png")); setText("Rotate"); diff --git a/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/awt/TranslateAction.java b/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/awt/TranslateAction.java index bb59c563..a5edf45d 100644 --- a/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/awt/TranslateAction.java +++ b/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/awt/TranslateAction.java @@ -24,6 +24,7 @@ import javax.vecmath.Vector3d; import org.simantics.g3d.math.MathTools; import org.simantics.g3d.math.Ray; import org.simantics.g3d.scenegraph.IG3DNode; +import org.simantics.g3d.scenegraph.base.INode; import org.simantics.g3d.scenegraph.structural.IStructuralNode; import org.simantics.g3d.vtk.Activator; import org.simantics.g3d.vtk.common.VTKNodeMap; @@ -44,7 +45,7 @@ public class TranslateAction extends vtkAwtAction{ public static final int YZ = 5; public static final int P = 6; - private VTKNodeMap nodeMap; + private VTKNodeMap nodeMap; //private TranslateGizmo gizmo = new TranslateGizmo(); private TranslateAxisGizmo gizmo = new TranslateAxisGizmo(); protected IG3DNode node; @@ -67,7 +68,7 @@ public class TranslateAction extends vtkAwtAction{ return node; } - public TranslateAction(InteractiveVtkPanel panel, VTKNodeMap nodeMap) { + public TranslateAction(InteractiveVtkPanel panel, VTKNodeMap nodeMap) { super(panel); setImageDescriptor(Activator.imageDescriptorFromPlugin("com.famfamfam.silk", "icons/arrow_out.png")); setText("Translate"); diff --git a/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/common/AbstractVTKNodeMap.java b/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/common/AbstractVTKNodeMap.java index 0866dde5..a03e89cb 100644 --- a/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/common/AbstractVTKNodeMap.java +++ b/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/common/AbstractVTKNodeMap.java @@ -22,6 +22,7 @@ import java.util.List; import java.util.Map; import java.util.Set; import java.util.Stack; +import java.util.function.Consumer; import org.simantics.db.ReadGraph; import org.simantics.db.Session; @@ -40,7 +41,6 @@ import org.simantics.g3d.scenegraph.base.ParentNode; import org.simantics.objmap.exceptions.MappingException; import org.simantics.objmap.graph.IMapping; import org.simantics.objmap.graph.IMappingListener; -import org.simantics.utils.datastructures.Callback; import org.simantics.utils.datastructures.MapList; import org.simantics.utils.datastructures.MapSet; import org.simantics.utils.datastructures.Pair; @@ -109,7 +109,7 @@ public abstract class AbstractVTKNodeMap implements VT @SuppressWarnings("unchecked") @Override public Collection getRenderObjects(INode node) { - return nodeToActor.getValues((E)node); + return nodeToActor.getValues((E) node); } protected void map(E node, Collection props) { @@ -127,7 +127,6 @@ public abstract class AbstractVTKNodeMap implements VT nodeToActor.remove(node); } - @SuppressWarnings("unchecked") @Override public ParentNode getRootNode() { return (ParentNode)rootNode; @@ -188,12 +187,11 @@ public abstract class AbstractVTKNodeMap implements VT } - @SuppressWarnings("unchecked") @Override public void updateRenderObjectsFor(E node) { List toDelete = new ArrayList(); view.lock(); - for (vtkProp prop : nodeToActor.getValues((E)node)) { + for (vtkProp prop : nodeToActor.getValues(node)) { if (prop.GetVTKId() != 0) { view.getRenderer().RemoveActor(prop); //prop.Delete(); @@ -202,12 +200,12 @@ public abstract class AbstractVTKNodeMap implements VT actorToNode.remove(prop); } view.unlock(); - nodeToActor.remove((E)node); - Collection coll = getActors((E)node); + nodeToActor.remove(node); + Collection coll = getActors(node); if (coll != null) { for (vtkProp prop : coll) { - nodeToActor.add((E)node,prop); - actorToNode.put(prop, (E)node); + nodeToActor.add(node,prop); + actorToNode.put(prop, node); toDelete.remove(prop); } } @@ -253,7 +251,6 @@ public abstract class AbstractVTKNodeMap implements VT repaint(); } - @SuppressWarnings("unchecked") private void receiveUpdate(E node, String id, boolean db) { if (DEBUG) System.out.println("receiveUpdate " + debugString(node) + " " + id + " " + db); synchronized (syncMutex) { @@ -296,10 +293,10 @@ public abstract class AbstractVTKNodeMap implements VT commit(graph); } - }, new Callback() { + }, new Consumer() { @Override - public void run(DatabaseException parameter) { + public void accept(DatabaseException parameter) { if (parameter != null) ExceptionUtils.logAndShowError("Cannot commit editor changes", parameter); } @@ -326,7 +323,6 @@ public abstract class AbstractVTKNodeMap implements VT if (DEBUG)System.out.println("domainModified"); session.asyncRequest(new ReadRequest() { - @SuppressWarnings("unchecked") @Override public void run(ReadGraph graph) throws DatabaseException { update(graph); @@ -416,6 +412,7 @@ public abstract class AbstractVTKNodeMap implements VT * This code here synchronizes removed and added objects to collect deletable objects. (a deletable object is one which is removed but not added). * */ + @SuppressWarnings("unused") protected void syncDeletes() { deleteUC.clear(); for (Pair n : removed) { @@ -437,6 +434,7 @@ public abstract class AbstractVTKNodeMap implements VT /** * Clears deletable objects from mapping cache. */ + @SuppressWarnings("unused") protected void clearDeletes() { if (DEBUG && delete.size() > 0) System.out.println("Delete"); for (E n : delete) { diff --git a/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/common/HoverHighlighter.java b/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/common/HoverHighlighter.java index 7acb3f54..4a07d696 100644 --- a/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/common/HoverHighlighter.java +++ b/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/common/HoverHighlighter.java @@ -12,23 +12,23 @@ package org.simantics.g3d.vtk.common; import org.eclipse.jface.viewers.ISelection; -import org.simantics.g3d.scenegraph.IG3DNode; import org.simantics.g3d.scenegraph.NodeHighlighter; import org.simantics.g3d.scenegraph.NodeHighlighter.HighlightEventType; +import org.simantics.g3d.scenegraph.base.INode; -public class HoverHighlighter extends SelectionHighlighter { +public class HoverHighlighter extends SelectionHighlighter { - - public HoverHighlighter(VtkView panel, VTKNodeMap nodeMap) { + public HoverHighlighter(VtkView panel, VTKNodeMap nodeMap) { super(panel, nodeMap); - } + @Override protected void highlight(ISelection s) { highlight(s, HighlightEventType.Hover, HighlightEventType.ClearHover); } - protected void hilight(IG3DNode node, HighlightEventType type) { + @Override + protected void hilight(INode node, HighlightEventType type) { if (node instanceof NodeHighlighter) { ((NodeHighlighter)node).highlight(type); return; @@ -40,12 +40,14 @@ public class HoverHighlighter extends SelectionHighlighter { } } - protected void setDefaultColor(IG3DNode node) { + @Override + protected void setDefaultColor(INode node) { double color[] = new double[]{0,0,0}; setColor(node, true, color); } - protected void setSelectedColor(IG3DNode node) { + @Override + protected void setSelectedColor(INode node) { double color[] = new double[]{1,0,1}; setColor(node, true, color); } diff --git a/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/common/NodeSelectionProvider2.java b/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/common/NodeSelectionProvider2.java index b9e3a0e8..db4710ed 100644 --- a/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/common/NodeSelectionProvider2.java +++ b/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/common/NodeSelectionProvider2.java @@ -43,9 +43,9 @@ public class NodeSelectionProvider2 implements ISelectionPr protected IEditorPart part; protected IMapping mapping; - protected VTKNodeMap nodeMap; + protected VTKNodeMap nodeMap; - public NodeSelectionProvider2(IEditorPart part, IMapping mapping, VTKNodeMap nodeMap) { + public NodeSelectionProvider2(IEditorPart part, IMapping mapping, VTKNodeMap nodeMap) { this.part = part; this.mapping = mapping; this.nodeMap = nodeMap; @@ -78,6 +78,7 @@ public class NodeSelectionProvider2 implements ISelectionPr } else if (resources.size() > 0) { nodes = new ArrayList(); for (Resource r : resources) { + @SuppressWarnings("unchecked") JavaObject n = mapping.get((DBObject)r); if (n instanceof IG3DNode) { nodes.add((IG3DNode)n); @@ -101,7 +102,6 @@ public class NodeSelectionProvider2 implements ISelectionPr fireSelectionChanged(event.getSource()); } - @SuppressWarnings("unchecked") protected void processSelection(ISelection s) { selectedNodes.clear(); selectedItems.clear(); @@ -112,11 +112,12 @@ public class NodeSelectionProvider2 implements ISelectionPr Collection selectedActors = AdaptationUtils.adaptToCollection(s, vtkProp.class); if (selectedActors.size() > 0) { for (vtkProp a : selectedActors) { - IG3DNode node = (IG3DNode)nodeMap.getNode((vtkProp)a); + INode node = nodeMap.getNode(a); if (node == null) continue; if (!selectedNodes.contains(node)) selectedNodes.add(node); + @SuppressWarnings("unchecked") DBObject r = mapping.inverseGet((JavaObject)node); selectedItems.add(new VTKSelectionItem(a, node,r)); } @@ -125,6 +126,7 @@ public class NodeSelectionProvider2 implements ISelectionPr for (INode node : selectedNds) { if (!selectedNodes.contains(node)) selectedNodes.add((IG3DNode)node); + @SuppressWarnings("unchecked") DBObject r = mapping.inverseGet((JavaObject)node); selectedItems.add(new VTKSelectionItem(null, (IG3DNode)node,r)); } diff --git a/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/common/SelectionHighlighter.java b/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/common/SelectionHighlighter.java index 69ed83e2..7aa2ad4d 100644 --- a/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/common/SelectionHighlighter.java +++ b/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/common/SelectionHighlighter.java @@ -35,19 +35,17 @@ import vtk.vtkMapper; import vtk.vtkProp; import vtk.vtkProperty; -public class SelectionHighlighter implements ISelectionChangedListener{ +public class SelectionHighlighter implements ISelectionChangedListener { - - protected VtkView panel; - protected VTKNodeMap nodeMap; + protected VTKNodeMap nodeMap; protected List selectedNodes = new ArrayList(); protected List selectedActors = new ArrayList(); protected HighlightObjectType type = HighlightObjectType.Node; - public SelectionHighlighter(VtkView panel, VTKNodeMap nodeMap) { + public SelectionHighlighter(VtkView panel, VTKNodeMap nodeMap) { this.panel = panel; this.nodeMap = nodeMap; } @@ -72,7 +70,7 @@ public class SelectionHighlighter implements ISelecti } - protected void hilight(E node, HighlightEventType type) { + protected void hilight(INode node, HighlightEventType type) { if (node instanceof NodeHighlighter) { ((NodeHighlighter)node).highlight(type); return; @@ -109,13 +107,13 @@ public class SelectionHighlighter implements ISelecti } for (IG3DNode node : selectedNodes) { if (!currentSelectedNodes.contains(node)) { - hilight((E)node, clear); + hilight((INode)node, clear); changed = true; } } for (IG3DNode node : currentSelectedNodes) { if (!selectedNodes.contains(node)) { - hilight((E)node, apply); + hilight((INode)node, apply); changed = true; } } @@ -160,18 +158,17 @@ public class SelectionHighlighter implements ISelecti return currentSelectedNodes; } - protected void setDefaultColor(E node) { + protected void setDefaultColor(INode node) { double color[] = new double[]{1,1,0}; setColor(node, false, color); } - protected void setSelectedColor(E node) { + protected void setSelectedColor(INode node) { double color[] = new double[]{1,0,0}; setColor(node, false, color); } - - public void setColor(E node, boolean edge, double color[]) { + public void setColor(INode node, boolean edge, double color[]) { for (vtkProp prop : nodeMap.getRenderObjects(node)) { if (prop instanceof vtkActor) { vtkActor act = (vtkActor)prop; diff --git a/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/common/VTKContentOutlinePage.java b/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/common/VTKContentOutlinePage.java index ceaaecd8..3a9cd997 100644 --- a/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/common/VTKContentOutlinePage.java +++ b/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/common/VTKContentOutlinePage.java @@ -26,12 +26,12 @@ import org.simantics.g3d.scenegraph.base.ParentNode; import org.simantics.g3d.tools.AdaptationUtils; import org.simantics.g3d.ui.ScenegraphOutlinePage; -public class VTKContentOutlinePage extends ScenegraphOutlinePage{ - private NodeSelectionProvider2 provider; +public class VTKContentOutlinePage extends ScenegraphOutlinePage{ + private NodeSelectionProvider2 provider; - public VTKContentOutlinePage(ParentNode rootNode, NodeSelectionProvider2 provider) { + public VTKContentOutlinePage(ParentNode rootNode, NodeSelectionProvider2 selectionProvider) { super(rootNode); - this.provider = provider; + this.provider = selectionProvider; } private boolean outsideSelection = false; diff --git a/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/common/VTKNodeMap.java b/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/common/VTKNodeMap.java index 5de2b10d..d3b94633 100644 --- a/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/common/VTKNodeMap.java +++ b/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/common/VTKNodeMap.java @@ -11,14 +11,10 @@ *******************************************************************************/ package org.simantics.g3d.vtk.common; -import org.simantics.g3d.scenegraph.IG3DNode; import org.simantics.g3d.scenegraph.NodeMap; import org.simantics.g3d.scenegraph.base.INode; import vtk.vtkProp; -public interface VTKNodeMap extends NodeMap{ - - - +public interface VTKNodeMap extends NodeMap{ } diff --git a/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/common/VTKSelectionItem.java b/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/common/VTKSelectionItem.java index f332322f..deb81272 100644 --- a/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/common/VTKSelectionItem.java +++ b/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/common/VTKSelectionItem.java @@ -31,25 +31,24 @@ public class VTKSelectionItem implements IAdaptable{ this.resource = res; } - @SuppressWarnings("rawtypes") @Override - public Object getAdapter(Class adapter) { - if (adapter == Resource.class) + public T getAdapter(Class adapter) { + if (adapter.isAssignableFrom(Resource.class)) if (resource instanceof Resource) - return resource; + return adapter.cast(resource); else return null; - if (adapter == StructuralResource.class) + if (adapter.isAssignableFrom(StructuralResource.class)) if (resource instanceof StructuralResource) - return resource; + return adapter.cast(resource); else return null; - if (adapter == vtkProp.class) - return prop; - if (adapter == IG3DNode.class && node instanceof IG3DNode) - return node; - if (adapter == INode.class) - return node; + if (adapter.isAssignableFrom(vtkProp.class)) + return adapter.cast(prop); + if (adapter.isAssignableFrom(IG3DNode.class) && node instanceof IG3DNode) + return adapter.cast(node); + if (adapter.isAssignableFrom(INode.class)) + return adapter.cast(node); return null; } diff --git a/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/shape/vtkShape.java b/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/shape/vtkShape.java index 99a9e6e8..45ecc35c 100644 --- a/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/shape/vtkShape.java +++ b/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/shape/vtkShape.java @@ -11,7 +11,6 @@ *******************************************************************************/ package org.simantics.g3d.vtk.shape; -import javax.vecmath.Point3d; import javax.vecmath.Tuple3d; import vtk.vtkActor; diff --git a/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/swt/InteractiveVtkComposite.java b/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/swt/InteractiveVtkComposite.java index b8f9ff0c..03d0d2fb 100644 --- a/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/swt/InteractiveVtkComposite.java +++ b/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/swt/InteractiveVtkComposite.java @@ -1,17 +1,12 @@ package org.simantics.g3d.vtk.swt; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; -import javax.vecmath.Vector3d; - import org.eclipse.swt.widgets.Composite; -import org.simantics.g3d.math.Ray; import org.simantics.g3d.scenegraph.RenderListener; import org.simantics.g3d.vtk.action.vtkAction; import org.simantics.g3d.vtk.common.VtkView; -import org.simantics.g3d.vtk.utils.vtkUtil; import org.simantics.utils.threads.IThreadWorkQueue; import org.simantics.utils.threads.SWTThread; import org.simantics.utils.threads.ThreadUtils; @@ -23,7 +18,6 @@ import vtk.vtkAreaPicker; import vtk.vtkAssemblyNode; import vtk.vtkAssemblyPath; import vtk.vtkCellPicker; -import vtk.vtkCoordinate; import vtk.vtkObjectBase; import vtk.vtkPointPicker; import vtk.vtkProp; @@ -184,6 +178,7 @@ public class InteractiveVtkComposite extends vtkSwtComponent implements VtkView{ public void lock() { getVTKLock().lock(); if (getComponent().getContext() != null && !getComponent().getContext().isCurrent()) { + @SuppressWarnings("unused") int ret = getComponent().getContext().makeCurrent(); // System.out.println("Make current2 " + ret); } diff --git a/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/swt/RotateAction.java b/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/swt/RotateAction.java index bd581ac2..9cf39eff 100644 --- a/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/swt/RotateAction.java +++ b/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/swt/RotateAction.java @@ -29,12 +29,12 @@ import org.simantics.g3d.math.MathTools; import org.simantics.g3d.math.Ray; import org.simantics.g3d.preferences.PreferenceConstants; import org.simantics.g3d.scenegraph.IG3DNode; +import org.simantics.g3d.scenegraph.base.INode; import org.simantics.g3d.scenegraph.structural.IStructuralNode; import org.simantics.g3d.vtk.Activator; import org.simantics.g3d.vtk.common.VTKNodeMap; import org.simantics.g3d.vtk.gizmo.RotateAxisGizmo; import org.simantics.g3d.vtk.utils.vtkUtil; -import org.simantics.utils.threads.AWTThread; import org.simantics.utils.threads.ThreadUtils; import vtk.vtkProp; @@ -51,7 +51,7 @@ public class RotateAction extends vtkSwtAction{ public static final int Z = 2; public static final int P = 3; - private VTKNodeMap nodeMap; + private VTKNodeMap nodeMap; //private TranslateGizmo gizmo = new TranslateGizmo(); private RotateAxisGizmo gizmo = new RotateAxisGizmo(); private IG3DNode node; @@ -105,7 +105,7 @@ public class RotateAction extends vtkSwtAction{ return node; } - public RotateAction(InteractiveVtkComposite panel, VTKNodeMap nodeMap) { + public RotateAction(InteractiveVtkComposite panel, VTKNodeMap nodeMap) { super(panel); setImageDescriptor(Activator.imageDescriptorFromPlugin("com.famfamfam.silk", "icons/arrow_rotate_clockwise.png")); setText("Rotate"); diff --git a/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/swt/TranslateAction.java b/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/swt/TranslateAction.java index b30573c5..32b97c1b 100644 --- a/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/swt/TranslateAction.java +++ b/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/swt/TranslateAction.java @@ -27,12 +27,12 @@ import org.eclipse.swt.widgets.Display; import org.simantics.g3d.math.MathTools; import org.simantics.g3d.math.Ray; import org.simantics.g3d.scenegraph.IG3DNode; +import org.simantics.g3d.scenegraph.base.INode; import org.simantics.g3d.scenegraph.structural.IStructuralNode; import org.simantics.g3d.vtk.Activator; import org.simantics.g3d.vtk.common.VTKNodeMap; import org.simantics.g3d.vtk.gizmo.TranslateAxisGizmo; import org.simantics.g3d.vtk.utils.vtkUtil; -import org.simantics.utils.threads.AWTThread; import org.simantics.utils.threads.ThreadUtils; import vtk.vtkProp; @@ -47,7 +47,7 @@ public class TranslateAction extends vtkSwtAction{ public static final int YZ = 5; public static final int P = 6; - private VTKNodeMap nodeMap; + private VTKNodeMap nodeMap; //private TranslateGizmo gizmo = new TranslateGizmo(); private TranslateAxisGizmo gizmo = new TranslateAxisGizmo(); protected IG3DNode node; @@ -70,7 +70,7 @@ public class TranslateAction extends vtkSwtAction{ return node; } - public TranslateAction(InteractiveVtkComposite panel, VTKNodeMap nodeMap) { + public TranslateAction(InteractiveVtkComposite panel, VTKNodeMap nodeMap) { super(panel); setImageDescriptor(Activator.imageDescriptorFromPlugin("com.famfamfam.silk", "icons/arrow_out.png")); setText("Translate"); diff --git a/org.simantics.g3d/.classpath b/org.simantics.g3d/.classpath index 8a8f1668..b862a296 100644 --- a/org.simantics.g3d/.classpath +++ b/org.simantics.g3d/.classpath @@ -1,6 +1,6 @@ - + diff --git a/org.simantics.g3d/.settings/org.eclipse.jdt.core.prefs b/org.simantics.g3d/.settings/org.eclipse.jdt.core.prefs index 0c68a61d..295926d9 100644 --- a/org.simantics.g3d/.settings/org.eclipse.jdt.core.prefs +++ b/org.simantics.g3d/.settings/org.eclipse.jdt.core.prefs @@ -1,7 +1,7 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.8 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/org.simantics.g3d/META-INF/MANIFEST.MF b/org.simantics.g3d/META-INF/MANIFEST.MF index d1a9d009..7e889b35 100644 --- a/org.simantics.g3d/META-INF/MANIFEST.MF +++ b/org.simantics.g3d/META-INF/MANIFEST.MF @@ -38,3 +38,4 @@ Export-Package: org.simantics.g3d, org.simantics.g3d.tools, org.simantics.g3d.ui, org.simantics.g3d.wizard +Automatic-Module-Name: org.simantics.g3d diff --git a/org.simantics.g3d/src/org/simantics/g3d/property/AnnotatedPropertyTabContributorFactory.java b/org.simantics.g3d/src/org/simantics/g3d/property/AnnotatedPropertyTabContributorFactory.java index 7198ead2..7e3f8533 100644 --- a/org.simantics.g3d/src/org/simantics/g3d/property/AnnotatedPropertyTabContributorFactory.java +++ b/org.simantics.g3d/src/org/simantics/g3d/property/AnnotatedPropertyTabContributorFactory.java @@ -216,6 +216,7 @@ public class AnnotatedPropertyTabContributorFactory implements PropertyTabContri private static Map createManipulators(CompoundPropertyItem item, Object obj) { try { + @SuppressWarnings("unchecked") Map map = (Map)item.getter.invoke(obj); Map result = new HashMap(); for (String key : map.keySet()) { @@ -232,7 +233,7 @@ public class AnnotatedPropertyTabContributorFactory implements PropertyTabContri return result; } catch (Exception e) { e.printStackTrace(); - return Collections.EMPTY_MAP; + return Collections.emptyMap(); } } @@ -980,9 +981,9 @@ public class AnnotatedPropertyTabContributorFactory implements PropertyTabContri if (focusCellManager != null) { try { Method m = focusCellManager.getClass().getSuperclass() - .getDeclaredMethod("init", null); + .getDeclaredMethod("init"); m.setAccessible(true); - m.invoke(focusCellManager, null); + m.invoke(focusCellManager); } catch (SecurityException e) { e.printStackTrace(); } catch (IllegalArgumentException e) { @@ -1050,9 +1051,10 @@ public class AnnotatedPropertyTabContributorFactory implements PropertyTabContri if (DEBUG)System.err.println("FOCUS CELL: " + focusCell); Method m = AbstractTableViewer.class.getDeclaredMethod( - "getSelectionFromWidget", null); + "getSelectionFromWidget"); m.setAccessible(true); - List l = (List) m.invoke(getViewer(), null); + @SuppressWarnings("rawtypes") + List l = (List) m.invoke(getViewer()); if (focusCellManager != null) { m = focusCellManager .getClass() @@ -1152,9 +1154,9 @@ public class AnnotatedPropertyTabContributorFactory implements PropertyTabContri ViewerColumn column = (ViewerColumn) m.invoke(viewer, new Object[] { new Integer(columnIndex) }); m = ViewerColumn.class.getDeclaredMethod( - "getEditingSupport", null); + "getEditingSupport"); m.setAccessible(true); - EditingSupport es = (EditingSupport) m.invoke(column, null); + EditingSupport es = (EditingSupport) m.invoke(column); if (column != null && es != null) { m = EditingSupport.class.getDeclaredMethod("canEdit", new Class[] { Object.class }); @@ -1258,10 +1260,9 @@ public class AnnotatedPropertyTabContributorFactory implements PropertyTabContri m.setAccessible(true); ViewerColumn column = (ViewerColumn) m.invoke(viewer, new Object[] { new Integer(cell.getColumnIndex()) }); - m = ViewerColumn.class.getDeclaredMethod("getEditingSupport", - null); + m = ViewerColumn.class.getDeclaredMethod("getEditingSupport"); m.setAccessible(true); - EditingSupport es = (EditingSupport) m.invoke(column, null); + EditingSupport es = (EditingSupport) m.invoke(column); if (column != null && es != null) { m = EditingSupport.class.getDeclaredMethod("canEdit", new Class[] { Object.class }); diff --git a/org.simantics.g3d/src/org/simantics/g3d/property/MethodWithMapValueProvider.java b/org.simantics.g3d/src/org/simantics/g3d/property/MethodWithMapValueProvider.java index 7e9859a5..eeae0dc8 100644 --- a/org.simantics.g3d/src/org/simantics/g3d/property/MethodWithMapValueProvider.java +++ b/org.simantics.g3d/src/org/simantics/g3d/property/MethodWithMapValueProvider.java @@ -29,9 +29,11 @@ public class MethodWithMapValueProvider implements ValueProvider { @Override public Object getValue(Object obj) throws Exception{ + @SuppressWarnings("unchecked") Map map = (Map)getter.invoke(obj); return map.get(key); } + @SuppressWarnings("unchecked") @Override public void setValue(Object obj, Object value) throws Exception { Map map = new HashMap(); diff --git a/org.simantics.g3d/src/org/simantics/g3d/scenegraph/G3DNode.java b/org.simantics.g3d/src/org/simantics/g3d/scenegraph/G3DNode.java index c0526992..c955dc6a 100644 --- a/org.simantics.g3d/src/org/simantics/g3d/scenegraph/G3DNode.java +++ b/org.simantics.g3d/src/org/simantics/g3d/scenegraph/G3DNode.java @@ -18,7 +18,6 @@ import org.simantics.g3d.ontology.G3D; import org.simantics.g3d.property.annotations.GetPropertyValue; import org.simantics.g3d.property.annotations.PropertyContributor; import org.simantics.g3d.property.annotations.SetPropertyValue; -import org.simantics.g3d.scenegraph.base.INode; import org.simantics.g3d.scenegraph.base.Node; import org.simantics.g3d.tools.NodeTools; import org.simantics.objmap.graph.annotations.RelatedGetValue; @@ -149,11 +148,9 @@ public class G3DNode extends Node implements IG3DNode { } @Override - public Object getAdapter(Class adapter) { - if (INode.class == adapter) - return this; - if (IG3DNode.class == adapter) - return this; + public C getAdapter(Class adapter) { + if (adapter.isInstance(this)) + return adapter.cast(this); return null; } diff --git a/org.simantics.g3d/src/org/simantics/g3d/scenegraph/G3DparentNode.java b/org.simantics.g3d/src/org/simantics/g3d/scenegraph/G3DparentNode.java index ee35bac5..f28b1c3c 100644 --- a/org.simantics.g3d/src/org/simantics/g3d/scenegraph/G3DparentNode.java +++ b/org.simantics.g3d/src/org/simantics/g3d/scenegraph/G3DparentNode.java @@ -143,7 +143,7 @@ public class G3DparentNode extends ParentNode implements } @Override - public Object getAdapter(Class adapter) { + public C getAdapter(Class adapter) { return null; } } diff --git a/org.simantics.g3d/src/org/simantics/g3d/scenegraph/base/Node.java b/org.simantics.g3d/src/org/simantics/g3d/scenegraph/base/Node.java index 6d122930..af1e3af5 100644 --- a/org.simantics.g3d/src/org/simantics/g3d/scenegraph/base/Node.java +++ b/org.simantics.g3d/src/org/simantics/g3d/scenegraph/base/Node.java @@ -11,9 +11,6 @@ *******************************************************************************/ package org.simantics.g3d.scenegraph.base; -import java.util.ArrayList; -import java.util.List; - import org.eclipse.core.runtime.ListenerList; diff --git a/org.simantics.g3d/src/org/simantics/g3d/scenegraph/structural/ComponentNode.java b/org.simantics.g3d/src/org/simantics/g3d/scenegraph/structural/ComponentNode.java index 9cdc3bf4..13ac2f52 100644 --- a/org.simantics.g3d/src/org/simantics/g3d/scenegraph/structural/ComponentNode.java +++ b/org.simantics.g3d/src/org/simantics/g3d/scenegraph/structural/ComponentNode.java @@ -26,7 +26,7 @@ import org.simantics.objmap.graph.annotations.RelatedSetValue; import org.simantics.objmap.structural.IStructuralObject; import org.simantics.utils.datastructures.MapList; -public abstract class ComponentNode extends Node implements IComponentNode{ +public abstract class ComponentNode, T2 extends IComponentNode> extends Node implements IComponentNode{ private String name; @@ -123,7 +123,7 @@ public abstract class ComponentNode getAllConnectedNodes() { List list = new ArrayList(); for (T c : getAllConnections()) { - T2 node = (T2)c.getOther(this); + T2 node = c.getOther(this); if (node != null) list.add(node); } @@ -161,9 +161,10 @@ public abstract class ComponentNode connections = new MapList(); + @SuppressWarnings("unchecked") protected void _addConnection(String id, T c) { connections.add(id, c); - c.addConnect(this); + c.addConnect((T2) this); firePropertyChanged(id); } @@ -223,7 +224,7 @@ public abstract class ComponentNode getConnectedNodes(String id) { List list = new ArrayList(); for (T c : getConnections(id)) { - T2 node = (T2)c.getOther(this); + T2 node = c.getOther(this); if (node != null) list.add(node); } diff --git a/org.simantics.g3d/src/org/simantics/g3d/scenegraph/structural/Connection.java b/org.simantics.g3d/src/org/simantics/g3d/scenegraph/structural/Connection.java index c43ca12f..bd8ade64 100644 --- a/org.simantics.g3d/src/org/simantics/g3d/scenegraph/structural/Connection.java +++ b/org.simantics.g3d/src/org/simantics/g3d/scenegraph/structural/Connection.java @@ -19,42 +19,42 @@ import org.simantics.db.Resource; import org.simantics.objmap.structural.IStructuralObject; @SuppressWarnings("rawtypes") -public abstract class Connection implements IStructuralObject{ +public abstract class Connection, T2 extends IComponentNode> implements IStructuralObject{ + private List connects = new ArrayList(); - private List connects = new ArrayList(); - - - public void addConnect(T node) { + public void addConnect(T2 node) { if (!connects.contains(node)) connects.add(node); fireChanged(node,true); } - protected void fireChanged(T node, boolean add){ - for (IComponentNode n : connects) { - n.connectionChanged(this,node,add); + @SuppressWarnings("unchecked") + protected void fireChanged(T2 node, boolean add){ + for (T2 n : connects) { + n.connectionChanged((T) this,node,add); } } - public Collection getConnected() { + public Collection getConnected() { return connects; } - public void removeConnect(T node) { + public void removeConnect(T2 node) { connects.remove(node); fireChanged(node,false); } + @SuppressWarnings("unchecked") public void remove() { - List toRemove = new ArrayList(connects.size()); + List toRemove = new ArrayList(connects.size()); toRemove.addAll(connects); for (IComponentNode node : toRemove) { - node.removeConnection(this); + node.removeConnection((T) this); } } - public T getOther(T node) { + public T2 getOther(IComponentNode node) { if (connects.size() != 2) return null; if (connects.get(0).equals(node)) diff --git a/org.simantics.g3d/src/org/simantics/g3d/scenegraph/structural/G3DComponentNode.java b/org.simantics.g3d/src/org/simantics/g3d/scenegraph/structural/G3DComponentNode.java index 0221bee2..69291365 100644 --- a/org.simantics.g3d/src/org/simantics/g3d/scenegraph/structural/G3DComponentNode.java +++ b/org.simantics.g3d/src/org/simantics/g3d/scenegraph/structural/G3DComponentNode.java @@ -26,7 +26,7 @@ import org.simantics.objmap.graph.annotations.RelatedSetValue; import org.simantics.objmap.structural.IStructuralObject; import org.simantics.utils.datastructures.MapList; -public abstract class G3DComponentNode extends G3DNode implements IComponentNode{ +public abstract class G3DComponentNode, T2 extends IComponentNode> extends G3DNode implements IComponentNode{ private String name; @@ -161,9 +161,10 @@ public abstract class G3DComponentNode connections = new MapList(); + @SuppressWarnings("unchecked") protected void _addConnection(String id, T c) { connections.add(id, c); - c.addConnect(this); + c.addConnect((T2) this); firePropertyChanged(id); } diff --git a/org.simantics.g3d/src/org/simantics/g3d/scenegraph/structural/G3DStructuralParentNode.java b/org.simantics.g3d/src/org/simantics/g3d/scenegraph/structural/G3DStructuralParentNode.java index b94cee31..073ef79d 100644 --- a/org.simantics.g3d/src/org/simantics/g3d/scenegraph/structural/G3DStructuralParentNode.java +++ b/org.simantics.g3d/src/org/simantics/g3d/scenegraph/structural/G3DStructuralParentNode.java @@ -21,7 +21,6 @@ import org.simantics.g3d.ontology.G3D; import org.simantics.g3d.property.annotations.GetPropertyValue; import org.simantics.g3d.property.annotations.SetPropertyValue; import org.simantics.g3d.scenegraph.IG3DNode; -import org.simantics.g3d.scenegraph.base.INode; import org.simantics.g3d.scenegraph.base.NodeException; import org.simantics.g3d.tools.NodeTools; import org.simantics.objmap.graph.annotations.RelatedGetValue; @@ -168,15 +167,12 @@ public abstract class G3DStructuralParentNode extends protected Collection _getStrNodes(String id) { return getNodes(id+"/str"); } - - public Object getAdapter(Class adapter) { - if (INode.class == adapter) - return this; - if (IG3DNode.class == adapter) - return this; + + @Override + public U getAdapter(Class adapter) { + if (adapter.isInstance(this)) + return adapter.cast(this); return null; } - - } diff --git a/org.simantics.g3d/src/org/simantics/g3d/scenegraph/structural/IComponentNode.java b/org.simantics.g3d/src/org/simantics/g3d/scenegraph/structural/IComponentNode.java index 6280b374..a8371846 100644 --- a/org.simantics.g3d/src/org/simantics/g3d/scenegraph/structural/IComponentNode.java +++ b/org.simantics.g3d/src/org/simantics/g3d/scenegraph/structural/IComponentNode.java @@ -15,8 +15,7 @@ import java.util.Collection; import java.util.List; -@SuppressWarnings("rawtypes") -public interface IComponentNode extends IStructuralNode{ +public interface IComponentNode, T2 extends IComponentNode> extends IStructuralNode{ public List getAllConnections(); //public void addConnection(Connection c); diff --git a/org.simantics.g3d/src/org/simantics/g3d/scl/SCLUtil.java b/org.simantics.g3d/src/org/simantics/g3d/scl/SCLUtil.java index 940c244e..39d4e441 100644 --- a/org.simantics.g3d/src/org/simantics/g3d/scl/SCLUtil.java +++ b/org.simantics.g3d/src/org/simantics/g3d/scl/SCLUtil.java @@ -14,6 +14,7 @@ import org.simantics.scl.compiler.types.TCon; import org.simantics.scl.compiler.types.Type; import org.simantics.scl.osgi.SCLOsgi; +@SuppressWarnings("restriction") public class SCLUtil { static Map> typeMap = new HashMap>(); diff --git a/org.simantics.g3d/src/org/simantics/g3d/scl/ScriptNodeMap.java b/org.simantics.g3d/src/org/simantics/g3d/scl/ScriptNodeMap.java index f9a245dc..3c1cd9f2 100644 --- a/org.simantics.g3d/src/org/simantics/g3d/scl/ScriptNodeMap.java +++ b/org.simantics.g3d/src/org/simantics/g3d/scl/ScriptNodeMap.java @@ -93,9 +93,11 @@ public abstract class ScriptNodeMap implements NodeMap @Override public ParentNode getRootNode() { - return (ParentNode)rootNode; + return rootNode; } + + @Override public boolean isChangeTracking() { return changeTracking; diff --git a/org.simantics.g3d/src/org/simantics/g3d/wizard/ModelExportWizardPage.java b/org.simantics.g3d/src/org/simantics/g3d/wizard/ModelExportWizardPage.java index 0146ff34..379927df 100644 --- a/org.simantics.g3d/src/org/simantics/g3d/wizard/ModelExportWizardPage.java +++ b/org.simantics.g3d/src/org/simantics/g3d/wizard/ModelExportWizardPage.java @@ -38,7 +38,6 @@ import org.simantics.db.Resource; import org.simantics.db.common.NamedResource; import org.simantics.db.common.request.ReadRequest; import org.simantics.db.exception.DatabaseException; -import org.simantics.layer0.Layer0; import org.simantics.ui.utils.ResourceAdaptionUtils; @@ -206,7 +205,6 @@ public abstract class ModelExportWizardPage extends Wiza new ReadRequest() { @Override public void run(ReadGraph graph) throws DatabaseException { - Layer0 L0 = Layer0.getInstance(graph); models = getSupportedModels(graph, Simantics.getProject().get()); } }); diff --git a/org.simantics.opencascade.vtk/.classpath b/org.simantics.opencascade.vtk/.classpath index 8a8f1668..b862a296 100644 --- a/org.simantics.opencascade.vtk/.classpath +++ b/org.simantics.opencascade.vtk/.classpath @@ -1,6 +1,6 @@ - + diff --git a/org.simantics.opencascade.vtk/.settings/org.eclipse.jdt.core.prefs b/org.simantics.opencascade.vtk/.settings/org.eclipse.jdt.core.prefs index 24422af6..295926d9 100644 --- a/org.simantics.opencascade.vtk/.settings/org.eclipse.jdt.core.prefs +++ b/org.simantics.opencascade.vtk/.settings/org.eclipse.jdt.core.prefs @@ -1,8 +1,7 @@ -#Wed Aug 08 16:10:05 EEST 2012 eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 -org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.6 +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/org.simantics.opencascade.vtk/META-INF/MANIFEST.MF b/org.simantics.opencascade.vtk/META-INF/MANIFEST.MF index 9297e52d..50b49bd1 100644 --- a/org.simantics.opencascade.vtk/META-INF/MANIFEST.MF +++ b/org.simantics.opencascade.vtk/META-INF/MANIFEST.MF @@ -13,6 +13,7 @@ Require-Bundle: org.eclipse.ui, javax.vecmath;bundle-version="1.5.2", org.simantics.utils.datastructures;bundle-version="1.1.0", org.simantics.g3d.vtk;bundle-version="1.0.0" -Bundle-RequiredExecutionEnvironment: JavaSE-1.6 +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Bundle-ActivationPolicy: lazy Export-Package: org.simantics.opencascade.vtk +Automatic-Module-Name: org.simantics.opencascade.vtk diff --git a/org.simantics.opencascade.vtk/src/org/simantics/opencascade/vtk/VTKOCCTool.java b/org.simantics.opencascade.vtk/src/org/simantics/opencascade/vtk/VTKOCCTool.java index faa8efd1..d9fc5f4c 100644 --- a/org.simantics.opencascade.vtk/src/org/simantics/opencascade/vtk/VTKOCCTool.java +++ b/org.simantics.opencascade.vtk/src/org/simantics/opencascade/vtk/VTKOCCTool.java @@ -105,6 +105,7 @@ public class VTKOCCTool { return assemblies; } + @SuppressWarnings("unused") private static void gridToAssembly(vtkAssembly assemblies, vtkPolyData partGrid, vtkAppendPolyData stlSurfaceData, vtkAppendPolyData stlEdgeData) { double featureAngle = 30; diff --git a/org.simantics.opencascade/.classpath b/org.simantics.opencascade/.classpath index 8a8f1668..b862a296 100644 --- a/org.simantics.opencascade/.classpath +++ b/org.simantics.opencascade/.classpath @@ -1,6 +1,6 @@ - + diff --git a/org.simantics.opencascade/.settings/org.eclipse.jdt.core.prefs b/org.simantics.opencascade/.settings/org.eclipse.jdt.core.prefs index a29390ad..295926d9 100644 --- a/org.simantics.opencascade/.settings/org.eclipse.jdt.core.prefs +++ b/org.simantics.opencascade/.settings/org.eclipse.jdt.core.prefs @@ -1,8 +1,7 @@ -#Mon Dec 12 17:21:52 EET 2011 eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 -org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.6 +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/org.simantics.opencascade/META-INF/MANIFEST.MF b/org.simantics.opencascade/META-INF/MANIFEST.MF index 6b4948b1..3a8e7957 100644 --- a/org.simantics.opencascade/META-INF/MANIFEST.MF +++ b/org.simantics.opencascade/META-INF/MANIFEST.MF @@ -10,6 +10,7 @@ Require-Bundle: org.eclipse.core.runtime, org.jcae.opencascade;bundle-version="1.0.0", org.simantics.utils.datastructures;bundle-version="1.1.0", org.simantics.g3d;bundle-version="1.0.0" -Bundle-RequiredExecutionEnvironment: JavaSE-1.6 +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Bundle-ActivationPolicy: lazy Export-Package: org.simantics.opencascade +Automatic-Module-Name: org.simantics.opencascade diff --git a/org.simantics.plant3d.ontology/.classpath b/org.simantics.plant3d.ontology/.classpath index ad32c83a..b862a296 100644 --- a/org.simantics.plant3d.ontology/.classpath +++ b/org.simantics.plant3d.ontology/.classpath @@ -1,7 +1,7 @@ - - - - - - - + + + + + + + diff --git a/org.simantics.plant3d.ontology/.settings/org.eclipse.jdt.core.prefs b/org.simantics.plant3d.ontology/.settings/org.eclipse.jdt.core.prefs index c537b630..0c68a61d 100644 --- a/org.simantics.plant3d.ontology/.settings/org.eclipse.jdt.core.prefs +++ b/org.simantics.plant3d.ontology/.settings/org.eclipse.jdt.core.prefs @@ -1,7 +1,7 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 -org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.6 +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/org.simantics.plant3d.ontology/META-INF/MANIFEST.MF b/org.simantics.plant3d.ontology/META-INF/MANIFEST.MF index f74fbe6b..8b7db6f7 100644 --- a/org.simantics.plant3d.ontology/META-INF/MANIFEST.MF +++ b/org.simantics.plant3d.ontology/META-INF/MANIFEST.MF @@ -15,5 +15,6 @@ Require-Bundle: org.eclipse.core.runtime, org.simantics.image2.ontology;bundle-version="1.2.0", org.simantics.silk.ontology;bundle-version="1.1.0", org.simantics.project.ontology;bundle-version="1.2.0" -Bundle-RequiredExecutionEnvironment: JavaSE-1.6 +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Export-Package: org.simantics.plant3d.ontology +Automatic-Module-Name: org.simantics.plant3d.ontology diff --git a/org.simantics.plant3d.product/.project b/org.simantics.plant3d.product/.project index 5ace73e5..6ef52379 100644 --- a/org.simantics.plant3d.product/.project +++ b/org.simantics.plant3d.product/.project @@ -5,11 +5,6 @@ - - org.eclipse.jdt.core.javabuilder - - - org.eclipse.pde.ManifestBuilder @@ -23,6 +18,5 @@ org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature diff --git a/org.simantics.plant3d.product/META-INF/MANIFEST.MF b/org.simantics.plant3d.product/META-INF/MANIFEST.MF index 199456f5..b8e15b91 100644 --- a/org.simantics.plant3d.product/META-INF/MANIFEST.MF +++ b/org.simantics.plant3d.product/META-INF/MANIFEST.MF @@ -3,11 +3,9 @@ Bundle-ManifestVersion: 2 Bundle-Name: Product Bundle-SymbolicName: org.simantics.plant3d.product;singleton:=true Bundle-Version: 1.0.0.qualifier -Bundle-Activator: org.simantics.plant3d.product.Activator Require-Bundle: org.eclipse.core.runtime, org.eclipse.ui;bundle-version="3.7.0", org.simantics.plant3d;bundle-version="1.0.0", org.simantics.project;bundle-version="1.0.1" Bundle-ActivationPolicy: lazy -Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Bundle-Vendor: VTT diff --git a/org.simantics.plant3d.product/build.properties b/org.simantics.plant3d.product/build.properties index e1d2dead..122283d1 100644 --- a/org.simantics.plant3d.product/build.properties +++ b/org.simantics.plant3d.product/build.properties @@ -1,5 +1,3 @@ -source.. = src/ -output.. = bin/ bin.includes = META-INF/,\ .,\ plugin.xml,\ diff --git a/org.simantics.plant3d.product/src/org/simantics/plant3d/product/Activator.java b/org.simantics.plant3d.product/src/org/simantics/plant3d/product/Activator.java deleted file mode 100644 index 87c1fac3..00000000 --- a/org.simantics.plant3d.product/src/org/simantics/plant3d/product/Activator.java +++ /dev/null @@ -1,30 +0,0 @@ -package org.simantics.plant3d.product; - -import org.osgi.framework.BundleActivator; -import org.osgi.framework.BundleContext; - -public class Activator implements BundleActivator { - - private static BundleContext context; - - static BundleContext getContext() { - return context; - } - - /* - * (non-Javadoc) - * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext) - */ - public void start(BundleContext bundleContext) throws Exception { - Activator.context = bundleContext; - } - - /* - * (non-Javadoc) - * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext) - */ - public void stop(BundleContext bundleContext) throws Exception { - Activator.context = null; - } - -} diff --git a/org.simantics.plant3d/.classpath b/org.simantics.plant3d/.classpath index ad32c83a..b862a296 100644 --- a/org.simantics.plant3d/.classpath +++ b/org.simantics.plant3d/.classpath @@ -1,7 +1,7 @@ - - - - - - - + + + + + + + diff --git a/org.simantics.plant3d/META-INF/MANIFEST.MF b/org.simantics.plant3d/META-INF/MANIFEST.MF index 8a67558d..7b8a3b0d 100644 --- a/org.simantics.plant3d/META-INF/MANIFEST.MF +++ b/org.simantics.plant3d/META-INF/MANIFEST.MF @@ -34,7 +34,7 @@ Require-Bundle: org.eclipse.core.runtime, org.simantics.structural.ui;bundle-version="1.1.1", org.simantics.g3d.csg;bundle-version="1.0.0", org.simantics.utils.thread.swt;bundle-version="1.1.0" -Bundle-RequiredExecutionEnvironment: JavaSE-1.6 +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Bundle-ActivationPolicy: lazy Export-Package: org.simantics.plant3d.actions, org.simantics.plant3d.browser, @@ -49,3 +49,4 @@ Export-Package: org.simantics.plant3d.actions, org.simantics.plant3d.scenegraph.controlpoint, org.simantics.plant3d.scl, org.simantics.plant3d.utils +Automatic-Module-Name: org.simantics.plant3d diff --git a/org.simantics.plant3d/src/org/simantics/plant3d/actions/AddComponentAction.java b/org.simantics.plant3d/src/org/simantics/plant3d/actions/AddComponentAction.java index 88ab9838..56b0443e 100644 --- a/org.simantics.plant3d/src/org/simantics/plant3d/actions/AddComponentAction.java +++ b/org.simantics.plant3d/src/org/simantics/plant3d/actions/AddComponentAction.java @@ -42,7 +42,9 @@ public class AddComponentAction extends vtkSwtAction { private Item toAdd = null; private PositionType insertPosition; + @SuppressWarnings("unused") private boolean insertAdjustable; + @SuppressWarnings("unused") private boolean lengthAdjustable; private String libUri; diff --git a/org.simantics.plant3d/src/org/simantics/plant3d/actions/RemoveAndSplitAction.java b/org.simantics.plant3d/src/org/simantics/plant3d/actions/RemoveAndSplitAction.java index 3dc6a4ae..180eca2f 100644 --- a/org.simantics.plant3d/src/org/simantics/plant3d/actions/RemoveAndSplitAction.java +++ b/org.simantics.plant3d/src/org/simantics/plant3d/actions/RemoveAndSplitAction.java @@ -7,7 +7,7 @@ import org.simantics.plant3d.scenegraph.PipelineComponent; public class RemoveAndSplitAction extends RemoveAction { - public RemoveAndSplitAction(VTKNodeMap nodeMap) { + public RemoveAndSplitAction(VTKNodeMap nodeMap) { super(nodeMap); setText("Remove/Split"); } diff --git a/org.simantics.plant3d/src/org/simantics/plant3d/actions/RoutePipeAction.java b/org.simantics.plant3d/src/org/simantics/plant3d/actions/RoutePipeAction.java index 7de27a31..a57fcc4c 100644 --- a/org.simantics.plant3d/src/org/simantics/plant3d/actions/RoutePipeAction.java +++ b/org.simantics.plant3d/src/org/simantics/plant3d/actions/RoutePipeAction.java @@ -839,6 +839,7 @@ public class RoutePipeAction extends vtkSwtAction { return true; } + @SuppressWarnings("unused") private Vector3d getLockDir() { switch (lock) { case CUSTOM: @@ -849,8 +850,9 @@ public class RoutePipeAction extends vtkSwtAction { return new Vector3d(0,1,0); case Z: return new Vector3d(0,0,1); + default: + return null; } - return null; } protected void updateRoute(Vector3d o, Vector3d d) { diff --git a/org.simantics.plant3d/src/org/simantics/plant3d/actions/TranslateFreeVariableLengthAction.java b/org.simantics.plant3d/src/org/simantics/plant3d/actions/TranslateFreeVariableLengthAction.java index 16a38820..261ab8c3 100644 --- a/org.simantics.plant3d/src/org/simantics/plant3d/actions/TranslateFreeVariableLengthAction.java +++ b/org.simantics.plant3d/src/org/simantics/plant3d/actions/TranslateFreeVariableLengthAction.java @@ -10,8 +10,6 @@ import org.simantics.g3d.scenegraph.IG3DNode; import org.simantics.g3d.vtk.swt.InteractiveVtkComposite; import org.simantics.g3d.vtk.utils.vtkUtil; import org.simantics.plant3d.Activator; -import org.simantics.plant3d.actions.RoutePipeAction.LockType; -import org.simantics.plant3d.actions.RoutePipeAction.ToolState; import org.simantics.plant3d.scenegraph.EndComponent; import org.simantics.plant3d.scenegraph.InlineComponent; import org.simantics.plant3d.scenegraph.Nozzle; @@ -19,9 +17,7 @@ import org.simantics.plant3d.scenegraph.P3DRootNode; import org.simantics.plant3d.scenegraph.PipelineComponent; import org.simantics.plant3d.scenegraph.TurnComponent; import org.simantics.plant3d.scenegraph.controlpoint.PipeControlPoint; -import org.simantics.plant3d.scenegraph.controlpoint.PipingRules; import org.simantics.plant3d.scenegraph.controlpoint.PipeControlPoint.Direction; -import org.simantics.plant3d.utils.ComponentUtils; public class TranslateFreeVariableLengthAction extends RoutePipeAction{ diff --git a/org.simantics.plant3d/src/org/simantics/plant3d/actions/TranslateInlineAction.java b/org.simantics.plant3d/src/org/simantics/plant3d/actions/TranslateInlineAction.java index 594c73d3..3c5886d8 100644 --- a/org.simantics.plant3d/src/org/simantics/plant3d/actions/TranslateInlineAction.java +++ b/org.simantics.plant3d/src/org/simantics/plant3d/actions/TranslateInlineAction.java @@ -9,6 +9,7 @@ import javax.vecmath.Vector3d; import org.simantics.g3d.math.MathTools; import org.simantics.g3d.math.Ray; import org.simantics.g3d.scenegraph.IG3DNode; +import org.simantics.g3d.scenegraph.base.INode; import org.simantics.g3d.vtk.common.VTKNodeMap; import org.simantics.g3d.vtk.swt.InteractiveVtkComposite; import org.simantics.g3d.vtk.swt.TranslateAction; @@ -26,7 +27,7 @@ public class TranslateInlineAction extends TranslateAction{ private Vector3d e; private Vector3d dir; - public TranslateInlineAction(InteractiveVtkComposite panel, VTKNodeMap nodeMap) { + public TranslateInlineAction(InteractiveVtkComposite panel, VTKNodeMap nodeMap) { super(panel, nodeMap); setImageDescriptor(Activator.imageDescriptorFromPlugin("com.famfamfam.silk", "icons/arrow_refresh.png")); } diff --git a/org.simantics.plant3d/src/org/simantics/plant3d/browser/P3DBrowser.java b/org.simantics.plant3d/src/org/simantics/plant3d/browser/P3DBrowser.java index 176fbaaa..f659c4be 100644 --- a/org.simantics.plant3d/src/org/simantics/plant3d/browser/P3DBrowser.java +++ b/org.simantics.plant3d/src/org/simantics/plant3d/browser/P3DBrowser.java @@ -7,6 +7,7 @@ import org.simantics.structural.ui.modelBrowser.ModelBrowser2; public class P3DBrowser extends ModelBrowser2 { + @SuppressWarnings("deprecation") @Override protected Set getBrowseContexts() { return browseContexts; diff --git a/org.simantics.plant3d/src/org/simantics/plant3d/dialog/ComponentContentProvider.java b/org.simantics.plant3d/src/org/simantics/plant3d/dialog/ComponentContentProvider.java index fe55fdfa..288455a2 100644 --- a/org.simantics.plant3d/src/org/simantics/plant3d/dialog/ComponentContentProvider.java +++ b/org.simantics.plant3d/src/org/simantics/plant3d/dialog/ComponentContentProvider.java @@ -10,6 +10,7 @@ public class ComponentContentProvider implements IStructuredContentProvider { @Override public Object[] getElements(Object inputElement) { + @SuppressWarnings("unchecked") List list = (List)inputElement; return list.toArray(); } diff --git a/org.simantics.plant3d/src/org/simantics/plant3d/editor/P3DNodeMap.java b/org.simantics.plant3d/src/org/simantics/plant3d/editor/P3DNodeMap.java index a145b71a..08ce5a07 100644 --- a/org.simantics.plant3d/src/org/simantics/plant3d/editor/P3DNodeMap.java +++ b/org.simantics.plant3d/src/org/simantics/plant3d/editor/P3DNodeMap.java @@ -103,6 +103,7 @@ public class P3DNodeMap extends AbstractVTKNodeMap { node.update(view.getRenderer()); if (node instanceof ParentNode) { + @SuppressWarnings("unchecked") ParentNode p = (ParentNode)node; for (IP3DNode n : p.getNodes()) updateTransform(n); diff --git a/org.simantics.plant3d/src/org/simantics/plant3d/editor/Plant3DEditor.java b/org.simantics.plant3d/src/org/simantics/plant3d/editor/Plant3DEditor.java index 53a0ed2c..b11cf90e 100644 --- a/org.simantics.plant3d/src/org/simantics/plant3d/editor/Plant3DEditor.java +++ b/org.simantics.plant3d/src/org/simantics/plant3d/editor/Plant3DEditor.java @@ -82,7 +82,6 @@ import vtk.vtkRenderer; import vtk.vtkSSAAPass; import vtk.vtkSequencePass; import vtk.vtkSimpleMotionBlurPass; -import vtk.vtkSobelGradientMagnitudePass; public class Plant3DEditor extends ResourceEditorPart { @@ -230,12 +229,12 @@ public class Plant3DEditor extends ResourceEditorPart { return new NodeSelectionProvider2(this,mapping,nodeMap); } - protected HoverHighlighter createHoverHighlhighter() { - return new HoverHighlighter(panel,nodeMap); + protected HoverHighlighter createHoverHighlhighter() { + return new HoverHighlighter<>(panel,nodeMap); } - protected SelectionHighlighter createSelectionHighlighter() { - return new SelectionHighlighter(panel,nodeMap); + protected SelectionHighlighter createSelectionHighlighter() { + return new SelectionHighlighter(panel,nodeMap); } protected String getLibraryUri() { @@ -491,30 +490,29 @@ public class Plant3DEditor extends ResourceEditorPart { return outlinePage; } - @SuppressWarnings("rawtypes") @Override - public Object getAdapter(Class adapter) { - if (IPropertyPage.class.equals(adapter)) - return new StandardPropertyPage(getSite(),getPropertyContexts()); - if (IContentOutlinePage.class.equals(adapter)) { - return createOutline(); + public T getAdapter(Class adapter) { + if (adapter.isAssignableFrom(IPropertyPage.class)) + return adapter.cast(new StandardPropertyPage(getSite(),getPropertyContexts())); + if (adapter.isAssignableFrom(ISelectionProvider.class)) + return adapter.cast(selectionProvider); + if (adapter.isAssignableFrom(IContentOutlinePage.class)) { + return adapter.cast(createOutline()); } - if (NodeMap.class.equals(adapter)) { - return nodeMap; + if (adapter.isAssignableFrom(NodeMap.class)) { + return adapter.cast(nodeMap); } - if (INode.class.equals(adapter)) { - return rootNode; + if (adapter.isAssignableFrom(INode.class)) { + return adapter.cast(rootNode); } - if (IMapping.class.equals(adapter)) { - return mapping; + if (adapter.isAssignableFrom(IMapping.class)) { + return adapter.cast(mapping); } -// if (InteractiveVtkPanel.class.equals(adapter)) { -// return panel; +// if (adapter.isAssignableFrom(InteractiveVtkPanel.class)) { +// return adapter.cast(panel); // } - if (VtkView.class.equals(adapter)) - return panel; - if (ISelectionProvider.class.equals(adapter)) - return selectionProvider; + if (adapter.isAssignableFrom(VtkView.class)) + return adapter.cast(panel); return super.getAdapter(adapter); } diff --git a/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/P3DParentNode.java b/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/P3DParentNode.java index dabae5ac..2be49183 100644 --- a/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/P3DParentNode.java +++ b/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/P3DParentNode.java @@ -167,9 +167,9 @@ public abstract class P3DParentNode extends ParentNode im } @Override - public Object getAdapter(Class adapter) { - if (IG3DNode.class == adapter) - return this; + public C getAdapter(Class adapter) { + if (adapter.isInstance(this)) + return adapter.cast(this); return null; } diff --git a/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/P3DRootNode.java b/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/P3DRootNode.java index 5b7fe274..27b1d471 100644 --- a/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/P3DRootNode.java +++ b/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/P3DRootNode.java @@ -157,11 +157,10 @@ public class P3DRootNode extends ParentNode implements IG3DNode, NodeMapP } - @SuppressWarnings("rawtypes") @Override - public Object getAdapter(Class adapter) { - if (NodeMap.class == adapter) - return nodeMap; + public T getAdapter(Class adapter) { + if (adapter.isAssignableFrom(NodeMap.class)) + return adapter.cast(nodeMap); return null; } diff --git a/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/ParameterizedNode.java b/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/ParameterizedNode.java index 7aa0e808..2aa9c698 100644 --- a/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/ParameterizedNode.java +++ b/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/ParameterizedNode.java @@ -1,7 +1,6 @@ package org.simantics.plant3d.scenegraph; import java.util.Map; -import java.util.Set; import org.simantics.g3d.scenegraph.IG3DNode; diff --git a/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/PipeRun.java b/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/PipeRun.java index 36710e4f..958228e8 100644 --- a/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/PipeRun.java +++ b/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/PipeRun.java @@ -43,7 +43,7 @@ public class PipeRun extends P3DParentNode { @Override public Collection getActors() { - return Collections.EMPTY_LIST; + return Collections.emptyList(); } @Override @@ -51,12 +51,14 @@ public class PipeRun extends P3DParentNode { } + @SuppressWarnings("deprecation") @RelatedGetValue(Plant3D.URIs.HasTurnRadius) @GetPropertyValue(value=Plant3D.URIs.HasTurnRadius, name = "Elbow radius") public double getTurnRadius() { return turnRadius[0]; } + @SuppressWarnings("deprecation") @RelatedSetValue(Plant3D.URIs.HasTurnRadius) @SetPropertyValue(Plant3D.URIs.HasTurnRadius) public void setTurnRadius(double turnRadius) { diff --git a/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/PipelineComponent.java b/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/PipelineComponent.java index 735916db..37dd5012 100644 --- a/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/PipelineComponent.java +++ b/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/PipelineComponent.java @@ -428,7 +428,7 @@ public abstract class PipelineComponent extends GeometryNode { } public Map updateParameterMap() { - return Collections.EMPTY_MAP; + return Collections.emptyMap(); } public abstract String getType(); diff --git a/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/controlpoint/PipingRules.java b/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/controlpoint/PipingRules.java index eb07e9c0..f5c6f876 100644 --- a/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/controlpoint/PipingRules.java +++ b/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/controlpoint/PipingRules.java @@ -375,6 +375,7 @@ public class PipingRules { } + @SuppressWarnings("unused") private static boolean calculateOffset(Vector3d startPoint, Vector3d endPoint, ArrayList list, Vector3d dir, Vector3d offset) { boolean hasOffsets = false; List offsets = new ArrayList(list.size()); @@ -718,7 +719,7 @@ public class PipingRules { // position of the // component dir.add(prevPos); - PipeControlPoint scp = insertStraight(prev, icp, dir, length); + insertStraight(prev, icp, dir, length); return true; } else { triedIR = true; @@ -1372,6 +1373,7 @@ public class PipingRules { // end,Point3d endPoint, Vector3d dir, boolean hasOffsets,int iter, boolean // reversed, ArrayList toRemove) throws TransactionException // { + @SuppressWarnings("unused") private static void processPathLegNoOffset(UpdateStruct2 u) throws Exception { if (DEBUG) System.out.println("PipingRules.processPathLeg " + u.start + " " + u.end); @@ -1876,7 +1878,6 @@ public class PipingRules { // this should not be possible throw new RuntimeException("VariableLengthComponent " + splittingComponent + " is not connected to anything."); } - double reservedLength = splittingComponent.getControlPoint().getLength(); double newLength = newComponent.getControlPoint().getLength(); @@ -1912,21 +1913,20 @@ public class PipingRules { vn.interpolate(next, 0.5); - PipeControlPoint newVariableLengthCP = null;//insertStraight(pcp1, pcp2, pos, length); if (nextCP == null) { newCP.insert(splittingCP, Direction.NEXT); - newVariableLengthCP = insertStraight(newCP, Direction.NEXT, new Vector3d(vn), ln); + insertStraight(newCP, Direction.NEXT, new Vector3d(vn), ln); splittingCP.setWorldPosition(new Vector3d(vp)); // ControlPointTools.setWorldPosition(splittingCP, vp); // splittingCP.setRelatedScalarDouble(ProcessResource.plant3Dresource.HasLength, lp); } else if (prevCP == null) { newCP.insert(splittingCP, Direction.PREVIOUS); - newVariableLengthCP = insertStraight(newCP, Direction.PREVIOUS, new Vector3d(vp), lp); + insertStraight(newCP, Direction.PREVIOUS, new Vector3d(vp), lp); splittingCP.setWorldPosition(new Vector3d(vn)); // splittingCP.setRelatedScalarDouble(ProcessResource.plant3Dresource.HasLength, ln); } else { newCP.insert(splittingCP, nextCP); - newVariableLengthCP = insertStraight(newCP, nextCP, new Vector3d(vn), ln); + insertStraight(newCP, nextCP, new Vector3d(vn), ln); splittingCP.setWorldPosition(new Vector3d(vp)); // splittingCP.setRelatedScalarDouble(ProcessResource.plant3Dresource.HasLength, lp); } diff --git a/org.simantics.plant3d/src/org/simantics/plant3d/utils/ComponentUtils.java b/org.simantics.plant3d/src/org/simantics/plant3d/utils/ComponentUtils.java index fb065f11..4e357144 100644 --- a/org.simantics.plant3d/src/org/simantics/plant3d/utils/ComponentUtils.java +++ b/org.simantics.plant3d/src/org/simantics/plant3d/utils/ComponentUtils.java @@ -5,7 +5,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import javax.vecmath.Point3d; import javax.vecmath.Vector3d; import org.simantics.Simantics; @@ -356,6 +355,8 @@ public class ComponentUtils { pipeRun = toPcp.getPipeRun(); } break; + default: + break; } Vector3d start = new Vector3d(); Vector3d end = new Vector3d(); @@ -372,6 +373,8 @@ public class ComponentUtils { case SPLIT: pos = new Vector3d(toPcp.getWorldPosition()); break; + default: + break; } } else if (toPcp.isDirected()) { @@ -433,6 +436,8 @@ public class ComponentUtils { break; case SPLIT: break; + default: + break; } switch (position) { @@ -450,6 +455,8 @@ public class ComponentUtils { break; case SPLIT: PipingRules.splitVariableLengthComponent(newComponent, (InlineComponent)component, true); + default: + break; } } else { PipeRun other = new PipeRun(); @@ -479,6 +486,8 @@ public class ComponentUtils { break; case SPLIT: break; + default: + break; } newPcp.setWorldPosition(pos); @@ -559,7 +568,6 @@ public class ComponentUtils { // Runs do not have compatible specs, and a reducer must be attached in between. InlineComponent reducer = ComponentUtils.createReducer(root); PipeControlPoint pcp = reducer.getControlPoint(); - PipeControlPoint ocp = pcp.getSubPoint().get(0); Vector3d endPos = endCP.getWorldPosition(); Vector3d currentPos = currentCP.getWorldPosition(); diff --git a/org.simantics.plant3d/src/org/simantics/plant3d/utils/P3DUtil.java b/org.simantics.plant3d/src/org/simantics/plant3d/utils/P3DUtil.java index 65b93cff..cb46546e 100644 --- a/org.simantics.plant3d/src/org/simantics/plant3d/utils/P3DUtil.java +++ b/org.simantics.plant3d/src/org/simantics/plant3d/utils/P3DUtil.java @@ -69,7 +69,7 @@ public class P3DUtil { @Override public List perform(ReadGraph graph) throws DatabaseException { - Resource project = Simantics.getProject().get(); +// Resource project = Simantics.getProject().get(); Resource builtins = graph.getResource(libUri); List actions = new ArrayList<>(); // actions.addAll(getItems(graph, project,type)); diff --git a/vtk.rendering.win32.win32.x86_64/.project b/vtk.rendering.win32.win32.x86_64/.project index 5b951697..ed43df67 100644 --- a/vtk.rendering.win32.win32.x86_64/.project +++ b/vtk.rendering.win32.win32.x86_64/.project @@ -5,11 +5,6 @@ - - org.eclipse.jdt.core.javabuilder - - - org.eclipse.pde.ManifestBuilder @@ -23,6 +18,5 @@ org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature diff --git a/vtk.rendering.win32.win32.x86_64/build.properties b/vtk.rendering.win32.win32.x86_64/build.properties index 34d2e4d2..7594fab8 100644 --- a/vtk.rendering.win32.win32.x86_64/build.properties +++ b/vtk.rendering.win32.win32.x86_64/build.properties @@ -1,4 +1,2 @@ -source.. = src/ -output.. = bin/ bin.includes = META-INF/,\ . diff --git a/vtk.rendering/src/vtk/rendering/swt/vtkSwtInteractorForwarderDecorator.java b/vtk.rendering/src/vtk/rendering/swt/vtkSwtInteractorForwarderDecorator.java index 56259564..27848388 100644 --- a/vtk.rendering/src/vtk/rendering/swt/vtkSwtInteractorForwarderDecorator.java +++ b/vtk.rendering/src/vtk/rendering/swt/vtkSwtInteractorForwarderDecorator.java @@ -24,6 +24,7 @@ import org.eclipse.swt.internal.DPIUtil; * Commissariat a l'Energie Atomique et aux Energies Alternatives, * 15 avenue des Sablieres, CS 60001, 33116 Le Barp, France. */ +@SuppressWarnings("restriction") public class vtkSwtInteractorForwarderDecorator extends vtkInteractorForwarder implements MouseListener, MouseMoveListener, MouseTrackListener, MouseWheelListener, KeyListener { diff --git a/vtk.rendering/src/vtk/rendering/vtkAbstractComponent.java b/vtk.rendering/src/vtk/rendering/vtkAbstractComponent.java index c905a72f..6cb48953 100644 --- a/vtk.rendering/src/vtk/rendering/vtkAbstractComponent.java +++ b/vtk.rendering/src/vtk/rendering/vtkAbstractComponent.java @@ -27,6 +27,7 @@ import vtk.vtkRenderer; * Commissariat a l'Energie Atomique et aux Energies Alternatives, * 15 avenue des Sablieres, CS 60001, 33116 Le Barp, France. */ +@SuppressWarnings("restriction") public abstract class vtkAbstractComponent implements vtkComponent { protected vtkRenderWindow renderWindow; protected vtkRenderer renderer; diff --git a/vtk.win32.win32.x86_64/.project b/vtk.win32.win32.x86_64/.project index 2214f177..fe987f73 100644 --- a/vtk.win32.win32.x86_64/.project +++ b/vtk.win32.win32.x86_64/.project @@ -5,11 +5,6 @@ - - org.eclipse.jdt.core.javabuilder - - - org.eclipse.pde.ManifestBuilder @@ -23,6 +18,5 @@ org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature diff --git a/vtk.win32.win32.x86_64/build.properties b/vtk.win32.win32.x86_64/build.properties index e621548a..eddd902b 100644 --- a/vtk.win32.win32.x86_64/build.properties +++ b/vtk.win32.win32.x86_64/build.properties @@ -1,5 +1,3 @@ -source.. = src/ -output.. = bin/ bin.includes = META-INF/,\ .,\ vtkChartsCore.dll,\