1 /* 2 * Copyright (C) 2007 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package com.android.ddmuilib; 18 19 import org.eclipse.jface.preference.IPreferenceStore; 20 21 /** 22 * Preference entry point for ddmuilib. Allows the lib to access a preference 23 * store (org.eclipse.jface.preference.IPreferenceStore) defined by the 24 * application that includes the lib. 25 */ 26 public final class DdmUiPreferences { 27 28 public static final int DEFAULT_THREAD_REFRESH_INTERVAL = 4; // seconds 29 30 private static int sThreadRefreshInterval = DEFAULT_THREAD_REFRESH_INTERVAL; 31 32 private static IPreferenceStore mStore; 33 34 private static String sSymbolLocation =""; //$NON-NLS-1$ 35 private static String sAddr2LineLocation =""; //$NON-NLS-1$ 36 private static String sTraceviewLocation =""; //$NON-NLS-1$ 37 38 public static void setStore(IPreferenceStore store) { 39 mStore = store; 40 } 41 42 public static IPreferenceStore getStore() { 43 return mStore; 44 } 45 46 public static int getThreadRefreshInterval() { 47 return sThreadRefreshInterval; 48 } 49 50 public static void setThreadRefreshInterval(int port) { 51 sThreadRefreshInterval = port; 52 } 53 54 public static String getSymbolDirectory() { 55 return sSymbolLocation; 56 } 57 58 public static void setSymbolsLocation(String location) { 59 sSymbolLocation = location; 60 } 61 62 public static String getAddr2Line() { 63 return sAddr2LineLocation; 64 } 65 66 public static void setAddr2LineLocation(String location) { 67 sAddr2LineLocation = location; 68 } 69 70 public static String getTraceview() { 71 return sTraceviewLocation; 72 } 73 74 public static void setTraceviewLocation(String location) { 75 sTraceviewLocation = location; 76 } 77 78 79 } 80