Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
lab3
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hakon.Molnes
lab3
Commits
485d3623
Commit
485d3623
authored
1 year ago
by
Hakon.Molnes
Browse files
Options
Downloads
Patches
Plain Diff
Replace SimpleShell.java
parent
209a0413
Branches
main
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/no/uib/inf101/terminal/SimpleShell.java
+17
-4
17 additions, 4 deletions
src/main/java/no/uib/inf101/terminal/SimpleShell.java
with
17 additions
and
4 deletions
src/main/java/no/uib/inf101/terminal/SimpleShell.java
+
17
−
4
View file @
485d3623
...
...
@@ -52,8 +52,8 @@ public class SimpleShell implements CommandLineInterface {
//Implimentation of command-lin-Interface into our Shell-class
@Override
public
void
key
Pressed
(
char
key
)
{
public
void
aKeyIs
Pressed
(
char
key
)
{
if
(
key
==
'\n'
)
{
this
.
processCurrentCommandLine
();
}
else
if
(
key
>=
' '
&&
key
<=
'~'
)
{
...
...
@@ -64,8 +64,8 @@ public class SimpleShell implements CommandLineInterface {
}
@Override
public
String
getScreenContent
()
{
public
String
whatTheScreenLooksLike
()
{
String
s
=
""
;
for
(
String
line
:
this
.
history
)
{
s
+=
line
;
...
...
@@ -169,4 +169,17 @@ public class SimpleShell implements CommandLineInterface {
}
public
void
keyPressed
(
char
key
)
{
aKeyIsPressed
(
key
);
}
public
String
getScreenContent
()
{
return
whatTheScreenLooksLike
();
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment