X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.scl.commands%2Fsrc%2Forg%2Fsimantics%2Fscl%2Fcommands%2Finternal%2FErrorCommand.java;h=c977263414a1a37113de1e8c659fcc84974beb09;hb=b844ca924d129072e11f7e4c18918dd388a37e8c;hp=7eb7a8afcfef3330dea73a49f5b813cc49dc40fb;hpb=969bd23cab98a79ca9101af33334000879fb60c5;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.scl.commands/src/org/simantics/scl/commands/internal/ErrorCommand.java b/bundles/org.simantics.scl.commands/src/org/simantics/scl/commands/internal/ErrorCommand.java index 7eb7a8afc..c97726341 100644 --- a/bundles/org.simantics.scl.commands/src/org/simantics/scl/commands/internal/ErrorCommand.java +++ b/bundles/org.simantics.scl.commands/src/org/simantics/scl/commands/internal/ErrorCommand.java @@ -1,34 +1,34 @@ -package org.simantics.scl.commands.internal; - -import org.simantics.db.RequestProcessor; -import org.simantics.db.Resource; -import org.simantics.db.exception.DatabaseException; -import org.simantics.db.procedure.Procedure; -import org.simantics.scl.commands.Command; - -public class ErrorCommand implements Command { - - String name; - - public ErrorCommand(String name) { - this.name = name; - } - - @Override - public Object execute(RequestProcessor processor, Resource model, Object... parameters) throws DatabaseException { - throw new DatabaseException("Command " + name + " is not available."); - } - - @Override - public boolean check(RequestProcessor processor, Resource model, - Object... parameters) throws DatabaseException { - return false; - } - - @Override - public void asyncExecute(RequestProcessor processor, Resource model, - Object[] parameters, Procedure procedure) { - procedure.exception(new DatabaseException("Command " + name + " is not available.")); - } - -} +package org.simantics.scl.commands.internal; + +import org.simantics.db.RequestProcessor; +import org.simantics.db.Resource; +import org.simantics.db.exception.DatabaseException; +import org.simantics.db.procedure.Procedure; +import org.simantics.scl.commands.Command; + +public class ErrorCommand implements Command { + + String name; + + public ErrorCommand(String name) { + this.name = name; + } + + @Override + public Object execute(RequestProcessor processor, Resource model, Object... parameters) throws DatabaseException { + throw new DatabaseException("Command " + name + " is not available."); + } + + @Override + public boolean check(RequestProcessor processor, Resource model, + Object... parameters) throws DatabaseException { + return false; + } + + @Override + public void asyncExecute(RequestProcessor processor, Resource model, + Object[] parameters, Procedure procedure) { + procedure.exception(new DatabaseException("Command " + name + " is not available.")); + } + +}