Projects >> Pydev >>3b5662db60b201c5ab5b6ae4ce583659d430dedb

Chunk
Conflicting content
        
        debugger.addTarget(this);
        PyExceptionBreakPointManager.getInstance().addListener(this);
<<<<<<< HEAD
        
=======

>>>>>>> a113f120ac134055ff62b6f856ad78390dfe673b
        IBreakpointManager breakpointManager= DebugPlugin.getDefault().getBreakpointManager();
        breakpointManager.addBreakpointListener(this);
        // we have to know when we get removed, so that we can shut off the debugger
Solution content
        
        debugger.addTarget(this);
        PyExceptionBreakPointManager.getInstance().addListener(this);
        
        IBreakpointManager breakpointManager= DebugPlugin.getDefault().getBreakpointManager();
        breakpointManager.addBreakpointListener(this);
        // we have to know when we get removed, so that we can shut off the debugger
File
PyDebugTargetServer.java
Developer's decision
Version 1
Kind of conflict
Blank
Chunk
Conflicting content
    static final String ATTR_UNITTEST_TESTS = PLUGIN_ID + ".ATTR_UNITTEST_TESTS";
    static final String ATTR_UNITTEST_CONFIGURATION_FILE = PLUGIN_ID + ".ATTR_UNITTEST_CONFIGURATION_FILE";
    static final String PYDEV_CONFIG_RUN = "PYDEV_CONFIG_RUN";
<<<<<<< HEAD
    
=======
  
>>>>>>> a113f120ac134055ff62b6f856ad78390dfe673b
    
}
Solution content
    static final String ATTR_UNITTEST_TESTS = PLUGIN_ID + ".ATTR_UNITTEST_TESTS";
    static final String ATTR_UNITTEST_CONFIGURATION_FILE = PLUGIN_ID + ".ATTR_UNITTEST_CONFIGURATION_FILE";
    static final String PYDEV_CONFIG_RUN = "PYDEV_CONFIG_RUN";
    
    
}
File
Constants.java
Developer's decision
Version 1
Kind of conflict
Blank
Chunk
Conflicting content
        SendPyExceptionCommand sendCmd = new SendPyExceptionCommand(this);
        this.postCommand(sendCmd);
    }
<<<<<<< HEAD
    
=======

>>>>>>> a113f120ac134055ff62b6f856ad78390dfe673b
    /**
     * @return true if the given breakpoint is supported by this target
     */
Solution content
        SendPyExceptionCommand sendCmd = new SendPyExceptionCommand(this);
        this.postCommand(sendCmd);
    }
    
    /**
     * @return true if the given breakpoint is supported by this target
     */
File
AbstractDebugTarget.java
Developer's decision
Version 1
Kind of conflict
Blank
Chunk
Conflicting content
        // now, register all the breakpoints in all projects
        addBreakpointsFor(ResourcesPlugin.getWorkspace().getRoot());
<<<<<<< HEAD
        
        // Sending python exceptions before sending run command 
=======

        // Sending python exceptions before sending run command
>>>>>>> a113f120ac134055ff62b6f856ad78390dfe673b
        this.onSetConfiguredExceptions();

        // Send the run command, and we are off
Solution content
        // now, register all the breakpoints in all projects
        addBreakpointsFor(ResourcesPlugin.getWorkspace().getRoot());
        
        // Sending python exceptions before sending run command 
        this.onSetConfiguredExceptions();

        // Send the run command, and we are off
File
AbstractDebugTarget.java
Developer's decision
Version 1
Kind of conflict
Comment
Chunk
Conflicting content
import org.eclipse.debug.core.model.IProcess;
import org.python.pydev.core.log.Log;
import org.python.pydev.debug.model.remote.RemoteDebugger;
<<<<<<< HEAD
=======
import org.python.pydev.plugin.PydevPlugin;

