-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Worksheet: insertions (or embedded blocks) renamed to insets.
- Loading branch information
Showing
10 changed files
with
59 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 8 additions & 8 deletions
16
com.yoursway.ide.worksheet/src/com/yoursway/ide/worksheet/internal/controller/Command.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,30 @@ | ||
package com.yoursway.ide.worksheet.internal.controller; | ||
|
||
import com.yoursway.ide.worksheet.internal.view.ResultBlock; | ||
import com.yoursway.ide.worksheet.internal.view.ResultInset; | ||
import com.yoursway.utils.annotations.UseFromUIThread; | ||
|
||
public class Command { | ||
|
||
private final String commandText; | ||
private final ResultBlockProvider blockProvider; | ||
private final ResultInsetProvider insetProvider; | ||
|
||
public Command(String commandText, ResultBlockProvider blockProvider) { | ||
public Command(String commandText, ResultInsetProvider insetProvider) { | ||
if (commandText.trim().length() == 0) | ||
throw new AssertionError("A command must not be empty."); | ||
if (blockProvider == null) | ||
throw new NullPointerException("blockProvider is null"); | ||
if (insetProvider == null) | ||
throw new NullPointerException("insetProvider is null"); | ||
|
||
this.commandText = commandText; | ||
this.blockProvider = blockProvider; | ||
this.insetProvider = insetProvider; | ||
} | ||
|
||
public String commandText() { | ||
return commandText; | ||
} | ||
|
||
@UseFromUIThread | ||
public ResultBlock block() { | ||
return blockProvider.get(); | ||
public ResultInset inset() { | ||
return insetProvider.get(); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
...ernal/controller/ResultBlockProvider.java → ...ernal/controller/ResultInsetProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
package com.yoursway.ide.worksheet.internal.controller; | ||
|
||
import com.yoursway.ide.worksheet.internal.view.ResultBlock; | ||
import com.yoursway.ide.worksheet.internal.view.ResultInset; | ||
import com.yoursway.utils.annotations.UseFromUIThread; | ||
|
||
public interface ResultBlockProvider { | ||
public interface ResultInsetProvider { | ||
|
||
@UseFromUIThread | ||
ResultBlock get(); | ||
ResultInset get(); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters