Skip to content

Commit

Permalink
RED-1156 (github #221) nested executables coloring
Browse files Browse the repository at this point in the history
- review fixes
  • Loading branch information
michalanglart authored and KrzysztofJozefowicz committed Aug 22, 2018
1 parent 353eb9e commit 480ba3a
Show file tree
Hide file tree
Showing 20 changed files with 28 additions and 28 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2016 Nokia Solutions and Networks
* Copyright 2018 Nokia Solutions and Networks
* Licensed under the Apache License, Version 2.0,
* see license.txt file for details.
*/
Expand Down Expand Up @@ -32,13 +32,13 @@

public class JoinTemplateNameFixer extends RedSuiteMarkerResolution {

// Removes Test Timeout message:
// Joins Test Template keyword written in multiple cells:
// *** Settings ***
// Test Timeout 2 min my custom message
// Test Template key word
//
// ->
// *** Settings ***
// Metadata key val
// Test Template key word

@Override
public String getLabel() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2015 Nokia Solutions and Networks
* Copyright 2018 Nokia Solutions and Networks
* Licensed under the Apache License, Version 2.0,
* see license.txt file for details.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2015 Nokia Solutions and Networks
* Copyright 2018 Nokia Solutions and Networks
* Licensed under the Apache License, Version 2.0,
* see license.txt file for details.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2015 Nokia Solutions and Networks
* Copyright 2018 Nokia Solutions and Networks
* Licensed under the Apache License, Version 2.0,
* see license.txt file for details.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2015 Nokia Solutions and Networks
* Copyright 2018 Nokia Solutions and Networks
* Licensed under the Apache License, Version 2.0,
* see license.txt file for details.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2015 Nokia Solutions and Networks
* Copyright 2018 Nokia Solutions and Networks
* Licensed under the Apache License, Version 2.0,
* see license.txt file for details.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2015 Nokia Solutions and Networks
* Copyright 2018 Nokia Solutions and Networks
* Licensed under the Apache License, Version 2.0,
* see license.txt file for details.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ public boolean checkIfCanBeMapped(final RobotFileOutput robotFileOutput, final R
if (currentState == ParsingState.KEYWORD_SETTING_TIMEOUT) {
final List<UserKeyword> keywords = robotFileOutput.getFileModel().getKeywordTable().getKeywords();
final List<KeywordTimeout> keywordTimeouts = keywords.get(keywords.size() - 1).getTimeouts();
return checkIfHasAlreadyValue(keywordTimeouts);
return hasValueAlready(keywordTimeouts);
}
return currentState == ParsingState.KEYWORD_SETTING_TIMEOUT_VALUE
|| currentState == ParsingState.KEYWORD_SETTING_TIMEOUT_MESSAGE_ARGUMENTS;
}

private boolean checkIfHasAlreadyValue(final List<KeywordTimeout> keywordTimeouts) {
private boolean hasValueAlready(final List<KeywordTimeout> keywordTimeouts) {
return !keywordTimeouts.isEmpty() && keywordTimeouts.get(keywordTimeouts.size() - 1).getTimeout() != null;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ public boolean checkIfCanBeMapped(final RobotFileOutput robotFileOutput, final R
if (utility.getCurrentStatus(processingState) == ParsingState.KEYWORD_SETTING_TIMEOUT) {
final List<UserKeyword> keywords = robotFileOutput.getFileModel().getKeywordTable().getKeywords();
final List<KeywordTimeout> timeouts = keywords.get(keywords.size() - 1).getTimeouts();
return !checkIfHasAlreadyValue(timeouts);
return !hasValueAlready(timeouts);
}
return false;
}

private boolean checkIfHasAlreadyValue(final List<KeywordTimeout> keywordTimeouts) {
private boolean hasValueAlready(final List<KeywordTimeout> keywordTimeouts) {
return !keywordTimeouts.isEmpty() && keywordTimeouts.get(keywordTimeouts.size() - 1).getTimeout() != null;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2015 Nokia Solutions and Networks
* Copyright 2018 Nokia Solutions and Networks
* Licensed under the Apache License, Version 2.0,
* see license.txt file for details.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2015 Nokia Solutions and Networks
* Copyright 2018 Nokia Solutions and Networks
* Licensed under the Apache License, Version 2.0,
* see license.txt file for details.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2015 Nokia Solutions and Networks
* Copyright 2018 Nokia Solutions and Networks
* Licensed under the Apache License, Version 2.0,
* see license.txt file for details.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2015 Nokia Solutions and Networks
* Copyright 2018 Nokia Solutions and Networks
* Licensed under the Apache License, Version 2.0,
* see license.txt file for details.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ public boolean checkIfCanBeMapped(final RobotFileOutput robotFileOutput, final R
if (stateHelper.getCurrentStatus(processingState) == ParsingState.TEST_CASE_SETTING_TEST_TEMPLATE) {
final List<TestCase> tests = robotFileOutput.getFileModel().getTestCaseTable().getTestCases();
final List<TestCaseTemplate> templates = tests.get(tests.size() - 1).getTemplates();
return !checkIfHasAlreadyKeywordName(templates);
return !hasKeywordNameAlready(templates);
}
return false;
}

private boolean checkIfHasAlreadyKeywordName(final List<TestCaseTemplate> templates) {
private boolean hasKeywordNameAlready(final List<TestCaseTemplate> templates) {
return !templates.isEmpty() && templates.get(templates.size() - 1).getKeywordName() != null;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2015 Nokia Solutions and Networks
* Copyright 2018 Nokia Solutions and Networks
* Licensed under the Apache License, Version 2.0,
* see license.txt file for details.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2015 Nokia Solutions and Networks
* Copyright 2018 Nokia Solutions and Networks
* Licensed under the Apache License, Version 2.0,
* see license.txt file for details.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ public boolean checkIfCanBeMapped(final RobotFileOutput robotFileOutput, final R
if (currentState == ParsingState.TEST_CASE_SETTING_TEST_TIMEOUT) {
final List<TestCase> testCases = robotFileOutput.getFileModel().getTestCaseTable().getTestCases();
final List<TestCaseTimeout> timeouts = testCases.get(testCases.size() - 1).getTimeouts();
return checkIfHasAlreadyValue(timeouts);
return hasValueAlready(timeouts);
}
return currentState == ParsingState.TEST_CASE_SETTING_TEST_TIMEOUT_VALUE
|| currentState == ParsingState.TEST_CASE_SETTING_TEST_TIMEOUT_MESSAGE_ARGUMENTS;
}

private boolean checkIfHasAlreadyValue(final List<TestCaseTimeout> testCaseTimeouts) {
private boolean hasValueAlready(final List<TestCaseTimeout> testCaseTimeouts) {
return !testCaseTimeouts.isEmpty() && testCaseTimeouts.get(testCaseTimeouts.size() - 1).getTimeout() != null;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ public boolean checkIfCanBeMapped(final RobotFileOutput robotFileOutput, final R
if (utility.getCurrentStatus(processingState) == ParsingState.TEST_CASE_SETTING_TEST_TIMEOUT) {
final List<TestCase> tests = robotFileOutput.getFileModel().getTestCaseTable().getTestCases();
final List<TestCaseTimeout> timeouts = tests.get(tests.size() - 1).getTimeouts();
return !checkIfHasAlreadyValue(timeouts);
return !hasValueAlready(timeouts);
}
return false;
}

private boolean checkIfHasAlreadyValue(final List<TestCaseTimeout> testCaseTimeouts) {
private boolean hasValueAlready(final List<TestCaseTimeout> testCaseTimeouts) {
return !testCaseTimeouts.isEmpty() && testCaseTimeouts.get(testCaseTimeouts.size() - 1).getTimeout() != null;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2016 Nokia Solutions and Networks
* Copyright 2018 Nokia Solutions and Networks
* Licensed under the Apache License, Version 2.0,
* see license.txt file for details.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2016 Nokia Solutions and Networks
* Copyright 2018 Nokia Solutions and Networks
* Licensed under the Apache License, Version 2.0,
* see license.txt file for details.
*/
Expand Down

0 comments on commit 480ba3a

Please sign in to comment.