>>>>>>> a113f120ac134055ff62b6f856ad78390dfe673b
/**
 * Debugger class that represents a single python process.
 * 
Solution content
import org.eclipse.debug.core.model.IProcess;
import org.python.pydev.core.log.Log;
import org.python.pydev.debug.model.remote.RemoteDebugger;
/**
 * Debugger class that represents a single python process.
 * 
File
PyDebugTarget.java
Developer's decision
Version 1
Kind of conflict
Import
Chunk
Conflicting content
		DebugPlugin.getDefault().getLaunchManager().addLaunchListener(this);
	}

<<<<<<< HEAD
    public PyDebugTarget(ILaunch launch, IProcess process, IPath[] file, RemoteDebugger debugger, IProject project) {
        this.launch = launch;
        this.process = process;
        this.file = file;
        this.debugger = debugger;
        this.threads = new PyThread[0];
        this.project = project;
        launch.addDebugTarget(this);
        debugger.addTarget(this);
        IBreakpointManager breakpointManager= DebugPlugin.getDefault().getBreakpointManager();
        breakpointManager.addBreakpointListener(this);
        PyExceptionBreakPointManager.getInstance().addListener(this);
        // we have to know when we get removed, so that we can shut off the debugger
        DebugPlugin.getDefault().getLaunchManager().addLaunchListener(this);
    }        

    public void launchRemoved(ILaunch launch) {
        // shut down the remote debugger when parent launch
        if (launch == this.launch) {
            IBreakpointManager breakpointManager= DebugPlugin.getDefault().getBreakpointManager();
            breakpointManager.removeBreakpointListener(this);
            PyExceptionBreakPointManager.getInstance().removeListener(this);
            debugger.dispose();
            debugger = null;
        }
    }    
=======
	public void launchRemoved(ILaunch launch) {
		// shut down the remote debugger when parent launch
		if (launch == this.launch) {
			IBreakpointManager breakpointManager = DebugPlugin.getDefault()
					.getBreakpointManager();
			breakpointManager.removeBreakpointListener(this);
			PyExceptionBreakPointManager.getInstance().removeListener(this);
			debugger.dispose();
			debugger = null;
		}
	}

	public IProcess getProcess() {
		return process;
	}
>>>>>>> a113f120ac134055ff62b6f856ad78390dfe673b

	public boolean canTerminate() {
		if (!finishedInit) {
Solution content
    public PyDebugTarget(ILaunch launch, IProcess process, IPath[] file, RemoteDebugger debugger, IProject project) {
        this.launch = launch;
        this.process = process;
        this.file = file;
        this.debugger = debugger;
        this.threads = new PyThread[0];
        this.project = project;
        launch.addDebugTarget(this);
        debugger.addTarget(this);
        IBreakpointManager breakpointManager= DebugPlugin.getDefault().getBreakpointManager();
        breakpointManager.addBreakpointListener(this);
        PyExceptionBreakPointManager.getInstance().addListener(this);
        // we have to know when we get removed, so that we can shut off the debugger
        DebugPlugin.getDefault().getLaunchManager().addLaunchListener(this);
    }        

    public void launchRemoved(ILaunch launch) {
        // shut down the remote debugger when parent launch
        if (launch == this.launch) {
            IBreakpointManager breakpointManager= DebugPlugin.getDefault().getBreakpointManager();
            breakpointManager.removeBreakpointListener(this);
            PyExceptionBreakPointManager.getInstance().removeListener(this);
            debugger.dispose();
            debugger = null;
        }
    }    
File
PyDebugTarget.java
Developer's decision
Version 1
Kind of conflict
Method declaration
Chunk
Conflicting content
		return process.isTerminated();
	}

<<<<<<< HEAD
    public void terminate() {
        if(process != null){
            try {
                process.terminate();
            } catch (DebugException e) {
                Log.log(e);
            }
            process = null;
        }
        super.terminate();
    }        
    
=======
	public void terminate() {
		if (process != null) {
			try {
				process.terminate();
			} catch (DebugException e) {
				PydevPlugin.log(e);
			}
			process = null;
		}
		super.terminate();
	}
>>>>>>> a113f120ac134055ff62b6f856ad78390dfe673b

}
Solution content
    public void terminate() {
        if(process != null){
            try {
                process.terminate();
            } catch (DebugException e) {
                Log.log(e);
            }
            process = null;
        }
        super.terminate();
    }        
    

}
File
PyDebugTarget.java
Developer's decision
Version 1
Kind of conflict
Method declaration
Chunk
Conflicting content
public class PyExceptionBreakPointManager {

<<<<<<< HEAD
    //Static variables
    private static final String EXCEPTION_FILE_NAME = "python_exceptions.prefs";
    private static final String CUSTOM_EXCEPTION_FILE_NAME = "custom_exceptions.prefs";
    private static final String BREAK_ON_CAUGHT_EXCEPTION = "caught_exception_state.prefs";
    private static final String BREAK_ON_UNCAUGHT_EXCEPTION = "uncaught_exception_state.prefs";
    
    
    private static PyExceptionBreakPointManager pyExceptionBreakPointManager;
    private static final Object lock = new Object();

    
    //For instance
    private ListenerList listeners = new ListenerList(
            IExceptionsBreakpointListener.class);

    /**
     * Singleton: private constructor.
     */
    private PyExceptionBreakPointManager() {

    }
    
    public static PyExceptionBreakPointManager getInstance() {
        if (pyExceptionBreakPointManager == null) {
            synchronized (lock) {
                if (pyExceptionBreakPointManager == null) {
                    pyExceptionBreakPointManager = new PyExceptionBreakPointManager();
                }
            }
        }
        return pyExceptionBreakPointManager;
    }

    
    //Listeners
    
    public void addListener(IExceptionsBreakpointListener listener) {
        this.listeners.add(listener);
    }

    public void removeListener(IExceptionsBreakpointListener listener) {
        this.listeners.remove(listener);
    }
    

    //Setters
    
    
    /**
     * Sets whether we should break on caught/uncaught exceptions and the array of exceptions to be used.
     */
    public void setBreakOn(boolean breakOnCaught, boolean breakOnUncaught, String[] exceptionArray) {
        ConfigureExceptionsFileUtils.writeToFile(BREAK_ON_CAUGHT_EXCEPTION, Boolean.toString(breakOnCaught), false);
        

        ConfigureExceptionsFileUtils.writeToFile(BREAK_ON_UNCAUGHT_EXCEPTION, Boolean.toString(breakOnUncaught), false);
        
        String pyExceptionsStr = StringUtils.join(ConfigureExceptionsFileUtils.DELIMITER, exceptionArray);
        
        ConfigureExceptionsFileUtils.writeToFile(EXCEPTION_FILE_NAME, pyExceptionsStr, false);
        
        for (IExceptionsBreakpointListener listener : this.listeners.getListeners()) {
            listener.onSetConfiguredExceptions();
        }
    }

    
    /**
     * Adds a new custom exception the user entered (note that it just adds it to the list
     * of custom exceptions, it doesn't really change the exceptions set). 
     */
    public void addUserConfiguredException(String userConfiguredException) {
        boolean isAppend = false;

        IPath path = ConfigureExceptionsFileUtils.getFilePathFromMetadata(CUSTOM_EXCEPTION_FILE_NAME);
        if (path.toFile().exists()) {
            isAppend = true;
            userConfiguredException = ConfigureExceptionsFileUtils.DELIMITER + userConfiguredException;
        }
        ConfigureExceptionsFileUtils.writeToFile(CUSTOM_EXCEPTION_FILE_NAME, userConfiguredException, isAppend);
    }

    
    
    //Getters

    public String getBreakOnUncaughtExceptions() {
        return ConfigureExceptionsFileUtils.readFromMetadataFile(BREAK_ON_UNCAUGHT_EXCEPTION);
    }

    public String getBreakOnCaughtExceptions() {
        return ConfigureExceptionsFileUtils.readFromMetadataFile(BREAK_ON_CAUGHT_EXCEPTION);
    }

    public String getExceptionsString() {
        return ConfigureExceptionsFileUtils.readFromMetadataFile(EXCEPTION_FILE_NAME);
    }
    
    public List getExceptionsList() {
        return ConfigureExceptionsFileUtils.getConfiguredExceptions(EXCEPTION_FILE_NAME);
    }


    /**
     * @return only the exceptions configured by the user (i.e.: not builtin exceptions)
     */
    public List getUserConfiguredExceptions() {
        List configuredExceptions = ConfigureExceptionsFileUtils.getConfiguredExceptions(CUSTOM_EXCEPTION_FILE_NAME);
        Collections.sort(configuredExceptions);

        return configuredExceptions;
    }


    /**
     * @return a list the default 'builtin' exceptions to be presented to the user (i.e.:
     * AssertionError, RuntimeError, etc)
     */
    public List getBuiltinExceptions() {
        ArrayList list = new ArrayList();
        IInterpreterManager useManager = ChooseInterpreterManager.chooseInterpreterManager();
        if (useManager != null) {
            IToken[] pythonTokens = useManager.getBuiltinMod(IPythonNature.DEFAULT_INTERPRETER).getGlobalTokens();
            for (IToken token : pythonTokens) {
                String pyToken = token.getRepresentation();
                String lower = pyToken.toLowerCase();
                if (lower.contains("error") || lower.contains("exception") || lower.contains("warning")) {
                    list.add(pyToken.trim());
                }
            }
            Collections.sort(list);
        }
        return list;
    }


