-
Notifications
You must be signed in to change notification settings - Fork 302
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1648 from bardsoftware/prj-4-gpcloud-browser
New project file UI
- Loading branch information
Showing
116 changed files
with
7,865 additions
and
3,942 deletions.
There are no files selected for viewing
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,5 @@ | ||
language: java | ||
jdk: openjdk11 | ||
script: ./ganttproject-builder/build-travis.sh | ||
branches: | ||
only: | ||
|
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,23 @@ | ||
# Gradle | ||
# Build your Java project and run tests with Gradle using a Gradle wrapper script. | ||
# Add steps that analyze code, save build artifacts, deploy, and more: | ||
# https://docs.microsoft.com/azure/devops/pipelines/languages/java | ||
|
||
trigger: | ||
- prj-4-gpcloud-browser | ||
|
||
pool: | ||
vmImage: 'Ubuntu-16.04' | ||
|
||
steps: | ||
- task: Gradle@2 | ||
inputs: | ||
workingDirectory: '' | ||
gradleWrapperFile: 'gradlew' | ||
gradleOptions: '-Xmx3072m' | ||
javaHomeOption: 'JDKVersion' | ||
jdkVersionOption: '1.11' | ||
jdkArchitectureOption: 'x64' | ||
publishJUnitResults: true | ||
testResultsFiles: '**/TEST-*.xml' | ||
tasks: 'build' |
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
81 changes: 81 additions & 0 deletions
81
biz.ganttproject.core/src/biz/ganttproject/core/option/KeyValueOption.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,81 @@ | ||
/* | ||
Copyright 2018 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 <http://www.gnu.org/licenses/>. | ||
*/ | ||
package biz.ganttproject.core.option; | ||
|
||
import com.google.common.base.Function; | ||
import com.google.common.base.Joiner; | ||
import com.google.common.collect.ImmutableMap; | ||
import com.google.common.collect.Iterables; | ||
import com.google.common.collect.Maps; | ||
|
||
import java.util.Map; | ||
|
||
/** | ||
* @author dbarashev@bardsoftware.com | ||
*/ | ||
public abstract class KeyValueOption extends GPAbstractOption<Map.Entry<String, String>> implements ListOption<Map.Entry<String, String>> { | ||
private static final Function<Map.Entry<String, String>, String> ENTRY_TO_KEY_VALUE = new Function<Map.Entry<String, String>, String>() { | ||
@Override | ||
public String apply(Map.Entry<String, String> entry) { | ||
return String.format("%s = %s", entry.getKey(), entry.getValue()); | ||
} | ||
}; | ||
private Map<String, String> myMap = Maps.newHashMap(); | ||
|
||
public KeyValueOption(String id) { | ||
super(id); | ||
} | ||
|
||
@Override | ||
public String getPersistentValue() { | ||
return "\n" + Joiner.on('\n').join(Iterables.transform(getValues(), ENTRY_TO_KEY_VALUE)) + "\n"; | ||
} | ||
|
||
@Override | ||
public void loadPersistentValue(String value) { | ||
myMap.clear(); | ||
for (String line : value.split("\n")) { | ||
String[] keyValue = line.split("="); | ||
if (keyValue.length < 2) { | ||
continue; | ||
} | ||
myMap.put(keyValue[0].trim(), keyValue[1].trim()); | ||
} | ||
fireChangeValueEvent(new ChangeValueEvent(getID(), null, null, this)); | ||
} | ||
|
||
@Override | ||
public void setValues(Iterable<Map.Entry<String, String>> values) { | ||
Map oldValue = Maps.newHashMap(myMap); | ||
myMap.clear(); | ||
for (Map.Entry<String, String> e : values) { | ||
myMap.put(e.getKey(), e.getValue()); | ||
} | ||
fireChangeValueEvent(new ChangeValueEvent(getID(), oldValue, myMap, this)); | ||
} | ||
|
||
@Override | ||
public Iterable<Map.Entry<String, String>> getValues() { | ||
return myMap.entrySet(); | ||
} | ||
|
||
public Map<String, String> getKeyValueMap() { | ||
return ImmutableMap.copyOf(myMap); | ||
} | ||
} |
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
Binary file not shown.
Binary file not shown.
Binary file not shown.
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,31 +1,25 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<plugin | ||
id="biz.ganttproject.impex.ical" | ||
name="GanttProject ICal import/export" | ||
version="2.8.4" | ||
provider-name=""> | ||
id="biz.ganttproject.impex.ical" | ||
name="GanttProject ICal import/export" | ||
version="2.8.4" | ||
provider-name=""> | ||
|
||
<runtime> | ||
<library name="biz.ganttproject.impex.ical.jar"> | ||
<export name="*"/> | ||
</library> | ||
<library name="lib/backport-util-concurrent-3.1.jar"> | ||
<export name="*"/> | ||
</library> | ||
<library name="lib/commons-lang-2.6.jar"> | ||
<export name="*"/> | ||
</library> | ||
<library name="lib/ical4j-1.0.3.jar"> | ||
<export name="*"/> | ||
</library> | ||
</runtime> | ||
<requires> | ||
<import plugin="biz.ganttproject.core"/> | ||
<import plugin="org.eclipse.core.runtime"/> | ||
<import plugin="net.sourceforge.ganttproject"/> | ||
</requires> | ||
<extension | ||
point="net.sourceforge.ganttproject.importer"> | ||
<importer class="biz.ganttproject.impex.ical.IcsFileImporter"/> | ||
</extension> | ||
<runtime> | ||
<library name="biz.ganttproject.impex.ical.jar"> | ||
<export name="*"/> | ||
</library> | ||
<library name="lib/*"> | ||
<export name="*"/> | ||
</library> | ||
</runtime> | ||
<requires> | ||
<import plugin="biz.ganttproject.core"/> | ||
<import plugin="org.eclipse.core.runtime"/> | ||
<import plugin="net.sourceforge.ganttproject"/> | ||
</requires> | ||
<extension | ||
point="net.sourceforge.ganttproject.importer"> | ||
<importer class="biz.ganttproject.impex.ical.IcsFileImporter"/> | ||
</extension> | ||
</plugin> |
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
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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
Oops, something went wrong.