Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import org.eclipse.e4.ui.di.Focus;
import org.eclipse.e4.ui.di.Persist;
import org.eclipse.e4.ui.model.application.ui.MDirtyable;
import org.eclipse.e4.ui.tests.model.test.util.TestException;

public class ClientEditor {

Expand All @@ -43,7 +44,7 @@ void delegateFocus() {
void doSave() {
saveCalled = true;
if (throwException) {
throw new RuntimeException();
throw new TestException();
}

dirtyable.setDirty(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
import org.eclipse.e4.ui.model.application.ui.basic.MWindow;
import org.eclipse.e4.ui.model.application.ui.basic.MWindowElement;
import org.eclipse.e4.ui.services.IServiceConstants;
import org.eclipse.e4.ui.tests.model.test.util.TestException;
import org.eclipse.e4.ui.tests.workbench.TargetedView;
import org.eclipse.e4.ui.workbench.modeling.EModelService;
import org.eclipse.e4.ui.workbench.modeling.EPartService;
Expand Down Expand Up @@ -10103,27 +10104,27 @@ static class ExceptionListener implements IPartListener {

@Override
public void partActivated(MPart part) {
throw new RuntimeException();
throw new TestException();
}

@Override
public void partBroughtToTop(MPart part) {
throw new RuntimeException();
throw new TestException();
}

@Override
public void partDeactivated(MPart part) {
throw new RuntimeException();
throw new TestException();
}

@Override
public void partHidden(MPart part) {
throw new RuntimeException();
throw new TestException();
}

@Override
public void partVisible(MPart part) {
throw new RuntimeException();
throw new TestException();
}

}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*******************************************************************************
* Copyright (c) 2024 Joerg Kubitz and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Joerg Kubitz - initial API and implementation
******************************************************************************/

package org.eclipse.e4.ui.tests.model.test.util;

public class TestException extends RuntimeException {

private static final long serialVersionUID = 1L;

public TestException() {
super("Intentional TestException. Ignore me in the logfile.");
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import org.eclipse.e4.core.contexts.IEclipseContext;
import org.eclipse.e4.ui.di.PersistState;
import org.eclipse.e4.ui.services.IServiceConstants;
import org.eclipse.e4.ui.tests.model.test.util.TestException;
import org.eclipse.jface.layout.GridLayoutFactory;
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.LabelProvider;
Expand Down Expand Up @@ -57,7 +58,7 @@ public SampleView(Composite parent, final IEclipseContext outputContext,

parent.addDisposeListener(e -> {
if (errorOnWidgetDisposal) {
throw new RuntimeException();
throw new TestException();
}
});

Expand Down Expand Up @@ -154,7 +155,7 @@ void preDestroy() {
nullParentContext = context.getParent() == null;

if (errorOnPreDestroy) {
throw new RuntimeException();
throw new TestException();
}
}

Expand Down
Loading