Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
ProofScriptParser
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
24
Issues
24
List
Boards
Labels
Service Desk
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sarah.grebing
ProofScriptParser
Commits
0f0c3f8c
Commit
0f0c3f8c
authored
May 24, 2017
by
Sarah Grebing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Delete Temp Files
parent
e4dcaaf4
Pipeline
#10706
failed with stage
in 2 minutes and 11 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
63 deletions
+0
-63
src/main/java/edu/kit/formal/commands/CommandHandler.java
src/main/java/edu/kit/formal/commands/CommandHandler.java
+0
-27
src/main/java/edu/kit/formal/commands/LocalScriptCommandHandler.java
...va/edu/kit/formal/commands/LocalScriptCommandHandler.java
+0
-36
No files found.
src/main/java/edu/kit/formal/commands/CommandHandler.java
deleted
100644 → 0
View file @
e4dcaaf4
package
edu.kit.formal.commands
;
import
edu.kit.formal.interpreter.State
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* AbstractHandler for Chain of Respionsibility
*/
public
abstract
class
CommandHandler
{
protected
List
<
CommandHandler
>
nextList
=
new
ArrayList
<>();
public
void
addNextCommandHandler
(
CommandHandler
cmdHandler
)
{
this
.
nextList
.
add
(
cmdHandler
);
}
public
void
handle
(
String
commandName
)
{
for
(
int
i
=
0
;
i
<
nextList
.
size
();
i
++)
{
CommandHandler
cmdHandler
=
nextList
.
get
(
i
);
cmdHandler
.
handle
(
commandName
);
}
}
protected
abstract
State
processCommand
();
}
src/main/java/edu/kit/formal/commands/LocalScriptCommandHandler.java
deleted
100644 → 0
View file @
e4dcaaf4
package
edu.kit.formal.commands
;
import
edu.kit.formal.interpreter.State
;
import
edu.kit.formal.proofscriptparser.ast.ProofScript
;
import
java.util.HashMap
;
/**
* Created by sarah on 5/17/17.
*/
public
class
LocalScriptCommandHandler
extends
CommandHandler
{
HashMap
<
String
,
ProofScript
>
localScripts
;
String
requestedCommand
;
public
LocalScriptCommandHandler
()
{
localScripts
=
new
HashMap
<>();
}
@Override
public
void
handle
(
String
commandName
)
{
if
(
localScripts
.
containsKey
(
commandName
))
{
requestedCommand
=
commandName
;
processCommand
();
}
else
{
super
.
handle
(
commandName
);
}
}
@Override
protected
State
processCommand
()
{
ProofScript
command
=
localScripts
.
get
(
requestedCommand
);
return
null
;
//execute
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment