Questions tagged [generated-code]
231 questions
2
votes
1 answer
Xamarin Resource.Designer.cs generating const instead of static
I have on .NET 6 project using xamarin.android where the resource designer file generated with an error CS0131 : The left-hand side of an assignment must be a variable, property or indexer:
public static void UpdateIdValues()
{
…

Youness Kafia
- 173
- 1
- 5
2
votes
2 answers
When I open a querydsl JPA project with vscode, vscode has many cannot be resolved errors
When I open a querydsl JPA project with vscode, vscode has many cannot be resolved errors:
The import com.**.QRoutePayload cannot be resolved
When I open it with IDEA, it's all right.
Why do I get this errors in vscode and how can I fix it?

tmaolin
- 21
- 1
2
votes
0 answers
VS2022 CS8785 'CodeBehindGenerator' failed to generate MauiXaml
I work on a MAUI project on Visual Studio 2022 preview 3.
At compile time, I get the following warning:
CS8785 'CodeBehindGenerator' failed to generate MauiXaml
Then the code behind is not generated, so the project doesn't compile.
The generate…

sinsedrix
- 4,336
- 4
- 29
- 53
2
votes
1 answer
How to refer to generated source files?
How do I refer to files generated by a sourceGenerators sbt task? I know that the source file is deposited to target/scala-/src_managed/path/to/File.Scala but I don't know how to reference it in my project. Any ideas?
/server
/app
…

franklin
- 1,800
- 7
- 32
- 59
2
votes
1 answer
How can I stop Maven from regenerating something if the generation-source has not changed?
I want maven to skip generation of something (source, XML, XSDs - you name it - ) if the source of that thing has not changed.
Something like - IF the all files in src/main/x are younger than all files in target/generated-sources - THEN skip…

Inquisitor Shm
- 1,433
- 5
- 17
- 26
2
votes
0 answers
Using generated builders of inherited classes when the builders themselves don't inherit
The automapper I'm using, AutoMatter, allows inheritance, e.g.
@AutoMatter
public interface BaseClass {
Foo foo();
Bar bar();
}
@AutoMatter
public interface DerivedClass extends BaseClass {
Baz baz();
}
but its generated builders are not…

Andrew Cheong
- 29,362
- 15
- 90
- 145
2
votes
2 answers
How can I make JAXB-generated classes participate in a Visitor pattern?
Hey folks, hopefully a nice easy one here.
I'm generating classes with JAXB from a schema, and I'd like to be able to process them with a Visitor pattern.
To do that, I think I need every JAXB-generated class to implement the interface I've defined,…

brabster
- 42,504
- 27
- 146
- 186
2
votes
2 answers
CMake: generate and compile architecture-specific source files in XCode
I have a CMake project that's used to generate an iOS-targeted XCode project that supports multiple CPU architectures (arm64 and armv7).
My CMake project includes some commands (defined with add_custom_command) that convert Lua scripts into C++…

Dominic Dos Santos
- 2,623
- 2
- 18
- 30
2
votes
2 answers
Code not generating new number for every roulette spin
How do i get my program to create a new random number every time the user makes a new bet, currently it will only produce the number black 2 every time i run it. Also odd generated numbers have to be red and even black.
import random
def…

marty_mcfly
- 51
- 4
2
votes
1 answer
check if an expression is a custom type using "go/parser"
Situation
writing a code generator that checks fields of a struct and add validation functions using struct tags
Problem
Here I need to check if the type field is a custom type or not
ie,
Following are not custom types
int,…

Sarath Sadasivan Pillai
- 6,737
- 29
- 42
2
votes
1 answer
WCF service reference stopped generating code for one project
I have references to two different WCF services in a project. I updated the reference for one of the services, and now no code is generated for it. The references.cs file just has the "this is genrated code" comment at the top. Updating that same…

Mike Pateras
- 14,715
- 30
- 97
- 137
2
votes
1 answer
How can I change the visibility of setter method by Intellij code generator?
In my code generator, I saw the default visibility is public, so all methods generated is public, although I customized myself template of setter.
enter image description here
My template:
enter image description here
Now, I need public getter and…

MapleTree
- 41
- 7
2
votes
0 answers
QtChartView missing namespace in the generated UI file
I am working on visual c++ with the Qt Framework.
I am trying to add a QChartView in a project. I added the included paths and the files to link.
When I try to make compilation, I have a lot of syntaxe error in my code. These come from the fact that…

awawa
- 21
- 2
2
votes
2 answers
How to recognize a generated .class file programatically?
I am developing an application that analyzes Java applications (Windup).
I'd like to be able to recognize programatically if a .class file was generated instead of written by a programmer and compiled.
As a human, I can tell because the decompiled…

Ondra Žižka
- 43,948
- 41
- 217
- 277
2
votes
1 answer
Force macro definition in C-code generated with SImulink
I am building a Simulink model in order it generates the C-code equivalent. Actually, the C-code doing that already exists but I want to visualize it with Simulink. I know that the code Simulink will generate will not be the same than the one it is…

soso_eeckhout
- 31
- 3