import org.tizen.dynamicanalyzer.ui.file.FilePage;
import org.tizen.dynamicanalyzer.ui.network.NetworkPage;
import org.tizen.dynamicanalyzer.ui.opengl.GLPage;
+import org.tizen.dynamicanalyzer.ui.page.MenuBar;
import org.tizen.dynamicanalyzer.ui.thread.ThreadPage;
-import org.tizen.dynamicanalyzer.ui.toolbar.Toolbar;
import org.tizen.dynamicanalyzer.ui.widgets.table.DATableDataFormat;
import org.tizen.dynamicanalyzer.utils.AnalyzerUtil;
import org.tizen.dynamicanalyzer.widgets.da.view.DAPageComposite;
public void mouseDoubleClick(MouseEvent e) {
// swt.button1 = left click
// swt.button3 = right click
- if (Toolbar.INSTANCE.isSourceViewEnabled()
+ if(MenuBar.getInstance().getSourceView()
|| !(e.widget instanceof Grid)) {
return;
}
import org.tizen.dynamicanalyzer.swap.model.data.ProbeCommonData;
import org.tizen.dynamicanalyzer.swap.platform.BinarySettingData;
import org.tizen.dynamicanalyzer.swap.platform.BinarySettingManager;
+import org.tizen.dynamicanalyzer.ui.page.MenuBar;
import org.tizen.dynamicanalyzer.ui.timeline.calltrace.FunctionEntryDBTable;
import org.tizen.dynamicanalyzer.ui.toolbar.Toolbar;
import org.tizen.dynamicanalyzer.ui.widgets.table.DATableDataFormat;
isHeader = true;
}
- boolean isToggled = Toolbar.INSTANCE.isSourceViewEnabled();
+ boolean isToggled = MenuBar.getInstance().getSourceView();
if (enabled && !isHeader) {
setViewCursor(isToggled);
}
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.FileDialog;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.MenuItem;
import org.tizen.dynamicanalyzer.nl.AnalyzerLabels;
import org.tizen.dynamicanalyzer.nl.MenuBarLabels;
import org.tizen.dynamicanalyzer.project.Project;
-import org.tizen.dynamicanalyzer.shortcut.ShortCutManager;
import org.tizen.dynamicanalyzer.swap.logparser.DataManagerRegistry;
import org.tizen.dynamicanalyzer.ui.file.FileChartView;
import org.tizen.dynamicanalyzer.ui.file.FilePage;
import org.tizen.dynamicanalyzer.ui.timeline.TimelinePage;
import org.tizen.dynamicanalyzer.ui.timeline.common.TimelineChartView;
import org.tizen.dynamicanalyzer.ui.toolbar.AboutDialog;
-import org.tizen.dynamicanalyzer.ui.toolbar.SaveAsDialog;
import org.tizen.dynamicanalyzer.ui.toolbar.Toolbar;
-import org.tizen.dynamicanalyzer.ui.toolbar.opentrace.OpenTraceDialog;
import org.tizen.dynamicanalyzer.ui.toolbar.opentrace.OpenTraceProgressManager;
import org.tizen.dynamicanalyzer.ui.toolbar.setting.FlatFeatureDialog;
import org.tizen.dynamicanalyzer.ui.toolbar.setting.PreferencesDialog;
private static MenuBar instance = new MenuBar();
private Shell currentShell;
private Menu menubar = null;
+
+ private boolean sourceView = false;
public MenuBar() {
currentShell = WorkbenchUtil.getWorkbenchWindow().getShell();
return false;
}
-
+ public void setSourceView(boolean setview) {
+ this.sourceView = setview;
+ }
+
+ public boolean getSourceView() {
+ return this.sourceView;
+ }
}
\ No newline at end of file
import org.tizen.dynamicanalyzer.setting.FlatPreferences;
import org.tizen.dynamicanalyzer.setting.SettingDataManager;
import org.tizen.dynamicanalyzer.shortcut.ShortCutManager;
+import org.tizen.dynamicanalyzer.ui.page.MenuBar;
import org.tizen.dynamicanalyzer.util.CommonUtil;
import org.tizen.dynamicanalyzer.widgets.button.DACustomButton;
import org.tizen.dynamicanalyzer.widgets.button.DACustomButtonClickEventListener;
generalvalues.setBackground(ColorResources.DIALOG_CONTENT_BACKGROUND);
sourceviewtoggle = createToggleButton(generalvalues);
+ sourceviewtoggle.addClickListener(new DACustomButtonClickEventListener() {
+
+ @Override
+ public void handleClickEvent(DACustomButton button) {
+ MenuBar.getInstance().setSourceView(sourceviewtoggle.isToggled());
+ }
+ });
systemrateText = createTextBox(generalvalues, "ms");
if (value == 1) {
sourceviewtoggle.setToggled(true);
+ MenuBar.getInstance().setSourceView(true);
} else {
sourceviewtoggle.setToggled(false);
+ MenuBar.getInstance().setSourceView(false);
}
value = SettingDataManager.INSTANCE.getOptionsPreferencesValue(FlatPreferences.SYSTEM_SAMPLING_RATE);