From: lehtonen Date: Tue, 3 Jun 2014 10:37:47 +0000 (+0000) Subject: Fixed warnings from sysdyn code. X-Git-Tag: 1.8.1~40 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=91f80da051f7915194c629278b88f29311024726;p=simantics%2Fsysdyn.git Fixed warnings from sysdyn code. refs #4695 git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@29573 ac1ea38d-2e2b-0410-8846-a27921b304fc --- diff --git a/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/Addition.java b/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/Addition.java index b2ec695c..8c09ab6f 100644 --- a/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/Addition.java +++ b/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/Addition.java @@ -10,8 +10,6 @@ *******************************************************************************/ package fi.semantum.sysdyn.solver; -import java.util.Collection; -import java.util.Iterator; import java.util.Map; public class Addition implements IExpression { diff --git a/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/And.java b/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/And.java index dc3ab53d..2cee3857 100644 --- a/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/And.java +++ b/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/And.java @@ -13,8 +13,6 @@ package fi.semantum.sysdyn.solver; import java.util.ArrayList; import java.util.Map; -import fi.semantum.sysdyn.solver.IExpression.ExpressionVisitor; - public class And implements IExpression { public IExpression[] exps; diff --git a/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/Application.java b/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/Application.java index a59ece28..8f1987a4 100644 --- a/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/Application.java +++ b/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/Application.java @@ -12,8 +12,6 @@ package fi.semantum.sysdyn.solver; import java.util.Map; -import fi.semantum.sysdyn.solver.IExpression.ExpressionVisitor; - public class Application implements IExpression { public String name; diff --git a/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/Argument.java b/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/Argument.java index 2712ab90..cf5fe675 100644 --- a/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/Argument.java +++ b/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/Argument.java @@ -12,8 +12,6 @@ package fi.semantum.sysdyn.solver; import java.util.Map; -import fi.semantum.sysdyn.solver.IExpression.ExpressionVisitor; - public class Argument implements IExpression { public String name; diff --git a/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/Array.java b/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/Array.java index 233838d9..75d286ed 100644 --- a/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/Array.java +++ b/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/Array.java @@ -15,9 +15,6 @@ import java.util.Collection; import java.util.Iterator; import java.util.Map; -import fi.semantum.sysdyn.solver.IExpression.ExpressionVisitor; -import fi.semantum.sysdyn.solver.SolverUtils.Slice; - public class Array implements IExpression { public static final Array FULL = new Array(); diff --git a/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/ArraySliceExpression.java b/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/ArraySliceExpression.java index 9ed04b14..24d313d8 100644 --- a/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/ArraySliceExpression.java +++ b/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/ArraySliceExpression.java @@ -12,8 +12,6 @@ package fi.semantum.sysdyn.solver; import java.util.Map; -import fi.semantum.sysdyn.solver.IExpression.ExpressionVisitor; - public class ArraySliceExpression implements IExpression { public IExpression start; diff --git a/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/Assignment.java b/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/Assignment.java index acaee56a..8f43075a 100644 --- a/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/Assignment.java +++ b/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/Assignment.java @@ -10,7 +10,6 @@ *******************************************************************************/ package fi.semantum.sysdyn.solver; -import fi.semantum.sysdyn.solver.IExpression.ExpressionVisitor; public class Assignment { diff --git a/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/Constant.java b/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/Constant.java index b93dc989..3c56e26a 100644 --- a/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/Constant.java +++ b/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/Constant.java @@ -12,8 +12,6 @@ package fi.semantum.sysdyn.solver; import java.util.Map; -import fi.semantum.sysdyn.solver.IExpression.ExpressionVisitor; - public class Constant implements IExpression { public Object value; diff --git a/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/Declaration.java b/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/Declaration.java index 90b2cfc2..b7b1678b 100644 --- a/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/Declaration.java +++ b/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/Declaration.java @@ -11,11 +11,8 @@ *******************************************************************************/ package fi.semantum.sysdyn.solver; -import java.nio.channels.UnsupportedAddressTypeException; import java.util.Map; -import fi.semantum.sysdyn.solver.IExpression.ExpressionVisitor; - public class Declaration implements IExpression { public Variable variable; diff --git a/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/Derivate.java b/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/Derivate.java index ef3b6012..131ca742 100644 --- a/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/Derivate.java +++ b/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/Derivate.java @@ -12,8 +12,6 @@ package fi.semantum.sysdyn.solver; import java.util.Map; -import fi.semantum.sysdyn.solver.IExpression.ExpressionVisitor; - public class Derivate implements IExpression { private Variable variable; diff --git a/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/Division.java b/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/Division.java index 80fbaee4..d8d357fe 100644 --- a/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/Division.java +++ b/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/Division.java @@ -12,8 +12,6 @@ package fi.semantum.sysdyn.solver; import java.util.Map; -import fi.semantum.sysdyn.solver.IExpression.ExpressionVisitor; - public class Division implements IExpression { public IExpression exp1; diff --git a/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/ElementwiseProduct.java b/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/ElementwiseProduct.java index 5888029f..59ea9718 100644 --- a/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/ElementwiseProduct.java +++ b/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/ElementwiseProduct.java @@ -14,8 +14,6 @@ import java.util.Collection; import java.util.Iterator; import java.util.Map; -import fi.semantum.sysdyn.solver.IExpression.ExpressionVisitor; - public class ElementwiseProduct implements IExpression { public IExpression exp1; diff --git a/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/Equals.java b/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/Equals.java index 110c99bd..5113479c 100644 --- a/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/Equals.java +++ b/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/Equals.java @@ -12,8 +12,6 @@ package fi.semantum.sysdyn.solver; import java.util.Map; -import fi.semantum.sysdyn.solver.IExpression.ExpressionVisitor; - public class Equals implements IExpression { public IExpression exp1; diff --git a/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/ForArray.java b/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/ForArray.java index 2a268732..bf7b7be6 100644 --- a/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/ForArray.java +++ b/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/ForArray.java @@ -14,8 +14,6 @@ import java.util.ArrayList; import java.util.Collection; import java.util.Map; -import fi.semantum.sysdyn.solver.IExpression.ExpressionVisitor; - public class ForArray implements IExpression { private ArrayList elements = new ArrayList(); diff --git a/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/GreaterOrEqualThan.java b/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/GreaterOrEqualThan.java index 4876199c..e9f8cdcc 100644 --- a/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/GreaterOrEqualThan.java +++ b/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/GreaterOrEqualThan.java @@ -12,8 +12,6 @@ package fi.semantum.sysdyn.solver; import java.util.Map; -import fi.semantum.sysdyn.solver.IExpression.ExpressionVisitor; - public class GreaterOrEqualThan implements IExpression { public IExpression exp1; diff --git a/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/GreaterThan.java b/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/GreaterThan.java index 1a9791d6..e91f0ffc 100644 --- a/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/GreaterThan.java +++ b/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/GreaterThan.java @@ -12,8 +12,6 @@ package fi.semantum.sysdyn.solver; import java.util.Map; -import fi.semantum.sysdyn.solver.IExpression.ExpressionVisitor; - public class GreaterThan implements IExpression { public IExpression exp1; diff --git a/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/IfThenElse.java b/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/IfThenElse.java index a95c99e1..d8511d72 100644 --- a/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/IfThenElse.java +++ b/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/IfThenElse.java @@ -12,8 +12,6 @@ package fi.semantum.sysdyn.solver; import java.util.Map; -import fi.semantum.sysdyn.solver.IExpression.ExpressionVisitor; - public class IfThenElse implements IExpression { public IExpression exp; diff --git a/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/LessOrEqualThan.java b/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/LessOrEqualThan.java index b9ab757e..d45163e9 100644 --- a/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/LessOrEqualThan.java +++ b/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/LessOrEqualThan.java @@ -12,8 +12,6 @@ package fi.semantum.sysdyn.solver; import java.util.Map; -import fi.semantum.sysdyn.solver.IExpression.ExpressionVisitor; - public class LessOrEqualThan implements IExpression { public IExpression exp1; diff --git a/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/LessThan.java b/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/LessThan.java index db798083..d66d63a5 100644 --- a/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/LessThan.java +++ b/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/LessThan.java @@ -12,8 +12,6 @@ package fi.semantum.sysdyn.solver; import java.util.Map; -import fi.semantum.sysdyn.solver.IExpression.ExpressionVisitor; - public class LessThan implements IExpression { public IExpression exp1; diff --git a/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/LineReader.java b/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/LineReader.java index d4e2f420..4b2da148 100644 --- a/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/LineReader.java +++ b/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/LineReader.java @@ -167,7 +167,7 @@ public class LineReader { public void parse() throws Exception { - long start = System.nanoTime(); + //long start = System.nanoTime(); for(;pos values = (ArrayList)environment.getSystem().evaluateFunction(environment, fn.base.name, args); for(int i=0;i variables = new ArrayList(); - for(Variable child : variable.browseChildren(graph)) { + for(Variable child : variable.getChildren(graph)) { Resource represents = (Resource)child.getPropertyValue(graph, Variables.REPRESENTS); if(graph.isInstanceOf(represents, sr.IndependentVariable)) { variables.add(child); diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/Configuration.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/Configuration.java index d50bfbc2..fdb9ee0b 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/Configuration.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/Configuration.java @@ -51,7 +51,7 @@ public class Configuration extends ViewpointContributor enumerations = new TreeMap(AlphanumComparator.CASE_INSENSITIVE_COMPARATOR); - for(Variable child : variable.browseChildren(graph)) { + for(Variable child : variable.getChildren(graph)) { Resource represents = (Resource)child.getPropertyValue(graph, Variables.REPRESENTS); if(graph.isInstanceOf(represents, sr.IndependentVariable)) { variables.put(child.getName(graph), child); diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/ModulesLabeler.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/ModulesLabeler.java index c271365a..36d64d01 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/ModulesLabeler.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/ModulesLabeler.java @@ -15,7 +15,6 @@ package org.simantics.sysdyn.ui.browser.contributions; import org.simantics.browsing.ui.graph.contributor.labeler.LabelerContributor; import org.simantics.db.ReadGraph; import org.simantics.db.exception.DatabaseException; -import org.simantics.sysdyn.ui.browser.nodes.ExperimentsFolder; import org.simantics.sysdyn.ui.browser.nodes.ModulesNode; public class ModulesLabeler extends LabelerContributor{ diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/nodes/AnnotationType.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/nodes/AnnotationType.java index 8b608c99..d5f3b6ba 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/nodes/AnnotationType.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/nodes/AnnotationType.java @@ -26,7 +26,6 @@ import org.simantics.db.common.request.WriteRequest; import org.simantics.db.common.utils.Logger; import org.simantics.db.exception.CancelTransactionException; import org.simantics.db.exception.DatabaseException; -import org.simantics.db.exception.ServiceNotFoundException; import org.simantics.db.layer0.util.RemoverUtil; import org.simantics.layer0.Layer0; import org.simantics.ui.SimanticsUI; diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/nodes/AnnotationValue.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/nodes/AnnotationValue.java index b97ad52e..0f551eee 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/nodes/AnnotationValue.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/nodes/AnnotationValue.java @@ -21,12 +21,9 @@ import org.simantics.browsing.ui.graph.impl.LabelModifier; import org.simantics.db.Resource; import org.simantics.db.Session; import org.simantics.db.WriteGraph; -import org.simantics.db.common.primitiverequest.PossibleObject; import org.simantics.db.common.request.WriteRequest; -import org.simantics.db.common.utils.Logger; import org.simantics.db.exception.CancelTransactionException; import org.simantics.db.exception.DatabaseException; -import org.simantics.db.exception.ServiceNotFoundException; import org.simantics.db.layer0.util.RemoverUtil; import org.simantics.layer0.Layer0; import org.simantics.ui.SimanticsUI; diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/nodes/Library.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/nodes/Library.java index c62f6c66..736081eb 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/nodes/Library.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/nodes/Library.java @@ -21,12 +21,9 @@ import org.simantics.browsing.ui.graph.impl.LabelModifier; import org.simantics.db.Resource; import org.simantics.db.Session; import org.simantics.db.WriteGraph; -import org.simantics.db.common.primitiverequest.PossibleObject; import org.simantics.db.common.request.WriteRequest; -import org.simantics.db.common.utils.Logger; import org.simantics.db.exception.CancelTransactionException; import org.simantics.db.exception.DatabaseException; -import org.simantics.db.exception.ServiceNotFoundException; import org.simantics.db.layer0.util.RemoverUtil; import org.simantics.layer0.Layer0; import org.simantics.ui.SimanticsUI; diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/editor/participant/SysdynCopyPasteStrategy.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/editor/participant/SysdynCopyPasteStrategy.java index 4a489593..2c5c0dd9 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/editor/participant/SysdynCopyPasteStrategy.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/editor/participant/SysdynCopyPasteStrategy.java @@ -20,17 +20,14 @@ import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.PlatformUI; import org.simantics.Simantics; -import org.simantics.annotation.ontology.AnnotationResource; import org.simantics.db.ReadGraph; import org.simantics.db.Resource; import org.simantics.db.Session; import org.simantics.db.WriteGraph; -import org.simantics.db.common.request.ReadRequest; import org.simantics.db.common.request.WriteRequest; import org.simantics.db.common.utils.NameUtils; import org.simantics.db.exception.DatabaseException; import org.simantics.db.request.Read; -import org.simantics.db.service.QueryControl; import org.simantics.diagram.handler.CopyPasteUtil; import org.simantics.diagram.handler.DefaultCopyPasteStrategy; import org.simantics.diagram.handler.ElementObjectAssortment; diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/ExportSharedOntologyHandler.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/ExportSharedOntologyHandler.java index 9d2f6703..5e29611e 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/ExportSharedOntologyHandler.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/ExportSharedOntologyHandler.java @@ -19,7 +19,6 @@ public class ExportSharedOntologyHandler extends AbstractHandler { ISelection sel = HandlerUtil.getCurrentSelection(event); - @SuppressWarnings("unchecked") SharedOntologyNode node = AdaptionUtils.adaptToSingle(sel, SharedOntologyNode.class); if (node == null) return null; diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/NewAnnotationTypeHandler.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/NewAnnotationTypeHandler.java index ee052f8b..f77b693f 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/NewAnnotationTypeHandler.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/NewAnnotationTypeHandler.java @@ -24,10 +24,10 @@ public class NewAnnotationTypeHandler extends AbstractHandler { ISelection sel = HandlerUtil.getCurrentSelection(event); - @SuppressWarnings("unchecked") Resource res = AdaptionUtils.adaptToSingle(sel, Resource.class); if(res == null) { - AbstractNode node = AdaptionUtils.adaptToSingle(sel, AbstractNode.class); + @SuppressWarnings("unchecked") + AbstractNode node = AdaptionUtils.adaptToSingle(sel, AbstractNode.class); if (node == null) return null; res = node.data; diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/NewAnnotationValueHandler.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/NewAnnotationValueHandler.java index 29ad88db..e8f757e1 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/NewAnnotationValueHandler.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/NewAnnotationValueHandler.java @@ -20,10 +20,10 @@ public class NewAnnotationValueHandler extends AbstractHandler { ISelection sel = HandlerUtil.getCurrentSelection(event); - @SuppressWarnings("unchecked") Resource res = AdaptionUtils.adaptToSingle(sel, Resource.class); if(res == null) { - AbstractNode node = AdaptionUtils.adaptToSingle(sel, AbstractNode.class); + @SuppressWarnings("unchecked") + AbstractNode node = AdaptionUtils.adaptToSingle(sel, AbstractNode.class); if (node == null) return null; res = node.data; diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/NewLibraryHandler.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/NewLibraryHandler.java index 009d225c..0f20af7d 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/NewLibraryHandler.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/NewLibraryHandler.java @@ -21,10 +21,10 @@ public class NewLibraryHandler extends AbstractHandler { ISelection sel = HandlerUtil.getCurrentSelection(event); - @SuppressWarnings("unchecked") Resource res = AdaptionUtils.adaptToSingle(sel, Resource.class); if(res == null) { - AbstractNode node = AdaptionUtils.adaptToSingle(sel, AbstractNode.class); + @SuppressWarnings("unchecked") + AbstractNode node = AdaptionUtils.adaptToSingle(sel, AbstractNode.class); if (node == null) return null; res = node.data; diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/game/ReloadGameExperimentHandler.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/game/ReloadGameExperimentHandler.java index 72d6970c..218512cd 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/game/ReloadGameExperimentHandler.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/game/ReloadGameExperimentHandler.java @@ -20,7 +20,6 @@ import org.simantics.project.IProject; import org.simantics.simulation.experiment.ExperimentState; import org.simantics.simulation.experiment.IExperiment; import org.simantics.simulation.project.IExperimentManager; -import org.simantics.sysdyn.manager.SysdynGameExperiment; import org.simantics.sysdyn.manager.SysdynGameExperimentBase; import org.simantics.sysdyn.ui.handlers.RunBasicExperiment; import org.simantics.ui.SimanticsUI; diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/listeners/SysdynPlaybackExperimentListener.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/listeners/SysdynPlaybackExperimentListener.java index e527a7f9..70dc93d3 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/listeners/SysdynPlaybackExperimentListener.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/listeners/SysdynPlaybackExperimentListener.java @@ -62,6 +62,7 @@ public class SysdynPlaybackExperimentListener implements IExperimentListener { switch(state) { case DISPOSED: revertPlaybackProfiles(); + default: break; } } diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/trend/PieDataset.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/trend/PieDataset.java index 3eb92c57..81d73100 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/trend/PieDataset.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/trend/PieDataset.java @@ -48,7 +48,7 @@ import org.simantics.ui.SimanticsUI; * @author Teemu Lempinen * */ -public class PieDataset extends AbstractDataset implements org.simantics.jfreechart.chart.PieDataset{ +public class PieDataset extends AbstractDataset implements org.simantics.jfreechart.chart.PieDataset { private List seriesList; private String realizationURI; diff --git a/org.simantics.sysdyn/src/org/simantics/sysdyn/manager/SysdynGameExperiment.java b/org.simantics.sysdyn/src/org/simantics/sysdyn/manager/SysdynGameExperiment.java index 395a6c50..145262d7 100644 --- a/org.simantics.sysdyn/src/org/simantics/sysdyn/manager/SysdynGameExperiment.java +++ b/org.simantics.sysdyn/src/org/simantics/sysdyn/manager/SysdynGameExperiment.java @@ -22,6 +22,7 @@ import java.util.HashMap; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.NullProgressMonitor; +import org.simantics.Simantics; import org.simantics.databoard.Bindings; import org.simantics.db.AsyncReadGraph; import org.simantics.db.ReadGraph; @@ -32,7 +33,6 @@ import org.simantics.db.common.request.WriteRequest; import org.simantics.db.common.utils.Logger; import org.simantics.db.exception.DatabaseException; import org.simantics.db.layer0.util.Layer0Utils; -import org.simantics.db.layer0.util.Simantics; import org.simantics.db.layer0.variable.Variable; import org.simantics.db.layer0.variable.Variables; import org.simantics.db.procedure.AsyncListener; diff --git a/org.simantics.sysdyn/src/org/simantics/sysdyn/manager/SysdynGameExperimentInternal.java b/org.simantics.sysdyn/src/org/simantics/sysdyn/manager/SysdynGameExperimentInternal.java index 11129a3a..07226b80 100644 --- a/org.simantics.sysdyn/src/org/simantics/sysdyn/manager/SysdynGameExperimentInternal.java +++ b/org.simantics.sysdyn/src/org/simantics/sysdyn/manager/SysdynGameExperimentInternal.java @@ -17,6 +17,7 @@ import java.util.HashMap; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.NullProgressMonitor; +import org.simantics.Simantics; import org.simantics.db.ReadGraph; import org.simantics.db.Resource; import org.simantics.db.WriteGraph; @@ -24,7 +25,6 @@ import org.simantics.db.common.request.WriteRequest; import org.simantics.db.common.utils.Logger; import org.simantics.db.exception.DatabaseException; import org.simantics.db.layer0.util.Layer0Utils; -import org.simantics.db.layer0.util.Simantics; import org.simantics.db.layer0.variable.Variable; import org.simantics.db.layer0.variable.Variables; import org.simantics.modelica.IModelicaMonitor; diff --git a/org.simantics.sysdyn/src/org/simantics/sysdyn/utils/DocumentationUtils.java b/org.simantics.sysdyn/src/org/simantics/sysdyn/utils/DocumentationUtils.java index 725516d3..2247106a 100644 --- a/org.simantics.sysdyn/src/org/simantics/sysdyn/utils/DocumentationUtils.java +++ b/org.simantics.sysdyn/src/org/simantics/sysdyn/utils/DocumentationUtils.java @@ -519,7 +519,6 @@ public class DocumentationUtils { double[] values = EvaluatingListener.trySyncRequest(Simantics.getSession(), new UniqueRead(){ - @SuppressWarnings("unchecked") @Override public double[] perform(ReadGraph graph) throws DatabaseException{