-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
JNG-4837 debugPrint as boolean (#97)
* JNG-4837 debugPrint as boolean * JNG-4837 Remove unneccessary method parameter
- Loading branch information
1 parent
08928d0
commit 125d420
Showing
38 changed files
with
161 additions
and
114 deletions.
There are no files selected for viewing
47 changes: 47 additions & 0 deletions
47
judo-ui-react/src/main/java/hu/blackbelt/judo/ui/generator/react/StoredVariableHelper.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 |
---|---|---|
@@ -0,0 +1,47 @@ | ||
package hu.blackbelt.judo.ui.generator.react; | ||
|
||
/*- | ||
* #%L | ||
* JUDO UI React Frontend Generator | ||
* %% | ||
* Copyright (C) 2018 - 2023 BlackBelt Technology | ||
* %% | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License 2.0 which is available at | ||
* http://www.eclipse.org/legal/epl-2.0. | ||
* | ||
* This Source Code may also be made available under the following Secondary | ||
* Licenses when the conditions for such availability set forth in the Eclipse | ||
* Public License, v. 2.0 are satisfied: GNU General Public License, version 2 | ||
* with the GNU Classpath Exception which is | ||
* available at https://www.gnu.org/software/classpath/license.html. | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 | ||
* #L% | ||
*/ | ||
|
||
import hu.blackbelt.judo.generator.commons.StaticMethodValueResolver; | ||
import hu.blackbelt.judo.generator.commons.ThreadLocalContextHolder; | ||
import hu.blackbelt.judo.generator.commons.annotations.ContextAccessor; | ||
import hu.blackbelt.judo.generator.commons.annotations.TemplateHelper; | ||
|
||
import java.util.Map; | ||
|
||
/** | ||
* The handlebars context inaccessible in helpers / value resolvers | ||
* because there is no state for them. The ThreadLocal is used | ||
* to init variable values from template execution. | ||
*/ | ||
@TemplateHelper | ||
@ContextAccessor | ||
public class StoredVariableHelper extends StaticMethodValueResolver { | ||
|
||
public static void bindContext(Map<String, ?> context) { | ||
ThreadLocalContextHolder.bindContext(context); | ||
} | ||
|
||
public static synchronized Boolean isDebugPrint() { | ||
return Boolean.parseBoolean((String) ThreadLocalContextHolder.getVariable("debugPrint")); | ||
} | ||
|
||
} |
2 changes: 1 addition & 1 deletion
2
judo-ui-react/src/main/resources/actor/src/fragments/link/hook-variables.fragment.hbs
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,6 +1,6 @@ | ||
const {{ link.dataElement.name }}SortModel: GridSortModel = {{{ getDefaultSortParamsForLink link }}}; | ||
|
||
{{# unless link.dataElement.isReadOnly }} | ||
{{# if debugPrint }}// include: actor/src/fragments/relation/hook-variables.fragment.hbs{{/ if }} | ||
{{# if isDebugPrint }}// include: actor/src/fragments/relation/hook-variables.fragment.hbs{{/ if }} | ||
{{> actor/src/fragments/relation/hook-variables.fragment.hbs rel=link }} | ||
{{/ unless }} |
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
2 changes: 1 addition & 1 deletion
2
judo-ui-react/src/main/resources/actor/src/fragments/table/hook-variables.fragment.hbs
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,4 +1,4 @@ | ||
const {{ table.dataElement.name }}SortModel: GridSortModel = {{{ getDefaultSortParamsForTable table }}}; | ||
|
||
{{# if debugPrint }}// include: actor/src/fragments/relation/hook-variables.fragment.hbs{{/ if }} | ||
{{# if isDebugPrint }}// include: actor/src/fragments/relation/hook-variables.fragment.hbs{{/ if }} | ||
{{> actor/src/fragments/relation/hook-variables.fragment.hbs rel=table }} |
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
24 changes: 12 additions & 12 deletions
24
judo-ui-react/src/main/resources/actor/src/pages/actions/action.tsx.hbs
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
2 changes: 1 addition & 1 deletion
2
...actor/src/pages/actions/action/call-operation-action/output-view/components/table.tsx.hbs
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
Oops, something went wrong.