launch wizard.
"Load shared library symbols automatically" option is true as default
before. It sometimes makes waiting for a long time. Now, user can select
the option in launch wizard.
Change-Id: Ib6a114cda97cdb22bdb1c5fc212b28e6d5abd92a
Signed-off-by: donghyuk,yang <donghyuk.yang@samsung.com>
import org.eclipse.cdt.core.ErrorParserManager;
import org.eclipse.cdt.core.ICommandLauncher;
import org.eclipse.cdt.core.IMarkerGenerator;
+import org.eclipse.cdt.core.index.IIndexManager;
import org.eclipse.cdt.core.model.CoreModel;
import org.eclipse.cdt.core.model.ICModelMarker;
import org.eclipse.cdt.core.resources.IConsole;
import org.tizen.nativeplatform.remote.connection.WorkspaceSyncronizer;
import org.tizen.nativeplatform.rootstrap.RootstrapManager;
import org.tizen.nativeplatform.util.IPackageUtil;
-import org.tizen.nativeplatform.util.PackageUtil;
import org.tizen.nativeplatform.util.PkgUtilFactory;
import org.tizen.nativeplatform.util.PlatformProjectUtil;
import org.tizen.nativeplatform.util.RootstrapUtil;
if (processor.process(buildArguments)) {
String[] rpmFiles = processor.getRpmFiles();
String[] xmlFiles = processor.getXmlFiles();
- buf = new StringBuffer(NEWLINE);
- buf.append("**** RPM files ****").append(NEWLINE);
- for (String file : rpmFiles) {
- buf.append(" - ").append(file).append(NEWLINE);
- }
- if (xmlFiles.length >= 0) {
+ if (rpmFiles.length > 0) {
+ buf = new StringBuffer(NEWLINE);
+ buf.append("**** RPM files ****").append(NEWLINE);
+ for (String file : rpmFiles) {
+ buf.append(" - ").append(file).append(NEWLINE);
+ }
+ }
+ if (xmlFiles.length > 0) {
buf.append(NEWLINE);
buf.append("**** XML files ****").append(NEWLINE);
for (String file : xmlFiles) {
import java.util.Map;
import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
+import org.eclipse.cdt.debug.mi.core.IMILaunchConfigurationConstants;
import org.eclipse.cdt.debug.ui.CDebugUIPlugin;
import org.eclipse.cdt.managedbuilder.core.IConfiguration;
import org.eclipse.core.resources.IProject;
if (Window.OK == dlg.open()) {
String programPath = dlg.getProgramPath();
String arguments = dlg.getArguments();
+ boolean loadSharedLib = dlg.loadSharedLibAutomatically();
applicationId = dlg.getSelectedApp();
Map<String, String> environments = dlg.getEnvironments();
- setOptionAttributes(wc, programPath, arguments, applicationId, environments);
+ setOptionAttributes(wc, programPath, arguments, applicationId, environments, loadSharedLib);
}
}
});
return false;
}
}
-
+ /*
protected void setOptionAttributes(ILaunchConfigurationWorkingCopy wc, String programPath,
String arguments, String applicationId, List<IPackage> devicePackages,
List<IPackage> rootstrapPackages, boolean reinstallOp, boolean selectPkgOp,
setOptionAttributes(wc, programPath, arguments, applicationId, environments);
setOptionAttributes(wc, devicePackages, rootstrapPackages, reinstallOp);
}
+ */
protected void setOptionAttributes(ILaunchConfigurationWorkingCopy wc, String programPath,
- String arguments, String applicationId, Map<String, String> environments) {
+ String arguments, String applicationId, Map<String, String> environments, boolean loadSharedLib) {
if (programPath != null) {
wc.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, programPath);
}
wc.setAttribute(ILaunchManager.ATTR_ENVIRONMENT_VARIABLES, environments);
}
wc.setAttribute(ILaunchManager.ATTR_APPEND_ENVIRONMENT_VARIABLES, false);
-
+ wc.setAttribute(IMILaunchConfigurationConstants.ATTR_DEBUGGER_AUTO_SOLIB, loadSharedLib);
try {
wc.doSave();
} catch (CoreException e) {
createInfoComposite(composite);
createAppComboComposite(composite);
createRunCommandComposite(composite, false);
-
+ if (isDebug) {
+ createDebugOptionComposite(composite);
+ }
setControl(composite);
validate();
}
protected boolean isDebug;
protected String COMMAND_LABEL_TEXT = "Command:";
+ protected Button autoLibButton;
protected Text commandText;
protected Text argumentsText;
protected Color originColor;
gridLayout.marginHeight = 0;
composite.setLayout(gridLayout);
createInfoComposite(composite);
- createRunCommandComposite(composite, true);
+ createRunCommandComposite(composite, true);
+ if (isDebug) {
+ createDebugOptionComposite(composite);
+ }
setControl(composite);
validate();
}
argumentsText.setText(argumentsInitText);
}
+ protected void createDebugOptionComposite(Composite parent) {
+ Composite composite = new Composite(parent, SWT.NULL);
+ composite.setLayout(new GridLayout(1, false));
+ composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+ autoLibButton = new Button(composite, SWT.CHECK);
+ autoLibButton.setText("Load shared library symbols automatically");
+ autoLibButton.setSelection(true);
+ }
+
protected void validate() {
final String command = commandText.getText().trim();
String projName = platformProject.getName();
return argumentsText.getText().trim();
}
+ public boolean loadSharedLibAutomatically() {
+ return autoLibButton.getSelection();
+ }
+
public String getSelectedApp() {
return null;
}
protected boolean canFinish = false;
protected String deviceLog = "";
protected String rootstrapLog = "";
+ protected boolean loadSharedLib = true;
public PlatformCommonLaunchWizard() {
}
public Map<String, String> getEnvironments() {
return envs;
}
+
+ public boolean loadSharedLibAutomatically() {
+ return loadSharedLib;
+ }
@Override
public void addPages() {
programPath = binPage.getBinaryPath();
arguments = binPage.getArguments();
selectedApp = binPage.getSelectedApp();
+ loadSharedLib = binPage.loadSharedLibAutomatically();
}
return true;
}
return null;
}
}
+
+ public boolean loadSharedLibAutomatically() {
+ if (wizard != null) {
+ return wizard.loadSharedLibAutomatically();
+ }
+ return true;
+ }
}
List<String> addList = new ArrayList<String>();
List<String> remainList = new ArrayList<String>();
List<String> removeList = new ArrayList<String>();
- System.out.print(true);
String copyFileList = groupFiles(sourceChecksums, targetChecksums, copyList, addList,
remainList, removeList);
if (isDeviceCommander()) {