=======
	// Static variables
	private static final String EXCEPTION_FILE_NAME = "python_exceptions.prefs";
	private static final String CUSTOM_EXCEPTION_FILE_NAME = "custom_exceptions.prefs";
	private static final String BREAK_ON_CAUGHT_EXCEPTION = "caught_exception_state.prefs";
	private static final String BREAK_ON_UNCAUGHT_EXCEPTION = "uncaught_exception_state.prefs";

	private static PyExceptionBreakPointManager pyExceptionBreakPointManager;
	private static final Object lock = new Object();

	// For instance
		Collections.sort(configuredExceptions);
	private ListenerList listeners = new ListenerList(
			IExceptionsBreakpointListener.class);

	/**
	 * Singleton: private constructor.
	 */
	private PyExceptionBreakPointManager() {

	}

	public static PyExceptionBreakPointManager getInstance() {
		if (pyExceptionBreakPointManager == null) {
			synchronized (lock) {
				if (pyExceptionBreakPointManager == null) {
					pyExceptionBreakPointManager = new PyExceptionBreakPointManager();
				}
			}
		}
		return pyExceptionBreakPointManager;
	}

	// Listeners

	public void addListener(IExceptionsBreakpointListener listener) {
		this.listeners.add(listener);
	}

	public void removeListener(IExceptionsBreakpointListener listener) {
		this.listeners.remove(listener);
	}

	// Setters

	/**
	 * Sets whether we should break on caught/uncaught exceptions and the array
	 * of exceptions to be used.
	 */
	public void setBreakOn(boolean breakOnCaught, boolean breakOnUncaught,
			String[] exceptionArray) {
		ConfigureExceptionsFileUtils.writeToFile(BREAK_ON_CAUGHT_EXCEPTION,
				Boolean.toString(breakOnCaught), false);

		ConfigureExceptionsFileUtils.writeToFile(BREAK_ON_UNCAUGHT_EXCEPTION,
				Boolean.toString(breakOnUncaught), false);

		String pyExceptionsStr = StringUtils.join(
				ConfigureExceptionsFileUtils.DELIMITER, exceptionArray);

		ConfigureExceptionsFileUtils.writeToFile(EXCEPTION_FILE_NAME,
				pyExceptionsStr, false);

		for (IExceptionsBreakpointListener listener : this.listeners
				.getListeners()) {
			listener.onSetConfiguredExceptions();
		}
	}

	/**
	 * Adds a new custom exception the user entered (note that it just adds it
	 * to the list of custom exceptions, it doesn't really change the exceptions
	 * set).
	 */
	public void addUserConfiguredException(String userConfiguredException) {
		boolean isAppend = false;

		IPath path = ConfigureExceptionsFileUtils
				.getFilePathFromMetadata(CUSTOM_EXCEPTION_FILE_NAME);
		if (path.toFile().exists()) {
			isAppend = true;
			userConfiguredException = ConfigureExceptionsFileUtils.DELIMITER
					+ userConfiguredException;
		}
		ConfigureExceptionsFileUtils.writeToFile(CUSTOM_EXCEPTION_FILE_NAME,
				userConfiguredException, isAppend);
	}

	// Getters

	public String getBreakOnUncaughtExceptions() {
		return ConfigureExceptionsFileUtils
				.readFromMetadataFile(BREAK_ON_UNCAUGHT_EXCEPTION);
	}

	public String getBreakOnCaughtExceptions() {
		return ConfigureExceptionsFileUtils
				.readFromMetadataFile(BREAK_ON_CAUGHT_EXCEPTION);
	}

	public String getExceptionsString() {
		return ConfigureExceptionsFileUtils
				.readFromMetadataFile(EXCEPTION_FILE_NAME);
	}

	public List getExceptionsList() {
		return ConfigureExceptionsFileUtils
				.getConfiguredExceptions(EXCEPTION_FILE_NAME);
	}

	/**
	 * @return only the exceptions configured by the user (i.e.: not builtin
	 *         exceptions)
	 */
	public List getUserConfiguredExceptions() {
		List configuredExceptions = ConfigureExceptionsFileUtils
				.getConfiguredExceptions(CUSTOM_EXCEPTION_FILE_NAME);
		return configuredExceptions;
	}

	/**
	 * @return a list the default 'builtin' exceptions to be presented to the
	 *         user (i.e.: AssertionError, RuntimeError, etc)
	 */
	public List getBuiltinExceptions() {
		ArrayList list = new ArrayList();
		IInterpreterManager useManager = ChooseInterpreterManager
				.chooseInterpreterManager();
		if (useManager != null) {
			IToken[] pythonTokens = useManager.getBuiltinMod(
					IPythonNature.DEFAULT_INTERPRETER).getGlobalTokens();
			for (IToken token : pythonTokens) {
				String pyToken = token.getRepresentation();
				String lower = pyToken.toLowerCase();
				if (lower.contains("error") || lower.contains("exception")
						|| lower.contains("warning")) {
					list.add(pyToken.trim());
				}
			}
			Collections.sort(list);
		}
		return list;
	}
