I'm studying eclipse cdt plug-in development use gnuarmeclipse.
I need to set or replace a file(such a linkerscript) in project explorer.
I know it change on project properties -> C/C++ Build -> Settings -> Tool Settings -> GCC C Linker -> General -> Script file(-T).
But I want, it execute on project explorer context menu.
See below.
1) Select LD(folder for only one linkerscript file) on Project Explorer.
2) Right click and select "Set Linker Script File" on context menu.
3) Select a file to set or replace on Open window.
This is setlinkerscript.java
public class setlinkerscript extends AbstractHandler {
public Object execute(ExecutionEvent event) throws ExecutionException {
// TODO Auto-generated method stub
IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindowChecked(event);
Shell shell = new Shell();
FileDialog dialog = new FileDialog(shell, SWT.OPEN);
dialog.setFilterExtensions(new String[] {"*.x"});
String linkerscript = dialog.open();
System.out.println(linkerscript);
return null;
}}
I got a file location but I don't know where I set on eclipse.
Any API or method is there? or recommend documents.
I can't attach jpg for figure.. need more reputation point. Sorry!
Thanks in advance.