Skip to content

Commit

Permalink
refs eclipse-efx#72 TextUtil references
Browse files Browse the repository at this point in the history
  • Loading branch information
martinbluehweis committed May 16, 2017
1 parent bbee1cc commit 47c5d55
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Import-Package: org.eclipse.equinox.p2.core;version="2.0.0",
org.eclipse.fx.core;version="3.0.0",
org.eclipse.fx.core.log;version="3.0.0",
org.eclipse.fx.core.operation;version="3.0.0",
org.eclipse.fx.core.text;version="3.0.0",
org.eclipse.fx.core.update;version="3.0.0",
org.osgi.framework;version="1.3.0",
org.osgi.service.component.annotations;version="1.2.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import org.eclipse.fx.core.log.Logger;
import org.eclipse.fx.core.log.LoggerFactory;
import org.eclipse.fx.core.operation.CancelableOperation;
import org.eclipse.fx.core.text.TextUtil;
import org.eclipse.fx.core.update.UpdateService;
import org.eclipse.jdt.annotation.NonNull;
import org.osgi.service.component.annotations.Component;
Expand Down Expand Up @@ -136,16 +137,19 @@ public void unsetProvisioningAgent(IProvisioningAgent agent) {
}
}

//Why is that not allowed???
// Why is that not allowed???
@NonNull
static Status fromStatus(@NonNull IStatus s) {
switch (s.getSeverity()) {
case IStatus.CANCEL:
return Status.status(Status.State.CANCEL,s.getCode(),Util.notNull(s.getMessage(),"<unknown>"),s.getException()); //$NON-NLS-1$
return Status.status(Status.State.CANCEL, s.getCode(), TextUtil.notNull(s.getMessage(), "<unknown>"), //$NON-NLS-1$
s.getException());
case IStatus.ERROR:
return Status.status(Status.State.ERROR,s.getCode(),Util.notNull(s.getMessage(),"<unknown>"),s.getException()); //$NON-NLS-1$
return Status.status(Status.State.ERROR, s.getCode(), TextUtil.notNull(s.getMessage(), "<unknown>"), //$NON-NLS-1$
s.getException());
case IStatus.WARNING:
return Status.status(Status.State.WARNING,s.getCode(),Util.notNull(s.getMessage(),"<unknown>"),s.getException()); //$NON-NLS-1$
return Status.status(Status.State.WARNING, s.getCode(), TextUtil.notNull(s.getMessage(), "<unknown>"), //$NON-NLS-1$
s.getException());
default:
return Status.ok();
}
Expand Down

0 comments on commit 47c5d55

Please sign in to comment.