>>>>>>> a113f120ac134055ff62b6f856ad78390dfe673b

}
Solution content
    

public class PyExceptionBreakPointManager {

    //Static variables
    private static final String EXCEPTION_FILE_NAME = "python_exceptions.prefs";
    private static final String CUSTOM_EXCEPTION_FILE_NAME = "custom_exceptions.prefs";
    private static final String BREAK_ON_CAUGHT_EXCEPTION = "caught_exception_state.prefs";
    private static final String BREAK_ON_UNCAUGHT_EXCEPTION = "uncaught_exception_state.prefs";
    
    private static PyExceptionBreakPointManager pyExceptionBreakPointManager;
    private static final Object lock = new Object();

    
    //For instance
    private ListenerList listeners = new ListenerList(
            IExceptionsBreakpointListener.class);

    /**
     * Singleton: private constructor.
     */
    private PyExceptionBreakPointManager() {

    }
    
    public static PyExceptionBreakPointManager getInstance() {
        if (pyExceptionBreakPointManager == null) {
            synchronized (lock) {
                if (pyExceptionBreakPointManager == null) {
                    pyExceptionBreakPointManager = new PyExceptionBreakPointManager();
                }
            }
        }
        return pyExceptionBreakPointManager;
    }

    
    //Listeners
    
