ProcPage.Title = Select Process
ProcPage.Desc = Please select a process for attach debugging
+ProcPage.Label.ProcName = Process:
+ProcPage.Label.ProcPath = Path:
+ProcPage.Button.Browse = Browse
PkgDialog.Title = Select packages to be installed
PkgDialog.Desc = Checked packages will be installed to buildsystem and device
import org.tizen.nativeplatform.build.PlatformProjectPackaging;
import org.tizen.nativeplatform.launch.TizenDebianLaunchMessages;
import org.tizen.nativeplatform.launch.wizards.PlatformLaunchUtils;
+import org.tizen.nativeplatform.launch.wizards.PlatformLaunchWizard;
import org.tizen.nativeplatform.pkgmgr.RPMPackageCommander;
import org.tizen.nativeplatform.pkgmgr.model.LocalPackage;
import org.tizen.nativeplatform.rootstrap.RootstrapManager;
String targetId = PlatformConfigurationManager.getBuildTargetName(config);
String rootId = SmartBuildInterface.getInstance().getRootstrapIDFromTargetID(targetId);
this.rootstrap = RootstrapManager.getRootstrap(rootId);
- this.rootPath = SmartBuildInterface.getInstance().getPlatformRootstrapPath(rootstrap.getPath().toOSString());
+ this.rootPath = SmartBuildInterface.getInstance().getPlatformRootstrapPath(rootstrap.getPath().toOSString());
setPlatformPackages();
setProjectMap();
import org.tizen.common.connection.ui.TizenRemoteFileDialog;
import org.tizen.common.connection.ui.TizenRemoteFileDialog.TizenRemoteFileDialogResult;
import org.tizen.nativecommon.launch.TizenLaunchMessages;
+import org.tizen.nativeplatform.launch.wizards.PlatformLaunchWizard;
+import org.tizen.nativeplatform.launch.wizards.PlatformLaunchWizardDialog;
import org.tizen.nativeplatform.views.ui.AddRootstrapDialog;
import org.tizen.sdblib.IDevice;
import org.tizen.sdblib.FileListingService.FileEntry;
private final String BUNDLE_NAME = PlatformLaunchSettingBinPage.class.getPackage().getName() + ".LaunchWizardPageUIMessages";//$NON-NLS-1$
private ResourceBundle resources = ResourceBundle.getBundle(BUNDLE_NAME);
+ private PlatformLaunchWizard wizard;
private Text text;
private String filePath = "";
private static final String DEFAULT_APP_PATH = "/opt/apps/";
- public PlatformLaunchSettingBinPage(String pageName) {
+ public PlatformLaunchSettingBinPage(PlatformLaunchWizard wizard, String pageName) {
super(pageName);
+ this.wizard = wizard;
setTitle(resources.getString("BinPage.Title"));
setDescription(resources.getString("BinPage.Desc"));
- setPageComplete(true);
+ setPageComplete(true);
}
@Override
Composite composite = new Composite(parent, SWT.NULL);
composite.setLayout(new GridLayout(2, false));
composite.setLayoutData(new GridData(GridData.FILL_BOTH));
- text = new Text(composite, SWT.SINGLE | SWT.BORDER);
+ text = new Text(composite, SWT.SINGLE | SWT.BORDER | SWT.READ_ONLY);
GridData data = new GridData(GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL);
- text.setLayoutData(data);
+ text.setLayoutData(data);
Button browseButton = new Button(composite, SWT.PUSH);
browseButton.setText(resources.getString("BinPage.Button.Browse"));
String path = handleBrowseButtonSelected();
if (path != null) {
text.setText(path);
+ wizard.setEnableFinish(true);
+ wizard.getContainer().updateButtons();
+ } else {
+ wizard.setEnableFinish(false);
+ wizard.getContainer().updateButtons();
}
}
});
resources.getString("BinPage.Remote.Dialog.Title"), device, false, DEFAULT_APP_PATH);
if(dlg.open() == TizenRemoteFileDialogResult.OK) {
FileEntry selectedFile = dlg.getSelectedFileEntry();
- filePath = selectedFile.getFullPath();
+ filePath = selectedFile.getFullPath().trim();
} else
filePath = null;
}
import org.tizen.nativeplatform.build.PlatformProjectPackaging;
import org.tizen.nativeplatform.launch.TizenDebianLaunchMessages;
import org.tizen.nativeplatform.launch.wizards.PlatformLaunchUtils;
+import org.tizen.nativeplatform.launch.wizards.PlatformLaunchWizard;
import org.tizen.nativeplatform.pkgmgr.model.LocalPackage;
import org.tizen.nativeplatform.rootstrap.RootstrapManager;
private Shell shell;
private String rootPath = "";
private String procName = "";
+ private PlatformLaunchWizard wizard;
private IConfiguration config;
private ArrayList<LocalPackage> platformPackages = new ArrayList<LocalPackage>();
private ArrayList<LocalPackage> packages = new ArrayList<LocalPackage>();
- public PlatformLaunchSettingProcPage(Shell shell, String pageName, IProject project, IConfiguration config) {
+ public PlatformLaunchSettingProcPage(PlatformLaunchWizard wizard, Shell shell, String pageName, IProject project, IConfiguration config) {
super(pageName);
setTitle(resources.getString("ProcPage.Title"));
- setDescription("ProcPage.Desc");
+ setDescription(resources.getString("ProcPage.Desc"));
setPageComplete(true);
+ this.wizard = wizard;
this.platformProject = project;
this.config = config;
this.shell = shell;
composite.setLayoutData(gridData);
Label procLabel = new Label(composite, SWT.NONE);
- procLabel.setText("Process : ");
+ procLabel.setText(resources.getString("ProcPage.Label.ProcName"));
processText = new Text(composite, SWT.BORDER | SWT.READ_ONLY);
processText.setLayoutData(gridData);
Button findBt = new Button(composite, SWT.PUSH);
- findBt.setText("Find");
+ findBt.setText(resources.getString("ProcPage.Button.Browse"));
findBt.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent evt) {
processText.setText(value);
procName = name;
pathText.setText(procInfo.getName());
+ wizard.setEnableFinish(true);
+ wizard.getContainer().updateButtons();
+ } else {
+ wizard.setEnableFinish(false);
+ wizard.getContainer().updateButtons();
}
}
});
composite.setLayoutData(gridData);
Label procPath = new Label(composite, SWT.NONE);
- procPath.setText("Path : ");
+ procPath.setText(resources.getString("ProcPage.Label.ProcPath"));
pathText = new Text(composite, SWT.BORDER | SWT.READ_ONLY);
- pathText.setLayoutData(gridData);
- pathText.setEnabled(false);
+ pathText.setLayoutData(gridData);
}
public String getProgramPath() {
@Override
public void addPages() {
- addPage(new PlatformLaunchSettingProcPage(shell, SETTING_PROC_PAGE, project, config));
+ addPage(new PlatformLaunchSettingProcPage(this, shell, SETTING_PROC_PAGE, project, config));
WizardDialog dialog = (WizardDialog)getContainer();
dialog.addPageChangedListener(this);
};
TwoPaneElementSelector dlg = new TwoPaneElementSelector(shell, topprovider, downprovider);
- dlg.setTitle("Select Process"); //$NON-NLS-1$
+ dlg.setTitle(String.format("Select Process [%s]", device.getDeviceName())); //$NON-NLS-1$
String dlgMsg = "";
if (procName != null && count == 0) {
dlgMsg = String.format("There is no \"%s\" process.\n", procName);
protected String appProject = "";
protected String mode = "";
protected boolean result;
+ protected boolean canFinish = false;
private final String SETTING_APP_PAGE = "setting_app";
private final String SETTING_BIN_PAGE = "setting_bin";
@Override
public boolean needsProgressMonitor() {
- // TODO Auto-generated method stub
- //return super.needsProgressMonitor();
return true;
+ }
+
+ @Override
+ public boolean canFinish() {
+ return canFinish;
+ }
+
+ public void setEnableFinish(boolean value) {
+ canFinish = value;
}
@Override
@Override
public void addPages() {
addPage(new PlatformLaunchSettingAppPage(shell, SETTING_APP_PAGE, project, config));
- addPage(new PlatformLaunchSettingBinPage(SETTING_BIN_PAGE));
+ addPage(new PlatformLaunchSettingBinPage(this, SETTING_BIN_PAGE));
WizardDialog dialog = (WizardDialog)getContainer();
dialog.addPageChangedListener(this);
WizardPage selectedPage = (WizardPage)event.getSelectedPage();
if (selectedPage.getName().equals(SETTING_APP_PAGE)) {
-
+
}
}