/*\r
* Dynamic Analyzer\r
*\r
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ * Copyright (c) 2000 - 2013 Samsung Electronics Co., Ltd. All rights reserved.\r
*\r
* Contact: \r
* Jooyoul Lee <jy.exe.lee@samsung.com>\r
import org.tizen.dynamicanalyzer.common.CommonConstants;
import org.tizen.dynamicanalyzer.common.SymbolManager;
import org.tizen.dynamicanalyzer.communicator.CommunicatorUtils;
-import org.tizen.dynamicanalyzer.communicator.DACommunicator;
import org.tizen.dynamicanalyzer.model.ImageInfo;
import org.tizen.dynamicanalyzer.nl.InformationViewLabels;
-import org.tizen.dynamicanalyzer.project.Project;
import org.tizen.dynamicanalyzer.swap.channel.data.ApiNameManager;
import org.tizen.dynamicanalyzer.swap.channel.data.BasicDataMessage;
import org.tizen.dynamicanalyzer.swap.logparser.LogPackage;
import org.tizen.dynamicanalyzer.swap.model.data.LogData;
-import org.tizen.dynamicanalyzer.swap.model.data.LogDataFactory;
-import org.tizen.dynamicanalyzer.swap.model.data.ProbeCommonData;
-import org.tizen.dynamicanalyzer.swap.model.data.ProfileData;
import org.tizen.dynamicanalyzer.swap.model.data.ScreenShotData;
import org.tizen.dynamicanalyzer.swap.model.data.SystemData;
import org.tizen.dynamicanalyzer.swap.model.data.UserFunctionData;
import org.tizen.dynamicanalyzer.ui.page.BaseView;
-import org.tizen.dynamicanalyzer.ui.summary.profiling.FunctionUsageProfiler;
import org.tizen.dynamicanalyzer.ui.toolbar.ToolbarArea;
-import org.tizen.dynamicanalyzer.uirecorder.UIRecorderPlayThread;
-import org.tizen.dynamicanalyzer.uirecorder.UIRecorderTool;
import org.tizen.dynamicanalyzer.utils.AnalyzerUtil;
import org.tizen.dynamicanalyzer.utils.ImageUtil;
import org.tizen.sdblib.service.SyncResult;
import org.tizen.dynamicanalyzer.ui.toolbar.StopProcessManager;
import org.tizen.dynamicanalyzer.ui.toolbar.ToolbarArea;
import org.tizen.dynamicanalyzer.utils.AnalyzerUtil;
-import org.tizen.dynamicanalyzer.widgets.chart.DAChart;
public class MessageParser {
int index = 0;
int id = ByteUtils.toInt(data, index);
index += INT_SIZE;
- int seq = ByteUtils.toInt(data, index);
+// int seq = ByteUtils.toInt(data, index);
index += INT_SIZE;
DATime changeTime = new DATime();
int sec = ByteUtils.toInt(data, index);
changeTime.setSec(sec);
changeTime.setNano(nano);
- int length = ByteUtils.toInt(data, index);
+// int length = ByteUtils.toInt(data, index);
index += INT_SIZE;
int pid = ByteUtils.toInt(data, index);
import java.util.HashMap;
import java.util.List;
-import org.eclipse.cdt.utils.debug.DebugField;
import org.eclipse.swt.layout.FormAttachment;
import org.eclipse.swt.layout.FormData;
import org.tizen.dynamicanalyzer.common.AnalyzerPaths;
+/*
+ * Dynamic Analyzer
+ *
+ * Copyright (c) 2013 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Jooyoul Lee <jy.exe.lee@samsung.com>
+ * Juyoung Kim <j0.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
package org.tizen.dynamicanalyzer.swap.platform.ui;
import java.io.BufferedReader;
data.height = 30;
data.width = 80;
findPackageButton.setLayoutData(data);
- findPackageButton.setText("Find dir");
+ findPackageButton.setText("Find file");
findPackageButton.addClickListener(findDebugButtonListener);
Label sourceLabel = new Label(shell, SWT.TRANSPARENT);
+/*
+ * Dynamic Analyzer
+ *
+ * Copyright (c) 2013 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Jooyoul Lee <jy.exe.lee@samsung.com>
+ * Juyoung Kim <j0.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
package org.tizen.dynamicanalyzer.swap.platform.ui.DeviceExplorer;
import org.eclipse.nebula.widgets.grid.Grid;
protected Text inputText = null;
protected DACustomButton goButton = null;
protected Label info = null;
- private boolean getDirectory = false;
+ private boolean bDirectory = false;
private IDevice device = null;
private FileEntry root = null;
FileEntry entry = (FileEntry) selection
.getData(ExplorerUtil.DATA_FIEL_KEY);
if (entry.isDirectory() || entry.isRoot()) {
- if (getDirectory) {
+ if (bDirectory) {
return entry;
} else {
return null;
}
} else {
- if (getDirectory) {
+ if (bDirectory) {
return entry.getParent();
} else {
return entry;
}
public void setReturnDirectory(boolean getDir) {
- getDirectory = getDir;
+ bDirectory = getDir;
+ }
+
+ public boolean isReturnDirectory() {
+ return bDirectory;
}
public void setDevice(IDevice dev) {
+/*
+ * Dynamic Analyzer
+ *
+ * Copyright (c) 2013 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Jooyoul Lee <jy.exe.lee@samsung.com>
+ * Juyoung Kim <j0.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
package org.tizen.dynamicanalyzer.swap.platform.ui.DeviceExplorer;
import org.eclipse.nebula.widgets.grid.Grid;
FileEntry entry = (FileEntry) item
.getData(ExplorerUtil.DATA_FIEL_KEY);
- if (!entry.isDirectory() && !entry.isRoot()) {
+ if (!entry.isDirectory() && !entry.isRoot()
+ && !explorer.isReturnDirectory()) {
result = entry;
shell.dispose();
}
+/*
+ * Dynamic Analyzer
+ *
+ * Copyright (c) 2013 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Jooyoul Lee <jy.exe.lee@samsung.com>
+ * Juyoung Kim <j0.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
package org.tizen.dynamicanalyzer.swap.platform.ui;
import java.io.File;
+/*
+ * Dynamic Analyzer
+ *
+ * Copyright (c) 2013 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Jooyoul Lee <jy.exe.lee@samsung.com>
+ * Juyoung Kim <j0.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
package org.tizen.dynamicanalyzer.swap.platform.ui.FileExplorer;
import java.io.File;
protected Text inputText = null;
protected DACustomButton goButton = null;
protected Label info = null;
- private boolean getDirectory = false;
+ private boolean bDirectory = false;
private File root = null;
private File current = null;
}
File entry = (File) selection.getData(ExplorerUtil.DATA_FIEL_KEY);
if (entry.isDirectory()) {
- if (getDirectory) {
+ if (bDirectory) {
return entry;
} else {
return null;
}
} else {
- if (getDirectory) {
+ if (bDirectory) {
return entry.getParentFile();
} else {
return entry;
}
}
} else {
- return null;
+ if (bDirectory) {
+ return current;
+ } else {
+ return null;
+ }
}
}
public void setReturnDirectory(boolean getDir) {
- getDirectory = getDir;
+ bDirectory = getDir;
+ }
+
+ public boolean isReturnDirectory() {
+ return bDirectory;
}
public int setCurrent(String path) {
+/*
+ * Dynamic Analyzer
+ *
+ * Copyright (c) 2013 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Jooyoul Lee <jy.exe.lee@samsung.com>
+ * Juyoung Kim <j0.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
package org.tizen.dynamicanalyzer.swap.platform.ui.FileExplorer;
import org.eclipse.nebula.widgets.grid.Grid;
+/*
+ * Dynamic Analyzer
+ *
+ * Copyright (c) 2013 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Jooyoul Lee <jy.exe.lee@samsung.com>
+ * Juyoung Kim <j0.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
package org.tizen.dynamicanalyzer.swap.platform.ui.FileExplorer;
import java.io.File;
+/*
+ * Dynamic Analyzer
+ *
+ * Copyright (c) 2013 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Jooyoul Lee <jy.exe.lee@samsung.com>
+ * Juyoung Kim <j0.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
package org.tizen.dynamicanalyzer.swap.platform.ui.FileExplorer;
+import java.io.File;
+
+import org.eclipse.nebula.widgets.grid.Grid;
+import org.eclipse.nebula.widgets.grid.GridItem;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.MouseListener;
import org.eclipse.swt.events.PaintEvent;
import org.eclipse.swt.events.PaintListener;
import org.eclipse.swt.graphics.Rectangle;
import org.tizen.dynamicanalyzer.common.DesignConstants;
import org.tizen.dynamicanalyzer.nl.AnalyzerLabels;
import org.tizen.dynamicanalyzer.resources.ColorResources;
+import org.tizen.dynamicanalyzer.swap.platform.ui.ExplorerUtil;
import org.tizen.dynamicanalyzer.ui.widgets.DAButton;
import org.tizen.dynamicanalyzer.ui.widgets.DAMessageBox;
import org.tizen.dynamicanalyzer.widgets.button.DACustomButton;
protected boolean run() {
explorer.updateData();
- // explorer.getTable().addMouseListener(new MouseListener() {
- //
- // @Override
- // public void mouseUp(MouseEvent e) {
- // // TODO Auto-generated method stub
- //
- // }
- //
- // @Override
- // public void mouseDown(MouseEvent e) {
- // // TODO Auto-generated method stub
- //
- // }
- //
- // @Override
- // public void mouseDoubleClick(MouseEvent e) {
- // Grid table = (Grid) e.widget;
- // GridItem[] items = (GridItem[]) table.getSelection();
- // if (null == items || items.length == 0) {
- // return;
- // }
- // GridItem item = items[0];
- // File entry = (File) item.getData(ExplorerUtil.DATA_FIEL_KEY);
- //
- // if (!entry.isDirectory()) {
- // result = entry;
- // shell.dispose();
- // }
- // }
- // });
+ explorer.getTable().addMouseListener(new MouseListener() {
+
+ @Override
+ public void mouseUp(MouseEvent e) {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void mouseDown(MouseEvent e) {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void mouseDoubleClick(MouseEvent e) {
+ Grid table = (Grid) e.widget;
+ GridItem[] items = (GridItem[]) table.getSelection();
+ if (null == items || items.length == 0) {
+ return;
+ }
+ GridItem item = items[0];
+ File entry = (File) item.getData(ExplorerUtil.DATA_FIEL_KEY);
+
+ if (!entry.isDirectory() && !explorer.isReturnDirectory()) {
+ result = entry;
+ shell.dispose();
+ }
+ }
+ });
return true;
}
import org.tizen.dynamicanalyzer.swap.model.data.LogDataFactory;
import org.tizen.dynamicanalyzer.swap.model.data.MemoryData;
import org.tizen.dynamicanalyzer.swap.model.data.ProbeCommonData;
-import org.tizen.dynamicanalyzer.utils.AnalyzerUtil;
public class LeakData {
public static final int INDEX_LEAK_SEQ = 1;
import java.util.HashMap;
import java.util.List;
-import org.tizen.dynamicanalyzer.common.AnalyzerManager;
import org.tizen.dynamicanalyzer.swap.model.data.LogData;
import org.tizen.dynamicanalyzer.swap.model.data.ProbeCommonData;
-import org.tizen.dynamicanalyzer.ui.info.callstack.CallStackData;
-import org.tizen.dynamicanalyzer.ui.info.callstack.CallStackUnit;
import org.tizen.dynamicanalyzer.utils.AnalyzerUtil;
public class LeakDetector {
}
}
- private void checkUserFuncLeakData(LogData log, LeakInfo chk) {
- HashMap<Integer, CallStackData> cdMap = AnalyzerManager
- .getCallstackManager().getCallStackDataBySeqMap();
- // HashMap<Long, String> apiMap = LogSpliter.getCallStackApiByAddrMap();
- HashMap<Long, CallStackUnit> addrMap = AnalyzerManager
- .getCallstackManager().getCallStackApiByAddrMap();
-
- if (null == cdMap || null == addrMap) {
- return;
- }
-
- int seqNum = log.getSeq();
- CallStackData csd = cdMap.get(seqNum);
- if (null == csd) {
- // System.out.println("no callstack "); //$NON-NLS-1$
- // for (int i = 0; i < input.length; i++)
- // {
- // System.out.print(input[i] + " "); //$NON-NLS-1$
- // }
- // System.out.println();
- return;
- }
- List<Long> addrs = null;
- addrs = csd.getAddrs();
- if (addrs.isEmpty()) {
- System.out.println("BUG: Callstack is empty!"); //$NON-NLS-1$
- return;
- }
-
- CallStackUnit callerFunc = addrMap.get(addrs.get(0));
-
- // user call
- if (AnalyzerManager.getCallstackManager().isUserCall(
- callerFunc.getFunctionName())) {
- HashMap<Integer, LeakData> leaks = getLeakHash();
- LeakData newLeak = new LeakData(log, this);
- leaks.put(newLeak.getKey(), newLeak);
- }
- // for internal leak
- // else {
- // undefined internal call
- // int size = addrs.size();
- // for (int i = 1; i < size; i++) {
- // callerFunc = addrMap.get(addrs.get(i));
- // if (callerFunc.getFunctionName().contains("__dlog_print")) { //$NON-NLS-1$
- // return;
- // }
- // if (CallStackManager.getInstance().isUserCall(
- // callerFunc.getFunctionName())) {
- // LeakData childData = new LeakData(input[chk.getKeyIndex()],
- // input);
- // String addr = Long.toString(addrs.get(i - 1));
- // callerFunc = addrMap.get(addrs.get(i - 1));
- // LeakData parentLeakData = getLeakHash().get(addr);
- // if (null == parentLeakData) {
- // parentLeakData = new LeakData(addr,
- // callerFunc.getSymbol(),
- // input[LogCenterConstants.ID_INDEX]);
- // getLeakHash().put(addr, parentLeakData);
- // }
- // parentLeakData.addChild(childData);
- // childData.setParentKey(parentLeakData.getKey());
- // getChildHash().put(childData.getKey(), childData);
- // break;
- // }
- // }
- // }
- }
+ // private void checkUserFuncLeakData(LogData log, LeakInfo chk) {
+ // HashMap<Integer, CallStackData> cdMap = AnalyzerManager
+ // .getCallstackManager().getCallStackDataBySeqMap();
+ // // HashMap<Long, String> apiMap = LogSpliter.getCallStackApiByAddrMap();
+ // HashMap<Long, CallStackUnit> addrMap = AnalyzerManager
+ // .getCallstackManager().getCallStackApiByAddrMap();
+ //
+ // if (null == cdMap || null == addrMap) {
+ // return;
+ // }
+ //
+ // int seqNum = log.getSeq();
+ // CallStackData csd = cdMap.get(seqNum);
+ // if (null == csd) {
+ // // System.out.println("no callstack "); //$NON-NLS-1$
+ // // for (int i = 0; i < input.length; i++)
+ // // {
+ // // System.out.print(input[i] + " "); //$NON-NLS-1$
+ // // }
+ // // System.out.println();
+ // return;
+ // }
+ // List<Long> addrs = null;
+ // addrs = csd.getAddrs();
+ // if (addrs.isEmpty()) {
+ // System.out.println("BUG: Callstack is empty!"); //$NON-NLS-1$
+ // return;
+ // }
+ //
+ // CallStackUnit callerFunc = addrMap.get(addrs.get(0));
+ //
+ // // user call
+ // if (AnalyzerManager.getCallstackManager().isUserCall(
+ // callerFunc.getFunctionName())) {
+ // HashMap<Integer, LeakData> leaks = getLeakHash();
+ // LeakData newLeak = new LeakData(log, this);
+ // leaks.put(newLeak.getKey(), newLeak);
+ // }
+ // for internal leak
+ // else {
+ // undefined internal call
+ // int size = addrs.size();
+ // for (int i = 1; i < size; i++) {
+ // callerFunc = addrMap.get(addrs.get(i));
+ // if (callerFunc.getFunctionName().contains("__dlog_print")) { //$NON-NLS-1$
+ // return;
+ // }
+ // if (CallStackManager.getInstance().isUserCall(
+ // callerFunc.getFunctionName())) {
+ // LeakData childData = new LeakData(input[chk.getKeyIndex()],
+ // input);
+ // String addr = Long.toString(addrs.get(i - 1));
+ // callerFunc = addrMap.get(addrs.get(i - 1));
+ // LeakData parentLeakData = getLeakHash().get(addr);
+ // if (null == parentLeakData) {
+ // parentLeakData = new LeakData(addr,
+ // callerFunc.getSymbol(),
+ // input[LogCenterConstants.ID_INDEX]);
+ // getLeakHash().put(addr, parentLeakData);
+ // }
+ // parentLeakData.addChild(childData);
+ // childData.setParentKey(parentLeakData.getKey());
+ // getChildHash().put(childData.getKey(), childData);
+ // break;
+ // }
+ // }
+ // }
+ // }
public int getLeakSeq() {
return leakSeq;
import org.tizen.dynamicanalyzer.model.TableInput;
import org.tizen.dynamicanalyzer.swap.model.data.LogData;
import org.tizen.dynamicanalyzer.swap.model.data.ProbeCommonData;
-import org.tizen.dynamicanalyzer.swap.model.data.ThreadData;
import org.tizen.dynamicanalyzer.ui.common.UICommonConstants;
import org.tizen.dynamicanalyzer.ui.timeline.common.TimelineConstants;
import org.tizen.dynamicanalyzer.ui.widgets.table.DAApiListTableComposite;
+++ /dev/null
-/*
- * Dynamic Analyzer
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact:
- * WooJin Jung <woojin2.jung@samsung.com>
- * Jooyoul Lee <jy.exe.lee@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Contributors:
- * - S-Core Co., Ltd
- *
- */
-
-package org.tizen.dynamicanalyzer.ui.timeline.calltrace;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-
-import org.tizen.dynamicanalyzer.swap.model.data.LogData;
-import org.tizen.dynamicanalyzer.swap.model.data.ProfileData;
-
-public class UserFunctionManager {
-// private List<LogData> log = null;
-// private static UserFunctionManager instance = null;
-// private int count = 0;
-// public static boolean stop = false;
-// private HashMap<Long, LogData> entryMap = new HashMap<Long, LogData>();
-//
-// public static UserFunctionManager getInstance() {
-// if (null == instance) {
-// instance = new UserFunctionManager();
-// }
-// return instance;
-// }
-//
-// public void clear() {
-// instance = null;
-// stop = false;
-// }
-//
-// public List<LogData> getLog() {
-// if (null == log) {
-// log = new ArrayList<LogData>();
-// }
-// return log;
-// }
-//
-// public void setReturnValue(LogData input) {
-// ProfileData exitData = (ProfileData) input;
-// long addr = exitData.getPcAddr();
-//// System.out.println(input.getId() + " exit addr : "
-//// + AnalyzerUtil.toHexdecimal(addr) + " api : " + exitData.getApiName());
-// ProfileData entryData = (ProfileData) entryMap.get(addr);
-// if (null != entryData) {
-//// System.out.println("SET RETURN! " + AnalyzerUtil.toHexdecimal(addr)
-//// + " value : " + exitData.getRet());
-// entryData.setRet(exitData.getRet());
-// entryMap.remove(addr);
-// }
-//
-// }
-//
-// public void addLog(LogData input) {
-// // TODO:UserFunction case
-// if (!stop) {
-// ProfileData entryData = (ProfileData) input;
-// getLog().add(entryData);
-// entryMap.put(entryData.getPcAddr(), entryData);
-//// System.out.println("PUT : "
-//// + AnalyzerUtil.toHexdecimal(entryData.getPcAddr())+ " api : " + entryData.getApiName());
-// count++;
-// if (count >= 1000) {
-// stop = true;
-// }
-// }
-// }
-}
+/*
+ * Dynamic Analyzer
+ *
+ * Copyright (c) 2013 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Jooyoul Lee <jy.exe.lee@samsung.com>
+ * Juyoung Kim <j0.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
package org.tizen.dynamicanalyzer.ui.toolbar.configuration;
import java.io.BufferedReader;
*
* Contact:
* HyunJong Park <phjwithyou.park@samsung.com>
+ * Jooyoul Lee <jy.exe.lee@samsung.com>
* Juyoung Kim <j0.kim@samsung.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
buttonData.height = 28;
cancelButton.setLayoutData(buttonData);
- // okButton = new DAButton(buttonContentsComp, SWT.NONE);
- // okButton.addClickListener(okButtonListener);
- // okButton.setText(AnalyzerLabels.OK);
- // okButton.setFont(FontResources.DIALOG_BUTTON_FONT);
- // buttonData = new FormData();
- // buttonData.right = new FormAttachment(50, -4);
- // buttonData.top = new FormAttachment(0, 11);
- // buttonData.width = 100;
- // buttonData.height = 28;
- // okButton.setLayoutData(buttonData);
-
applyButton = new DAButton(buttonContentsComp, SWT.NONE);
applyButton.addClickListener(applyButtonListener);
applyButton.setText(AnalyzerLabels.APPLY);
+++ /dev/null
-/*
- * Dynamic Analyzer
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact:
- * Jooyoul Lee <jy.exe.lee@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Contributors:
- * - S-Core Co., Ltd
- *
- */
-package org.tizen.dynamicanalyzer.utils;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Marshaller;
-import javax.xml.bind.Unmarshaller;
-
-public class XMLManager {
- private static final String DATA_MODEL_NAME_SPACE = "org.tizen.dynamicanalyzer.model"; //$NON-NLS-1$
-
- @SuppressWarnings("static-access")
- public static void marshal(Object obj, File path) {
- if (null == path || null == obj) {
- return;
- }
-
- try {
- JAXBContext jc = JAXBContext.newInstance(DATA_MODEL_NAME_SPACE);
- Marshaller marshaller = jc.createMarshaller();
- marshaller.setProperty(marshaller.JAXB_FORMATTED_OUTPUT,
- Boolean.TRUE);
- marshaller.marshal(obj, new FileOutputStream(path));
- } catch (JAXBException e) {
- e.printStackTrace();
- } catch (FileNotFoundException e) {
- e.printStackTrace();
- }
- }
-
- public static Object unmarshal(File path) {
- if (null == path) {
- return null;
- }
-
- try {
- JAXBContext jc = JAXBContext.newInstance(DATA_MODEL_NAME_SPACE);
- Unmarshaller u = jc.createUnmarshaller();
- return u.unmarshal(new FileInputStream(path));
- } catch (JAXBException e) {
- e.printStackTrace();
- } catch (FileNotFoundException e) {
- e.printStackTrace();
- }
- return null;
- }
-}