    public void addListener(IExceptionsBreakpointListener listener) {
        this.listeners.add(listener);
    }

    public void removeListener(IExceptionsBreakpointListener listener) {
        this.listeners.remove(listener);
    }
    

    //Setters
    
    
    /**
     * Sets whether we should break on caught/uncaught exceptions and the array of exceptions to be used.
     */
    public void setBreakOn(boolean breakOnCaught, boolean breakOnUncaught, String[] exceptionArray) {
        ConfigureExceptionsFileUtils.writeToFile(BREAK_ON_CAUGHT_EXCEPTION, Boolean.toString(breakOnCaught), false);
        
        ConfigureExceptionsFileUtils.writeToFile(BREAK_ON_UNCAUGHT_EXCEPTION, Boolean.toString(breakOnUncaught), false);
        
        String pyExceptionsStr = StringUtils.join(ConfigureExceptionsFileUtils.DELIMITER, exceptionArray);
        
        ConfigureExceptionsFileUtils.writeToFile(EXCEPTION_FILE_NAME, pyExceptionsStr, false);
        
        for (IExceptionsBreakpointListener listener : this.listeners.getListeners()) {
            listener.onSetConfiguredExceptions();
        }
    }

    
    /**
     * Adds a new custom exception the user entered (note that it just adds it to the list
     * of custom exceptions, it doesn't really change the exceptions set). 
     */
    public void addUserConfiguredException(String userConfiguredException) {
        boolean isAppend = false;

        IPath path = ConfigureExceptionsFileUtils.getFilePathFromMetadata(CUSTOM_EXCEPTION_FILE_NAME);
        if (path.toFile().exists()) {
            isAppend = true;
            userConfiguredException = ConfigureExceptionsFileUtils.DELIMITER + userConfiguredException;
        }
        ConfigureExceptionsFileUtils.writeToFile(CUSTOM_EXCEPTION_FILE_NAME, userConfiguredException, isAppend);
    }

    
    
    //Getters

    public String getBreakOnUncaughtExceptions() {
        return ConfigureExceptionsFileUtils.readFromMetadataFile(BREAK_ON_UNCAUGHT_EXCEPTION);
    }

    public String getBreakOnCaughtExceptions() {
        return ConfigureExceptionsFileUtils.readFromMetadataFile(BREAK_ON_CAUGHT_EXCEPTION);
    }

    public String getExceptionsString() {
        return ConfigureExceptionsFileUtils.readFromMetadataFile(EXCEPTION_FILE_NAME);
    }
    
    public List getExceptionsList() {
        return ConfigureExceptionsFileUtils.getConfiguredExceptions(EXCEPTION_FILE_NAME);
    }


    /**
     * @return only the exceptions configured by the user (i.e.: not builtin exceptions)
     */
    public List getUserConfiguredExceptions() {
        List configuredExceptions = ConfigureExceptionsFileUtils.getConfiguredExceptions(CUSTOM_EXCEPTION_FILE_NAME);
        Collections.sort(configuredExceptions);

        return configuredExceptions;
    }


    /**
     * @return a list the default 'builtin' exceptions to be presented to the user (i.e.:
     * AssertionError, RuntimeError, etc)
     */
    public List getBuiltinExceptions() {
        ArrayList list = new ArrayList();
        IInterpreterManager useManager = ChooseInterpreterManager.chooseInterpreterManager();
        if (useManager != null) {
            IToken[] pythonTokens = useManager.getBuiltinMod(IPythonNature.DEFAULT_INTERPRETER).getGlobalTokens();
            for (IToken token : pythonTokens) {
                String pyToken = token.getRepresentation();
                String lower = pyToken.toLowerCase();
                if (lower.contains("error") || lower.contains("exception") || lower.contains("warning")) {
                    list.add(pyToken.trim());
                }
            }
            Collections.sort(list);
        }
        return list;
    }



}
File
PyExceptionBreakPointManager.java
Developer's decision
Version 1
Kind of conflict
Attribute
Comment
Method declaration
Method invocation
Chunk
Conflicting content
public class SendPyExceptionCommand extends AbstractDebuggerCommand {

<<<<<<< HEAD
    public SendPyExceptionCommand(AbstractDebugTarget debugger) {
        super(debugger);
    }

    @Override
    public String getOutgoing() {
        PyExceptionBreakPointManager instance = PyExceptionBreakPointManager.getInstance();
        String pyExceptions = instance.getExceptionsString();
        String breakOnUncaught = instance.getBreakOnUncaughtExceptions();
        String breakOnCaught = instance.getBreakOnCaughtExceptions();
        
        return makeCommand(AbstractDebuggerCommand.CMD_SET_PY_EXCEPTION, sequence, 
                StringUtils.join(ConfigureExceptionsFileUtils.DELIMITER, breakOnUncaught, breakOnCaught, pyExceptions));
    }
=======
	public SendPyExceptionCommand(AbstractDebugTarget debugger) {
		super(debugger);
	}

	@Override
	public String getOutgoing() {
		PyExceptionBreakPointManager instance = PyExceptionBreakPointManager
				.getInstance();
		String pyExceptions = instance.getExceptionsString();
		String breakOnUncaught = instance.getBreakOnUncaughtExceptions();
		String breakOnCaught = instance.getBreakOnCaughtExceptions();

		return makeCommand(AbstractDebuggerCommand.CMD_SET_PY_EXCEPTION,
				sequence, StringUtils.join(
						ConfigureExceptionsFileUtils.DELIMITER,
						breakOnUncaught, breakOnCaught, pyExceptions));
	}
>>>>>>> a113f120ac134055ff62b6f856ad78390dfe673b
}
Solution content
public class SendPyExceptionCommand extends AbstractDebuggerCommand {

    public SendPyExceptionCommand(AbstractDebugTarget debugger) {
        super(debugger);
    }

    @Override
    public String getOutgoing() {
        PyExceptionBreakPointManager instance = PyExceptionBreakPointManager.getInstance();
        String pyExceptions = instance.getExceptionsString();
        String breakOnUncaught = instance.getBreakOnUncaughtExceptions();
        String breakOnCaught = instance.getBreakOnCaughtExceptions();
        
        return makeCommand(AbstractDebuggerCommand.CMD_SET_PY_EXCEPTION, sequence, 
                StringUtils.join(ConfigureExceptionsFileUtils.DELIMITER, breakOnUncaught, breakOnCaught, pyExceptions));
    }
}
File
SendPyExceptionCommand.java
Developer's decision
Version 1
Kind of conflict
Annotation
Method declaration
Chunk
Conflicting content
	// enable/disable breaking on the caught
	private Button uncaughtExceptionCheck;
	private Button caughtExceptionCheck;
<<<<<<< HEAD
    private boolean handleCaughtExceptions;
    private boolean handleUncaughtExceptions;
=======
	private boolean handleCaughtExceptions;
	private boolean handleUncaughtExceptions;
>>>>>>> a113f120ac134055ff62b6f856ad78390dfe673b

	protected static String SELECT_ALL_TITLE = WorkbenchMessages.SelectionDialog_selectLabel;
	protected static String DESELECT_ALL_TITLE = WorkbenchMessages.SelectionDialog_deselectLabel;
Solution content
	// enable/disable breaking on the caught
	private Button uncaughtExceptionCheck;
	private Button caughtExceptionCheck;
    private boolean handleCaughtExceptions;
    private boolean handleUncaughtExceptions;

	protected static String SELECT_ALL_TITLE = WorkbenchMessages.SelectionDialog_selectLabel;
	protected static String DESELECT_ALL_TITLE = WorkbenchMessages.SelectionDialog_deselectLabel;
File
PyConfigureExceptionDialog.java
Developer's decision
Version 1
Kind of conflict
Attribute
Chunk
Conflicting content
	 * @param composite
	 */
	private void createCaughtUncaughtCheck(Composite composite) {
<<<<<<< HEAD
	    PyExceptionBreakPointManager instance = PyExceptionBreakPointManager.getInstance();
	    String breakOnCaught = instance.getBreakOnCaughtExceptions();
        String breakOnUncaught = instance.getBreakOnUncaughtExceptions();
=======
		PyExceptionBreakPointManager instance = PyExceptionBreakPointManager
				.getInstance();
		String breakOnCaught = instance.getBreakOnCaughtExceptions();
		String breakOnUncaught = instance.getBreakOnUncaughtExceptions();
>>>>>>> a113f120ac134055ff62b6f856ad78390dfe673b

		uncaughtExceptionCheck = new Button(composite, SWT.CHECK);
		uncaughtExceptionCheck.setText("Suspend on uncaught exceptions");
Solution content
	 * @param composite
	 */
	private void createCaughtUncaughtCheck(Composite composite) {
	    PyExceptionBreakPointManager instance = PyExceptionBreakPointManager.getInstance();
	    String breakOnCaught = instance.getBreakOnCaughtExceptions();
        String breakOnUncaught = instance.getBreakOnUncaughtExceptions();

		uncaughtExceptionCheck = new Button(composite, SWT.CHECK);
		uncaughtExceptionCheck.setText("Suspend on uncaught exceptions");
File
PyConfigureExceptionDialog.java
Developer's decision
Version 1
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
		} else {
			caughtExceptionCheck.setSelection(false);
		}
<<<<<<< HEAD
		
=======

>>>>>>> a113f120ac134055ff62b6f856ad78390dfe673b
		Label label = new Label(composite, SWT.NONE);
		label.setText("* Will make debugging ~ 2x slower");
	}
