Skip to content

Commit

Permalink
VA 1.2.033
Browse files Browse the repository at this point in the history
  • Loading branch information
DoublesunRUS committed Aug 20, 2020
1 parent e82cea3 commit dc4ee17
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 42 deletions.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -5,47 +5,57 @@
import org.eclipse.core.runtime.Status;
import org.osgi.framework.BundleContext;

public class FrameworkPlugin extends Plugin {
public static final String ID = "ru.capralow.dt.framework.va"; //$NON-NLS-1$

private static FrameworkPlugin instance;

public static IStatus createErrorStatus(String message) {
return new Status(IStatus.ERROR, ID, 0, message, (Throwable) null);
}

public static IStatus createErrorStatus(String message, int code) {
return new Status(IStatus.ERROR, ID, code, message, (Throwable) null);
}

public static IStatus createErrorStatus(String message, int code, Throwable throwable) {
return new Status(IStatus.ERROR, ID, code, message, throwable);
}

public static IStatus createErrorStatus(String message, Throwable throwable) {
return new Status(IStatus.ERROR, ID, 0, message, throwable);
}

public static FrameworkPlugin getInstance() {
return instance;
}

public static void log(IStatus status) {
getInstance().getLog().log(status);
}

@Override
public void start(BundleContext context) throws Exception {
super.start(context);

instance = this;
}

@Override
public void stop(BundleContext context) throws Exception {
instance = null;

super.stop(context);
}
public class FrameworkPlugin
extends Plugin
{
public static final String ID = "ru.capralow.dt.framework.va"; //$NON-NLS-1$

private static FrameworkPlugin instance;

public static IStatus createErrorStatus(String message)
{
return new Status(IStatus.ERROR, ID, 0, message, (Throwable)null);
}

public static IStatus createErrorStatus(String message, int code)
{
return new Status(IStatus.ERROR, ID, code, message, (Throwable)null);
}

public static IStatus createErrorStatus(String message, int code, Throwable throwable)
{
return new Status(IStatus.ERROR, ID, code, message, throwable);
}

public static IStatus createErrorStatus(String message, Throwable throwable)
{
return new Status(IStatus.ERROR, ID, 0, message, throwable);
}

public static FrameworkPlugin getInstance()
{
return instance;
}

public static void log(IStatus status)
{
getInstance().getLog().log(status);
}

@Override
public void start(BundleContext context) throws Exception
{
super.start(context);

instance = this;
}

@Override
public void stop(BundleContext context) throws Exception
{
instance = null;

super.stop(context);
}

}

0 comments on commit dc4ee17

Please sign in to comment.