### Java Singleton Class Example
Source: https://docs.ganttproject.biz/development
This snippet demonstrates the recommended Java code style for GanttProject, including copyright headers, indentation, K&R parentheses, and member variable prefixes.
```java
public class Singleton {
public static int DEFAULT_VALUE = 42;
private static Singleton ourInstance;
private int myValue;
Singleton() {
myValue = Singleton.DEFAULT_VALUE;
}
public void setValue(int value) {
myValue = value;
}
public void getValueMultipliedByTheFirstArgumentAndAddedToTheSecond(
int multiplier, int increment) {
return myValue * multiplier + increment;
}
}
```
--------------------------------
### Java Singleton Class Example
Source: https://docs.ganttproject.biz/development/index.html
This snippet demonstrates adherence to GanttProject's Java coding style, including copyright headers, indentation, K&R parentheses, and member variable prefixes.
```java
public class Singleton {
public static int DEFAULT_VALUE = 42;
private static Singleton ourInstance;
private int myValue;
Singleton() {
myValue = Singleton.DEFAULT_VALUE;
}
public void setValue(int value) {
myValue = value;
}
public void getValueMultipliedByTheFirstArgumentAndAddedToTheSecond(
int multiplier, int increment) {
return myValue * multiplier + increment;
}
}
```
--------------------------------
### Build binary distribution with Gradle
Source: https://docs.ganttproject.biz/development/build-pilsen
Navigate to the builder directory and execute the Gradle tasks to compile the project.
```bash
cd /tmp/ganttproject/ganttproject-builder
gradle updateLibs distBin
```
--------------------------------
### Run GanttProject from Distribution
Source: https://docs.ganttproject.biz/development/build
Navigate to the distribution directory and use this command to run the built GanttProject application.
```bash
cd /tmp/ganttproject/ganttproject-builder/dist-bin
./ganttproject
```
--------------------------------
### Build and Run GanttProject with Gradle
Source: https://docs.ganttproject.biz/development/build
This Gradle command builds the distribution and immediately launches GanttProject. It's a convenient way to run the application after building.
```bash
./gradlew runApp
```
--------------------------------
### Initialize Git Submodules
Source: https://docs.ganttproject.biz/development/build
After cloning, navigate to the project directory and run this command to pull necessary submodules.
```bash
cd /tmp/ganttproject/
git submodule update --init
```
--------------------------------
### Run the built distribution
Source: https://docs.ganttproject.biz/development/build-pilsen
Execute the generated script to launch the application after a successful build.
```bash
cd /tmp/ganttproject/ganttproject-builder/dist-bin
./ganttproject
```
--------------------------------
### Build Code and Run Tests with Gradle
Source: https://docs.ganttproject.biz/development/build
Use this command if you only need to compile the code and run tests without creating a full distribution. It's useful for development and verification.
```bash
./gradlew build
```
--------------------------------
### Build GanttProject Binary Distribution
Source: https://docs.ganttproject.biz/development/build
Execute this Gradle command to build a distributable binary version of GanttProject. The output will be in the ganttproject-builder/dist-bin directory.
```bash
cd /tmp/ganttproject/
./gradlew distbin
```
--------------------------------
### Clone GanttProject repository
Source: https://docs.ganttproject.biz/development/build-pilsen
Use Git to download the source code from the official GitHub repository.
```bash
git clone https://github.com/bardsoftware/ganttproject.git
```
--------------------------------
### Add Copyright Header to New Files
Source: https://docs.ganttproject.biz/development/index.html
Include this license header at the top of every new file created for the GanttProject repository.
```text
/*
Copyright 2020 YOUR_REAL_NAME_HERE, BarD Software s.r.o
This file is part of GanttProject, an opensource project management tool.
GanttProject is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
GanttProject is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GanttProject. If not, see .
*/
```
--------------------------------
### GanttProject File Header
Source: https://docs.ganttproject.biz/development
Include this snippet in the header of all new files to comply with copyright and licensing terms. It specifies the project, copyright holder, and the GNU General Public License v3 or later.
```text
/*
Copyright 2020 YOUR_REAL_NAME_HERE, BarD Software s.r.o
This file is part of GanttProject, an opensource project management tool.
GanttProject is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
GanttProject is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GanttProject. If not, see .
*/
```
--------------------------------
### Calculated Column Value Expression
Source: https://docs.ganttproject.biz/user/calculated-columns
Defines the schema and usage for creating calculated columns in GanttProject 3.3+.
```APIDOC
## Calculated Column Expression
### Description
Calculated columns are task properties derived from other task attributes using SQL expressions. These expressions are evaluated by the H2 database engine.
### Available Task Properties
- **uid** (text) - Immutable long task identifier.
- **id** (int) - Task number unique to the project.
- **name** (text) - Task name.
- **color** (text) - RGB color in CSS format.
- **is_milestone** (boolean) - Milestone flag.
- **is_project_task** (boolean) - Project task flag.
- **start_date** (date) - Task start date.
- **end_date** (date) - Task end date.
- **duration** (int) - Duration in days.
- **completion** (int) - Completion percentage [0-100].
- **earliest_start_date** (date) - Earliest start date.
- **priority** (text) - Priority value {'0', '1', '2', '3', '4'}.
- **web_link** (text) - Task web link.
- **cost_manual_value** (decimal) - Explicitly set cost.
- **is_cost_calculated** (boolean) - Cost calculation flag.
- **notes** (text) - Task notes.
- **cost** (decimal) - Final cost value.
### Usage Notes
- Use standard SQL operations supported by H2.
- Equality operator is `=`.
- String concatenation operator is `||`.
```
=== COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.