Solution content
		} else {
			caughtExceptionCheck.setSelection(false);
		}
		
		Label label = new Label(composite, SWT.NONE);
		label.setText("* Will make debugging ~ 2x slower");
	}
File
PyConfigureExceptionDialog.java
Developer's decision
Version 1
Kind of conflict
Blank
Chunk
Conflicting content
			setResult(list);
		}

<<<<<<< HEAD
		//Save whether to break debugger or not on caught / uncaught exceptions
		handleCaughtExceptions = caughtExceptionCheck.getSelection();
        handleUncaughtExceptions = uncaughtExceptionCheck.getSelection();
=======
		// Save whether to break debugger or not on caught / uncaught exceptions
		handleCaughtExceptions = caughtExceptionCheck.getSelection();
		handleUncaughtExceptions = uncaughtExceptionCheck.getSelection();
>>>>>>> a113f120ac134055ff62b6f856ad78390dfe673b
		super.okPressed();
	}
	
Solution content
			setResult(list);
		}

		//Save whether to break debugger or not on caught / uncaught exceptions
		handleCaughtExceptions = caughtExceptionCheck.getSelection();
        handleUncaughtExceptions = uncaughtExceptionCheck.getSelection();
		super.okPressed();
	}
	
File
PyConfigureExceptionDialog.java
Developer's decision
Version 1
Kind of conflict
Attribute
Comment
Method invocation
Chunk
Conflicting content
        return this.handleCaughtExceptions;
    }

<<<<<<< HEAD
=======
	public boolean getResultHandleUncaughtExceptions() {
		return this.handleUncaughtExceptions;
	}

	public boolean getResultHandleCaughtExceptions() {
		return this.handleCaughtExceptions;
	}
