Hi,
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);
                EnumSet<BackendOptions> options = 
EnumSet.of(BackendOptions.AUTOSTART, BackendOptions.NO_CONSOLE);

                ILaunchConfiguration launchConfig = 
getLaunchConfiguration(info, options);
                launchConfig.launch(ILaunchManager.RUN_MODE, new 
NullProgressMonitor(), false, false);
                return BackendManager.getDefault().getByName(name);
            } catch (Exception e) {
                ErlLogger.error(e);
            }
        }
        return null;
    }

    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;
        }
    }

Now I'd like to know how can I sent this node to be hidden, i.e. start it with 
"-hidden" option.


------------------------------------------------------------------------------
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