Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2000, 2007 IBM Corporation and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html Contributors: IBM Corporation - initial API and implementation /
 
 package org.eclipse.ant.internal.ui.model;
 
 import java.util.List;
 
 
 public class AntModelCore implements IBreakpointsListener {
 	
 	private static AntModelCore inst;
 	
 	public static AntModelCore getDefault() {
 		if ( == null) {
 			new AntModelCore();
 		}
 			
 		return ;
 	}
 	
 	private List fModelChangeListenersnew ArrayList();
 	
 	private AntModelCore() { }
 
 	public void addAntModelListener(IAntModelListener listener) {
 		synchronized () {
 		}
 	}
 	
 	public void removeAntModelListener(IAntModelListener listener) {
 		synchronized () {
 		}
 	}
 	
 		Iterator i;
 		synchronized () {
 		}
 		while (i.hasNext()) {
 		}
 	}
    
    
Updates message attributes on any Ant line breakpoints if there are active Ant editors with Ant models

 
     private void updateBreakpointMessages(final IBreakpoint[] breakpoints) {
         IWorkspaceRunnable runnable = new IWorkspaceRunnable() {
             public void run(IProgressMonitor monitorthrows CoreException {
                 for (int i = 0; i < breakpoints.lengthi++) {
                     IBreakpoint breakpointbreakpoints[i];
                     if (breakpoint instanceof AntLineBreakpoint) {
                         IMarker marker = breakpoint.getMarker();
                         if (marker.exists()) {
                         	int lineNumbermarker.getAttribute(., 0);
                         	marker.setAttribute(., MessageFormat.format(.new String[] {Integer.toString(lineNumber)}));
                         }
                     }
                 }
             }
         };
         try {
             ResourcesPlugin.getWorkspace().run(runnablenull, 0, null);
         } catch (CoreException e) {
             AntUIPlugin.log(e);
         }
     }
 
     public void breakpointsAdded(IBreakpoint[] breakpoints) {
     }
 
    public void breakpointsRemoved(IBreakpoint[] breakpointsIMarkerDelta[] deltas) {
    }
    public void breakpointsChanged(IBreakpoint[] breakpointsIMarkerDelta[] deltas) {
        updateBreakpointMessages(breakpoints);        
    }
    public void stopBreakpointListening() {
        DebugPlugin.getDefault().getBreakpointManager().removeBreakpointListener(this);
    }
    
    public void startBreakpointListening() {
        DebugPlugin.getDefault().getBreakpointManager().addBreakpointListener(this);
    }
New to GrepCode? Check out our FAQ X