>>>>>>> a113f120ac134055ff62b6f856ad78390dfe673b

	/**
	 * Returns the viewer used to show the list.
Solution content
        return this.handleCaughtExceptions;
    }


	/**
	 * Returns the viewer used to show the list.
File
PyConfigureExceptionDialog.java
Developer's decision
Version 1
Kind of conflict
Method declaration
Chunk
Conflicting content
				display.asyncExec(new Runnable() {

					public void run() {
<<<<<<< HEAD
						if (!monitor.isCanceled() && filterPatternField != null && !filterPatternField.isDisposed()) {
=======
						if (!monitor.isCanceled() && filterPatternField != null
								&& !filterPatternField.isDisposed()) {
>>>>>>> a113f120ac134055ff62b6f856ad78390dfe673b
							doFilterUpdate(monitor);
						}
					}
Solution content
				display.asyncExec(new Runnable() {

					public void run() {
						if (!monitor.isCanceled() && filterPatternField != null && !filterPatternField.isDisposed()) {
							doFilterUpdate(monitor);
						}
					}
File
PyConfigureExceptionDialog.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
				new LabelProvider(), "");
import org.python.pydev.debug.ui.PyConfigureExceptionDialog;
import org.python.pydev.editor.actions.PyAction;

<<<<<<< HEAD
public class PyConfigureExceptionAction extends PyAction implements IWorkbenchWindowActionDelegate {

    public void run(IAction action) {

        PyConfigureExceptionDialog dialog = new PyConfigureExceptionDialog(
                getShell(), "", new PyExceptionListProvider(),
                new LabelProvider(), "");

        dialog.setInitialElementSelections(PyExceptionBreakPointManager.getInstance().getExceptionsList());
        dialog.setTitle("Add Python Exception Breakpoint");
        if(dialog.open() == PyConfigureExceptionDialog.OK){

            
            Object[] selectedItems = dialog.getResult();
            String[] exceptionArray;
            if (selectedItems != null) {
                exceptionArray = new String[selectedItems.length];
                System.arraycopy(selectedItems, 0, exceptionArray, 0, selectedItems.length);
            }else{
                exceptionArray = new String[0];
            }
            PyExceptionBreakPointManager.getInstance().setBreakOn(
                    dialog.getResultHandleCaughtExceptions(), dialog.getResultHandleUncaughtExceptions(), exceptionArray);
        }
    }

    public void selectionChanged(IAction action, ISelection selection) {
    }

    public void dispose() {
    }

    public void init(IWorkbenchWindow window) {
    }
=======
public class PyConfigureExceptionAction extends PyAction implements
		IWorkbenchWindowActionDelegate {

	public void run(IAction action) {

		PyConfigureExceptionDialog dialog = new PyConfigureExceptionDialog(
				getShell(), "", new PyExceptionListProvider(),

		dialog.setInitialElementSelections(PyExceptionBreakPointManager
				.getInstance().getExceptionsList());
		dialog.setTitle("Add Python Exception Breakpoint");
		if (dialog.open() == PyConfigureExceptionDialog.OK) {

			Object[] selectedItems = dialog.getResult();
			String[] exceptionArray;
			if (selectedItems != null) {
				exceptionArray = new String[selectedItems.length];
				System.arraycopy(selectedItems, 0, exceptionArray, 0,
						selectedItems.length);
			} else {
				exceptionArray = new String[0];
			}
			PyExceptionBreakPointManager.getInstance().setBreakOn(
					dialog.getResultHandleCaughtExceptions(),
					dialog.getResultHandleUncaughtExceptions(), exceptionArray);
		}
	}

	public void selectionChanged(IAction action, ISelection selection) {
	}

	public void dispose() {
	}

	public void init(IWorkbenchWindow window) {
	}
>>>>>>> a113f120ac134055ff62b6f856ad78390dfe673b
}
Solution content
import org.python.pydev.debug.ui.PyConfigureExceptionDialog;
import org.python.pydev.editor.actions.PyAction;

public class PyConfigureExceptionAction extends PyAction implements IWorkbenchWindowActionDelegate {

    public void run(IAction action) {

        PyConfigureExceptionDialog dialog = new PyConfigureExceptionDialog(
                getShell(), "", new PyExceptionListProvider(),
                new LabelProvider(), "");

        dialog.setInitialElementSelections(PyExceptionBreakPointManager.getInstance().getExceptionsList());
        dialog.setTitle("Add Python Exception Breakpoint");
        if(dialog.open() == PyConfigureExceptionDialog.OK){

            
            Object[] selectedItems = dialog.getResult();
            String[] exceptionArray;
            if (selectedItems != null) {
                exceptionArray = new String[selectedItems.length];
                System.arraycopy(selectedItems, 0, exceptionArray, 0, selectedItems.length);
            }else{
                exceptionArray = new String[0];
            }
            PyExceptionBreakPointManager.getInstance().setBreakOn(
                    dialog.getResultHandleCaughtExceptions(), dialog.getResultHandleUncaughtExceptions(), exceptionArray);
        }
    }

    public void selectionChanged(IAction action, ISelection selection) {
    }

    public void dispose() {
    }

    public void init(IWorkbenchWindow window) {
    }
}
File
PyConfigureExceptionAction.java
Developer's decision
Version 1
Kind of conflict
Class signature
Method declaration
Chunk
Conflicting content
public class PyExceptionListProvider implements IStructuredContentProvider {

<<<<<<< HEAD
    private Object newInput;
    private Object[] elementsForCurrentInput;
    private static final String[] EMPTY = new String[0];

    public PyExceptionListProvider() {

    }
=======
	private Object newInput;
	private Object[] elementsForCurrentInput;
	private static final String[] EMPTY = new String[0];

	public PyExceptionListProvider() {
>>>>>>> a113f120ac134055ff62b6f856ad78390dfe673b

    public Object[] getElements(Object inputElement) {
Solution content
public class PyExceptionListProvider implements IStructuredContentProvider {

    private Object newInput;
    private Object[] elementsForCurrentInput;
    private static final String[] EMPTY = new String[0];

    public PyExceptionListProvider() {

    }

    public Object[] getElements(Object inputElement) {
File
PyExceptionListProvider.java
Developer's decision
Version 1
Kind of conflict
Attribute
Method declaration
Method invocation
Method signature
Chunk
Conflicting content
        List list = instance.getBuiltinExceptions();
        list.addAll(instance.getUserConfiguredExceptions());

<<<<<<< HEAD
        elementsForCurrentInput = list.toArray(new String[0]);
    }

    public void addUserConfiguredException(String userConfiguredException) {
        PyExceptionBreakPointManager.getInstance().addUserConfiguredException(userConfiguredException);
        this.newInput = null;
    }
=======
		PyExceptionBreakPointManager instance = PyExceptionBreakPointManager
				.getInstance();
		List list = instance.getBuiltinExceptions();
		list.addAll(instance.getUserConfiguredExceptions());

		elementsForCurrentInput = list.toArray(new String[0]);
	}

	public void addUserConfiguredException(String userConfiguredException) {
		PyExceptionBreakPointManager.getInstance().addUserConfiguredException(
				userConfiguredException);
		this.newInput = null;
	}
>>>>>>> a113f120ac134055ff62b6f856ad78390dfe673b
}
Solution content
        List list = instance.getBuiltinExceptions();
        list.addAll(instance.getUserConfiguredExceptions());

        elementsForCurrentInput = list.toArray(new String[0]);
    }

    public void addUserConfiguredException(String userConfiguredException) {
        PyExceptionBreakPointManager.getInstance().addUserConfiguredException(userConfiguredException);
        this.newInput = null;
    }
}
File
PyExceptionListProvider.java
Developer's decision
Version 1
Kind of conflict
Attribute
Method declaration
Method invocation
Variable