Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
i57
dibugger
Commits
de55342c
Commit
de55342c
authored
Sep 04, 2018
by
Mihai Herda
Browse files
Fixed bug that was sometimes preventing files to be saved.
parent
9107d8de
Changes
1
Show whitespace changes
Inline
Side-by-side
src/dibugger/debuglogic/debugger/DebugControl.java
View file @
de55342c
...
...
@@ -289,6 +289,7 @@ public class DebugControl {
* @throws DIbuggerLogicException
*/
public
void
createWatchExpression
(
int
id
,
String
expr
)
throws
DIbuggerLogicException
{
System
.
out
.
println
(
"Add watch expression: "
+
id
+
" "
+
expr
);
while
(
list_watchExpressions
.
size
()
-
1
<
id
)
{
list_watchExpressions
.
add
(
null
);
}
...
...
@@ -307,6 +308,7 @@ public class DebugControl {
* @throws DIbuggerLogicException
*/
public
void
changeWatchExpression
(
int
id
,
String
expr
,
List
<
ScopeTuple
>
scopes
)
throws
DIbuggerLogicException
{
//System.out.println("Change watch expression: "+id+" to "+expr);
if
(
id
<
list_watchExpressions
.
size
())
{
WatchExpression
e
=
list_watchExpressions
.
get
(
id
);
if
(
e
!=
null
)
{
...
...
@@ -326,6 +328,7 @@ public class DebugControl {
* the id of the watch expression
*/
public
void
deleteWatchExpression
(
int
id
)
{
System
.
out
.
println
(
"Remove watch expression: "
+
id
);
if
(
id
==
list_watchExpressions
.
size
()
-
1
)
{
list_watchExpressions
.
remove
(
id
);
}
else
{
...
...
@@ -581,9 +584,13 @@ public class DebugControl {
*/
public
List
<
Integer
>
getWEScopeBegin
(
int
expressionID
)
{
List
<
Integer
>
l
=
new
ArrayList
<
Integer
>();
System
.
out
.
println
(
"Get Expression: "
+
expressionID
);
System
.
out
.
println
(
"From: "
+
list_watchExpressions
);
if
(
list_watchExpressions
.
get
(
expressionID
)!=
null
)
{
for
(
ScopeTuple
it
:
list_watchExpressions
.
get
(
expressionID
).
getScopes
())
{
l
.
add
(
it
.
getStartLine
());
}
}
if
(
l
.
size
()
==
0
)
{
for
(
int
i
=
0
;
i
<
numPrograms
;
++
i
)
{
l
.
add
(
1
);
...
...
@@ -601,9 +608,11 @@ public class DebugControl {
*/
public
List
<
Integer
>
getWEScopeEnd
(
int
expressionID
)
{
List
<
Integer
>
l
=
new
ArrayList
<
Integer
>();
if
(
list_watchExpressions
.
get
(
expressionID
)!=
null
)
{
for
(
ScopeTuple
it
:
list_watchExpressions
.
get
(
expressionID
).
getScopes
())
{
l
.
add
(
it
.
getEndLine
());
}
}
if
(
l
.
size
()
==
0
)
{
for
(
int
i
=
0
;
i
<
numPrograms
;
++
i
)
{
l
.
add
(
list_programInput
.
get
(
i
).
getText
().
split
(
"\n"
).
length
);
...
...
@@ -664,9 +673,11 @@ public class DebugControl {
*/
public
List
<
Integer
>
getCBScopeBegin
(
int
expressionID
)
{
List
<
Integer
>
l
=
new
ArrayList
<
Integer
>();
if
(
list_condBreakpoints
.
get
(
expressionID
)!=
null
)
{
for
(
ScopeTuple
it
:
list_condBreakpoints
.
get
(
expressionID
).
getScopes
())
{
l
.
add
(
it
.
getStartLine
());
}
}
if
(
l
.
size
()
==
0
)
{
for
(
int
i
=
0
;
i
<
numPrograms
;
++
i
)
{
l
.
add
(
1
);
...
...
@@ -685,9 +696,11 @@ public class DebugControl {
*/
public
List
<
Integer
>
getCBScopeEnd
(
int
expressionID
)
{
List
<
Integer
>
l
=
new
ArrayList
<
Integer
>();
if
(
list_condBreakpoints
.
get
(
expressionID
)!=
null
)
{
for
(
ScopeTuple
it
:
list_condBreakpoints
.
get
(
expressionID
).
getScopes
())
{
l
.
add
(
it
.
getEndLine
());
}
}
if
(
l
.
size
()
==
0
)
{
for
(
int
i
=
0
;
i
<
numPrograms
;
++
i
)
{
l
.
add
(
list_programInput
.
get
(
i
).
getText
().
split
(
"\n"
).
length
);
...
...
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