Skip to content

Commit

Permalink
Cleaning the Extension class
Browse files Browse the repository at this point in the history
  • Loading branch information
marigostra committed Apr 29, 2021
1 parent e4f849f commit 0ffea4e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 20 deletions.
2 changes: 1 addition & 1 deletion src/main/java/org/luwrain/app/viewer/App.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2012-2018 Michael Pozhidaev <[email protected]>
Copyright 2012-2021 Michael Pozhidaev <[email protected]>
This file is part of LUWRAIN.
Expand Down
23 changes: 5 additions & 18 deletions src/main/java/org/luwrain/app/viewer/Extension.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2012-2018 Michael Pozhidaev <[email protected]>
Copyright 2012-2021 Michael Pozhidaev <[email protected]>
This file is part of LUWRAIN.
Expand All @@ -26,34 +26,21 @@ public final class Extension extends org.luwrain.core.extensions.EmptyExtension
{
@Override public Command[] getCommands(Luwrain luwrain)
{
return new Command[]{
new Command(){
@Override public String getName()
{
return "viewer";
}
@Override public void onCommand(Luwrain luwrain)
{
luwrain.launchApp("viewer");
}
}};
return new Command[]{ new SimpleShortcutCommand("viewer") };
}

@Override public ExtensionObject[] getExtObjects(Luwrain luwrain)
{
return new ExtensionObject[]{

new Shortcut() {
@Override public String getExtObjName()
{
return "viewer";
}
@Override public String getExtObjName() { return "viewer"; }
@Override public Application[] prepareApp(String[] args)
{
NullCheck.notNullItems(args, "args");
if (args.length == 0)
return new Application[]{new App()};
final List<Application> v = new LinkedList();
final List<Application> v = new ArrayList();
for(String s: args)
v.add(new App(s));
if (v.isEmpty())
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/luwrain/app/viewer/Strings.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2012-2018 Michael Pozhidaev <[email protected]>
Copyright 2012-2021 Michael Pozhidaev <[email protected]>
This file is part of LUWRAIN.
Expand Down

0 comments on commit 0ffea4e

Please sign in to comment.