X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.db.procore%2Fsrc%2Ffi%2Fvtt%2Fsimantics%2Fprocore%2Finternal%2FUtils.java;h=b02edf172f782612289f6cadef5e528c7d9ea4a3;hp=b0ac28645dda1e034eccbf93bdc8d6a1658d26cb;hb=782dfcb9fc5ce3db46598f660abf642b9c8849b7;hpb=969bd23cab98a79ca9101af33334000879fb60c5 diff --git a/bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/Utils.java b/bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/Utils.java index b0ac28645..b02edf172 100644 --- a/bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/Utils.java +++ b/bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/Utils.java @@ -1,25 +1,25 @@ -package fi.vtt.simantics.procore.internal; - -import java.io.File; - -import org.eclipse.core.runtime.IPath; -import org.eclipse.core.runtime.Platform; -import org.osgi.framework.Bundle; - -public class Utils { - public static File getBaseFile(Bundle b) { - if(Platform.isRunning()) { - IPath state = Platform.getStateLocation(b); - return state.append("debug").toFile(); - } else { - return new File(""); - } - } - public static long convertHexStringToLong(String hex) { - if (hex.length() < 16) - return Long.parseLong(hex, 16); - long f = Long.parseLong(hex.substring(0,1), 16) << 60; - long l = Long.parseLong(hex.substring(1,16), 16); - return f | l; - } -} +package fi.vtt.simantics.procore.internal; + +import java.io.File; + +import org.eclipse.core.runtime.IPath; +import org.eclipse.core.runtime.Platform; +import org.osgi.framework.Bundle; + +public class Utils { + public static File getBaseFile(Bundle b) { + if(Platform.isRunning()) { + IPath state = Platform.getStateLocation(b); + return state.append("debug").toFile(); + } else { + return new File(""); + } + } + public static long convertHexStringToLong(String hex) { + if (hex.length() < 16) + return Long.parseLong(hex, 16); + long f = Long.parseLong(hex.substring(0,1), 16) << 60; + long l = Long.parseLong(hex.substring(1,16), 16); + return f | l; + } +}