manager.add(actionChangeConfFile);
manager.add(new Separator());
if (OSChecker.isWindows()) {
- manager.add(actionSync);
- manager.add(actionOpenDbgsrc);
- manager.add(new Separator());
+ manager.add(actionSync);
}
+ manager.add(actionOpenDbgsrc);
+ manager.add(new Separator());
manager.add(actionPkgMgr);
}
contextService.activateContext("org.tizen.nativeplatform.rootstrap.change.conffile.context");
if (OSChecker.isWindows()) {
contextService.activateContext("org.tizen.nativeplatform.rootstrap.sync.includes");
- contextService.activateContext("org.tizen.nativeplatform.rootstrap.open.debugsource");
}
+ contextService.activateContext("org.tizen.nativeplatform.rootstrap.open.debugsource");
}
private void makeActions() {
}
};
actionSync.setText(resources.getString("View.Contextmenu.Sync"));
-
- actionOpenDbgsrc = new Action() {
- @Override
- public void run() {
- openDebugSource();
- }
- };
- actionOpenDbgsrc.setText(resources.getString("View.Contextmenu.OpenDbgsrc"));
}
+ actionOpenDbgsrc = new Action() {
+ @Override
+ public void run() {
+ openDebugSource();
+ }
+ };
+ actionOpenDbgsrc.setText(resources.getString("View.Contextmenu.OpenDbgsrc"));
}
private void updateToolbarEnable() {
Table table = tableViewer.getTable();
TableItem[] item = table.getSelection();
final PlatformRootstrap selected = (PlatformRootstrap) item[0].getData();
- String rootstrapPath = RootstrapUtil.getUserSyncRootstrapPath(selected.getId());
+ String rootstrapPath = "";
+ if (OSChecker.isWindows()) {
+ rootstrapPath = RootstrapUtil.getUserSyncRootstrapPath(selected.getId());
+ } else {
+ rootstrapPath = SmartBuildInterface.getInstance().getPlatformRootstrapPath(selected.getPath());
+ }
String defaultPath = new Path(rootstrapPath).append("usr").append("src").append("debug").toString();
File debugSrcPath = new File(defaultPath);
if (!debugSrcPath.exists()) {
DialogUtil.openMessageDialog(shell, msg);
return;
}
- long dstTime = debugSrcPath.lastModified();
- long srcTime = RootstrapSynchronizer.getDebugsrcPathLastmodifiedTime(selected);
- if (srcTime != dstTime) {
- String msg = "There are changes for debug source in remote rootstrap.\n" +
- "Do you want to synchronize the changes?";
- int result = DialogUtil.openQuestionDialog(shell, "Do you want to synchronize?", msg);
- if (result == SWT.YES) {
- ProgressMonitorDialog dialog = new ProgressMonitorDialog(shell);
- try {
- dialog.run(true, true, new IRunnableWithProgress() {
- @Override
- public void run(IProgressMonitor monitor)
- throws InvocationTargetException, InterruptedException {
- monitor.beginTask("Synchronize debug sources...", -1);
- try {
- RootstrapSynchronizer.syncronize(selected, false, true, monitor);
- } finally {
- monitor.done();
+ if (OSChecker.isWindows()) {
+ long dstTime = debugSrcPath.lastModified();
+ long srcTime = RootstrapSynchronizer.getDebugsrcPathLastmodifiedTime(selected);
+ if (srcTime != dstTime) {
+ String msg = "There are changes for debug source in remote rootstrap.\n" +
+ "Do you want to synchronize the changes?";
+ int result = DialogUtil.openQuestionDialog(shell, "Do you want to synchronize?", msg);
+ if (result == SWT.YES) {
+ ProgressMonitorDialog dialog = new ProgressMonitorDialog(shell);
+ try {
+ dialog.run(true, true, new IRunnableWithProgress() {
+ @Override
+ public void run(IProgressMonitor monitor)
+ throws InvocationTargetException, InterruptedException {
+ monitor.beginTask("Synchronize debug sources...", -1);
+ try {
+ RootstrapSynchronizer.syncronize(selected, false, true, monitor);
+ } finally {
+ monitor.done();
+ }
}
- }
- });
- } catch (Exception e) {
- logger.error("Failed to syncronize debug sources", e);
- DialogUtil.openErrorDialog(String.format("%s\n * %s",
- "Failed to syncronize debug sources", e.toString()));
- return;
+ });
+ } catch (Exception e) {
+ logger.error("Failed to syncronize debug sources", e);
+ DialogUtil.openErrorDialog(String.format("%s\n * %s",
+ "Failed to syncronize debug sources", e.toString()));
+ return;
+ }
}
}
}