Example #1
0
 protected void requestFailed(String message, Throwable e) throws DebugException {
   throw new DebugException(
       new Status(
           IStatus.ERROR,
           DebugPlugin.getUniqueIdentifier(),
           DebugException.TARGET_REQUEST_FAILED,
           message,
           e));
 }
 /**
  * Throws a debug exception with a status code of <code>NOT_SUPPORTED</code>.
  *
  * @param message exception message
  * @param e underlying exception or <code>null</code>
  * @throws DebugException if a problem is encountered
  */
 protected void notSupported(String message, Throwable e) throws DebugException {
   throw new DebugException(
       new Status(
           IStatus.ERROR,
           DebugPlugin.getUniqueIdentifier(),
           DebugException.NOT_SUPPORTED,
           message,
           e));
 }
 @Override
 protected void setUp() throws Exception {
   super.setUp();
   // The following disables some nasty popups that can cause test to hang rather than fail.
   // when project has errors upon launching it.
   InstanceScope.INSTANCE
       .getNode(DebugPlugin.getUniqueIdentifier())
       .putBoolean(IInternalDebugCoreConstants.PREF_ENABLE_STATUS_HANDLERS, false);
 }
 /* (non-Javadoc)
  * @see org.eclipse.debug.internal.core.sourcelookup.ISourceContainerType#getMemento(org.eclipse.debug.internal.core.sourcelookup.ISourceContainer)
  */
 public String getMemento(ISourceContainer container) throws CoreException {
   if (this.equals(container.getType())) {
     return getDelegate().getMemento(container);
   }
   IStatus status =
       new Status(
           IStatus.ERROR,
           DebugPlugin.getUniqueIdentifier(),
           DebugPlugin.ERROR,
           SourceLookupMessages.SourceContainerType_0,
           null);
   throw new CoreException(status);
 }
Example #5
0
 /**
  * Returns the marker associated with this breakpoint.
  *
  * @return breakpoint marker
  * @exception DebugException if no marker is associated with this breakpoint or the associated
  *     marker does not exist
  */
 @Override
 protected IMarker ensureMarker() throws DebugException {
   IMarker m = getMarker();
   if (m == null || !m.exists()) {
     throw new DebugException(
         new Status(
             IStatus.ERROR,
             DebugPlugin.getUniqueIdentifier(),
             DebugException.REQUEST_FAILED,
             "Breakpoint_no_associated_marker",
             null));
   }
   return m;
 }