Skip to content

Commit

Permalink
moved issue related classes to de.uka.ipd.sdq.errorhandling.core
Browse files Browse the repository at this point in the history
  • Loading branch information
rsfzi authored and rapp-fzi committed Nov 29, 2024
1 parent 33798d4 commit 98e6672
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@ Bundle-ManifestVersion: 2
Bundle-Name: SDQ Errorhandling Core
Bundle-SymbolicName: de.uka.ipd.sdq.errorhandling.core
Bundle-Version: 5.2.0.qualifier
Export-Package: de.uka.ipd.sdq.errorhandling.core
Require-Bundle: org.eclipse.emf.ecore;bundle-version="2.33.0"
Bundle-Vendor: sdq.ipd.uka.de
Bundle-RequiredExecutionEnvironment: JavaSE-17
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package de.uka.ipd.sdq.errorhandling;
package de.uka.ipd.sdq.errorhandling.core;

/**
* Interface for reportable issues.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
package de.uka.ipd.sdq.errorhandling;
package de.uka.ipd.sdq.errorhandling.core;

import org.eclipse.emf.ecore.EObject;

import de.uka.ipd.sdq.errorhandling.dialogs.issues.IssuesDialog;

/**
* Issue combined with a severity level. Used to record and report issues to the user using the
* {@link IssuesDialog}.
Expand Down Expand Up @@ -97,26 +95,30 @@ public Object getElement() {
public String getResourceName() {
if (element != null) {
if (element instanceof EObject) {
return ((EObject) element).eResource().getURI().toFileString();
return ((EObject) element).eResource()
.getURI()
.toFileString();
} else {
return objectResourceName == null ? DEFAULT_RESOURCE_NAME : objectResourceName;
}
} else
} else {
return DEFAULT_RESOURCE_NAME;

}
}

public SeverityEnum getError() {
return severity;
}

@Override
public int compareTo(SeverityAndIssue o) {
if (this.severity == o.getError())
if (this.severity == o.getError()) {
return 0;
if (this.severity == SeverityEnum.ERROR && o.getError() == SeverityEnum.WARNING)
}
if (this.severity == SeverityEnum.ERROR && o.getError() == SeverityEnum.WARNING) {
return -1;
else
return 1;
}
return 1;
}

}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package de.uka.ipd.sdq.errorhandling;
package de.uka.ipd.sdq.errorhandling.core;

public enum SeverityEnum {
ERROR, WARNING
Expand Down
7 changes: 3 additions & 4 deletions bundles/de.uka.ipd.sdq.errorhandling/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ Bundle-Version: 5.2.0.qualifier
Bundle-Activator: de.uka.ipd.sdq.errorhandling.Activator
Bundle-Vendor: sdq.ipd.uka.de
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.emf.ecore,
org.eclipse.ui;resolution:=optional
org.eclipse.ui;resolution:=optional,
de.uka.ipd.sdq.errorhandling.core;bundle-version="5.2.0";visibility:=reexport
Bundle-ActivationPolicy: lazy
Export-Package: de.uka.ipd.sdq.errorhandling,
de.uka.ipd.sdq.errorhandling.dialogs.issues
Export-Package: de.uka.ipd.sdq.errorhandling.dialogs.issues
Bundle-RequiredExecutionEnvironment: JavaSE-17
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.ui.PlatformUI;

import de.uka.ipd.sdq.errorhandling.SeverityAndIssue;
import de.uka.ipd.sdq.errorhandling.core.SeverityAndIssue;

/**
* Inner class used to display the dialog containing found validation errors. Needed by Eclipse to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.swt.widgets.Text;

import de.uka.ipd.sdq.errorhandling.SeverityAndIssue;
import de.uka.ipd.sdq.errorhandling.SeverityEnum;
import de.uka.ipd.sdq.errorhandling.core.SeverityAndIssue;
import de.uka.ipd.sdq.errorhandling.core.SeverityEnum;

public class IssuesDialog extends Dialog {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;

import de.uka.ipd.sdq.errorhandling.IIssue;
import de.uka.ipd.sdq.errorhandling.core.IIssue;
import de.uka.ipd.sdq.stoex.analyser.visitors.TypeEnum;

public class ExpectedTypeMismatchIssue implements IIssue {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import java.util.ArrayList;
import java.util.Collection;

import de.uka.ipd.sdq.errorhandling.IIssue;
import de.uka.ipd.sdq.errorhandling.core.IIssue;
import de.uka.ipd.sdq.stoex.BooleanOperatorExpression;
import de.uka.ipd.sdq.stoex.IfElseExpression;
import de.uka.ipd.sdq.stoex.NegativeExpression;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

import com.google.inject.Inject;

import de.uka.ipd.sdq.errorhandling.IIssue;
import de.uka.ipd.sdq.errorhandling.core.IIssue;
import de.uka.ipd.sdq.probfunction.ProbfunctionPackage;
import de.uka.ipd.sdq.stoex.Expression;
import de.uka.ipd.sdq.stoex.StoexPackage;
Expand Down

0 comments on commit 98e6672

Please sign in to comment.