Hi,
Unfortunately it won't work. It's because I'm starting new node using 
ILaunchConfiguration.launch() as you suggested me. And only thing it cares 
about are parameters set in my getLaunchConfiguration method which looks like 
this (it's copied from yours with some modifications):
private ILaunchConfiguration getLaunchConfiguration(RuntimeInfo info, 
Set<BackendOptions> options) {
        ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
        ILaunchConfigurationType type = 
manager.getLaunchConfigurationType(ErtsProcess.CONFIGURATION_TYPE_INTERNAL);
        ILaunchConfigurationWorkingCopy workingCopy;
        try {
            workingCopy = type.newInstance(null, "internal " + 
info.getNodeName());
            workingCopy.setAttribute(DebugPlugin.ATTR_CONSOLE_ENCODING, 
"ISO-8859-1");
            workingCopy.setAttribute(ErlLaunchAttributes.NODE_NAME, 
info.getNodeName());
            workingCopy.setAttribute(ErlLaunchAttributes.RUNTIME_NAME, 
info.getName());
            workingCopy.setAttribute(ErlLaunchAttributes.COOKIE, 
info.getCookie());
            workingCopy.setAttribute(ErlLaunchAttributes.CONSOLE, 
!options.contains(BackendOptions.NO_CONSOLE));
            workingCopy.setAttribute(ErlLaunchAttributes.INTERNAL, 
options.contains(BackendOptions.INTERNAL));
            workingCopy.setAttribute(ErlLaunchAttributes.USE_LONG_NAME, false);
            return workingCopy.doSave();
        } catch (CoreException e) {
            e.printStackTrace();
            return null;
        }
    }


However, it seems that it could work like you said if I used 
BackendManager.createBackend(final RuntimeInfo info,  final Set<BackendOptions> 
options, final ILaunch launch, Map<String, String> env). In this method 
ManagedLauncher object is used which makes use of command args. But to obtain 
this object I need to create ILaunch object first which can be obtained after 
calling ILaunchConfiguration.launch. Actually it already creates node so call 
to createBackend tries to create this node once more. It's an issue I pointed 
two weeks ago and you where surprised by it;)

Starting another node as hidden isn't so crucial to me (but it's advised to 
trace another nodes from hidden one). The most imported thing for me was having 
new node and I achieved it. But if you look at this in future and try to clear 
API a little I would be grateful:)

If you have some time could you checkout my ttb branch and take a look on my 
plugin? Once I wrote how to use it but I'll do it again:
To trace function call check "call" in processes tab, In functions tab set 
trace pattern. Instead of doing it from there you can do it from outline view's 
context menu. Then press start (play button in control panel view), call your 
function and click stop. In tree viewer you should see traces. When 
double-clicking on function node it should open it's definition, the same when 
clicking on module's name.



----- "Vlad Dumitrescu" <vladd...@gmail.com> wrote:

> Hi!
> 
> On Tue, Aug 31, 2010 at 15:52, Piotr Dorobisz
> <piotr.dorob...@erlang-solutions.com> wrote:
> > As I wrote you few days ago I managed to create my own node using
> launchConfig.launch():
> >
> >    private Backend createBackend(String name) {
> >        final RuntimeInfo info =
> RuntimeInfo.copy(ErlangCore.getRuntimeInfoManager().getErlideRuntime(),
> false);
> >        if (info != null) {
> >            try {
> >                info.setNodeName(name);
> 
> I haven't tried that, but I think it should work if you set
> 
> info.setArgs(info.getArgs()+" -hidden");
> 
> regards,
> Vlad

------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
Erlide-devel mailing list
Erlide-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlide-devel

Reply via email to