Code example for TreeSet

Methods: addAll

0
	 
	public void cleanup() { 
		IBreakpointManager bp = DebugPlugin.getDefault().getBreakpointManager();
		IBreakpoint[] bps = bp.getBreakpoints(CDIDebugModel.getPluginIdentifier());
		 
		TreeSet uniqueBps = new TreeSet(new MoSyncBreakpointComparator());
		uniqueBps.addAll(Arrays.asList(bps));
	} 
 
	public void breakpointAdded(IBreakpoint breakpoint) {
		if (isBreakpointApplicable(breakpoint)) {
			//cleanup(); 
		} 
	} 
 
	private boolean isBreakpointApplicable(IBreakpoint breakpoint) {
		return CDIDebugModel.getPluginIdentifier().equals(breakpoint.getModelIdentifier());
	} 
 
	public void breakpointChanged(IBreakpoint breakpoint, IMarkerDelta delta) {
	}