

package cz.karry.dop.nbmodule.dbg;


import org.netbeans.api.debugger.DebuggerEngine.Destructor;
import cz.karry.dop.nbmodule.dbg.api.Debugger;
import cz.karry.dop.nbmodule.dbg.actions.StartActionProvider;
import org.netbeans.spi.debugger.ContextProvider;
import org.netbeans.spi.debugger.DebuggerEngineProvider;

public class DbgpEngineProvider extends DebuggerEngineProvider {

    private static final String MAS = "mas";            // NOI18N
    private ContextProvider myContext;
    private Destructor myDestructor;
    private StartActionProvider myProvider;
    private Object[] myServices;
    private Destructor destructor;
    
    
    public DbgpEngineProvider(ContextProvider contextProvider){
        myContext = contextProvider;
        myProvider = StartActionProvider.getInstance();
        myServices = new Object[ ] { myProvider };
        System.out.println("DOP DbgpEngineProvider");
    }
    
    @Override
    public String[] getLanguages() {
        System.out.println("DOP getLanguages");        
        return new String[] { MAS };
    }

    @Override
    public String getEngineTypeID() {
        System.out.println("DOP getEngineTypeID");
        return Debugger.ENGINE_ID;
    }

    @Override
    public Object[] getServices() {
        System.out.println("DOP getServices");        
        return myServices;
    }

    @Override
    public void setDestructor(Destructor desctuctor) {
        System.out.println("DOP setDestructor");        
        myDestructor = destructor; 
    }

    public Destructor getDestructor() {
        System.out.println("DOP getDestructor");        
        return myDestructor;
    }
    
    private ContextProvider getContext() {
              System.out.println("DOP getContext");
        return myContext;
    }
    

}
