// reset UI
if (UILayoutDataManager.INSTANCE.isDirty()) {
- UIActionHolder.getUIAction().setPageBySetting();
- UIActionHolder.getUIAction().setChartBySetting();
+ UIActionHolder.getUIAction().setUIElementsBySetting();
}
UIActionHolder.getUIAction().applyStartTraceUI();
UIActionHolder.getUIAction().applyWebProfilingUI(project.isWebApplication());
import org.eclipse.swt.widgets.Shell;
import org.tizen.dynamicanalyzer.common.DAResult;
+import org.tizen.dynamicanalyzer.project.Project;
public class CLIAction implements UIAction {
}
@Override
- public void setPages(String[] pageNames) {
+ public void setUIElements(Project project) {
// TODO Auto-generated method stub
-
}
@Override
- public void setCharts(String[] chartNames) {
+ public void setUIElementsBySetting() {
// TODO Auto-generated method stub
-
}
@Override
}
- @Override
- public void setChartBySetting() {
- // TODO Auto-generated method stub
-
- }
-
}
import org.tizen.dynamicanalyzer.common.DAResult;
import org.tizen.dynamicanalyzer.constant.CommonConstants;
import org.tizen.dynamicanalyzer.nl.SummaryLabels;
+import org.tizen.dynamicanalyzer.project.Project;
import org.tizen.dynamicanalyzer.resources.ImageResources;
import org.tizen.dynamicanalyzer.setting.SettingConstants;
import org.tizen.dynamicanalyzer.setting.SettingDataManager;
});
}
- /* (non-Javadoc)
- * @see org.tizen.dynamicanalyzer.handlers.UIAction#applyStopTraceUI()
- */
@Override
public void applyStopTraceUI() {
Display.getDefault().syncExec(new Runnable() {
});
}
- /* (non-Javadoc)
- * @see org.tizen.dynamicanalyzer.handlers.UIAction#applyWebProfilingUI(boolean)
- */
@Override
public void applyWebProfilingUI(final boolean isWeb) {
Display.getDefault().syncExec(new Runnable() {
});
}
- /* (non-Javadoc)
- * @see org.tizen.dynamicanalyzer.handlers.UIAction#showWarning(java.lang.String, int, int)
- */
@Override
public void showWarning(final String message, final int width,
final int height) {
});
}
- /* (non-Javadoc)
- * @see org.tizen.dynamicanalyzer.handlers.UIAction#showWarning(org.tizen.dynamicanalyzer.common.DAResult, int, int)
- */
@Override
public void showWarning(final DAResult result, final int width,
final int height) {
showWarning(result.getMessage() + " (" + result.getErrorNumber() + ")", width, height);
}
- /* (non-Javadoc)
- * @see org.tizen.dynamicanalyzer.handlers.UIAction#showWarning(java.lang.String)
- */
@Override
public void showWarning(final String message) {
Display.getDefault().asyncExec(new Runnable() {
Shell shell = WorkbenchUtil.getWorkbenchWindow().getShell();
DADialog dialog = new DADialog(shell, SWT.NONE);
dialog.setIcon(ImageResources.DIALOG_WARNING_ICON);
- dialog.setMessage(message);
+ dialog.setMessage(message);
dialog.setDialog(true);
dialog.getExportButton().addClickListener(exportListener);
dialog.open();
});
}
- /* (non-Javadoc)
- * @see org.tizen.dynamicanalyzer.handlers.UIAction#showWarning(java.lang.String, java.lang.String)
- */
@Override
public void showWarning(final String title, final String message) {
Display.getDefault().asyncExec(new Runnable() {
});
}
- /* (non-Javadoc)
- * @see org.tizen.dynamicanalyzer.handlers.UIAction#showWarning(org.tizen.dynamicanalyzer.common.DAResult)
- */
@Override
public void showWarning(final DAResult result) {
showWarning(result.getMessage() + CommonConstants.SPACE + CommonConstants.OPEN_BRACKET
+ result.getErrorNumber() + CommonConstants.CLOSE_BRACKET);
}
- /* (non-Javadoc)
- * @see org.tizen.dynamicanalyzer.handlers.UIAction#showWarning(org.eclipse.swt.widgets.Shell, java.lang.String)
- */
@Override
public void showWarning(final Shell shell, final String message) {
Display.getDefault().asyncExec(new Runnable() {
});
}
- /* (non-Javadoc)
- * @see org.tizen.dynamicanalyzer.handlers.UIAction#showWarning(org.eclipse.swt.widgets.Shell, org.tizen.dynamicanalyzer.common.DAResult)
- */
@Override
public void showWarning(final Shell shell, final DAResult result) {
showWarning(shell, result.getMessage() + CommonConstants.SPACE
+ CommonConstants.CLOSE_BRACKET);
}
- /* (non-Javadoc)
- * @see org.tizen.dynamicanalyzer.handlers.UIAction#getPageNames()
- */
@Override
public List<String> getPageNames() {
BaseView bv = (BaseView) WorkbenchUtil.getViewPart(BaseView.ID);
return nameList;
}
- /* (non-Javadoc)
- * @see org.tizen.dynamicanalyzer.handlers.UIAction#convertPageIDtoPageName(java.util.List)
- */
@Override
public List<String> convertPageIDtoPageName(List<String> pageIDs) {
List<String> pageNameList = new ArrayList<String>();
return pageNameList;
}
- /* (non-Javadoc)
- * @see org.tizen.dynamicanalyzer.handlers.UIAction#setPages(java.lang.String[])
- */
@Override
- public void setPages(String[] pageNames) {
+ public void setUIElements(Project project) {
+ setPages(project.getPageTabList());
+ setCharts(project.getTimelineChartList());
+ }
+
+ /**
+ * Set tab pages to be shown on UI.
+ *
+ * @param pageNames list of page names.
+ */
+ private void setPages(String[] pageNames) {
if (pageNames != null) {
final Set<String> pageNameSet = new HashSet<String>(Arrays.asList(pageNames));
}
}
- /* (non-Javadoc)
- * @see org.tizen.dynamicanalyzer.handlers.UIAction#setCharts(java.lang.String[])
+ /**
+ * Set charts to be shown on UI.
+ *
+ * @param chartNames list of chart names.
*/
- @Override
- public void setCharts(String[] chartNames) {
+ private void setCharts(String[] chartNames) {
if (chartNames != null) {
final List<String> chartNameList = Arrays.asList(chartNames);
}
}
- // update tab pages
- /* (non-Javadoc)
- * @see org.tizen.dynamicanalyzer.handlers.UIAction#setPageBySetting()
- */
+ @Override
+ public void setUIElementsBySetting() {
+ setPageBySetting();
+ setChartBySetting();
+ }
+
@Override
public void setPageBySetting() {
TargetData target = SettingDataManager.INSTANCE.getConnectedTarget();
UILayoutDataManager.INSTANCE.setDirty(false);
}
- // update chart list
- /* (non-Javadoc)
- * @see org.tizen.dynamicanalyzer.handlers.UIAction#setChartBySetting()
+ /**
+ * Update charts to be shown on UI based on current settings.
*/
- @Override
- public void setChartBySetting() {
+ private void setChartBySetting() {
final Set<String> selectedChartSet = new HashSet<String>();
// set selected chart list
}
});
}
-
+
private static DACustomButtonClickEventListener exportListener = new DACustomButtonClickEventListener() {
@Override
public void handleClickEvent(DACustomButton button) {
OpenTraceProgressManager.getInstance().setProgressPercent(
AnalyzerLabels.OPEN_TRACE_PROGRESS_LOADING, percent += 3);
- // change tab list and page to be shown
- UIActionHolder.getUIAction().setPages(project.getPageTabList());
-
- // change chart list in timeline page
- UIActionHolder.getUIAction().setCharts(project.getTimelineChartList());
+ // change tab list and page to be shown and chart list in timeline page
+ UIActionHolder.getUIAction().setUIElements(project);
// change page
if (RangeDataManager.getInstance().isBeingAnalyzed()) {
import org.eclipse.swt.widgets.Shell;
import org.tizen.dynamicanalyzer.common.DAResult;
+import org.tizen.dynamicanalyzer.project.Project;
/**
* Methods for common interactive actions in user interface.
/**
* Show warning to user.
*
- * @param message
- * warning message to be shown.
- * @param width
- * width of UI object to show warning in.
- * @param height
- * height of UI object to show warning in.
+ * @param message warning message to be shown.
+ * @param width width of UI object to show warning in.
+ * @param height height of UI object to show warning in.
*/
void showWarning(final String message, final int width,
final int height);
/**
* Show warning to user.
*
- * @param result
- * instance of {@link DAResult} defining the message to be shown.
- * @param width
- * width of UI object to show warning in.
- * @param height
- * height of UI object to show warning in.
+ * @param result instance of {@link DAResult} defining the message to be
+ * shown.
+ * @param width width of UI object to show warning in.
+ * @param height height of UI object to show warning in.
*/
void showWarning(final DAResult result, final int width,
final int height);
/**
* Show warning to user.
*
- * @param message
- * warning message to be shown.
+ * @param message warning message to be shown.
*/
void showWarning(final String message);
/**
* Show warning to user.
*
- * @param title
- * title of the warning message to be shown.
- * @param message
- * warning message to be shown.
+ * @param title title of the warning message to be shown.
+ * @param message warning message to be shown.
*/
void showWarning(final String title, final String message);
/**
* Show warning to user.
*
- * @param result
- * instance of {@link DAResult} defining the message to be shown.
+ * @param result instance of {@link DAResult} defining the message to be
+ * shown.
*/
void showWarning(final DAResult result);
/**
* Show warning to user.
*
- * @param shell
- * parent shell where to output warning.
- * @param message
- * warning message to be shown.
+ * @param shell parent shell where to output warning.
+ * @param message warning message to be shown.
*/
void showWarning(final Shell shell, final String message);
/**
* Show warning to user.
*
- * @param shell
- * parent {@link Shell} where to output warning.
- * @param result
- * instance of {@link DAResult} defining the message to be shown.
+ * @param shell parent {@link Shell} where to output warning.
+ * @param result instance of {@link DAResult} defining the message to be
+ * shown.
*/
void showWarning(final Shell shell, final DAResult result);
/**
* Convert ids of tab pages to corresponding tab pages names.
*
- * @param pageIDs
- * list of page ids.
+ * @param pageIDs list of page ids.
* @return list of page names.
*/
List<String> convertPageIDtoPageName(List<String> pageIDs);
/**
- * Set tab pages to be shown on UI.
+ * Set UI elements to be shown to user.
*
- * @param pageNames
- * list of page names.
+ * @param project {@link Project} where to load list of UI elements from
*/
- // FIXME replace setPages+setCharts with setUIElements methods
- void setPages(String[] pageNames);
+ void setUIElements(Project project);
/**
- * Set charts to be shown on UI.
- *
- * @param chartNames
- * list of chart names.
+ * Update UI elements to be shown on UI based on current settings.
*/
- // FIXME replace setPages+setCharts with setUIElements method
- void setCharts(String[] chartNames);
+ void setUIElementsBySetting();
/**
* Update tab pages to be shown on UI based on current settings.
+ *
+ * It was made a part of public API as it is called without other UI
+ * elements updates in IDECommunicator.autoStartApplication() method.
*/
- // FIXME replace setPageBySetting+setChartBySetting with
- // setUIElementsBySetting methods
void setPageBySetting();
- /**
- * Update charts to be shown on UI based on current settings.
- */
- // FIXME replace setPageBySetting+setChartBySetting with
- // setUIElementsBySetting methods
- void setChartBySetting();
-
}
\ No newline at end of file
};
private void doApply() {
if (DAState.isStartable()) {
- // add & remove tab view page
- UIActionHolder.getUIAction().setPageBySetting();
- // add & remove (timeline) chart
- UIActionHolder.getUIAction().setChartBySetting();
+ // add & remove tab view page and (timeline) chart
+ UIActionHolder.getUIAction().setUIElementsBySetting();
// write setting data
SettingDataManager.INSTANCE.applySettingData();
Composite selectedComposite = tabView.getTopComposite();
if (!(selectedComposite instanceof SettingDialogBinarySettingsPage)) {
if (DAState.isStartable()) {
- // add & remove tab view page
- UIActionHolder.getUIAction().setPageBySetting();
-
- // add & remove (timeline) chart
- UIActionHolder.getUIAction().setChartBySetting();
+ // add & remove tab view page and (timeline) chart
+ UIActionHolder.getUIAction().setUIElementsBySetting();
// write setting data
SettingDataManager.INSTANCE.applySettingData();
private void doApply() {
if (DAState.isStartable()) {
- // add & remove tab view page
- UIActionHolder.getUIAction().setPageBySetting();
-
- // add & remove (timeline) chart
- UIActionHolder.getUIAction().setChartBySetting();
+ // add & remove tab view page and (timeline) chart
+ UIActionHolder.getUIAction().setUIElementsBySetting();
// write setting data
SettingDataManager.INSTANCE.applySettingData();