Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Project properties are now automatically saved whenever a property ch…
…anges making its use less error prone.
- Loading branch information
Showing
9 changed files
with
78 additions
and
46 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
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
17 changes: 17 additions & 0 deletions
17
src/org/netbeans/gradle/project/properties/AbstractProjectProperties.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,17 @@ | ||
package org.netbeans.gradle.project.properties; | ||
|
||
import java.nio.charset.Charset; | ||
import java.util.Arrays; | ||
import java.util.Collection; | ||
|
||
public abstract class AbstractProjectProperties implements ProjectProperties { | ||
public static final Charset DEFAULT_SOURCE_ENCODING = Charset.forName("UTF-8"); | ||
|
||
@Override | ||
public final Collection<MutableProperty<?>> getAllProperties() { | ||
return Arrays.<MutableProperty<?>>asList( | ||
getPlatform(), | ||
getSourceEncoding(), | ||
getSourceLevel()); | ||
} | ||
} |
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
3 changes: 3 additions & 0 deletions
3
src/org/netbeans/gradle/project/properties/ProjectProperties.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 |
---|---|---|
@@ -1,10 +1,13 @@ | ||
package org.netbeans.gradle.project.properties; | ||
|
||
import java.nio.charset.Charset; | ||
import java.util.Collection; | ||
import org.netbeans.api.java.platform.JavaPlatform; | ||
|
||
public interface ProjectProperties { | ||
public MutableProperty<String> getSourceLevel(); | ||
public MutableProperty<JavaPlatform> getPlatform(); | ||
public MutableProperty<Charset> getSourceEncoding(); | ||
|
||
public Collection<MutableProperty<?>> getAllProperties(); | ||
} |
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